This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH v3 08/13] nds32: Linux ABI


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]