On 5/7/20 10:51 AM, Kees Cook wrote: > On Wed, May 06, 2020 at 05:41:47PM -0700, Anthony Yznaga wrote: >> Avoid regions of memory that contain preserved pages when computing >> slots used to select where to put the decompressed kernel. > This is changing the slot-walking code instead of updating > mem_avoid_overlap() -- that's where the check for a "reserved" memory > area should live. > > For example, this is how both mem_avoid_memmap() and the setup_data > memory areas are handled. > > Is there a reason mem_avoid_overlap() can't be used here? > I was thinking it would be more efficient to process just the regions that did not contain preserved pages rather than checking for preserved pages in mem_avoid_overlap(), but I see that may just be adding unnecessary complexity. I'll investigate modifying mem_avoid_overlap(). Thank you for the comments! Anthony
- [RFC 02/43] mm: PKRAM: implement node load and save functio... Anthony Yznaga
- [RFC 14/43] mm: memblock: PKRAM: prevent memblock resize fr... Anthony Yznaga
- [RFC 24/43] mm: shmem: prevent swapping of PKRAM-enabled tm... Anthony Yznaga
- [RFC 08/43] mm: PKRAM: introduce super block Anthony Yznaga
- [RFC 25/43] mm: shmem: specify the mm to use when inserting... Anthony Yznaga
- [RFC 20/43] PKRAM: disable feature when running the kdump k... Anthony Yznaga
- [RFC 11/43] PKRAM: pass the preserved pages pagetable to th... Anthony Yznaga
- [RFC 09/43] PKRAM: build a physical mapping pagetable of pa... Anthony Yznaga
- [RFC 21/43] x86/KASLR: PKRAM: support physical kaslr Anthony Yznaga
- Re: [RFC 21/43] x86/KASLR: PKRAM: support physical kas... Kees Cook
- Re: [RFC 21/43] x86/KASLR: PKRAM: support physical... Anthony Yznaga
- [RFC 18/43] kexec: PKRAM: avoid clobbering already preserve... Anthony Yznaga
- [RFC 01/43] mm: add PKRAM API stubs and Kconfig Anthony Yznaga
- [RFC 22/43] mm: shmem: introduce shmem_insert_page Anthony Yznaga
- [RFC 32/43] shmem: PKRAM: preserve shmem files a chunk at a... Anthony Yznaga
- [RFC 28/43] PKRAM: ensure memblocks with preserved pages in... Anthony Yznaga
- [RFC 30/43] memblock: add for_each_reserved_mem_range() Anthony Yznaga
- [RFC 03/43] mm: PKRAM: implement object load and save funct... Anthony Yznaga
- [RFC 31/43] memblock, mm: defer initialization of preserved... Anthony Yznaga
- [RFC 05/43] mm: PKRAM: support preserving transparent hugep... Anthony Yznaga
- [RFC 42/43] shmem: reduce time holding xa_lock when inserti... Anthony Yznaga