Tycho Andersen | 7 Oct 11:46 2015

v6 of seccomp filter c/r

Hi all,

Here's v6 of the seccomp filter c/r stuff. I've dropped the concept of a
seccomp fd entirely, in favor of just dumping the bpf data. This doesn't allow
us to restore correctly in all cases, though, as noted in the patch notes.

Note that this is now based on http://patchwork.ozlabs.org/patch/525492/ and
will need to be built with that patch applied. This gets rid of two incorrect
patches in a previous series and is a nicer API.

Thoughts welcome,


Yaniv Gardi | 7 Oct 09:54 2015

[PATCH v2] scsi: ufs: add ioctl interface for query request

This patch exposes the ioctl interface for UFS driver via SCSI device
ioctl interface. As of now UFS driver would provide the ioctl for query
interface to connected UFS device.

Signed-off-by: Dolev Raviv <draviv@...>
Signed-off-by: Noa Rubens <noag@...>
Signed-off-by: Raviv Shvili <rshvili@...>
Signed-off-by: Gilad Broner <gbroner@...>
Signed-off-by: Yaniv Gardi <ygardi@...>
 drivers/scsi/ufs/ufs.h        |  53 +++-------
 drivers/scsi/ufs/ufshcd.c     | 219 +++++++++++++++++++++++++++++++++++++++++-
 include/scsi/scsi.h           |   1 +
 include/uapi/scsi/Kbuild      |   1 +
 include/uapi/scsi/ufs/Kbuild  |   3 +
 include/uapi/scsi/ufs/ioctl.h |  58 +++++++++++
 include/uapi/scsi/ufs/ufs.h   |  67 +++++++++++++
 7 files changed, 359 insertions(+), 43 deletions(-)
 create mode 100644 include/uapi/scsi/ufs/Kbuild
 create mode 100644 include/uapi/scsi/ufs/ioctl.h
 create mode 100644 include/uapi/scsi/ufs/ufs.h

diff --git a/drivers/scsi/ufs/ufs.h b/drivers/scsi/ufs/ufs.h
index 05e0f23..eab739d 100644
--- a/drivers/scsi/ufs/ufs.h
+++ b/drivers/scsi/ufs/ufs.h
 <at>  <at>  -38,6 +38,7  <at>  <at> 

 #include <linux/mutex.h>
 #include <linux/types.h>
(Continue reading)

Kees Cook | 6 Oct 21:30 2015

[PATCH v3] selftests/seccomp: build and pass on arm64

Changing arm64 syscalls is done via a specific register set, more like s390
than like arm (specific ptrace call) and x86 (part of general registers).
Since (restarting) poll doesn't exist on arm64, switch to using nanosleep
for testing restart_syscall. And since it looks like the syscall ABI is
inconsistent on arm-compat, so we must work around it (and document it) in
the test.

Signed-off-by: Kees Cook <keescook@...>
 - correctly set syscall number on native arm64.
 - switch to nanosleep from a bad mix of poll and ppoll for testing restart.
 tools/testing/selftests/seccomp/seccomp_bpf.c | 71 ++++++++++++++++++---------
 1 file changed, 49 insertions(+), 22 deletions(-)

diff --git a/tools/testing/selftests/seccomp/seccomp_bpf.c b/tools/testing/selftests/seccomp/seccomp_bpf.c
index 770f47adf295..e7bc5d3533da 100644
--- a/tools/testing/selftests/seccomp/seccomp_bpf.c
+++ b/tools/testing/selftests/seccomp/seccomp_bpf.c
 <at>  <at>  -19,15 +19,16  <at>  <at> 
 #include <linux/prctl.h>
 #include <linux/ptrace.h>
 #include <linux/seccomp.h>
-#include <poll.h>
 #include <pthread.h>
 #include <semaphore.h>
 #include <signal.h>
 #include <stddef.h>
(Continue reading)

Kees Cook | 6 Oct 19:44 2015

[PATCH v2] selftests/seccomp: build on aarch64, document ABI

The syscall ABI is inconsistent on aarch64-compat, so at least we should
document it in the seccomp_bpf tests.

Signed-off-by: Kees Cook <keescook@...>
 tools/testing/selftests/seccomp/seccomp_bpf.c | 53 +++++++++++++++++----------
 1 file changed, 33 insertions(+), 20 deletions(-)

diff --git a/tools/testing/selftests/seccomp/seccomp_bpf.c b/tools/testing/selftests/seccomp/seccomp_bpf.c
index 770f47adf295..fe278551ea78 100644
--- a/tools/testing/selftests/seccomp/seccomp_bpf.c
+++ b/tools/testing/selftests/seccomp/seccomp_bpf.c
 <at>  <at>  -19,15 +19,16  <at>  <at> 
 #include <linux/prctl.h>
 #include <linux/ptrace.h>
 #include <linux/seccomp.h>
