alistair23-linux/include
Andrew G. Morgan ca05a99a54 capabilities: remain source compatible with 32-bit raw legacy capability support.
Source code out there hard-codes a notion of what the
_LINUX_CAPABILITY_VERSION #define means in terms of the semantics of the
raw capability system calls capget() and capset().  Its unfortunate, but
true.

Since the confusing header file has been in a released kernel, there is
software that is erroneously using 64-bit capabilities with the semantics
of 32-bit compatibilities.  These recently compiled programs may suffer
corruption of their memory when sys_getcap() overwrites more memory than
they are coded to expect, and the raising of added capabilities when using
sys_capset().

As such, this patch does a number of things to clean up the situation
for all. It

  1. forces the _LINUX_CAPABILITY_VERSION define to always retain its
     legacy value.

  2. adopts a new #define strategy for the kernel's internal
     implementation of the preferred magic.

  3. deprecates v2 capability magic in favor of a new (v3) magic
     number. The functionality of v3 is entirely equivalent to v2,
     the only difference being that the v2 magic causes the kernel
     to log a "deprecated" warning so the admin can find applications
     that may be using v2 inappropriately.

[User space code continues to be encouraged to use the libcap API which
protects the application from details like this.  libcap-2.10 is the first
to support v3 capabilities.]

Fixes issue reported in https://bugzilla.redhat.com/show_bug.cgi?id=447518.
Thanks to Bojan Smojver for the report.

[akpm@linux-foundation.org: s/depreciate/deprecate/g]
[akpm@linux-foundation.org: be robust about put_user size]
[akpm@linux-foundation.org: coding-style fixes]
Signed-off-by: Andrew G. Morgan <morgan@kernel.org>
Cc: Serge E. Hallyn <serue@us.ibm.com>
Cc: Bojan Smojver <bojan@rexursive.com>
Cc: stable@kernel.org
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Chris Wright <chrisw@sous-sol.org>
2008-05-31 16:36:16 -07:00
..
acpi
asm-alpha asm-{alpha,h8300,um,v850,xtensa}/param.h: unbreak HZ for userspace 2008-05-14 19:11:14 -07:00
asm-arm [ARM] fix OMAP include loops 2008-05-23 15:38:07 +01:00
asm-avr32
asm-blackfin Blackfin serial driver: add extra IRQ flag for 8250 serial driver 2008-05-17 18:21:57 +08:00
asm-cris
asm-frv read_barrier_depends arch fixlets 2008-05-14 10:05:18 -07:00
asm-generic gpio: build fixes 2008-05-24 09:56:13 -07:00
asm-h8300 asm-{alpha,h8300,um,v850,xtensa}/param.h: unbreak HZ for userspace 2008-05-14 19:11:14 -07:00
asm-ia64 KVM: ia64: Set KVM_IOAPIC_NUM_PINS to 48 2008-05-18 14:34:16 +03:00
asm-m32r
asm-m68k m68k: Prefix ISA type with ISA_TYPE_ 2008-05-18 13:28:50 -07:00
asm-m68knommu
asm-mips fix parenthesis in include/asm-mips/mach-au1x00/au1000.h 2008-05-24 09:56:08 -07:00
asm-mn10300 MN10300: Make cpu_relax() invoke barrier() 2008-05-08 10:49:39 -07:00
asm-parisc parisc: use conditional macro for 64-bit wide ops 2008-05-15 11:03:43 -04:00
asm-powerpc [POWERPC] mpic: Fix use of uninitialized variable 2008-05-23 16:15:37 +10:00
asm-ppc [POWERPC] ppc: More compile fixes 2008-05-12 22:57:51 +10:00
asm-s390 [S390] s390dbf: Use const char * for dbf name. 2008-05-15 16:52:39 +02:00
asm-sh sh: use the common ascii hex helpers 2008-05-16 15:09:08 +09:00
asm-sparc sparc: remove CVS keywords 2008-05-20 00:33:44 -07:00
asm-sparc64 sparc64: global_reg_snapshot is not for userspace 2008-05-25 22:50:16 -07:00
asm-um asm-{alpha,h8300,um,v850,xtensa}/param.h: unbreak HZ for userspace 2008-05-14 19:11:14 -07:00
asm-v850 asm-{alpha,h8300,um,v850,xtensa}/param.h: unbreak HZ for userspace 2008-05-14 19:11:14 -07:00
asm-x86 x86: prevent PGE flush from interruption/preemption 2008-05-23 18:16:15 +02:00
asm-xtensa asm-{alpha,h8300,um,v850,xtensa}/param.h: unbreak HZ for userspace 2008-05-14 19:11:14 -07:00
crypto
keys
linux capabilities: remain source compatible with 32-bit raw legacy capability support. 2008-05-31 16:36:16 -07:00
math-emu
media Fix a deadlock in the bttv driver 2008-05-20 10:12:26 -07:00
mtd
net netlink: Fix nla_parse_nested_compat() to call nla_parse() directly 2008-05-22 10:48:59 -07:00
pcmcia
rdma
rxrpc
scsi
sound [ALSA] ASoC: build fix for snd_soc_info_bool_ext 2008-05-13 14:47:44 +02:00
video
xen
Kbuild