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
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
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
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(+)
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
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
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
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
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/