Files
ubports_kernel_google_msm/include/linux
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
..
2008-02-05 03:20:13 -08:00
2008-05-20 14:14:15 -07:00
2008-02-06 10:41:02 -08:00
2008-04-29 08:06:00 -07:00
2008-03-04 13:41:23 +01:00
2008-04-28 06:28:37 -04:00
2008-04-29 08:11:16 -07:00
2008-04-29 12:36:54 -07:00
2008-04-22 15:16:32 -05:00
2008-04-29 08:06:01 -07:00
2008-05-01 08:03:59 -07:00
2008-04-30 08:29:52 -07:00
2008-03-04 14:47:06 -08:00
2008-04-21 11:22:28 -05:00
2008-04-25 13:26:55 +01:00
2008-04-25 13:26:55 +01:00
2008-02-08 02:09:56 +00:00
2008-04-25 13:26:55 +01:00
2008-04-21 22:38:45 +00:00
2008-02-08 09:22:24 -08:00
2008-04-28 08:58:30 -07:00
2008-04-19 19:19:54 +02:00
2008-02-07 08:42:30 -08:00
2008-05-07 09:48:23 +02:00
2008-04-28 08:58:35 -07:00
2008-05-16 17:22:26 -04:00
2008-05-01 13:08:16 -04:00
2008-05-07 09:29:00 +02:00
2008-05-13 08:02:26 -07:00
2008-05-24 09:56:13 -07:00
2008-05-20 16:44:43 +02:00
2008-05-20 16:44:43 +02:00
2008-04-22 11:34:59 +02:00
2008-02-05 09:44:19 -08:00
2008-04-04 18:36:49 +02:00
2008-04-29 23:11:38 +02:00
2008-05-18 20:49:41 +02:00
2008-05-14 23:06:16 +02:00
2008-04-29 08:06:25 -07:00
2008-03-17 22:48:46 -07:00
2008-04-29 08:06:03 -07:00
2008-04-29 08:06:02 -07:00
2008-05-05 16:47:14 +10:00
2008-04-29 08:06:15 -07:00
2008-04-19 19:10:28 -07:00
2008-05-01 08:03:58 -07:00
2008-05-14 19:11:14 -07:00
2008-04-19 19:44:57 +02:00
2008-02-06 10:41:01 -08:00
2008-02-26 14:03:47 +09:00
2008-05-01 08:03:58 -07:00
2008-04-29 08:06:01 -07:00
2008-04-29 08:06:17 -07:00
2008-05-24 09:56:09 -07:00
2008-05-26 16:08:40 +02:00
2008-02-08 09:22:31 -08:00
2008-02-14 21:13:33 -08:00
2008-04-28 08:58:29 -07:00
2008-04-19 16:54:56 -04:00
2008-04-19 16:55:29 -04:00
2008-02-14 21:13:33 -08:00
2008-04-20 21:47:03 -07:00
2008-04-20 21:47:03 -07:00
2008-04-29 08:06:02 -07:00
2008-02-07 23:11:56 -08:00
2008-04-29 08:06:02 -07:00
2008-05-06 12:01:41 -04:00
2008-03-17 22:46:46 -07:00
2008-02-08 09:22:31 -08:00
2008-02-05 09:44:22 -08:00
2008-04-30 08:29:51 -07:00
2008-04-29 08:05:59 -07:00
2008-04-17 10:43:01 -04:00
2008-04-25 00:25:08 +02:00
2008-02-07 08:42:34 -08:00
2008-04-28 08:58:32 -07:00
2008-04-15 13:26:52 -04:00
2008-02-07 08:42:30 -08:00
2008-02-07 08:42:34 -08:00
2008-04-28 08:58:20 -07:00
2008-04-28 08:58:29 -07:00
2008-04-19 19:44:59 +02:00
2008-05-04 17:07:03 -07:00
2008-05-21 17:40:05 -07:00
2008-04-29 02:48:01 -04:00
2008-05-01 08:03:59 -07:00
2008-04-30 08:29:47 -07:00
2008-04-17 20:05:36 +02:00
2008-04-24 21:16:57 -07:00
2008-05-09 07:45:18 -07:00
2008-02-04 23:50:13 +11:00
2008-04-28 08:58:21 -07:00
2008-02-06 10:41:03 -08:00