UBUNTU: ubuntu: overlayfs -- ovl: switch to __inode_permission()

When checking permissions on an overlayfs inode we do not take into
account either device cgroup restrictions nor security permissions.
This allows a user to mount an overlayfs layer over a restricted device
directory and by pass those permissions to open otherwise restricted
files.

Switch over to __inode_permissions.

Signed-off-by: Andy Whitcroft <apw@canonical.com>
Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
Signed-off-by: Andy Whitcroft <apw@canonical.com>
UBUNTU: ubuntu: overlayfs -- overlayfs: copy up i_uid/i_gid from the underlying inode

YAMA et al rely on on i_uid/i_gid to be populated in order to perform
their checks.  While these really cannot be guarenteed as the underlying
filesystem may not even have the concept, they are expected to be filled
when possible.  To quote Al Viro:

    "Ideally, yes, we'd want to have ->i_uid used only by fs-specific
     code and helpers used by that fs (including those that are
     implicit defaults). [...]   In practice we have enough places
     where uid/gid is used directly to make setting them practically
     a requirement - places like /proc/<pid>/ can get away with
     not doing that, but only because shitloads of syscalls are
     not allowed on those anyway, permissions or no permissions.
     In anything general-purpose you really need to set it."

Copy up the underlying filesystem information into the overlayfs inode
when we create it.

BugLink: http://bugs.launchpad.net/bugs/944386
Signed-off-by: Andy Whitcroft <apw@canonical.com>
Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
Signed-off-by: Andy Whitcroft <apw@canonical.com>
UBUNTU: ubuntu: AUFS (no-squash): basic framework and update machinary

Signed-off-by: Andy Whitcroft <apw@canonical.com>
UBUNTU: ubuntu: AUFS (no-squash) -- aufs3-base.patch

Signed-off-by: Andy Whitcroft <apw@canonical.com>
UBUNTU: ubuntu: AUFS (no-squash) -- aufs3-standalone.patch

Signed-off-by: Andy Whitcroft <apw@canonical.com>
UBUNTU: ubuntu: AUFS: aufs-update -- follow the uapi header changes

Signed-off-by: Andy Whitcroft <apw@canonical.com>
UBUNTU: ubuntu: AUFS -- update to f2873474324d0a31af4340554b9715f51331bc7f

Ben Hutchings (1):
      Use correct comparison with root uid

Daniel Alder (4):
      Bugfix: au_add_till_max wrongly detects overflow if b==0
      New function: au_add_muldiv_till_max
      Bugfix: au_statfs_sum calculates wrong sums when different block sizes are used
      aufs: au_statfs_sum calculates wrong sums when different block sizes are in use

