prctl parameters not being passed to kernel

Khem Raj raj.khem at gmail.com
Wed Jun 16 19:02:56 UTC 2010


On Wed, Jun 9, 2010 at 6:15 PM, Daniel Ng <daniel.ng1234 at gmail.com> wrote:
> Hi,
>
> I'm using Linux kernel 2.6.30.3 with uClibc 0.9.30.1, on a powerpc (mpc8272)
> platform.
>
> It looks like the prctl parameters are not being passed to the kernel properly,
> regardless of the the prctl operation I specify.
>
> For example, in the kernel (kernel/sys.c), I have inserted a printk to print out
> arg2:
>
>    case PR_SET_PDEATHSIG:
>        printk("PR_SET_PDEATHSIG: 0x%lx\n", arg2);
>        if (!valid_signal(arg2)) {
>            error = -EINVAL;
>            break;
>        }
>
> -but arg2 always seems to be 0.
>
> This is how I call prctl in userspace:
>
>    status = prctl(PR_SET_PDEATHSIG, SIGHUP, NULL, NULL, NULL);
>
> I've also tried the following:
>
>    status = prctl(PR_SET_PDEATHSIG, 1, NULL, NULL, NULL);
>
>    status = prctl(PR_SET_PDEATHSIG, SIGHUP);
>
>    status = prctl(PR_SET_PDEATHSIG, 1);
>
> -they all result in the kernel seeing arg2 as 0.
>
> Is there something I'm missing, or is this a genuine uClibc bug,
> or something else?
>
>

I only tried it on mips arch here and uclibc seems to pass correct
parameters to the syscall. I dont
have ppc system handy so cant test it right now however I would ask
you to reproduce it on latest
master on git if you could do that it will help.

Thanks

-Khem

>
>
> _______________________________________________
> uClibc mailing list
> uClibc at uclibc.org
> http://lists.busybox.net/mailman/listinfo/uclibc
>


More information about the uClibc mailing list