This is the mail archive of the 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: [gnu-csky] [PATCH v4 06/13] C-SKY: Linux ABI

On Thu, 13 Sep 2018, Arnd Bergmann wrote:

> From what I can tell, mips64, riscv64, nios2, and microblaze are all wrong, and
> the generic default would be wrong as well if picked up by anything else (but
> nothing seems to use it).

A question for cleaning this up and possibly unifying versions of this 
header: for multi-ABI architectures, in userspace, what are these 
structures meant to refer to?  The structures that would be produced by a 
core dump for the current process, as opposed to those that might be 
produced by a core dump for another ABI?

I can confirm that the struct elf_prpsinfo defined in sys/procfs.h for 
MIPS n64 has size 0x90 whereas an n64 core dump has data size 0x88 for 
NT_PRPSINFO, indicating the pr_uid / pr_gid types are indeed wrong.  But 
I'm concerned here about n32 and about other fields in the structure.  
The code (dating back to the original addition of support for 64-bit MIPS 
ABIs to glibc in 2003) uses type unsigned long long int for pr_flag for 
n32.  But if I core dump an n32 process, I get 0x80 for the size of 
NT_PRPSINFO (while the userspace structure has size 0x88).  And similarly 
there are n32 conditionals in struct elf_prstatus - the core dump has size 
0x1b8 for NT_PRSTATUS but the userspace structure has size 0x1c0.  If the 
structure is meant to correspond to the current ABI, that suggests those 
n32 conditionals are wrong (the conditional on the definition of 
elf_greg_t, however, is correct, as n32 does use 64-bit registers).

Joseph S. Myers

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