Re:Google developing own CPUs for Chromebook laptops
by mancerayder on Saturday October 02, 2021 @03:51PM
(#28731468)
I'm asking out of naiveté here -- how were they (kernel maintainers) able to get the Linux kernel to support M1 with undocumented instructions?
[ Parent
| on HN ]
Re:Google developing own CPUs for Chromebook laptops
by ducktective on Saturday October 02, 2021 @04:27PM
(#28731797)
My guess: if the situation is similar to Windows laptops, they just use a subset of OEM features and provide a sub-par experience (like lack of battery usage optimizations, flaky suspend/hibernate, second-tier graphics support, etc)
Now, I'm typing this on a GNU/Linux machine, but let's face it, all of the nuisances I mentioned are legit and constant source of problems in tech support forums.
Re:Google developing own CPUs for Chromebook laptops
by frabert on Saturday October 02, 2021 @04:01PM
(#28731571)
A kernel doesn't need to use all the instructions a CPU offers -- only the ones it needs.
Re:Google developing own CPUs for Chromebook laptops
by ithkuil on Saturday October 02, 2021 @04:43PM
(#28731910)
If the extra instructions also operate in extra state (e.g. extra registers) a kernel needs to know about their existence so it can correctly save and restore state on context switches
Re:Google developing own CPUs for Chromebook laptops
by my123 on Saturday October 02, 2021 @04:56PM
(#28732004)
Not necessarily/really, the custom extensions still need to be enabled by the kernel before they can be used.
As such, it isn’t actually an issue.
Re:Google developing own CPUs for Chromebook laptops
by ndesaulniers on Saturday October 02, 2021 @09:18PM
(#28733713)
You're confusing MSRs (which don't have to be saved/restored on context switch) with GPRs (which do).
Re:Google developing own CPUs for Chromebook laptops
by ithkuil on Sunday October 03, 2021 @08:16AM
(#28736584)
Well if there is a truly undocumented extension, how do I know it doesn't come with it's own registers (e.g. like a floating point unit does)
Re:Google developing own CPUs for Chromebook laptops
by saagarjha on Saturday October 02, 2021 @09:58PM
(#28733900)
Apple reserves certain MSRs that apply on a per-process basis, and thus must be applied on context switch.
Re:Google developing own CPUs for Chromebook laptops
by Someone on Saturday October 02, 2021 @06:13PM
(#28732585)
It doesn’t need to use them, but it must be aware of them, insofar as they may introduce security problems.
As an example, if the kernel doesn’t know of DMA channels, and it requires setup code to prevent user-level code from using them to copy across process boundaries, the kernel will run fine, but have glaring security problems.
Re:Google developing own CPUs for Chromebook laptops
by surajrmal on Saturday October 02, 2021 @06:53PM
(#28732832)
What dma channels doesn't require mapping registers into the user space process to work? There aren't usually magic instructions you have to opt into disabling as far as I know.
Re:Google developing own CPUs for Chromebook laptops
by im3w1l on Saturday October 02, 2021 @07:01PM
(#28732896)
Those are not security problems, they are insecurity features readjusts tinfoil.
Re:Google developing own CPUs for Chromebook laptops
by heavyset_go on Saturday October 02, 2021 @04:03PM
(#28731578)
I'm assuming they aren't using them or they've reverse engineered the ones they need to use.
Re:Google developing own CPUs for Chromebook laptops
by R0b0t1 on Saturday October 02, 2021 @03:57PM
(#28731526)
Don't use them. The instructions necessary to run Linux are likely inherited from the normal ARM set.
Re:Google developing own CPUs for Chromebook laptops
by kevingadd on Saturday October 02, 2021 @03:56PM
(#28731512)
The undocumented instructions aren't required in order to use the hardware