Re: [PATCH 18/22] Implement shm_open(2)

2023-08-20 Thread Richard Henderson
On 8/20/23 08:04, Richard Henderson wrote: On 8/19/23 02:48, Karim Taha wrote: +#define SHM_PATH(p) ((p) == SHM_ANON ? (p) : path(p)) +    if (arg1 == (uintptr_t)SHM_ANON) { +    p = SHM_ANON; +    } else { +    p = lock_user_string(arg1); +    if (p == NULL) { +    return -T

Re: [PATCH 18/22] Implement shm_open(2)

2023-08-20 Thread Richard Henderson
On 8/19/23 02:48, Karim Taha wrote: +#define SHM_PATH(p) ((p) == SHM_ANON ? (p) : path(p)) +if (arg1 == (uintptr_t)SHM_ANON) { +p = SHM_ANON; +} else { +p = lock_user_string(arg1); +if (p == NULL) { +return -TARGET_EFAULT; +} +} +ret = g

Re: [PATCH 18/22] Implement shm_open(2)

2023-08-19 Thread Warner Losh
On Sat, Aug 19, 2023 at 3:49 AM Karim Taha wrote: > From: Stacey Son > > Co-authored-by: Kyle Evans > > Signed-off-by: Stacey Son > Signed-off-by: Kyle Evans > Signed-off-by: Karim Taha > --- > bsd-user/bsd-mem.h| 27 +++ > bsd-user/freebsd/os-syscall.c |

[PATCH 18/22] Implement shm_open(2)

2023-08-19 Thread Karim Taha
From: Stacey Son Co-authored-by: Kyle Evans Signed-off-by: Stacey Son Signed-off-by: Kyle Evans Signed-off-by: Karim Taha --- bsd-user/bsd-mem.h| 27 +++ bsd-user/freebsd/os-syscall.c | 4 2 files changed, 31 insertions(+) diff --git a/bsd-user/bsd