ADI is a feature supported on SPARC M7 and newer processors to allow
hardware to catch rogue accesses to memory. ADI is supported for data
fetches only and not instruction fetches. An app can enable ADI on its
data pages, set version tags on them and use versioned addresses to
access the data pages. Upper bits of the address contain the version
tag. On M7 processors, upper four bits (bits 63-60) contain the version
tag. If a rogue app attempts to access ADI enabled data pages, its
access is blocked and processor generates an exception. Please see
Documentation/sparc/adi.txt for further details.
This patchset implements a char driver to read/write ADI versions from
privileged user space processes. Intended consumers are makedumpfile
and crash.
v5:
* Fixed MODULE_LICENSE() for adi.c
v4:
* Fixed messed up subject lines.
v3:
* Really fixed the copyright headers to use SPDX GPL v2. Really.
v2:
* Simplified copyright headers
* Completely reworked sparc64 selftests Makefiles. Used the
android selftests Makefiles as an example
* Added run.sh and drivers_test.sh to the sparc64 selftest
directory. Used bpf/test_kmod.sh and the android selftests
as examples
* Minor cleanups in the selftest adi-test.c
* Added calls to ksft_test_*() in the adi-test.c
Tom Hromatka (2):
char: sparc64: Add privileged ADI driver
selftests: sparc64: char: Selftest for privileged ADI driver
drivers/char/Kconfig | 12 +
drivers/char/Makefile | 1 +
drivers/char/adi.c | 240 +++++++
tools/testing/selftests/Makefile | 1 +
tools/testing/selftests/sparc64/Makefile | 46 ++
tools/testing/selftests/sparc64/drivers/.gitignore | 1 +
tools/testing/selftests/sparc64/drivers/Makefile | 15 +
tools/testing/selftests/sparc64/drivers/adi-test.c | 721 +++++++++++++++++++++
.../selftests/sparc64/drivers/drivers_test.sh | 30 +
tools/testing/selftests/sparc64/run.sh | 3 +
10 files changed, 1070 insertions(+)
create mode 100644 drivers/char/adi.c
create mode 100644 tools/testing/selftests/sparc64/Makefile
create mode 100644 tools/testing/selftests/sparc64/drivers/.gitignore
create mode 100644 tools/testing/selftests/sparc64/drivers/Makefile
create mode 100644 tools/testing/selftests/sparc64/drivers/adi-test.c
create mode 100755 tools/testing/selftests/sparc64/drivers/drivers_test.sh
create mode 100755 tools/testing/selftests/sparc64/run.sh
--
2.15.0
--
To unsubscribe from this list: send the line "unsubscribe linux-kselftest" in
the body of a message to majordomo(a)vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
On Mon, Apr 23, 2018 at 7:10 AM, Jeffrin Jose T <ahiliation(a)yahoo.co.in> wrote:
> This is a patch to the tools/testing/selftests/firmware/fw_run_tests.sh
> file which fixes a bug which calls to a wrong function name,which in turn
> blocks the execution of certain tests.
>
> Signed-off-by: Jeffrin Jose T <jeffrin(a)rajagiritech.edu.in>
>
> ---
> tools/testing/selftests/firmware/fw_run_tests.sh | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/tools/testing/selftests/firmware/fw_run_tests.sh b/tools/testing/selftests/firmware/fw_run_tests.sh
> index 06d638e9dc62..cffdd4eb0a57 100755
> --- a/tools/testing/selftests/firmware/fw_run_tests.sh
> +++ b/tools/testing/selftests/firmware/fw_run_tests.sh
> @@ -66,5 +66,5 @@ if [ -f $FW_FORCE_SYSFS_FALLBACK ]; then
> run_test_config_0003
> else
> echo "Running basic kernel configuration, working with your config"
> - run_test
> + run_tests
> fi
I find it confusing that run_tests() uses $1 and $2 but later ignores
them unless -f $FW_FORCE_SYSFS_FALLBACK, which is checked at both the
top level and in proc_set_*_fallback()... I'd expected the test to
happen only in run_tests() and have it removed from from
proc_set_*_fallback().
Regardless, the above patch is correct to run the tests. :)
Acked-by: Kees Cook <keescook(a)chromium.org>
-Kees
--
Kees Cook
Pixel Security
--
To unsubscribe from this list: send the line "unsubscribe linux-kselftest" in
the body of a message to majordomo(a)vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Fixes: c0fa1b6c3efc ("bpf: btf: Add BTF tests")
Signed-off-by: Anders Roxell <anders.roxell(a)linaro.org>
---
tools/testing/selftests/bpf/.gitignore | 1 +
1 file changed, 1 insertion(+)
diff --git a/tools/testing/selftests/bpf/.gitignore b/tools/testing/selftests/bpf/.gitignore
index 5e1ab2f0eb79..3e3b3ced3f7c 100644
--- a/tools/testing/selftests/bpf/.gitignore
+++ b/tools/testing/selftests/bpf/.gitignore
@@ -15,3 +15,4 @@ test_libbpf_open
test_sock
test_sock_addr
urandom_read
+test_btf
--
2.17.0
--
To unsubscribe from this list: send the line "unsubscribe linux-kselftest" in
the body of a message to majordomo(a)vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Tests run on top of Petr's v11 atomic replace feature and v2 of the shadow
variable enhancement patchsets:
[PATCH 0/8] livepatch: Atomic replace feature
https://lkml.kernel.org/r/20180323120028.31451-1-pmladek@suse.com
[PATCH v2 0/2] livepatch: Allocate and free shadow variables more safely
https://lkml.kernel.org/r/20180405122315.29065-1-pmladek@suse.com
which have been combined into a git tree, then branched:
https://github.com/joe-lawrence/linux/tree/klp_kselftest_basehttps://github.com/joe-lawrence/linux/tree/klp_kselftest_v3
so that the kbuild test robot could verify:
Subject: [joe-lawrence:klp_kselftest_v3] BUILD SUCCESS 73f12d67f681e3517a8cdc12ceec07b05543d269
From: kbuild test robot <lkp(a)intel.com>
To: Joe Lawrence <joe.lawrence(a)redhat.com>
tree/branch: https://github.com/joe-lawrence/linux klp_kselftest_v3
branch HEAD: 73f12d67f681e3517a8cdc12ceec07b05543d269 selftests/livepatch: introduce tests
elapsed time: 95m
configs tested: 202
[ ... snip ... ]
If anyone knows how to indicate an external git tree base to the bot in
the commit message or header letter, let me know. Otherwise I'll have
to keep pushing up to github and ignoring its misfires as reported to
the list :(
changes from v2:
- fix module_exit(test_klp_shadow_vars_exit) in test_klp_shadow_vars.c
- silence kbuild test robot's "XXX can be static" and "Using plain
integer as NULL pointer" complaints
- re-run tests with CONFIG_LOCKDEP=y and CONFIG_PROVE_LOCKING=y
- use GFP_ATOMIC in test_klp_shadow_vars.c constructor code
changes from v1:
- Only add $(CC_FLAGS_FTRACE) for target modules
- Remove between test delay
- Reduce RETRY_INTERVAL to .1 sec
- Reduce test_callback_mod's busymod_work_func delay from 60 to 10 sec
- s/PASS/ok and s/FAIL/not ok for test output
- Move test descriptions from Documentation/livepatch/callbacks.txt
into tools/testing/selftests/livepatch/test-callbacks.sh
- Add a shadow variable test script and module
- Add a short tools/testing/selftests/livepatch/README
- to += linux-kselftest(a)vger.kernel.org
- cc += Libor, Nicolai, Artem
change from rfc:
- SPDX-License-Identifiers
- Moved livepatch test modules into lib/livepatch
- Renamed livepatch.sh (filename suffix)
- Reduced between-test delay time
- Split off common functions.sh file
- Split into separate livepatch, callbacks, and shadow-vars scrips
- Gave the tests short descriptions instead of TEST1, TEST2, etc.
Joe Lawrence (1):
selftests/livepatch: introduce tests
Documentation/livepatch/callbacks.txt | 487 -----------------
lib/Kconfig.debug | 12 +
lib/Makefile | 2 +
lib/livepatch/Makefile | 15 +
lib/livepatch/test_klp_atomic_replace.c | 69 +++
lib/livepatch/test_klp_callbacks_busy.c | 43 ++
lib/livepatch/test_klp_callbacks_demo.c | 132 +++++
lib/livepatch/test_klp_callbacks_demo2.c | 104 ++++
lib/livepatch/test_klp_callbacks_mod.c | 24 +
lib/livepatch/test_klp_livepatch.c | 62 +++
lib/livepatch/test_klp_shadow_vars.c | 236 ++++++++
tools/testing/selftests/Makefile | 1 +
tools/testing/selftests/livepatch/Makefile | 8 +
tools/testing/selftests/livepatch/README | 43 ++
tools/testing/selftests/livepatch/config | 1 +
tools/testing/selftests/livepatch/functions.sh | 196 +++++++
.../testing/selftests/livepatch/test-callbacks.sh | 607 +++++++++++++++++++++
.../testing/selftests/livepatch/test-livepatch.sh | 173 ++++++
.../selftests/livepatch/test-shadow-vars.sh | 60 ++
19 files changed, 1788 insertions(+), 487 deletions(-)
create mode 100644 lib/livepatch/Makefile
create mode 100644 lib/livepatch/test_klp_atomic_replace.c
create mode 100644 lib/livepatch/test_klp_callbacks_busy.c
create mode 100644 lib/livepatch/test_klp_callbacks_demo.c
create mode 100644 lib/livepatch/test_klp_callbacks_demo2.c
create mode 100644 lib/livepatch/test_klp_callbacks_mod.c
create mode 100644 lib/livepatch/test_klp_livepatch.c
create mode 100644 lib/livepatch/test_klp_shadow_vars.c
create mode 100644 tools/testing/selftests/livepatch/Makefile
create mode 100644 tools/testing/selftests/livepatch/README
create mode 100644 tools/testing/selftests/livepatch/config
create mode 100644 tools/testing/selftests/livepatch/functions.sh
create mode 100755 tools/testing/selftests/livepatch/test-callbacks.sh
create mode 100755 tools/testing/selftests/livepatch/test-livepatch.sh
create mode 100755 tools/testing/selftests/livepatch/test-shadow-vars.sh
--
1.8.3.1
--
To unsubscribe from this list: send the line "unsubscribe linux-kselftest" in
the body of a message to majordomo(a)vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Fixes: 192dc405f308 ("selftests: net: add tcp_mmap program")
Signed-off-by: Anders Roxell <anders.roxell(a)linaro.org>
---
tools/testing/selftests/net/.gitignore | 1 +
1 file changed, 1 insertion(+)
diff --git a/tools/testing/selftests/net/.gitignore b/tools/testing/selftests/net/.gitignore
index c612d6e38c62..5559f6add046 100644
--- a/tools/testing/selftests/net/.gitignore
+++ b/tools/testing/selftests/net/.gitignore
@@ -7,3 +7,4 @@ reuseport_bpf_cpu
reuseport_bpf_numa
reuseport_dualstack
reuseaddr_conflict
+tcp_mmap
--
2.17.0
--
To unsubscribe from this list: send the line "unsubscribe linux-kselftest" in
the body of a message to majordomo(a)vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
List all the scripts invoked by fw_run_tests.sh, so that
"make TARGETS=firmware install" keeps working.
Fixes: 29a1c00ce1df8 ("test_firmware: add simple firmware firmware test ...")
Fixes: b3cf21fae1fe0 ("test_firmware: test three firmware kernel configs ...")
Signed-off-by: Ben Hutchings <ben.hutchings(a)codethink.co.uk>
---
tools/testing/selftests/firmware/Makefile | 1 +
1 file changed, 1 insertion(+)
diff --git a/tools/testing/selftests/firmware/Makefile b/tools/testing/selftests/firmware/Makefile
index 826f38d5dd19..261c81f08606 100644
--- a/tools/testing/selftests/firmware/Makefile
+++ b/tools/testing/selftests/firmware/Makefile
@@ -4,6 +4,7 @@
all:
TEST_PROGS := fw_run_tests.sh
+TEST_FILES := fw_fallback.sh fw_filesystem.sh fw_lib.sh
include ../lib.mk
--
2.16.2
--
To unsubscribe from this list: send the line "unsubscribe linux-kselftest" in
the body of a message to majordomo(a)vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
ADI is a feature supported on SPARC M7 and newer processors to allow
hardware to catch rogue accesses to memory. ADI is supported for data
fetches only and not instruction fetches. An app can enable ADI on its
data pages, set version tags on them and use versioned addresses to
access the data pages. Upper bits of the address contain the version
tag. On M7 processors, upper four bits (bits 63-60) contain the version
tag. If a rogue app attempts to access ADI enabled data pages, its
access is blocked and processor generates an exception. Please see
Documentation/sparc/adi.txt for further details.
This patchset implements a char driver to read/write ADI versions from
privileged user space processes. Intended consumers are makedumpfile
and crash.
v4:
* Fixed messed up subject lines.
v3:
* Really fixed the copyright headers to use SPDX GPL v2. Really.
v2:
* Simplified copyright headers
* Completely reworked sparc64 selftests Makefiles. Used the
android selftests Makefiles as an example
* Added run.sh and drivers_test.sh to the sparc64 selftest
directory. Used bpf/test_kmod.sh and the android selftests
as examples
* Minor cleanups in the selftest adi-test.c
* Added calls to ksft_test_*() in the adi-test.c
Tom Hromatka (2):
char: sparc64: Add privileged ADI driver
selftests: sparc64: char: Selftest for privileged ADI driver
drivers/char/Kconfig | 12 +
drivers/char/Makefile | 1 +
drivers/char/adi.c | 240 +++++++
tools/testing/selftests/Makefile | 1 +
tools/testing/selftests/sparc64/Makefile | 46 ++
tools/testing/selftests/sparc64/drivers/.gitignore | 1 +
tools/testing/selftests/sparc64/drivers/Makefile | 15 +
tools/testing/selftests/sparc64/drivers/adi-test.c | 721 +++++++++++++++++++++
.../selftests/sparc64/drivers/drivers_test.sh | 30 +
tools/testing/selftests/sparc64/run.sh | 3 +
10 files changed, 1070 insertions(+)
create mode 100644 drivers/char/adi.c
create mode 100644 tools/testing/selftests/sparc64/Makefile
create mode 100644 tools/testing/selftests/sparc64/drivers/.gitignore
create mode 100644 tools/testing/selftests/sparc64/drivers/Makefile
create mode 100644 tools/testing/selftests/sparc64/drivers/adi-test.c
create mode 100755 tools/testing/selftests/sparc64/drivers/drivers_test.sh
create mode 100755 tools/testing/selftests/sparc64/run.sh
--
2.15.0
--
To unsubscribe from this list: send the line "unsubscribe linux-kselftest" in
the body of a message to majordomo(a)vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
This problem is fixed now.
$sudo make -C tools/testing/selftests/proc run_tests
[sudo] password for jeffrin:
make: Entering directory
'/home/jeffrin/upstream-kernel/linux/tools/testing/selftests/proc'
TAP version 13
selftests: proc-loadavg-001
========================================
ok 1..1 selftests: proc-loadavg-001 [PASS]
Please add me in changelog if i was useful.
On Sat, Apr 21, 2018 at 8:41 PM, Jeffrin Thalakkottoor
<jeffrin(a)rajagiritech.edu.in> wrote:
> hello,
>
> selftests: proc-loadavg-001
> ========================================
> not ok 1..1 selftests: proc-loadavg-001 [FAIL]
>
> To reproduce :
> make -C tools/testing/selftests/proc run_tests
>
> Linux debian 4.17.0-rc1+ #3 SMP Sat Apr 21 03:41:44 IST 2018 x86_64 GNU/Linux
>
> GNU Make 4.2.1
> Binutils 2.30
> Util-linux 2.31.1
> Mount 2.31.1
> Linux C Library 2.27
> Dynamic linker (ldd) 2.27
> readlink: missing operand
> Try 'readlink --help' for more information.
> Procps 3.3.14
> Kbd 2.0.4
> Console-tools 2.0.4
> Sh-utils 8.28
> Udev 238
>
>
>
> --
> software engineer
> rajagiri school of engineering and technology
--
software engineer
rajagiri school of engineering and technology
--
To unsubscribe from this list: send the line "unsubscribe linux-kselftest" in
the body of a message to majordomo(a)vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Hi Linus,
Please pull the following Kselftest update for 4.17-rc2
This Kselftest update for 4.17-rc2 consists of a fix from Michael Ellerman
to not run dnotify_test by default to prevent Kselftest running forever.
diff is attached.
thanks,
-- Shuah
-----------------------------------------------------------------------------------
The following changes since commit 60cc43fc888428bb2f18f08997432d426a243338:
Linux 4.17-rc1 (2018-04-15 18:24:20 -0700)
are available in the git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest tags/linux-kselftest-4.17-rc2
for you to fetch changes up to 8bf24e8319613bbe950d4188682b3a0d9441b76b:
selftests/filesystems: Don't run dnotify_test by default (2018-04-17 17:01:16 -0600)
----------------------------------------------------------------
linux-kselftest-4.17-rc2
This Kselftest update for 4.17-rc2 consists of a fix from Michael Ellerman
to not run dnotify_test by default to prevent Kselftest running forever.
----------------------------------------------------------------
Michael Ellerman (1):
selftests/filesystems: Don't run dnotify_test by default
tools/testing/selftests/filesystems/Makefile | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)
-----------------------------------------------------------------------------------
ADI is a feature supported on SPARC M7 and newer processors to allow
hardware to catch rogue accesses to memory. ADI is supported for data
fetches only and not instruction fetches. An app can enable ADI on its
data pages, set version tags on them and use versioned addresses to
access the data pages. Upper bits of the address contain the version
tag. On M7 processors, upper four bits (bits 63-60) contain the version
tag. If a rogue app attempts to access ADI enabled data pages, its
access is blocked and processor generates an exception. Please see
Documentation/sparc/adi.txt for further details.
This patchset implements a char driver to read/write ADI versions from
privileged user space processes. Intended consumers are makedumpfile
and crash.
v3:
* Really fixed the copyright headers to use SPDX GPL v2. Really.
v2:
* Simplified copyright headers
* Completely reworked sparc64 selftests Makefiles. Used the
android selftests Makefiles as an example
* Added run.sh and drivers_test.sh to the sparc64 selftest
directory. Used bpf/test_kmod.sh and the android selftests
as examples
* Minor cleanups in the selftest adi-test.c
* Added calls to ksft_test_*() in the adi-test.c
Tom Hromatka (2):
SPARC M7 and newer processors utilize ADI to version and protect
memory. This driver is capable of reading/writing ADI/MCD versions
from privileged user space processes. Addresses in the adi file are
mapped linearly to physical memory at a ratio of 1:adi_blksz. Thus,
a read (or write) of offset K in the file operates upon the ADI
version at physical address K * adi_blksz. The version information
is encoded as one version per byte. Intended consumers are
makedumpfile and crash.
Add a selftest for the sparc64 privileged ADI driver. These tests
verify the read(), pread(), write(), pwrite(), and seek()
functionality of the driver. The tests also report simple
performance statistics:
drivers/char/Kconfig | 12 +
drivers/char/Makefile | 1 +
drivers/char/adi.c | 240 +++++++
tools/testing/selftests/Makefile | 1 +
tools/testing/selftests/sparc64/Makefile | 46 ++
tools/testing/selftests/sparc64/drivers/.gitignore | 1 +
tools/testing/selftests/sparc64/drivers/Makefile | 15 +
tools/testing/selftests/sparc64/drivers/adi-test.c | 721 +++++++++++++++++++++
.../selftests/sparc64/drivers/drivers_test.sh | 30 +
tools/testing/selftests/sparc64/run.sh | 3 +
10 files changed, 1070 insertions(+)
create mode 100644 drivers/char/adi.c
create mode 100644 tools/testing/selftests/sparc64/Makefile
create mode 100644 tools/testing/selftests/sparc64/drivers/.gitignore
create mode 100644 tools/testing/selftests/sparc64/drivers/Makefile
create mode 100644 tools/testing/selftests/sparc64/drivers/adi-test.c
create mode 100755 tools/testing/selftests/sparc64/drivers/drivers_test.sh
create mode 100755 tools/testing/selftests/sparc64/run.sh
--
2.15.0
--
To unsubscribe from this list: send the line "unsubscribe linux-kselftest" in
the body of a message to majordomo(a)vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html