android_kernel_lge_bullhead/tools/testing/selftests
Peter Jones 7b35014c77 efi: Make efivarfs entries immutable by default
commit ed8b0de5a33d2a2557dce7f9429dca8cb5bc5879 upstream.

"rm -rf" is bricking some peoples' laptops because of variables being
used to store non-reinitializable firmware driver data that's required
to POST the hardware.

These are 100% bugs, and they need to be fixed, but in the mean time it
shouldn't be easy to *accidentally* brick machines.

We have to have delete working, and picking which variables do and don't
work for deletion is quite intractable, so instead make everything
immutable by default (except for a whitelist), and make tools that
aren't quite so broad-spectrum unset the immutable flag.

Signed-off-by: Peter Jones <pjones@redhat.com>
Tested-by: Lee, Chun-Yi <jlee@suse.com>
Acked-by: Matthew Garrett <mjg59@coreos.com>
Signed-off-by: Matt Fleming <matt@codeblueprint.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-03-16 08:41:37 -07:00
..
breakpoints breakpoint selftests: print failure status instead of cause make error 2012-12-17 17:15:27 -08:00
cpu-hotplug cpu-hotplug selftests: print failure status instead of cause make error 2012-12-17 17:15:27 -08:00
efivarfs efi: Make efivarfs entries immutable by default 2016-03-16 08:41:37 -07:00
ipc selftests: IPC message queue copy feature test 2013-01-04 16:11:45 -08:00
kcmp tools/testing/selftests/kcmp/kcmp_test.c: print reason for failure in kcmp_test 2012-12-17 17:15:27 -08:00
memory-hotplug mem-hotplug selftests: print failure status instead of cause make error 2012-12-17 17:15:27 -08:00
mount userns: Unbreak the unprivileged remount tests 2015-01-08 09:58:17 -08:00
mqueue mqueue selftests: print failure status instead of cause make error 2012-12-17 17:15:26 -08:00
net selftests: psock_tpacket: fix status check 2013-04-29 12:26:53 -04:00
ptrace selftest: add a test case for PTRACE_PEEKSIGINFO 2013-04-30 17:04:05 -07:00
vm vm selftests: print failure status instead of cause make error 2012-12-17 17:15:26 -08:00
Makefile mnt: Add tests for unprivileged remount cases that have found to be faulty 2014-09-17 09:04:00 -07:00
README.txt selftests: add a simple doc 2013-02-27 19:10:24 -08:00

README.txt

Linux Kernel Selftests

The kernel contains a set of "self tests" under the tools/testing/selftests/
directory. These are intended to be small unit tests to exercise individual
code paths in the kernel.

Running the selftests
=====================

To build the tests:

  $ make -C tools/testing/selftests


To run the tests:

  $ make -C tools/testing/selftests run_tests

- note that some tests will require root privileges.


To run only tests targetted for a single subsystem:

  $  make -C tools/testing/selftests TARGETS=cpu-hotplug run_tests

See the top-level tools/testing/selftests/Makefile for the list of all possible
targets.


Contributing new tests
======================

In general, the rules for for selftests are

 * Do as much as you can if you're not root;

 * Don't take too long;

 * Don't break the build on any architecture, and

 * Don't cause the top-level "make run_tests" to fail if your feature is
   unconfigured.