Linux x86/x86_64 Will Now Always Reserve The First 1MB Of RAM - Phoronix:
The Linux x86/x86_64 kernel code already had logic in place for reserving portions of the first 1MB of RAM to avoid the BIOS or kernel potentially clobbering that space among other reasons while now Linux 5.13 is doing away with that "wankery" and will just unconditionally always reserve the first 1MB of RAM.
[...] The motivation now for Linux 5.13 in getting that 1MB unconditional reservation in place for Linux x86/x86_64 stems from a bug report around an AMD Ryzen system being unbootable on Linux 5.13 since the change to consolidate their early memory reservations handling. Just unconditionally doing the first 1MB makes things much simpler to handle.
The change was sent in this morning as part of x86/urgent. "Do away with all the wankery of reserving X amount of memory in the first megabyte to prevent BIOS corrupting it and simply and unconditionally reserve the whole first megabyte."
no more wankery
(Score: 3, Interesting) by maxwell demon on Monday June 07 2021, @11:03AM (2 children)
Is that memory still mapped in /dev/mem? If so, it sounds like you could store arbitrary data there without the kernel or any process ever touching it (unless that process also accesses /dev/mem directly). Probably not useful, but an interesting thought anyway.
The Tao of math: The numbers you can count are not the real numbers.
(Score: 1, Informative) by Anonymous Coward on Tuesday June 08 2021, @07:50AM (1 child)
That depends on whether CONFIG_STRICT_DEVMEM is enabled or not. If it is, then it would not be accessible that way. Even if it was disabled, storing arbitrary data there is not a good idea. The data there is routinely read and overwritten and it can be very difficult to tell in advance what part of that area is safe on which hardware. Hence why they are just reserving the whole block instead of trying to keep some sort of table halfway accurate based solely on the bug reports they receive. It is widely believed that Microsoft doesn't even try and a number of other operating systems don't either.
(Score: 0) by Anonymous Coward on Tuesday June 08 2021, @09:49PM
Look at what landed in my inbox: https://lore.kernel.org/lkml/YL%2FTc1bGkgXKRKfT@zn.tnic/ [kernel.org]