Bug 781 - Kernel Feature is missing 2.6 features for powerpc32/powerpc64
Summary: Kernel Feature is missing 2.6 features for powerpc32/powerpc64
Status: RESOLVED FIXED
Alias: None
Product: glibc
Classification: Unclassified
Component: libc (show other bugs)
Version: unspecified
: P2 normal
Target Milestone: ---
Assignee: GOTO Masanori
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-03-08 16:26 UTC by Steven Munroe
Modified: 2018-04-20 13:28 UTC (History)
1 user (show)

See Also:
Host: powerpc64--linux
Target: powerpc64--linux
Build: powerpc64--linux
Last reconfirmed:
fweimer: security-


Attachments
[PATCH] update kernel-features.h for powerpc (925 bytes, patch)
2005-03-08 16:38 UTC, Steven Munroe
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Steven Munroe 2005-03-08 16:26:44 UTC
Anton Blanchard writes:

FYI I found what looked like some issues with the ppc32/64 glibc feature
selection code.

Anton

--

/* Starting with version 2.6.9, the waitid system call is available.  */
#if __LINUX_KERNEL_VERSION >=  0x020609
# define __ASSUME_WAITID_SYSCALL        1
#endif

We havent turned waitid on for ppc64 (32 or 64bit userspace). We expect
to do it shortly. I guess it should be disabled on ppc for the moment. 

/* The tgkill syscall was instroduced for i386 in 2.5.75.  For Alpha
   it was introduced in 2.6.0-test1 which unfortunately cannot be
   distinguished from 2.6.0.  On x86-64 it was introduced in
   2.6.0-test3. */
#if (__LINUX_KERNEL_VERSION >= 132427 && defined __i386__) \
    || (__LINUX_KERNEL_VERSION >= 132609 && defined __alpha__) \
    || (__LINUX_KERNEL_VERSION >= 132609 && defined __x86_64__) \
    || (__LINUX_KERNEL_VERSION >= 132609 && defined __sh__)
# define __ASSUME_TGKILL        1
#endif

tgkill was introduced into ppc32 and ppc64 on 2.6.0-test* too.

/* The utimes syscall has been available for some architectures
   forever.  For x86 it was introduced after 2.5.75, for x86-64 in
   2.6.0-test3.  */
#if defined __alpha__ || defined __ia64__ || defined __hppa__ \
    || defined __sparc__ \
    || (__LINUX_KERNEL_VERSION > 132427 && defined __i386__) \
    || (__LINUX_KERNEL_VERSION > 132609 && defined __x86_64__) \
    || (__LINUX_KERNEL_VERSION >= 132609 && defined __sh__)
# define __ASSUME_UTIMES        1
#endif

utimes was introduced into ppc32 and ppc64 on 2.6.0-test*.

/* The fixed version of the posix_fadvise64 syscall appeared in
   2.6.0-test3.  At least for x86.  */
#if __LINUX_KERNEL_VERSION >= 132609 && defined __i386__
# define __ASSUME_FADVISE64_64_SYSCALL  1
#endif

Its in 2.6.2 on both ppc32 and ppc64 kernels but its a 32bit userspace
call only.
Comment 1 Steven Munroe 2005-03-08 16:38:36 UTC
Created attachment 431 [details]
[PATCH] update kernel-features.h for powerpc
Comment 2 Steven Munroe 2005-03-08 16:42:00 UTC
The patch attached about adds the appropirate changes to kernel-features.h to
reflect the powerpc kernels as of 2.6.9.
Comment 3 GOTO Masanori 2005-03-10 10:47:59 UTC
Is this bug "resolved and fixed"?
Comment 4 Steven Munroe 2005-03-10 14:22:10 UTC
Yes this is fixed, just waiting for patch review and hopefully commitment to cvs.
Comment 5 Steven Munroe 2005-03-17 21:32:48 UTC
Oops I should not marked this fixed before it was committed.
Comment 6 Steven Munroe 2005-04-28 16:02:30 UTC
Can someone look at a apply this patch? Its tested and ready to go!
Comment 7 cvs-commit@gcc.gnu.org 2005-04-28 22:20:59 UTC
Subject: Bug 781

CVSROOT:	/cvs/glibc
Module name:	libc
Changes by:	roland@sources.redhat.com	2005-04-28 22:20:52

Modified files:
	sysdeps/unix/sysv/linux: kernel-features.h 

Log message:
	2005-03-07  Steven Munroe  <sjmunroe@us.ibm.com>
	
	[BZ #781]
	* sysdeps/unix/sysv/linux/kernel-features.h
	(__ASSUME_TGKILL): Define for powerpc32/64 starting with 2.6.1.
	(__ASSUME_UTIMES): Define for powerpc32/64 starting with 2.6.1.
	(__ASSUME_FADVISE64_64_SYSCALL): Define for powerpc32 only starting
	with 2.6.1.
	(__ASSUME_WAITID_SYSCALL): Don't define for powerpc32/64.

Patches:
http://sources.redhat.com/cgi-bin/cvsweb.cgi/libc/sysdeps/unix/sysv/linux/kernel-features.h.diff?cvsroot=glibc&r1=1.83&r2=1.84

Comment 8 Roland McGrath 2005-04-28 22:33:44 UTC
Fixed in trunk.  If you think it should go into 2.3.x, get your vendors to test
it in their production builds.