Re: [PATCH V2 1/2] efi/unaccepted: Do not let /proc/vmcore try to access unaccepted memory

2023-09-12 Thread Adrian Hunter
On 12/09/23 10:19, David Hildenbrand wrote: > On 11.09.23 13:21, Adrian Hunter wrote: >> Support for unaccepted memory was added recently, refer commit dcdfdd40fa82 >> ("mm: Add support for unaccepted memory"), whereby a virtual machine may >> need to accept memory

[PATCH V2 2/2] proc/kcore: Do not try to access unaccepted memory

2023-09-11 Thread Adrian Hunter
ore, which is read-only and does not support mmap, this means a read of unaccepted memory will return zeros. Signed-off-by: Adrian Hunter --- fs/proc/kcore.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) Changes in V2: Change patch subject and commit message Do not

[PATCH V2 0/2] Do not try to access unaccepted memory

2023-09-11 Thread Adrian Hunter
ct and commit message Do not open code pfn_is_unaccepted_memory() /dev/mem: Do not map unaccepted memory Patch dropped because it is not required Adrian Hunter (2): efi/unaccepted: Do not let /proc/vmcore try to access unaccepted memory proc/kcore: Do not

[PATCH V2 1/2] efi/unaccepted: Do not let /proc/vmcore try to access unaccepted memory

2023-09-11 Thread Adrian Hunter
fail. For /proc/vmcore, which is read-only, this means a read or mmap of unaccepted memory will return zeros. Signed-off-by: Adrian Hunter --- drivers/firmware/efi/unaccepted_memory.c | 20 include/linux/mm.h | 7 +++ 2 files changed, 27 insertions(+)

Re: [PATCH 1/3] proc/vmcore: Do not map unaccepted memory

2023-09-07 Thread Adrian Hunter
On 7/09/23 18:39, Dave Hansen wrote: > On 9/6/23 00:39, Adrian Hunter wrote: >> @@ -559,7 +567,8 @@ static int vmcore_remap_oldmem_pfn(struct vm_area_struct >> *vma, >> * pages without a reason. >> */ >> idx = srcu_read_lock(&vmc

[PATCH 1/3] proc/vmcore: Do not map unaccepted memory

2023-09-06 Thread Adrian Hunter
ch is read-only, this means a read or mmap of unaccepted memory will return zeros. Fixes: dcdfdd40fa82 ("mm: Add support for unaccepted memory") Signed-off-by: Adrian Hunter --- fs/proc/vmcore.c | 15 --- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/fs/pro

[PATCH 3/3] /dev/mem: Do not map unaccepted memory

2023-09-06 Thread Adrian Hunter
ans a read of unaccepted memory will return zeros, a write to unaccepted memory will be ignored, but an mmap of unaccepted memory will return an error. Fixes: dcdfdd40fa82 ("mm: Add support for unaccepted memory") Signed-off-by: Adrian Hunter --- drivers/char/mem.c | 9 +++-- 1 file c

[PATCH 0/3] Do not map unaccepted memory

2023-09-06 Thread Adrian Hunter
Hi Support for unaccepted memory was added recently, refer commit dcdfdd40fa82 ("mm: Add support for unaccepted memory"), whereby a virtual machine may need to accept memory before it can be used. Plug a few gaps where RAM is exposed without checking if it is unaccepted memory. Adr

[PATCH 2/3] proc/kcore: Do not map unaccepted memory

2023-09-06 Thread Adrian Hunter
ch is read-only and does not support mmap, this means a read of unaccepted memory will return zeros. Fixes: dcdfdd40fa82 ("mm: Add support for unaccepted memory") Signed-off-by: Adrian Hunter --- fs/proc/kcore.c | 10 +- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/