J. R. Okajima (79):
      make aufs-version 3.x
      aufs3.x-rcN 20120109
      aufs: tiny for 3.3, umode_t
      aufs: tiny for 3.3, arg fo show_options()
      aufs: for 3.3, support for set_nlink()
      aufs: tiny for 3.3, arg for iterate_mounts()
      aufs3.x-rcN 20120116
      aufs: tiny for 3.3, arg of ->migratepage()
      aufs3.x-rcN 20120123
      aufs: tiny, wrap around some long lines
      aufs3.x-rcN 20120130
      aufs: for 3.3, follow the changes in mainline, name_hash in lookup_one_len()
      aufs: refine document
      aufs: special handling kmem_cache for HNOTIFY
      aufs: for 2.6.36, support for async free of fsnotify mark
      aufs: possible bugfix in rename(2)
      aufs3.x-rcN 20120312
      version 3.3
      Revert "version 3.3"
      aufs: follow the changes in mainline, remove vfsub_set_nlink()
      aufs: statfs, support various bsize
      aufs3.x-rcN 20120326
      aufs: update the donator
      aufs: simply follow the changes for 3.4-rcN
      aufs3.x-rcN 20120402
      aufs: tiny for linux-3.4-rc1
      aufs3.x-rcN 20120409
      aufs3.x-rcN 20120430
      version 3.4
      Revert "version 3.4"
      aufs3.x-rcN 20120521
      aufs: for 3.5-rcN, QSTR_INIT()
      aufs3.x-rcN 20120528
      aufs: for 3.5-rcN, remove ->trucate_range()
      aufs: for 3.5-rcN, implement ->update_time()
      aufs: for 3.5-rcN, ->encode_fh()
      aufs: for 3.5-rcN, k[ug]id_t
      aufs: for 3.5-rcN, two VFS locks
      aufs: for 3.5-rcN, security_mmap_file()
      aufs: tiny, replace pr_warning() by pr_warn()
      aufs: cosmetics for aufs_mmap()
      aufs3.x-rcN 20120611
      aufs: for 3.5-rcN, new au_security_file_mmap() 1/2
      aufs: for 3.5-rcN, call au_security_file_mmap() 2/2
      aufs3.x-rcN 20120618
      Revert "aufs: for 3.5-rcN, call au_security_file_mmap() 2/2"
      Revert "aufs: for 3.5-rcN, new au_security_file_mmap() 1/2"
      Revert "aufs: cosmetics for aufs_mmap()"
      update the donators
      aufs: aufs_mmap() calls security_mmap_file() directly
      version 3.5
      Revert "version 3.5"
      aufs: bugfix, set iinfo lockdep class in the initialization
      aufs: for linux-3.6-rcN, i_dentry
      aufs: for linux-3.6-rcN, no nameidata for lookup
      aufs: for linux-3.6-rcN, no nameidata for d_revalidate
      aufs: for linux-3.6-rcN, no nameidata for open/create, no atomic_open
      aufs: for linux-3.6-rcN, no nameidata
      aufs: for linux-3.6-rcN, ->follow_link()
      aufs: for linux-3.6-rcN, delayed_fput()
      aufs3.x-rcN 20120730
      aufs: bugfix, use gid_eq() for gid
      aufs: for linux-3.6-rcN, mnt_want/drop_write()
      aufs: for linux-3.6-rcN, empty swap_activate/deactivate()
      aufs: for linux-3.6-rcN, (un)support for may_linkat()
      aufs3.x-rcN 20120813
      aufs: simply refined the installation method
      aufs3.x-rcN 20120827
      version 3.6
      Revert "version 3.6"
      aufs: for linux-3.7-rcN, rcu_barrier() before destroying inode cache
      aufs3.x-rcN 20121015
      aufs: for linux-3.7, replace __getname_gfp() by __get_free_page()
      aufs: for linux-3.7, remove VM_EXECUTABLE
      aufs: for linux-3.7, support for uapi
      aufs: for linux-3.7, support for uapi, backward compatibility
      aufs stdalone: for linux-3.7, support for uapi
      aufs: tiny, wrap long lines
      aufs3.x-rcN 20121112

Justin (1):
      Parallel make patch

Philip Müller (1):
      aufs: for 3.6-rc1, proc_map.patch

Signed-off-by: Andy Whitcroft <apw@canonical.com>
UBUNTU: ubuntu: AUFS (no-squash) -- reenable

BugLink: http://bugs.launchpad.net/bugs/1079193
Signed-off-by: Andy Whitcroft <apw@canonical.com>
UBUNTU: SAUCE: (no-up) seccomp: forcing auditing of kill condition

Error messages are emitted because of a binary blob which is insufficient
reason to upstream this patch.
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1079469/comments/1

BugLink: http://bugs.launchpad.net/bugs/1079469

Instead of auditing all seccomp actions, only force the reporting of
those that kill a process. All others should be checked for an existing
audit context on the process. (This improves the adjustment that
commit 426ae7eee59e3de2a4c14ccfc30df0a7d64709fe was attempting.)

Signed-off-by: Kees Cook <kees@ubuntu.com>
Acked-by: Herton Krzesinski <herton.krzesinski@canonical.com>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
UBUNTU: SAUCE: (no-up) Remove yam files duplicated in linux-firmware

Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
UBUNTU: SAUCE: (no-up) Remove tehuti files duplicated in linux-firmware

Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
UBUNTU: SAUCE: (no-up) Remove matrox files duplicated in linux-firmware

Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
UBUNTU: SAUCE: (no-up) Remove cxgb3 files duplicated in linux-firmware

Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
UBUNTU: SAUCE: (no-up) Remove r128 files duplicated in linux-firmware

Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
UBUNTU: SAUCE: (no-up) Remove acenic files duplicated in linux-firmware

Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
UBUNTU: SAUCE: (no-up) Remove keyspan files duplicated in linux-firmware

Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
UBUNTU: SAUCE: (no-up) Remove sun files duplicated in linux-firmware

Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
UBUNTU: SAUCE: (no-up) Remove radeon files duplicated in linux-firmware

Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
UBUNTU: SAUCE: (no-up) Update bnx2x firmware to 7.8.2.0

This is a boot essential device so package firmware with the kernel.

Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
UBUNTU: SAUCE: (no-up) Remove sb16 files duplicated in linux-firmware

Signed-off-by: Tim Gardner <tim.gardner@canonical.com>