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
a11c692b
Commit
a11c692b
authored
Oct 06, 2003
by
David S. Miller
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[SPARC64]: Clean up uid16 usage just like x86_64 did.
parent
cf8c738d
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
25 additions
and
32 deletions
+25
-32
arch/sparc64/Kconfig
arch/sparc64/Kconfig
+5
-0
arch/sparc64/defconfig
arch/sparc64/defconfig
+17
-2
arch/sparc64/kernel/sys_sparc32.c
arch/sparc64/kernel/sys_sparc32.c
+1
-28
include/asm-sparc64/posix_types.h
include/asm-sparc64/posix_types.h
+2
-2
No files found.
arch/sparc64/Kconfig
View file @
a11c692b
...
...
@@ -359,6 +359,11 @@ config COMPAT
depends on SPARC32_COMPAT
default y
config UID16
bool
depends on SPARC32_COMPAT
default y
config BINFMT_ELF32
tristate "Kernel support for 32-bit ELF binaries"
depends on SPARC32_COMPAT
...
...
arch/sparc64/defconfig
View file @
a11c692b
...
...
@@ -75,6 +75,7 @@ CONFIG_RTC=y
CONFIG_SUN_OPENPROMFS=m
CONFIG_SPARC32_COMPAT=y
CONFIG_COMPAT=y
CONFIG_UID16=y
CONFIG_BINFMT_ELF32=y
# CONFIG_BINFMT_AOUT32 is not set
CONFIG_BINFMT_ELF=y
...
...
@@ -979,8 +980,14 @@ CONFIG_INPUT_EVDEV=y
#
# Input I/O drivers
#
# CONFIG_GAMEPORT is not set
CONFIG_SOUND_GAMEPORT=y
CONFIG_GAMEPORT=m
CONFIG_SOUND_GAMEPORT=m
# CONFIG_GAMEPORT_NS558 is not set
# CONFIG_GAMEPORT_L4 is not set
# CONFIG_GAMEPORT_EMU10K1 is not set
# CONFIG_GAMEPORT_VORTEX is not set
# CONFIG_GAMEPORT_FM801 is not set
# CONFIG_GAMEPORT_CS461x is not set
CONFIG_SERIO=y
CONFIG_SERIO_I8042=y
# CONFIG_SERIO_SERPORT is not set
...
...
@@ -1334,6 +1341,9 @@ CONFIG_SND_VIRMIDI=m
#
CONFIG_SND_ALI5451=m
CONFIG_SND_AZT3328=m
CONFIG_SND_CS46XX=m
# CONFIG_SND_CS46XX_NEW_DSP is not set
CONFIG_SND_CS4281=m
CONFIG_SND_EMU10K1=m
CONFIG_SND_KORG1212=m
CONFIG_SND_NM256=m
...
...
@@ -1341,15 +1351,20 @@ CONFIG_SND_NM256=m
# CONFIG_SND_RME96 is not set
# CONFIG_SND_RME9652 is not set
# CONFIG_SND_HDSP is not set
CONFIG_SND_TRIDENT=m
CONFIG_SND_YMFPCI=m
CONFIG_SND_ALS4000=m
CONFIG_SND_CMIPCI=m
CONFIG_SND_ENS1370=m
CONFIG_SND_ENS1371=m
CONFIG_SND_ES1938=m
CONFIG_SND_ES1968=m
CONFIG_SND_MAESTRO3=m
CONFIG_SND_FM801=m
CONFIG_SND_ICE1712=m
# CONFIG_SND_ICE1724 is not set
CONFIG_SND_INTEL8X0=m
CONFIG_SND_SONICVIBES=m
# CONFIG_SND_VIA82XX is not set
CONFIG_SND_VX222=m
...
...
arch/sparc64/kernel/sys_sparc32.c
View file @
a11c692b
...
...
@@ -55,6 +55,7 @@
#include <linux/vfs.h>
#include <linux/netfilter_ipv4/ip_tables.h>
#include <linux/ptrace.h>
#include <linux/highuid.h>
#include <asm/types.h>
#include <asm/ipc.h>
...
...
@@ -99,34 +100,6 @@ extern asmlinkage long sys_setresgid(gid_t, gid_t, gid_t);
extern
asmlinkage
long
sys_setfsuid
(
uid_t
);
extern
asmlinkage
long
sys_setfsgid
(
gid_t
);
/* For this source file, we want overflow handling. */
#undef high2lowuid
#undef high2lowgid
#undef low2highuid
#undef low2highgid
#undef SET_UID16
#undef SET_GID16
#undef NEW_TO_OLD_UID
#undef NEW_TO_OLD_GID
#undef SET_OLDSTAT_UID
#undef SET_OLDSTAT_GID
#undef SET_STAT_UID
#undef SET_STAT_GID
#define high2lowuid(uid) ((uid) > 65535) ? (u16)overflowuid : (u16)(uid)
#define high2lowgid(gid) ((gid) > 65535) ? (u16)overflowgid : (u16)(gid)
#define low2highuid(uid) ((uid) == (u16)-1) ? (uid_t)-1 : (uid_t)(uid)
#define low2highgid(gid) ((gid) == (u16)-1) ? (gid_t)-1 : (gid_t)(gid)
#define SET_UID16(var, uid) var = high2lowuid(uid)
#define SET_GID16(var, gid) var = high2lowgid(gid)
#define NEW_TO_OLD_UID(uid) high2lowuid(uid)
#define NEW_TO_OLD_GID(gid) high2lowgid(gid)
#define SET_OLDSTAT_UID(stat, uid) (stat).st_uid = high2lowuid(uid)
#define SET_OLDSTAT_GID(stat, gid) (stat).st_gid = high2lowgid(gid)
#define SET_STAT_UID(stat, uid) (stat).st_uid = high2lowuid(uid)
#define SET_STAT_GID(stat, gid) (stat).st_gid = high2lowgid(gid)
asmlinkage
long
sys32_chown16
(
const
char
*
filename
,
u16
user
,
u16
group
)
{
return
sys_chown
(
filename
,
low2highuid
(
user
),
low2highgid
(
group
));
...
...
include/asm-sparc64/posix_types.h
View file @
a11c692b
...
...
@@ -28,8 +28,8 @@ typedef unsigned short __kernel_gid16_t;
typedef
int
__kernel_clockid_t
;
typedef
int
__kernel_timer_t
;
typedef
__kernel_uid_
t
__kernel_old_uid_t
;
typedef
__kernel_gid_
t
__kernel_old_gid_t
;
typedef
unsigned
shor
t
__kernel_old_uid_t
;
typedef
unsigned
shor
t
__kernel_old_gid_t
;
typedef
__kernel_uid_t
__kernel_uid32_t
;
typedef
__kernel_gid_t
__kernel_gid32_t
;
...
...
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