[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 16/27] linux-user/syscall.c: fix missed flag for shared memory in
|
From: |
Laurent Vivier |
|
Subject: |
[PULL 16/27] linux-user/syscall.c: fix missed flag for shared memory in open_self_maps |
|
Date: |
Thu, 6 Jan 2022 11:41:26 +0100 |
From: Andrey Kazmin <a.kazmin@partner.samsung.com>
The possible variants for region type in /proc/self/maps are either
private "p" or shared "s". In the current implementation,
we mark shared regions as "-". It could break memory mapping parsers
such as included into ASan/HWASan sanitizers.
Fixes: 01ef6b9e4e4e ("linux-user: factor out reading of /proc/self/maps")
Signed-off-by: Andrey Kazmin <a.kazmin@partner.samsung.com>
Reviewed-by: Laurent Vivier <laurent@vivier.eu>
Acked-by: Alex Bennée <alex.bennee@linaro.org>
Message-Id: <20211227125048.22610-1-a.kazmin@partner.samsung.com>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
---
linux-user/syscall.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/linux-user/syscall.c b/linux-user/syscall.c
index 01cd59cdce53..3160d77154b5 100644
--- a/linux-user/syscall.c
+++ b/linux-user/syscall.c
@@ -8045,7 +8045,7 @@ static int open_self_maps(void *cpu_env, int fd)
(flags & PAGE_READ) ? 'r' : '-',
(flags & PAGE_WRITE_ORG) ? 'w' : '-',
(flags & PAGE_EXEC) ? 'x' : '-',
- e->is_priv ? 'p' : '-',
+ e->is_priv ? 'p' : 's',
(uint64_t) e->offset, e->dev, e->inode);
if (path) {
dprintf(fd, "%*s%s\n", 73 - count, "", path);
--
2.33.1
- [PULL 01/27] qemu-binfmt-conf.sh: fix -F option, (continued)
- [PULL 01/27] qemu-binfmt-conf.sh: fix -F option, Laurent Vivier, 2022/01/06
- [PULL 12/27] target/sh4: Implement prctl_unalign_sigbus, Laurent Vivier, 2022/01/06
- [PULL 18/27] linux-user/nios2: Fixes for signal frame setup, Laurent Vivier, 2022/01/06
- [PULL 15/27] linux-user: call set/getscheduler set/getparam directly, Laurent Vivier, 2022/01/06
- [PULL 22/27] linux-user/nios2: Fix sigmask in setup_rt_frame, Laurent Vivier, 2022/01/06
- [PULL 26/27] linux-user: netlink: Add IFLA_VFINFO_LIST, Laurent Vivier, 2022/01/06
- [PULL 09/27] linux-user: Add code for PR_GET/SET_UNALIGN, Laurent Vivier, 2022/01/06
- [PULL 20/27] linux-user/nios2: Map a real kuser page, Laurent Vivier, 2022/01/06
- [PULL 02/27] linux-user/hexagon: Use generic target_stat64 structure, Laurent Vivier, 2022/01/06
- [PULL 16/27] linux-user/syscall.c: fix missed flag for shared memory in open_self_maps,
Laurent Vivier <=
- [PULL 27/27] linux-user: netlink: update IFLA_BRPORT entries, Laurent Vivier, 2022/01/06
- [PULL 07/27] linux-user: Split out do_prctl and subroutines, Laurent Vivier, 2022/01/06
- [PULL 25/27] linux-user: netlink: update IFLA entries, Laurent Vivier, 2022/01/06
- [PULL 21/27] linux-user/nios2: Fix EA vs PC confusion, Laurent Vivier, 2022/01/06
- [PULL 08/27] linux-user: Disable more prctl subcodes, Laurent Vivier, 2022/01/06
- [PULL 19/27] linux-user/elfload: Rename ARM_COMMPAGE to HI_COMMPAGE, Laurent Vivier, 2022/01/06
- [PULL 23/27] linux-user/nios2: Use set_sigmask in do_rt_sigreturn, Laurent Vivier, 2022/01/06
- [PULL 24/27] linux-user/syscall.c: malloc to g_try_malloc, Laurent Vivier, 2022/01/06
- [PULL 05/27] linux-user: target_syscall.h remove definition TARGET_MINSIGSTKSZ, Laurent Vivier, 2022/01/06
- Re: [PULL 00/27] Linux user for 7.0 patches, Richard Henderson, 2022/01/06