-#include <poll.h>
 #include <pthread.h>
 #include <semaphore.h>
 #include <signal.h>
 #include <stddef.h>
 #include <stdbool.h>
 #include <string.h>
+#include <time.h>
 #include <linux/elf.h>
 #include <sys/uio.h>
+#include <sys/utsname.h>

 #define _GNU_SOURCE
 #include <unistd.h>
(Continue reading)

Gabriel Laskar | 6 Oct 16:27 2015

[PATCH v2 3/3] falloc: expose ioctl numbers into uapi

Signed-off-by: Gabriel Laskar <gabriel@...>

v2: missed the include of <linux/types.h>

 include/linux/falloc.h      | 18 ------------------
 include/uapi/linux/falloc.h | 20 ++++++++++++++++++++
 2 files changed, 20 insertions(+), 18 deletions(-)

diff --git a/include/linux/falloc.h b/include/linux/falloc.h
index 9961110..eb651e9 100644
--- a/include/linux/falloc.h
+++ b/include/linux/falloc.h
 <at>  <at>  -3,24 +3,6  <at>  <at> 

 #include <uapi/linux/falloc.h>

- * Space reservation ioctls and argument structure
- * are designed to be compatible with the legacy XFS ioctls.
- */
-struct space_resv {
-	__s16		l_type;
-	__s16		l_whence;
-	__s64		l_start;
-	__s64		l_len;		/* len == 0 means until end of file */
-	__s32		l_sysid;
-	__u32		l_pid;
-	__s32		l_pad[4];	/* reserved area */
(Continue reading)

Andreas Gruenbacher | 5 Oct 21:36 2015

[PATCH v9 00/43] Richacls

Here is another update of the richacl patch queue.  I would like to ask for
feedback so that the core and ext4 code (patches 1-21) can be merged in the
4.4 merge window.  Changes since the last posting

 * A set_richacl inode operation similar to set_acl for POSIX ACLs was
   added.  The filesystem specific code needed for adding richacl support
   has shrunk: ext4_richacl_chmod, ext4_xattr_{list,get,set}_richacl,
   ext4_init_richacl, ext4_richacl_xattr_handler were all replaced by vfs

The complete patch queue is available here:

  git://git.kernel.org/pub/scm/linux/kernel/git/agruen/linux-richacl.git \

The richacl user-space utilitites and test suite are available here:


We still have two open issues in nfs (see the previous posting) which don't
affect the core functionality.


Andreas Gruenbacher (41):
  vfs: Add IS_ACL() and IS_RICHACL() tests
  vfs: Add MAY_CREATE_FILE and MAY_CREATE_DIR permission flags
  vfs: Add MAY_DELETE_SELF and MAY_DELETE_CHILD permission flags
(Continue reading)

Gabriel Laskar | 5 Oct 16:53 2015

[PATCH] timerfd: expose uapi header

this patch expose the timerfd apis to the userland. It is already in
glibc header sys/timerfd.h but not synchronised, and missing the ioctl
number definition.

Signed-off-by: Gabriel Laskar <gabriel@...>
 include/linux/timerfd.h      | 20 +-------------------
 include/uapi/linux/Kbuild    |  1 +
 include/uapi/linux/timerfd.h | 31 +++++++++++++++++++++++++++++++
 3 files changed, 33 insertions(+), 19 deletions(-)
 create mode 100644 include/uapi/linux/timerfd.h

diff --git a/include/linux/timerfd.h b/include/linux/timerfd.h
index bd36ce4..bab0b1a 100644
--- a/include/linux/timerfd.h
+++ b/include/linux/timerfd.h
 <at>  <at>  -8,23 +8,7  <at>  <at> 

-#include <linux/fcntl.h>
-/* For _IO helpers */
-#include <linux/ioctl.h>
- * CAREFUL: Check include/asm-generic/fcntl.h when defining
- * new flags, since they might collide with O_* ones. We want
- * to re-use O_* flags that couldn't possibly have a meaning
(Continue reading)

Gabriel Laskar | 5 Oct 16:50 2015

[PATCH 0/3] Small changes in headers

Here is some changes for ioctls numbers declared outside of uapi, or not used
at all.

Gabriel Laskar (3):
  mce: change asm/ioctls.h for linux/ioctl.h
  msm: remove unused header
  falloc: expose ioctl numbers into uapi

 arch/x86/include/uapi/asm/mce.h |  2 +-
 include/linux/falloc.h          | 18 ----------
 include/linux/msm_mdp.h         | 79 -----------------------------------------
 include/uapi/linux/falloc.h     | 18 ++++++++++
 4 files changed, 19 insertions(+), 98 deletions(-)
 delete mode 100644 include/linux/msm_mdp.h



Manjeet Pawar | 5 Oct 11:56 2015


MINSIGSTKSZ and SIGSTKSZ for ARM64 are not correctly set in latest kernel.
This patch fixes this issue.

This issue is reported in LTP (testcase: sigaltstack02.c).
Testcase failed when sigaltstack() called with stack size "MINSIGSTKSZ - 1"
Since in Glibc-2.22, MINSIGSTKSZ is set to 5120 but in kernel
it is set to 2048 so testcase gets failed.

Testcase Output:
sigaltstack02 1  TPASS  :  stgaltstack() fails, Invalid Flag value,errno:22
sigaltstack02 2  TFAIL  :  sigaltstack() returned 0, expected -1,errno:12

Reported Issue in Glibc Bugzilla:

Bugfix in Glibc-2.22:

Signed-off-by: Akhilesh Kumar <akhilesh.k@...>
Signed-off-by: Manjeet Pawar <manjeet.p@...>
Signed-off-by: Rohit Thapliyal <r.thapliyal@...>
 include/uapi/asm-generic/signal.h |    9 +++++++--
 1 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/include/uapi/asm-generic/signal.h b/include/uapi/asm-generic/signal.h
index 9df61f1..2ffbe38 100644
--- a/include/uapi/asm-generic/signal.h
(Continue reading)

Peter Jones | 2 Oct 16:34 2015

[PATCH] Add support for EDD4 fields and types.

Back in 2010, t13 EDD version 4 added a couple of storage types, some
host bridge types (that are pretty much all represented identically),
and a couple of fields on existing storage types.

This change makes the driver expose those to userland.

Signed-off-by: Peter Jones <pjones@...>
 drivers/firmware/edd.c   | 15 ++++++++++-----
 include/uapi/linux/edd.h |  6 +++++-
 2 files changed, 15 insertions(+), 6 deletions(-)

diff --git a/drivers/firmware/edd.c b/drivers/firmware/edd.c
index e229576..5092b92 100644
--- a/drivers/firmware/edd.c
+++ b/drivers/firmware/edd.c
 <at>  <at>  -152,15 +152,15  <at>  <at>  edd_show_host_bus(struct edd_device *edev, char *buf)
 	} else if (!strncmp(info->params.host_bus_type, "PCIX", 4) ||
 		   !strncmp(info->params.host_bus_type, "PCI", 3) ||
-		   !strncmp(info->params.host_bus_type, "XPRS", 4)) {
+		   !strncmp(info->params.host_bus_type, "XPRS", 4) ||
+		   !strncmp(info->params.host_bus_type, "HTPT", 4)) {
 		p += scnprintf(p, left,
 			     "\t%02x:%02x.%d  channel: %u\n",
-	} else if (!strncmp(info->params.host_bus_type, "IBND", 4) ||
(Continue reading)

Hiraku Toyooka | 2 Oct 13:46 2015

[PATCH v2 0/2] selftests/pstore: add pstore test script

These scripts include test cases which check pstore behavior. This
is useful to avoid regressions of pstore.

Changes since v1:
 * Exit with 1 in pstore/Makefile when pstore_crash_test failed.
 * Create helper functions to make the tests much more readable.
 * Use /sys/module/pstore/parameters/backend to check pstore backend is
 * Show content of /sys/module/.../backend and /proc/cmdline for debug
 * Give UUID to each execution of test script.
 * Write unique test string with UUID into pmsg.
 * Check only one test string pattern appears in pmsg after crash.
 * Check UUID written to pmsg matches across crash.
 * Don't touch panic_on_oops because it is not necessary for reboot on crash

(v1: http://www.kernelhub.org/?msg=831044&p=2)

I also confirmed that these scripts work fine with kdump reboot with
kernel boot parameter 'crash_kexec_post_notifiers'.


Hiraku Toyooka (2):
      selftests/pstore: add pstore test script for pre-reboot
      selftests/pstore: add pstore test scripts going with reboot

 tools/testing/selftests/Makefile                   |    4 +
 tools/testing/selftests/pstore/Makefile            |   15 ++++
 tools/testing/selftests/pstore/common_tests        |   83 ++++++++++++++++++++
 tools/testing/selftests/pstore/pstore_crash_test   |   30 +++++++
(Continue reading)