Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
linux
Commits
e6f9f840
Commit
e6f9f840
authored
Sep 17, 2002
by
Daniel Jacobowitz
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add CLONE_UNTRACED to the flags forced by kernel_thread
parent
acc70885
Changes
19
Show whitespace changes
Inline
Side-by-side
Showing
19 changed files
with
20 additions
and
14 deletions
+20
-14
arch/alpha/kernel/entry.S
arch/alpha/kernel/entry.S
+1
-1
arch/arm/kernel/process.c
arch/arm/kernel/process.c
+1
-1
arch/cris/kernel/entry.S
arch/cris/kernel/entry.S
+1
-0
arch/cris/kernel/entryoffsets.c
arch/cris/kernel/entryoffsets.c
+1
-0
arch/i386/kernel/process.c
arch/i386/kernel/process.c
+1
-1
arch/ia64/kernel/process.c
arch/ia64/kernel/process.c
+1
-1
arch/m68k/kernel/process.c
arch/m68k/kernel/process.c
+1
-1
arch/mips/kernel/process.c
arch/mips/kernel/process.c
+1
-1
arch/mips64/kernel/process.c
arch/mips64/kernel/process.c
+1
-1
arch/parisc/kernel/entry.S
arch/parisc/kernel/entry.S
+2
-1
arch/ppc/kernel/misc.S
arch/ppc/kernel/misc.S
+1
-0
arch/ppc64/kernel/misc.S
arch/ppc64/kernel/misc.S
+1
-0
arch/s390/kernel/process.c
arch/s390/kernel/process.c
+1
-1
arch/s390x/kernel/process.c
arch/s390x/kernel/process.c
+1
-1
arch/sh/kernel/process.c
arch/sh/kernel/process.c
+1
-1
arch/sparc/kernel/process.c
arch/sparc/kernel/process.c
+1
-1
arch/sparc64/kernel/process.c
arch/sparc64/kernel/process.c
+1
-1
arch/x86_64/kernel/process.c
arch/x86_64/kernel/process.c
+1
-1
include/linux/sched.h
include/linux/sched.h
+1
-0
No files found.
arch/alpha/kernel/entry.S
View file @
e6f9f840
...
@@ -213,7 +213,7 @@ kernel_thread:
...
@@ -213,7 +213,7 @@ kernel_thread:
stq
$
2
,
152
(
$
30
)
/*
HAE
*/
stq
$
2
,
152
(
$
30
)
/*
HAE
*/
/
*
Shuffle
FLAGS
to
the
front
; add CLONE_VM. */
/
*
Shuffle
FLAGS
to
the
front
; add CLONE_VM. */
ldi
$
1
,
CLONE_VM
ldi
$
1
,
CLONE_VM
|
CLONE_UNTRACED
or
$
18
,
$
1
,
$
16
or
$
18
,
$
1
,
$
16
bsr
$
26
,
sys_clone
bsr
$
26
,
sys_clone
...
...
arch/arm/kernel/process.c
View file @
e6f9f840
...
@@ -396,7 +396,7 @@ pid_t kernel_thread(int (*fn)(void *), void *arg, unsigned long flags)
...
@@ -396,7 +396,7 @@ pid_t kernel_thread(int (*fn)(void *), void *arg, unsigned long flags)
b sys_exit
\n
\
b sys_exit
\n
\
1: "
1: "
:
"=r"
(
__ret
)
:
"=r"
(
__ret
)
:
"Ir"
(
flags
),
"I"
(
CLONE_VM
),
"r"
(
fn
),
"r"
(
arg
)
:
"Ir"
(
flags
),
"I"
(
CLONE_VM
|
CLONE_UNTRACED
),
"r"
(
fn
),
"r"
(
arg
)
:
"r0"
,
"r1"
,
"lr"
);
:
"r0"
,
"r1"
,
"lr"
);
return
__ret
;
return
__ret
;
}
}
...
...
arch/cris/kernel/entry.S
View file @
e6f9f840
...
@@ -748,6 +748,7 @@ kernel_thread:
...
@@ -748,6 +748,7 @@ kernel_thread:
/
*
r11
is
argument
2
to
clone
,
the
flags
*/
/
*
r11
is
argument
2
to
clone
,
the
flags
*/
move.d
$r12
,
$r11
move.d
$r12
,
$r11
or.w
LCLONE_VM
,
$r11
or.w
LCLONE_VM
,
$r11
or.w
LCLONE_UNTRACED
,
$r11
/
*
Save
FN
for
later
.
*/
/
*
Save
FN
for
later
.
*/
move.d
$r10
,
$r12
move.d
$r10
,
$r12
...
...
arch/cris/kernel/entryoffsets.c
View file @
e6f9f840
...
@@ -57,5 +57,6 @@ OF (LTHREAD_DCCR, struct thread_struct, dccr)
...
@@ -57,5 +57,6 @@ OF (LTHREAD_DCCR, struct thread_struct, dccr)
/* linux/sched.h values - doesn't have an #ifdef __ASSEMBLY__ for these. */
/* linux/sched.h values - doesn't have an #ifdef __ASSEMBLY__ for these. */
VAL
(
LCLONE_VM
,
CLONE_VM
)
VAL
(
LCLONE_VM
,
CLONE_VM
)
VAL
(
LCLONE_UNTRACED
,
CLONE_UNTRACED
)
__asm__
(
".endif"
);
__asm__
(
".endif"
);
arch/i386/kernel/process.c
View file @
e6f9f840
...
@@ -504,7 +504,7 @@ int kernel_thread(int (*fn)(void *), void * arg, unsigned long flags)
...
@@ -504,7 +504,7 @@ int kernel_thread(int (*fn)(void *), void * arg, unsigned long flags)
regs
.
eflags
=
0x286
;
regs
.
eflags
=
0x286
;
/* Ok, create the new process.. */
/* Ok, create the new process.. */
p
=
do_fork
(
flags
|
CLONE_VM
,
0
,
&
regs
,
0
,
NULL
);
p
=
do_fork
(
flags
|
CLONE_VM
|
CLONE_UNTRACED
,
0
,
&
regs
,
0
,
NULL
);
return
IS_ERR
(
p
)
?
PTR_ERR
(
p
)
:
p
->
pid
;
return
IS_ERR
(
p
)
?
PTR_ERR
(
p
)
:
p
->
pid
;
}
}
...
...
arch/ia64/kernel/process.c
View file @
e6f9f840
...
@@ -509,7 +509,7 @@ kernel_thread (int (*fn)(void *), void *arg, unsigned long flags)
...
@@ -509,7 +509,7 @@ kernel_thread (int (*fn)(void *), void *arg, unsigned long flags)
struct
task_struct
*
parent
=
current
;
struct
task_struct
*
parent
=
current
;
int
result
,
tid
;
int
result
,
tid
;
tid
=
clone
(
flags
|
CLONE_VM
,
0
);
tid
=
clone
(
flags
|
CLONE_VM
|
CLONE_UNTRACED
,
0
);
if
(
parent
!=
current
)
{
if
(
parent
!=
current
)
{
result
=
(
*
fn
)(
arg
);
result
=
(
*
fn
)(
arg
);
_exit
(
result
);
_exit
(
result
);
...
...
arch/m68k/kernel/process.c
View file @
e6f9f840
...
@@ -152,7 +152,7 @@ int kernel_thread(int (*fn)(void *), void * arg, unsigned long flags)
...
@@ -152,7 +152,7 @@ int kernel_thread(int (*fn)(void *), void * arg, unsigned long flags)
{
{
register
long
retval
__asm__
(
"d0"
);
register
long
retval
__asm__
(
"d0"
);
register
long
clone_arg
__asm__
(
"d1"
)
=
flags
|
CLONE_VM
;
register
long
clone_arg
__asm__
(
"d1"
)
=
flags
|
CLONE_VM
|
CLONE_UNTRACED
;
retval
=
__NR_clone
;
retval
=
__NR_clone
;
__asm__
__volatile__
__asm__
__volatile__
...
...
arch/mips/kernel/process.c
View file @
e6f9f840
...
@@ -176,7 +176,7 @@ int kernel_thread(int (*fn)(void *), void * arg, unsigned long flags)
...
@@ -176,7 +176,7 @@ int kernel_thread(int (*fn)(void *), void * arg, unsigned long flags)
:
"=r"
(
retval
)
:
"=r"
(
retval
)
:
"i"
(
__NR_clone
),
"i"
(
__NR_exit
),
:
"i"
(
__NR_clone
),
"i"
(
__NR_exit
),
"r"
(
arg
),
"r"
(
fn
),
"r"
(
arg
),
"r"
(
fn
),
"r"
(
flags
|
CLONE_VM
)
"r"
(
flags
|
CLONE_VM
|
CLONE_UNTRACED
)
/*
/*
* The called subroutine might have destroyed any of the
* The called subroutine might have destroyed any of the
* at, result, argument or temporary registers ...
* at, result, argument or temporary registers ...
...
...
arch/mips64/kernel/process.c
View file @
e6f9f840
...
@@ -167,7 +167,7 @@ int kernel_thread(int (*fn)(void *), void *arg, unsigned long flags)
...
@@ -167,7 +167,7 @@ int kernel_thread(int (*fn)(void *), void *arg, unsigned long flags)
"1:
\t
move
\t
%0, $2"
"1:
\t
move
\t
%0, $2"
:
"=r"
(
retval
)
:
"=r"
(
retval
)
:
"i"
(
__NR_clone
),
"i"
(
__NR_exit
),
"r"
(
arg
),
"r"
(
fn
),
:
"i"
(
__NR_clone
),
"i"
(
__NR_exit
),
"r"
(
arg
),
"r"
(
fn
),
"r"
(
flags
|
CLONE_VM
)
"r"
(
flags
|
CLONE_VM
|
CLONE_UNTRACED
)
/* The called subroutine might have destroyed any of the
/* The called subroutine might have destroyed any of the
* at, result, argument or temporary registers ... */
* at, result, argument or temporary registers ... */
...
...
arch/parisc/kernel/entry.S
View file @
e6f9f840
...
@@ -497,7 +497,8 @@ __kernel_thread:
...
@@ -497,7 +497,8 @@ __kernel_thread:
#endif
#endif
STREG
%
r26
,
PT_GR26
(%
r1
)
/*
Store
function
&
argument
for
child
*/
STREG
%
r26
,
PT_GR26
(%
r1
)
/*
Store
function
&
argument
for
child
*/
STREG
%
r25
,
PT_GR25
(%
r1
)
STREG
%
r25
,
PT_GR25
(%
r1
)
ldo
CLONE_VM
(%
r0
),
%
r26
/*
Force
CLONE_VM
since
only
init_mm
*/
ldil
L
%
CLONE_UNTRACED
ldo
CLONE_VM
(%
r26
),
%
r26
/*
Force
CLONE_VM
since
only
init_mm
*/
or
%
r26
,
%
r24
,
%
r26
/*
will
have
kernel
mappings
.
*/
or
%
r26
,
%
r24
,
%
r26
/*
will
have
kernel
mappings
.
*/
copy
%
r0
,
%
r25
copy
%
r0
,
%
r25
bl
do_fork_FIXME_NOW_RETURNS_TASK_STRUCT
,
%
r2
bl
do_fork_FIXME_NOW_RETURNS_TASK_STRUCT
,
%
r2
...
...
arch/ppc/kernel/misc.S
View file @
e6f9f840
...
@@ -1023,6 +1023,7 @@ _GLOBAL(kernel_thread)
...
@@ -1023,6 +1023,7 @@ _GLOBAL(kernel_thread)
mr
r30
,
r3
/*
function
*/
mr
r30
,
r3
/*
function
*/
mr
r31
,
r4
/*
argument
*/
mr
r31
,
r4
/*
argument
*/
ori
r3
,
r5
,
CLONE_VM
/*
flags
*/
ori
r3
,
r5
,
CLONE_VM
/*
flags
*/
oris
r3
,
r3
,
CLONE_UNTRACED
>>
16
li
r0
,
__NR_clone
li
r0
,
__NR_clone
sc
sc
cmpi
0
,
r3
,
0
/*
parent
or
child
?
*/
cmpi
0
,
r3
,
0
/*
parent
or
child
?
*/
...
...
arch/ppc64/kernel/misc.S
View file @
e6f9f840
...
@@ -485,6 +485,7 @@ _GLOBAL(kernel_thread)
...
@@ -485,6 +485,7 @@ _GLOBAL(kernel_thread)
/
*
XXX
fix
this
when
we
optimise
syscall
entry
to
not
save
volatiles
*/
/
*
XXX
fix
this
when
we
optimise
syscall
entry
to
not
save
volatiles
*/
mr
r6
,
r3
/*
function
*/
mr
r6
,
r3
/*
function
*/
ori
r3
,
r5
,
CLONE_VM
/*
flags
*/
ori
r3
,
r5
,
CLONE_VM
/*
flags
*/
oris
r3
,
r3
,(
CLONE_UNTRACED
>>
16
)
li
r0
,
__NR_clone
li
r0
,
__NR_clone
sc
sc
cmpi
0
,
r3
,
0
/*
parent
or
child
?
*/
cmpi
0
,
r3
,
0
/*
parent
or
child
?
*/
...
...
arch/s390/kernel/process.c
View file @
e6f9f840
...
@@ -123,7 +123,7 @@ void show_regs(struct pt_regs *regs)
...
@@ -123,7 +123,7 @@ void show_regs(struct pt_regs *regs)
int
kernel_thread
(
int
(
*
fn
)(
void
*
),
void
*
arg
,
unsigned
long
flags
)
int
kernel_thread
(
int
(
*
fn
)(
void
*
),
void
*
arg
,
unsigned
long
flags
)
{
{
int
clone_arg
=
flags
|
CLONE_VM
;
int
clone_arg
=
flags
|
CLONE_VM
|
CLONE_UNTRACED
;
int
retval
;
int
retval
;
__asm__
__volatile__
(
__asm__
__volatile__
(
...
...
arch/s390x/kernel/process.c
View file @
e6f9f840
...
@@ -120,7 +120,7 @@ void show_regs(struct pt_regs *regs)
...
@@ -120,7 +120,7 @@ void show_regs(struct pt_regs *regs)
int
kernel_thread
(
int
(
*
fn
)(
void
*
),
void
*
arg
,
unsigned
long
flags
)
int
kernel_thread
(
int
(
*
fn
)(
void
*
),
void
*
arg
,
unsigned
long
flags
)
{
{
int
clone_arg
=
flags
|
CLONE_VM
;
int
clone_arg
=
flags
|
CLONE_VM
|
CLONE_UNTRACED
;
int
retval
;
int
retval
;
__asm__
__volatile__
(
__asm__
__volatile__
(
...
...
arch/sh/kernel/process.c
View file @
e6f9f840
...
@@ -120,7 +120,7 @@ int kernel_thread(int (*fn)(void *), void * arg, unsigned long flags)
...
@@ -120,7 +120,7 @@ int kernel_thread(int (*fn)(void *), void * arg, unsigned long flags)
{
/* Don't use this in BL=1(cli). Or else, CPU resets! */
{
/* Don't use this in BL=1(cli). Or else, CPU resets! */
register
unsigned
long
__sc0
__asm__
(
"r0"
);
register
unsigned
long
__sc0
__asm__
(
"r0"
);
register
unsigned
long
__sc3
__asm__
(
"r3"
)
=
__NR_clone
;
register
unsigned
long
__sc3
__asm__
(
"r3"
)
=
__NR_clone
;
register
unsigned
long
__sc4
__asm__
(
"r4"
)
=
(
long
)
flags
|
CLONE_VM
;
register
unsigned
long
__sc4
__asm__
(
"r4"
)
=
(
long
)
flags
|
CLONE_VM
|
CLONE_UNTRACED
;
register
unsigned
long
__sc5
__asm__
(
"r5"
)
=
0
;
register
unsigned
long
__sc5
__asm__
(
"r5"
)
=
0
;
register
unsigned
long
__sc8
__asm__
(
"r8"
)
=
(
long
)
arg
;
register
unsigned
long
__sc8
__asm__
(
"r8"
)
=
(
long
)
arg
;
register
unsigned
long
__sc9
__asm__
(
"r9"
)
=
(
long
)
fn
;
register
unsigned
long
__sc9
__asm__
(
"r9"
)
=
(
long
)
fn
;
...
...
arch/sparc/kernel/process.c
View file @
e6f9f840
...
@@ -726,7 +726,7 @@ pid_t kernel_thread(int (*fn)(void *), void * arg, unsigned long flags)
...
@@ -726,7 +726,7 @@ pid_t kernel_thread(int (*fn)(void *), void * arg, unsigned long flags)
/* Notreached by child. */
/* Notreached by child. */
"1: mov %%o0, %0
\n\t
"
:
"1: mov %%o0, %0
\n\t
"
:
"=r"
(
retval
)
:
"=r"
(
retval
)
:
"i"
(
__NR_clone
),
"r"
(
flags
|
CLONE_VM
),
"i"
(
__NR_clone
),
"r"
(
flags
|
CLONE_VM
|
CLONE_UNTRACED
),
"i"
(
__NR_exit
),
"r"
(
fn
),
"r"
(
arg
)
:
"i"
(
__NR_exit
),
"r"
(
fn
),
"r"
(
arg
)
:
"g1"
,
"g2"
,
"g3"
,
"o0"
,
"o1"
,
"memory"
,
"cc"
);
"g1"
,
"g2"
,
"g3"
,
"o0"
,
"o1"
,
"memory"
,
"cc"
);
return
retval
;
return
retval
;
...
...
arch/sparc64/kernel/process.c
View file @
e6f9f840
...
@@ -694,7 +694,7 @@ pid_t kernel_thread(int (*fn)(void *), void * arg, unsigned long flags)
...
@@ -694,7 +694,7 @@ pid_t kernel_thread(int (*fn)(void *), void * arg, unsigned long flags)
/* Notreached by child. */
/* Notreached by child. */
"1:"
:
"1:"
:
"=r"
(
retval
)
:
"=r"
(
retval
)
:
"i"
(
__NR_clone
),
"r"
(
flags
|
CLONE_VM
),
"i"
(
__NR_clone
),
"r"
(
flags
|
CLONE_VM
|
CLONE_UNTRACED
),
"i"
(
__NR_exit
),
"r"
(
fn
),
"r"
(
arg
)
:
"i"
(
__NR_exit
),
"r"
(
fn
),
"r"
(
arg
)
:
"g1"
,
"g2"
,
"g3"
,
"o0"
,
"o1"
,
"memory"
,
"cc"
);
"g1"
,
"g2"
,
"g3"
,
"o0"
,
"o1"
,
"memory"
,
"cc"
);
return
retval
;
return
retval
;
...
...
arch/x86_64/kernel/process.c
View file @
e6f9f840
...
@@ -58,7 +58,7 @@
...
@@ -58,7 +58,7 @@
asmlinkage
extern
void
ret_from_fork
(
void
);
asmlinkage
extern
void
ret_from_fork
(
void
);
unsigned
long
kernel_thread_flags
=
CLONE_VM
;
unsigned
long
kernel_thread_flags
=
CLONE_VM
|
CLONE_UNTRACED
;
int
hlt_counter
;
int
hlt_counter
;
...
...
include/linux/sched.h
View file @
e6f9f840
...
@@ -50,6 +50,7 @@ struct exec_domain;
...
@@ -50,6 +50,7 @@ struct exec_domain;
#define CLONE_SETTID 0x00100000
/* write the TID back to userspace */
#define CLONE_SETTID 0x00100000
/* write the TID back to userspace */
#define CLONE_CLEARTID 0x00200000
/* clear the userspace TID */
#define CLONE_CLEARTID 0x00200000
/* clear the userspace TID */
#define CLONE_DETACHED 0x00400000
/* parent wants no child-exit signal */
#define CLONE_DETACHED 0x00400000
/* parent wants no child-exit signal */
#define CLONE_UNTRACED 0x00800000
/* set if the tracing process can't force CLONE_PTRACE on this clone */
/*
/*
* List of flags we want to share for kernel threads,
* List of flags we want to share for kernel threads,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment