Bug 91086

Summary: definitions for CLONE_ flags do not agree
Product: [Retired] Red Hat Linux Reporter: John Reiser <jreiser>
Component: glibcAssignee: Jakub Jelinek <jakub>
Status: CLOSED UPSTREAM QA Contact: Brian Brock <bbrock>
Severity: medium Docs Contact:
Priority: medium    
Version: 9CC: fweimer
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2003-06-10 03:24:08 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description John Reiser 2003-05-17 16:33:01 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.0.0) Gecko/20020529

Description of problem:
The #define of flags for CLONE_* flag bits do not agree among the current most
recent versions of glibc-devel, glibc-kernheaders, and kernel.  This causes
confusion and bugs.

For instance, the 0x1000 bit is:
-----
[kernel-2.4.20-13.9] include/linux/sched.h
#define CLONE_IDLETASK	0x00001000	/* set if new pid should be 0 (kernel only)*/
[glibc-kernheaders-2.4-8.10] /usr/include/linux/sched.h:
#define CLONE_PID	0x00001000	/* set if pid shared */
[glibc-devel-2.3.2-27.9] /usr/include/bits/sched.h:
# define CLONE_PID     0x00001000 /* Set if pid shared.  */
-----

Also, the #defines for CLONE_SYSVSEM CLONE_SETTLS CLONE_PARENT_SETTID
CLONE_CHILD_CLEARTID CLONE_DETACHED CLONE_UNTRACED CLONE_CHILD_SETTID
are missing from glibc-kernheaders-2.4-8.10 (the most recent version).

Version-Release number of selected component (if applicable):
glibc-devel-2.3.2-27.9, glibc-kernheaders-2.4-8.10, kernel-2.4.20-13.9

How reproducible:
Always

Steps to Reproduce:
1.Inspect source file sched.h from [kernel-2.4.20-13.9] include/linux/sched.h,
[glibc-kernheaders-2.4-8.10] /usr/include/linux/sched.h,
[glibc-devel-2.3.2-27.9] /usr/include/bits/sched.h,
2.
3.
    

Actual Results:  The 0x1000 flag bit has differing definitions.  The defintions
for the 0x1fe0000 flag bits are missing from /usr/include/linux/sched.h

Expected Results:  Agreement about all flag bits for clone().

Additional info:

Comment 1 Ulrich Drepper 2003-06-10 03:24:08 UTC
Not that it would matter the slightest bit, but we changed the glibc header.