Commit e585e47031751f4e393e10ffd922885508b958dd

Authored by Matt Mackall
Committed by Linus Torvalds
1 parent 22c4e3084e

[PATCH] tiny: Make *[ug]id16 support optional

Configurable 16-bit UID and friends support

This allows turning off the legacy 16 bit UID interfaces on embedded platforms.

   text    data     bss     dec     hex filename
3330172  529036  190556 4049764  3dcb64 vmlinux-baseline
3328268  529040  190556 4047864  3dc3f8 vmlinux

From: Adrian Bunk <bunk@stusta.de>

    UID16 was accidentially disabled for !EMBEDDED.

Signed-off-by: Matt Mackall <mpm@selenic.com>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>

Showing 19 changed files with 28 additions and 65 deletions Side-by-side Diff

... ... @@ -18,9 +18,6 @@
18 18 bool
19 19 default y
20 20  
21   -config UID16
22   - bool
23   -
24 21 config RWSEM_GENERIC_SPINLOCK
25 22 bool
26 23  
... ... @@ -46,10 +46,6 @@
46 46 <file:Documentation/mca.txt> (and especially the web page given
47 47 there) before attempting to build an MCA bus kernel.
48 48  
49   -config UID16
50   - bool
51   - default y
52   -
53 49 config RWSEM_GENERIC_SPINLOCK
54 50 bool
55 51 default y
... ... @@ -34,10 +34,6 @@
34 34 int
35 35 default 9
36 36  
37   -config UID16
38   - bool
39   - default y
40   -
41 37 config RWSEM_GENERIC_SPINLOCK
42 38 bool
43 39 default y
... ... @@ -9,10 +9,6 @@
9 9 bool
10 10 default y
11 11  
12   -config UID16
13   - bool
14   - default y
15   -
16 12 config RWSEM_GENERIC_SPINLOCK
17 13 bool
18 14 default y
... ... @@ -21,10 +21,6 @@
21 21 bool
22 22 default n
23 23  
24   -config UID16
25   - bool
26   - default y
27   -
28 24 config RWSEM_GENERIC_SPINLOCK
29 25 bool
30 26 default y
... ... @@ -29,10 +29,6 @@
29 29 config SBUS
30 30 bool
31 31  
32   -config UID16
33   - bool
34   - default y
35   -
36 32 config GENERIC_ISA_DMA
37 33 bool
38 34 default y
... ... @@ -10,10 +10,6 @@
10 10 bool
11 11 default y
12 12  
13   -config UID16
14   - bool
15   - default y
16   -
17 13 config RWSEM_GENERIC_SPINLOCK
18 14 bool
19 15 default y
arch/m68knommu/Kconfig
... ... @@ -17,10 +17,6 @@
17 17 bool
18 18 default n
19 19  
20   -config UID16
21   - bool
22   - default y
23   -
24 20 config RWSEM_GENERIC_SPINLOCK
25 21 bool
26 22 default y
... ... @@ -19,9 +19,6 @@
19 19 config STACK_GROWSUP
20 20 def_bool y
21 21  
22   -config UID16
23   - bool
24   -
25 22 config RWSEM_GENERIC_SPINLOCK
26 23 def_bool y
27 24  
arch/powerpc/Kconfig
... ... @@ -26,9 +26,6 @@
26 26 bool
27 27 default y
28 28  
29   -config UID16
30   - bool
31   -
32 29 config GENERIC_HARDIRQS
33 30 bool
34 31 default y
... ... @@ -8,9 +8,6 @@
8 8 bool
9 9 default y
10 10  
11   -config UID16
12   - bool
13   -
14 11 config GENERIC_HARDIRQS
15 12 bool
16 13 default y
... ... @@ -14,10 +14,6 @@
14 14 gaming console. The SuperH port has a home page at
15 15 <http://www.linux-sh.org/>.
16 16  
17   -config UID16
18   - bool
19   - default y
20   -
21 17 config RWSEM_GENERIC_SPINLOCK
22 18 bool
23 19 default y
... ... @@ -9,10 +9,6 @@
9 9 bool
10 10 default y
11 11  
12   -config UID16
13   - bool
14   - default y
15   -
16 12 config HIGHMEM
17 13 bool
18 14 default y
arch/sparc64/Kconfig
... ... @@ -309,11 +309,6 @@
309 309 depends on SPARC32_COMPAT
310 310 default y
311 311  
312   -config UID16
313   - bool
314   - depends on SPARC32_COMPAT
315   - default y
316   -
317 312 config BINFMT_ELF32
318 313 tristate "Kernel support for 32-bit ELF binaries"
319 314 depends on SPARC32_COMPAT
... ... @@ -22,10 +22,6 @@
22 22 config PCI
23 23 bool
24 24  
25   -config UID16
26   - bool
27   - default y
28   -
29 25 config GENERIC_CALIBRATE_DELAY
30 26 bool
31 27 default y
... ... @@ -10,9 +10,6 @@
10 10 config MMU
11 11 bool
12 12 default n
13   -config UID16
14   - bool
15   - default n
16 13 config RWSEM_GENERIC_SPINLOCK
17 14 bool
18 15 default y
... ... @@ -542,11 +542,6 @@
542 542 depends on COMPAT && SYSVIPC
543 543 default y
544 544  
545   -config UID16
546   - bool
547   - depends on IA32_EMULATION
548   - default y
549   -
550 545 endmenu
551 546  
552 547 source "net/Kconfig"
... ... @@ -228,6 +228,15 @@
228 228  
229 229 source "usr/Kconfig"
230 230  
  231 +config UID16
  232 + bool "Enable 16-bit UID system calls" if EMBEDDED
  233 + depends !ALPHA && !PPC && !PPC64 && !PARISC && !V850 && !ARCH_S390X
  234 + depends !X86_64 || IA32_EMULATION
  235 + depends !SPARC64 || SPARC32_COMPAT
  236 + default y
  237 + help
  238 + This enables the legacy 16-bit UID syscall wrappers.
  239 +
231 240 config CC_OPTIMIZE_FOR_SIZE
232 241 bool "Optimize for size (Look out for broken compilers!)"
233 242 default y
... ... @@ -83,6 +83,25 @@
83 83 cond_syscall(sys_inotify_add_watch);
84 84 cond_syscall(sys_inotify_rm_watch);
85 85 cond_syscall(sys_migrate_pages);
  86 +cond_syscall(sys_chown16);
  87 +cond_syscall(sys_fchown16);
  88 +cond_syscall(sys_getegid16);
  89 +cond_syscall(sys_geteuid16);
  90 +cond_syscall(sys_getgid16);
  91 +cond_syscall(sys_getgroups16);
  92 +cond_syscall(sys_getresgid16);
  93 +cond_syscall(sys_getresuid16);
  94 +cond_syscall(sys_getuid16);
  95 +cond_syscall(sys_lchown16);
  96 +cond_syscall(sys_setfsgid16);
  97 +cond_syscall(sys_setfsuid16);
  98 +cond_syscall(sys_setgid16);
  99 +cond_syscall(sys_setgroups16);
  100 +cond_syscall(sys_setregid16);
  101 +cond_syscall(sys_setresgid16);
  102 +cond_syscall(sys_setresuid16);
  103 +cond_syscall(sys_setreuid16);
  104 +cond_syscall(sys_setuid16);
86 105  
87 106 /* arch-specific weak syscall entries */
88 107 cond_syscall(sys_pciconfig_read);