about summary refs log tree commit diff
path: root/NEWS
diff options
context:
space:
mode:
authorJoseph Myers <joseph@codesourcery.com>2018-09-14 13:21:33 +0000
committerJoseph Myers <joseph@codesourcery.com>2018-09-14 13:21:33 +0000
commitd59f3e5e0fd518eeed1ec11886fd796d163cea5d (patch)
tree2d004b9a745855525ca4d28d476e3d6c8247c1ac /NEWS
parentf29b6f17e4e80de9761479c7d377b765095baa67 (diff)
downloadglibc-d59f3e5e0fd518eeed1ec11886fd796d163cea5d.tar.gz
glibc-d59f3e5e0fd518eeed1ec11886fd796d163cea5d.tar.xz
glibc-d59f3e5e0fd518eeed1ec11886fd796d163cea5d.zip
Fix sys/procfs.h pr_uid, pr_gid type (bug 23649).
As noted in
<https://sourceware.org/ml/libc-alpha/2018-09/msg00178.html>, glibc's
sys/procfs.h headers for microblaze, mips (n64), nios2 and riscv have
incorrect types for the pr_uid and pr_gid members of struct
elf_prpsinfo (as does the generic Linux version, but nothing uses
that).

This patch fixes those headers to use unsigned int.  The generic Linux
version is also fixed, but I do *not* recommend making new
architectures use it yet.  Rather, I think it should be reworked to
look more like a copy of the AArch64 version, but with a new
<bits/procfs.h> header included to provide register set definitions;
<bits/procfs.h> would then be architecture-specific while many
architectures could use the generic <sys/procfs.h>.  This fix is
deliberately separate from any reworking to use a generic header more,
since it's possible there could be uses for backporting this fix but
not for backporting a subsequent cleanup.

Tested with build-many-glibcs.py.  This of course doesn't provide much
validation of the structure layout; if the Linux kernel is fixed so
that "#include <linux/elfcore.h>" actually compiles with the headers
from "make headers_install" (and if the layout in both headers is
meant to be the same, whatever ABI we are building for), I have a test
that can be added to glibc to check the layout against that from the
Linux kernel.

	[BZ #23649]
	* sysdeps/unix/sysv/linux/microblaze/sys/procfs.h (struct
	elf_prpsinfo): Use unsigned int for pr_uid and pr_gid.
	* sysdeps/unix/sysv/linux/mips/sys/procfs.h (struct elf_prpsinfo):
	Likewise.
	* sysdeps/unix/sysv/linux/nios2/sys/procfs.h (struct
	elf_prpsinfo): Likewise.
	* sysdeps/unix/sysv/linux/riscv/sys/procfs.h (struct
	elf_prpsinfo): Likewise.
	* sysdeps/unix/sysv/linux/sys/procfs.h (struct elf_prpsinfo):
	Likewise.
Diffstat (limited to 'NEWS')
-rw-r--r--NEWS5
1 files changed, 5 insertions, 0 deletions
diff --git a/NEWS b/NEWS
index 04a0e89010..dbb86a73a3 100644
--- a/NEWS
+++ b/NEWS
@@ -26,6 +26,11 @@ Deprecated and removed features, and other changes affecting compatibility:
 * The glibc.tune tunable namespace has been renamed to glibc.cpu and the
   tunable glibc.tune.cpu has been renamed to glibc.cpu.name.
 
+* The type of the pr_uid and pr_gid members of struct elf_prpsinfo, defined
+  in <sys/procfs.h>, has been corrected to match the type actually used by
+  the Linux kernel.  This affects the size and layout of that structure on
+  MicroBlaze, MIPS (n64 ABI only), Nios II and RISC-V.
+
 Changes to build and runtime requirements:
 
   [Add changes to build and runtime requirements here]