[PATCH v4 02/10] tests/inject-nf.test: replace getpid with geteuid

Ákos Uzonyi uzonyi.akos at gmail.com
Mon Jun 15 13:01:43 UTC 2020


On Mon, 15 Jun 2020 at 01:37, Dmitry V. Levin <ldv at altlinux.org> wrote:
> On Sat, Jun 13, 2020 at 06:18:29PM +0200, Ákos Uzonyi wrote:
> > Since we treat PIDs as signed integers, large values (>=2^31) will
> > cause overflow when we use printpid.
> > UIDs are treated as unsigned integers, so geteuid is a good alternative.
> > (getuid would be problematic, as it does not exists on alpha).
>
> No, this approach doesn't work because
> $ cat /proc/sys/kernel/overflowuid
> 65534
> $ ./inject-nf
> expected 0x25bd0, got rval=0xfffe err=0
>
> See also tests/overflowuid.c file.

Sorry, I don't understand why overflowuid is significant here.

Could you please give a more detailed explanation, how the error you
wrote can be reproduced?


More information about the Strace-devel mailing list