Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
K
KED Linux Kernel Fork
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Model registry
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
KED Software Projects
Miscellaneous
KED Linux Kernel Fork
Commits
a78ee9ed
Commit
a78ee9ed
authored
7 years ago
by
Al Viro
Browse files
Options
Downloads
Patches
Plain Diff
shmat(2): move compat to native
Signed-off-by:
Al Viro
<
viro@zeniv.linux.org.uk
>
parent
9b1404c2
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
ipc/compat.c
+0
-16
0 additions, 16 deletions
ipc/compat.c
ipc/shm.c
+19
-0
19 additions, 0 deletions
ipc/shm.c
with
19 additions
and
16 deletions
ipc/compat.c
+
0
−
16
View file @
a78ee9ed
...
@@ -80,22 +80,6 @@ void to_compat_ipc_perm(struct compat_ipc_perm *to, struct ipc64_perm *from)
...
@@ -80,22 +80,6 @@ void to_compat_ipc_perm(struct compat_ipc_perm *to, struct ipc64_perm *from)
to
->
seq
=
from
->
seq
;
to
->
seq
=
from
->
seq
;
}
}
#ifndef COMPAT_SHMLBA
#define COMPAT_SHMLBA SHMLBA
#endif
COMPAT_SYSCALL_DEFINE3
(
shmat
,
int
,
shmid
,
compat_uptr_t
,
shmaddr
,
int
,
shmflg
)
{
unsigned
long
ret
;
long
err
;
err
=
do_shmat
(
shmid
,
compat_ptr
(
shmaddr
),
shmflg
,
&
ret
,
COMPAT_SHMLBA
);
if
(
err
)
return
err
;
force_successful_syscall_return
();
return
(
long
)
ret
;
}
COMPAT_SYSCALL_DEFINE4
(
semtimedop
,
int
,
semid
,
struct
sembuf
__user
*
,
tsems
,
COMPAT_SYSCALL_DEFINE4
(
semtimedop
,
int
,
semid
,
struct
sembuf
__user
*
,
tsems
,
unsigned
,
nsops
,
unsigned
,
nsops
,
const
struct
compat_timespec
__user
*
,
timeout
)
const
struct
compat_timespec
__user
*
,
timeout
)
...
...
This diff is collapsed.
Click to expand it.
ipc/shm.c
+
19
−
0
View file @
a78ee9ed
...
@@ -1439,6 +1439,25 @@ SYSCALL_DEFINE3(shmat, int, shmid, char __user *, shmaddr, int, shmflg)
...
@@ -1439,6 +1439,25 @@ SYSCALL_DEFINE3(shmat, int, shmid, char __user *, shmaddr, int, shmflg)
return
(
long
)
ret
;
return
(
long
)
ret
;
}
}
#ifdef CONFIG_COMPAT
#ifndef COMPAT_SHMLBA
#define COMPAT_SHMLBA SHMLBA
#endif
COMPAT_SYSCALL_DEFINE3
(
shmat
,
int
,
shmid
,
compat_uptr_t
,
shmaddr
,
int
,
shmflg
)
{
unsigned
long
ret
;
long
err
;
err
=
do_shmat
(
shmid
,
compat_ptr
(
shmaddr
),
shmflg
,
&
ret
,
COMPAT_SHMLBA
);
if
(
err
)
return
err
;
force_successful_syscall_return
();
return
(
long
)
ret
;
}
#endif
/*
/*
* detach and kill segment if marked destroyed.
* detach and kill segment if marked destroyed.
* The work is done in shm_close.
* The work is done in shm_close.
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment