qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 29/32] bsd-user: Implement pdgetpid(2) and the undocumented s


From: Warner Losh
Subject: Re: [PATCH 29/32] bsd-user: Implement pdgetpid(2) and the undocumented setugid.
Date: Tue, 29 Aug 2023 15:14:01 -0600



On Tue, Aug 29, 2023 at 2:36 PM Richard Henderson <richard.henderson@linaro.org> wrote:
On 8/27/23 08:57, Karim Taha wrote:
> From: Stacey Son <sson@FreeBSD.org>
>
> Signed-off-by: Stacey Son <sson@FreeBSD.org>
> Signed-off-by: Karim Taha <kariem.taha2.7@gmail.com>
> ---
>   bsd-user/freebsd/os-proc.h    | 23 +++++++++++++++++++++++
>   bsd-user/freebsd/os-syscall.c |  8 ++++++++
>   2 files changed, 31 insertions(+)

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>

> +/* undocumented __setugid */
> +static inline abi_long do_freebsd___setugid(abi_long arg1)
> +{
> +    return get_errno(__setugid(arg1));
> +}

Given that this is

#ifdef REGRESSION
...
#else /* !REGRESSION */
         return (ENOSYS);
#endif /* REGRESSION */

in current freebsd, we could probably just stub this out?

I agree...

The REGRESSION kernel option exists only so that the tools/regression/security/proc_to_proc tests
can run. this is an interesting set of tests, but hasn't been updated since 2004, except for the
usual 'churn' commits required by sweeps for new-compiler things, or project policy changes.
So it's not even clear if this specific regression test is still interesting (though there are many
other tests in the tree that are recent and under active development).

So it's irrelevant to the bsd-user emulator, and returning ENOSYS will match perfectly what almost any
kernel deployed will do.

Warner

reply via email to

[Prev in Thread] Current Thread [Next in Thread]