Merge branch 'linus'; commit 'v3.0-rc2' into next
cgroupfs: use init_cred when populating new cgroupfs mount

We recently found that in some configurations SELinux was blocking the ability
for cgroupfs to be mounted.  The reason for this is because cgroupfs creates
files and directories during the get_sb() call and also uses lookup_one_len()
during that same get_sb() call.  This is a problem since the security
subsystem cannot initialize the superblock and the inodes in that filesystem
until after the get_sb() call returns.  Thus we leave the inodes in
an unitialized state during get_sb().  For the vast majority of filesystems
this is not an issue, but since cgroupfs uses lookup_on_len() it does
search permission checks on the directories in the path it walks.  Since the
inode security state is not set up SELinux does these checks as if the inodes
were 'unlabeled.'

Many 'normal' userspace process do not have permission to interact with
unlabeled inodes.  The solution presented here is to do the permission checks
of path walk and inode creation as the kernel rather than as the task that
called mount.  Since the kernel has permission to read/write/create
unlabeled inodes the get_sb() call will complete successfully and the SELinux
code will be able to initialize the superblock and those inodes created during
the get_sb() call.

This appears to be the same solution used by other filesystems such as devtmpfs
to solve the same issue and should thus have no negative impact on other LSMs
which currently work.

Signed-off-by: Eric Paris <eparis@redhat.com>
Acked-by: Paul Menage <menage@google.com>
Signed-off-by: James Morris <jmorris@namei.org>
drm/i915: Call intel_enable_plane from i9xx_crtc_mode_set (again)

This change got placed in the ironlake path instead of the 9xx path
during a recent code shuffle.

Signed-off-by: Keith Packard <keithp@keithp.com>
kbuild: add `baseprereq'

On the same model as `basetarget', it represents the filename of first
prerequisite with directory and extension stripped.

Signed-off-by: Arnaud Lacombe <lacombar@gmail.com>
kbuild: add implicit rules for parser generation

Cc: David Gibson <david@gibson.dropbear.id.au>
Cc: Michal Marek <mmarek@suse.cz>
Signed-off-by: Arnaud Lacombe <lacombar@gmail.com>
kbuild: simplify the %_shipped rule

This is needed to have make(1) correctly link the implicit rules which
generate the _shipped file from the lexer/parser to the final file.

Signed-off-by: Arnaud Lacombe <lacombar@gmail.com>
genksyms: pass hash and lookup functions name and target language though the input file

Renaming hash and lookup functions on the command line would reduces its
genericity. Use the .gperf file to pass this information. Do the same for the
target language.

Signed-off-by: Arnaud Lacombe <lacombar@gmail.com>
genksyms: drop -Wno-uninitialized from HOSTCFLAGS_parse.tab.o

Signed-off-by: Arnaud Lacombe <lacombar@gmail.com>
genksyms: migrate parser to implicit rules

Signed-off-by: Arnaud Lacombe <lacombar@gmail.com>
genksym: regen parser

Signed-off-by: Arnaud Lacombe <lacombar@gmail.com>
kconfig: constify `kconf_id_lookup'

Signed-off-by: Arnaud Lacombe <lacombar@gmail.com>
kconfig: kill no longer needed reference to YYDEBUG

Signed-off-by: Arnaud Lacombe <lacombar@gmail.com>
kconfig/zconf.l: do not ask to generate backup

This avoids the creation of a top-level `lex.backup' when the lexer gets
re-generated.

Signed-off-by: Arnaud Lacombe <lacombar@gmail.com>
kconfig: migrate parser to implicit rules

Signed-off-by: Arnaud Lacombe <lacombar@gmail.com>
kconfig: regen parser

Signed-off-by: Arnaud Lacombe <lacombar@gmail.com>
dtc: migrate parser to implicit rules

Cc: David Gibson <david@gibson.dropbear.id.au>
Signed-off-by: Arnaud Lacombe <lacombar@gmail.com>
dtc: regen parser

Cc: David Gibson <david@gibson.dropbear.id.au>
Signed-off-by: Arnaud Lacombe <lacombar@gmail.com>
drm/i915: Introduce i915_gem_object_finish_gpu()

... reincarnated from i915_gem_object_flush_gpu(). The semantic
difference is that after calling finish_gpu() the object no longer
resides in any GPU domain, and so will cause the GPU caches to be
invalidated if it is ever used again.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
drm/i915: Introduce i915_gem_object_finish_gtt()

Like its siblings finish_gpu(), this function clears the object from the
GTT domain forcing it to be trigger a domain invalidation should we ever
need to use via the GTT again.

Note that the most important side-effect of finishing the GTT domain
(aside from clearing the tracking read/write domains) is that it imposes
an memory barrier so that all accesses are complete before it returns,
which is important if you intend to be modifying translation tables
shortly afterwards. The second most important side-effect is that it
tears down the GTT mappings forcing a page-fault and invalidation on
next user access to the object.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
drm/i915/gtt: Split out i915_gem_gtt_rebind_object()

... in preparation for changing the cache level (and thus the flags upon
the PTEs) dynamically.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>