This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH v3 08/13] nds32: Linux ABI
- From: Arnd Bergmann <arnd at arndb dot de>
- To: Vincent Chen <vincentc at andestech dot com>
- Cc: GNU C Library <libc-alpha at sourceware dot org>, Joseph Myers <joseph at codesourcery dot com>, Vincent Chen <deanbo422 at gmail dot com>, cnoize at andestech dot com
- Date: Thu, 13 Sep 2018 14:06:07 +0200
- Subject: Re: [PATCH v3 08/13] nds32: Linux ABI
- References: <1528960976-10934-1-git-send-email-vincentc@andestech.com> <1528960976-10934-9-git-send-email-vincentc@andestech.com>
On Thu, Jun 14, 2018 at 9:26 AM Vincent Chen <vincentc@andestech.com> wrote:
> diff --git a/sysdeps/unix/sysv/linux/nds32/sys/procfs.h b/sysdeps/unix/sysv/linux/nds32/sys/procfs.h
> new file mode 100644
> index 0000000..06dce6b
> --- /dev/null
> +++ b/sysdeps/unix/sysv/linux/nds32/sys/procfs.h
....
> +#define ELF_PRARGSZ (80) /* Number of chars for args. */
> +
> +struct elf_prpsinfo
> + {
> + char pr_state; /* Numeric process state. */
> + char pr_sname; /* Char for pr_state. */
> + char pr_zomb; /* Zombie. */
> + char pr_nice; /* Nice val. */
> + unsigned long int pr_flag; /* Flags. */
> + unsigned short int pr_uid;
> + unsigned short int pr_gid;
> + int pr_pid, pr_ppid, pr_pgrp, pr_sid;
> + char pr_fname[16]; /* Filename of executable. */
> + char pr_psargs[ELF_PRARGSZ]; /* Initial part of arg list. */
> + };
I just checked this one and found the same bug that was mentioned in the
csky review thread for a few architectures (not csky):
pr_uid/pr_gid are 'unsigned int' in the kernel, not 'unsigned short int'.
Arnd