* [PATCH v4 13/20] selftests/ptrace: add install target to enable test install
From: Shuah Khan @ 2015-01-06 19:43 UTC (permalink / raw)
To: mmarek-AlSwsSmVLrQ, gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r,
akpm-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b,
rostedt-nx8X9YLhiw1AfugRpC6u6w, mingo-H+wXaHxf7aLQT0dZR+AlfA,
davem-fT/PcQaiUtIeIZ0/mPfg9Q, keescook-F7+t8E8rja9g9hUCZPvPmw,
tranmanphong-Re5JQEeQqe8AvxtiuMwx3w, mpe-Gsx/Oe8HsFggBc27wqDAHg,
cov-sgV2jX0FEOL9JmXXK+q4OQ, dh.herrmann-Re5JQEeQqe8AvxtiuMwx3w,
hughd-hpIqsD4AKlfQT0dZR+AlfA, bobby.prani-Re5JQEeQqe8AvxtiuMwx3w,
serge.hallyn-GeWIH/nMZzLQT0dZR+AlfA,
ebiederm-aS9lmoZGLiVWk0Htik3J/w, tim.bird-/MT0OVThwyLZJqsBc5GL+g,
josh-iaAMLnmF4UmaiuxdJuQwMA, koct9i-Re5JQEeQqe8AvxtiuMwx3w,
masami.hiramatsu.pt-FCd8Q96Dh0JBDgjK7y7TUQ
Cc: Shuah Khan, linux-kbuild-u79uwXL29TY76Z2rM5mHXA,
linux-kernel-u79uwXL29TY76Z2rM5mHXA,
linux-api-u79uwXL29TY76Z2rM5mHXA, netdev-u79uwXL29TY76Z2rM5mHXA
In-Reply-To: <cover.1420571615.git.shuahkh-JPH+aEBZ4P+UEJcrhfAQsw@public.gmane.org>
Add a new make target to enable installing test. This target
installs test in the kselftest install location and add to the
kselftest script to run the test. Install target can be run
only from top level kernel source directory.
Signed-off-by: Shuah Khan <shuahkh-JPH+aEBZ4P+UEJcrhfAQsw@public.gmane.org>
---
tools/testing/selftests/ptrace/Makefile | 16 +++++++++++++---
1 file changed, 13 insertions(+), 3 deletions(-)
diff --git a/tools/testing/selftests/ptrace/Makefile b/tools/testing/selftests/ptrace/Makefile
index 47ae2d3..6fc352c 100644
--- a/tools/testing/selftests/ptrace/Makefile
+++ b/tools/testing/selftests/ptrace/Makefile
@@ -1,10 +1,20 @@
CFLAGS += -iquote../../../../include/uapi -Wall
-peeksiginfo: peeksiginfo.c
-all: peeksiginfo
+TEST_STR = ./peeksiginfo || echo 'peeksiginfo selftests: [FAIL]'
+
+all:
+ gcc peeksiginfo.c -o peeksiginfo
+
+install:
+ifdef INSTALL_KSFT_PATH
+ install ./peeksiginfo $(INSTALL_KSFT_PATH)
+ @echo "$(TEST_STR)" >> $(KSELFTEST)
+else
+ @echo "Run make kselftest_install in top level source directory"
+endif
clean:
rm -f peeksiginfo
run_tests: all
- @./peeksiginfo || echo "peeksiginfo selftests: [FAIL]"
+ @$(TEST_STR)
--
2.1.0
^ permalink raw reply related
* [PATCH v4 14/20] selftests/size: add install target to enable test install
From: Shuah Khan @ 2015-01-06 19:43 UTC (permalink / raw)
To: mmarek, gregkh, akpm, rostedt, mingo, davem, keescook,
tranmanphong, mpe, cov, dh.herrmann, hughd, bobby.prani,
serge.hallyn, ebiederm, tim.bird, josh, koct9i,
masami.hiramatsu.pt
Cc: Shuah Khan, linux-kbuild, linux-kernel, linux-api, netdev
In-Reply-To: <cover.1420571615.git.shuahkh@osg.samsung.com>
Add a new make target to enable installing test. This target
installs test in the kselftest install location and add to the
kselftest script to run the test. Install target can be run
only from top level kernel source directory.
Signed-off-by: Shuah Khan <shuahkh@osg.samsung.com>
---
tools/testing/selftests/size/Makefile | 12 +++++++++++-
1 file changed, 11 insertions(+), 1 deletion(-)
diff --git a/tools/testing/selftests/size/Makefile b/tools/testing/selftests/size/Makefile
index 04dc25e..a1478fa 100644
--- a/tools/testing/selftests/size/Makefile
+++ b/tools/testing/selftests/size/Makefile
@@ -1,12 +1,22 @@
CC = $(CROSS_COMPILE)gcc
+TEST_STR = ./get_size || echo 'get_size selftests: [FAIL]'
+
all: get_size
get_size: get_size.c
$(CC) -static -ffreestanding -nostartfiles -s $< -o $@
+install:
+ifdef INSTALL_KSFT_PATH
+ install ./get_size $(INSTALL_KSFT_PATH)
+ @echo "$(TEST_STR)" >> $(KSELFTEST)
+else
+ @echo "Run make kselftest_install in top level source directory"
+endif
+
run_tests: all
- ./get_size
+ @$(TEST_STR)
clean:
$(RM) get_size
--
2.1.0
^ permalink raw reply related
* [PATCH v4 15/20] selftests/sysctl: add install target to enable test install
From: Shuah Khan @ 2015-01-06 19:43 UTC (permalink / raw)
To: mmarek-AlSwsSmVLrQ, gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r,
akpm-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b,
rostedt-nx8X9YLhiw1AfugRpC6u6w, mingo-H+wXaHxf7aLQT0dZR+AlfA,
davem-fT/PcQaiUtIeIZ0/mPfg9Q, keescook-F7+t8E8rja9g9hUCZPvPmw,
tranmanphong-Re5JQEeQqe8AvxtiuMwx3w, mpe-Gsx/Oe8HsFggBc27wqDAHg,
cov-sgV2jX0FEOL9JmXXK+q4OQ, dh.herrmann-Re5JQEeQqe8AvxtiuMwx3w,
hughd-hpIqsD4AKlfQT0dZR+AlfA, bobby.prani-Re5JQEeQqe8AvxtiuMwx3w,
serge.hallyn-GeWIH/nMZzLQT0dZR+AlfA,
ebiederm-aS9lmoZGLiVWk0Htik3J/w, tim.bird-/MT0OVThwyLZJqsBc5GL+g,
josh-iaAMLnmF4UmaiuxdJuQwMA, koct9i-Re5JQEeQqe8AvxtiuMwx3w,
masami.hiramatsu.pt-FCd8Q96Dh0JBDgjK7y7TUQ
Cc: Shuah Khan, linux-kbuild-u79uwXL29TY76Z2rM5mHXA,
linux-kernel-u79uwXL29TY76Z2rM5mHXA,
linux-api-u79uwXL29TY76Z2rM5mHXA, netdev-u79uwXL29TY76Z2rM5mHXA
In-Reply-To: <cover.1420571615.git.shuahkh-JPH+aEBZ4P+UEJcrhfAQsw@public.gmane.org>
Add a new make target to enable installing test. This target
installs test in the kselftest install location and add to the
kselftest script to run the test. Install target can be run
only from top level kernel source directory.
Signed-off-by: Shuah Khan <shuahkh-JPH+aEBZ4P+UEJcrhfAQsw@public.gmane.org>
---
tools/testing/selftests/sysctl/Makefile | 17 +++++++++++++++--
1 file changed, 15 insertions(+), 2 deletions(-)
diff --git a/tools/testing/selftests/sysctl/Makefile b/tools/testing/selftests/sysctl/Makefile
index 0a92ada..9119ef1 100644
--- a/tools/testing/selftests/sysctl/Makefile
+++ b/tools/testing/selftests/sysctl/Makefile
@@ -4,12 +4,25 @@
# No binaries, but make sure arg-less "make" doesn't trigger "run_tests".
all:
+INSTALL_PROGS = common_tests run_numerictests run_stringtests
+NUMERIC_TEST_STR = /bin/sh ./run_numerictests
+STRING_TEST_STR = /bin/sh ./run_stringtests
+
# Allow specific tests to be selected.
test_num:
- @/bin/sh ./run_numerictests
+ @$(NUMERIC_TEST_STR)
test_string:
- @/bin/sh ./run_stringtests
+ @$(STRING_TEST_STR)
+
+install: all
+ifdef INSTALL_KSFT_PATH
+ install $(INSTALL_PROGS) $(INSTALL_KSFT_PATH)
+ @echo "$(NUMERIC_TEST_STR)" >> $(KSELFTEST)
+ @echo "$(STRING_TEST_STR)" >> $(KSELFTEST)
+else
+ @echo "Run make kselftest_install in top level source directory"
+endif
run_tests: all test_num test_string
--
2.1.0
^ permalink raw reply related
* [PATCH v4 16/20] selftests/timers: add install target to enable test install
From: Shuah Khan @ 2015-01-06 19:43 UTC (permalink / raw)
To: mmarek, gregkh, akpm, rostedt, mingo, davem, keescook,
tranmanphong, mpe, cov, dh.herrmann, hughd, bobby.prani,
serge.hallyn, ebiederm, tim.bird, josh, koct9i,
masami.hiramatsu.pt
Cc: Shuah Khan, linux-kbuild, linux-kernel, linux-api, netdev
In-Reply-To: <cover.1420571615.git.shuahkh@osg.samsung.com>
Add a new make target to enable installing test. This target
installs test in the kselftest install location and add to the
kselftest script to run the test. Install target can be run
only from top level kernel source directory.
Signed-off-by: Shuah Khan <shuahkh@osg.samsung.com>
---
tools/testing/selftests/timers/Makefile | 12 +++++++++++-
1 file changed, 11 insertions(+), 1 deletion(-)
diff --git a/tools/testing/selftests/timers/Makefile b/tools/testing/selftests/timers/Makefile
index eb2859f..6c03e92 100644
--- a/tools/testing/selftests/timers/Makefile
+++ b/tools/testing/selftests/timers/Makefile
@@ -1,8 +1,18 @@
+TEST_STR = ./posix_timers
+
all:
gcc posix_timers.c -o posix_timers -lrt
+install:
+ifdef INSTALL_KSFT_PATH
+ install ./posix_timers $(INSTALL_KSFT_PATH)
+ @echo "$(TEST_STR)" >> $(KSELFTEST)
+else
+ @echo "Run make kselftest_install in top level source directory"
+endif
+
run_tests: all
- ./posix_timers
+ @$(TEST_STR)
clean:
rm -f ./posix_timers
--
2.1.0
^ permalink raw reply related
* [PATCH v4 17/20] selftests/user: add install target to enable test install
From: Shuah Khan @ 2015-01-06 19:43 UTC (permalink / raw)
To: mmarek, gregkh, akpm, rostedt, mingo, davem, keescook,
tranmanphong, mpe, cov, dh.herrmann, hughd, bobby.prani,
serge.hallyn, ebiederm, tim.bird, josh, koct9i,
masami.hiramatsu.pt
Cc: Shuah Khan, linux-kbuild, linux-kernel, linux-api, netdev
In-Reply-To: <cover.1420571615.git.shuahkh@osg.samsung.com>
Add a new make target to enable installing test. This target
installs test in the kselftest install location and add to the
kselftest script to run the test. Install target can be run
only from top level kernel source directory.
Signed-off-by: Shuah Khan <shuahkh@osg.samsung.com>
---
tools/testing/selftests/user/Makefile | 12 +++++++++++-
1 file changed, 11 insertions(+), 1 deletion(-)
diff --git a/tools/testing/selftests/user/Makefile b/tools/testing/selftests/user/Makefile
index 12c9d15..3d38308 100644
--- a/tools/testing/selftests/user/Makefile
+++ b/tools/testing/selftests/user/Makefile
@@ -1,7 +1,17 @@
# Makefile for user memory selftests
+TEST_STR = ./test_user_copy.sh
+
# No binaries, but make sure arg-less "make" doesn't trigger "run_tests"
all:
+install:
+ifdef INSTALL_KSFT_PATH
+ install ./test_user_copy.sh $(INSTALL_KSFT_PATH)
+ @echo "$(TEST_STR)" >> $(KSELFTEST)
+else
+ @echo "Run make kselftest_install in top level source directory"
+endif
+
run_tests: all
- ./test_user_copy.sh
+ @$(TEST_STR)
--
2.1.0
^ permalink raw reply related
* [PATCH v4 18/20] selftests/vm: add install target to enable test install
From: Shuah Khan @ 2015-01-06 19:43 UTC (permalink / raw)
To: mmarek, gregkh, akpm, rostedt, mingo, davem, keescook,
tranmanphong, mpe, cov, dh.herrmann, hughd, bobby.prani,
serge.hallyn, ebiederm, tim.bird, josh, koct9i,
masami.hiramatsu.pt
Cc: Shuah Khan, linux-kbuild, linux-kernel, linux-api, netdev
In-Reply-To: <cover.1420571615.git.shuahkh@osg.samsung.com>
Add a new make target to enable installing test. This target
installs test in the kselftest install location and add to the
kselftest script to run the test. Install target can be run
only from top level kernel source directory.
Signed-off-by: Shuah Khan <shuahkh@osg.samsung.com>
---
tools/testing/selftests/vm/Makefile | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
diff --git a/tools/testing/selftests/vm/Makefile b/tools/testing/selftests/vm/Makefile
index 4c4b1f6..3312057 100644
--- a/tools/testing/selftests/vm/Makefile
+++ b/tools/testing/selftests/vm/Makefile
@@ -4,13 +4,22 @@ CC = $(CROSS_COMPILE)gcc
CFLAGS = -Wall
BINARIES = hugepage-mmap hugepage-shm map_hugetlb thuge-gen hugetlbfstest
BINARIES += transhuge-stress
+TEST_STR = /bin/sh ./run_vmtests || echo 'vmtests: [FAIL]'
all: $(BINARIES)
%: %.c
$(CC) $(CFLAGS) -o $@ $^
+install:
+ifdef INSTALL_KSFT_PATH
+ install run_vmtests $(BINARIES) $(INSTALL_KSFT_PATH)
+ @echo "$(TEST_STR)" >> $(KSELFTEST)
+else
+ @echo "Run make kselftest_install in top level source directory"
+endif
+
run_tests: all
- @/bin/sh ./run_vmtests || (echo "vmtests: [FAIL]"; exit 1)
+ @$(TEST_STR)
clean:
$(RM) $(BINARIES)
--
2.1.0
^ permalink raw reply related
* [PATCH v4 19/20] selftests: add install target to enable test install
From: Shuah Khan @ 2015-01-06 19:43 UTC (permalink / raw)
To: mmarek, gregkh, akpm, rostedt, mingo, davem, keescook,
tranmanphong, mpe, cov, dh.herrmann, hughd, bobby.prani,
serge.hallyn, ebiederm, tim.bird, josh, koct9i,
masami.hiramatsu.pt
Cc: Shuah Khan, linux-kbuild, linux-kernel, linux-api, netdev
In-Reply-To: <cover.1420571615.git.shuahkh@osg.samsung.com>
Add a new make target to enable installing selftests. This
new target will call install targets for the tests that are
specified in INSTALL_TARGETS. During install, a script is
generated to run tests that are installed. This script will
be installed in the selftest install directory. Individual
test Makefiles are changed to add to the script. This will
allow new tests to add install and run test commands to the
generated kselftest script. run_tests target runs the
generated kselftest script to run tests when it is initiated
from from "make kselftest" from top level source directory.
Approach:
Add a new kselftest_install target:
-- exports kselftest INSTALL_KSFT_PATH
default $(INSTALL_MOD_PATH)/lib/kselftest/$(KERNELRELEASE)
-- exports INSTALL_KSFT_PATH
-- runs selftests make kselftest_install target:
selftests make install target
-- Sets up environment for sub-makefiles
-- creates kselftest.sh script in install install dir
-- runs install targets for INSTALL_TARGETS
-- install target can be run only from top level source dir.
Individual test make install targets:
-- install test programs and/or scripts in install dir
-- append to the ksefltest.sh file to add commands to run test
-- install target can be run only from top level source dir.
Adds the following new ways to initiate selftests:
-- Installing and running kselftest from install directory
by running "make kselftest"
-- Running kselftest script from install directory
Maintains the following ways to run tests:
-- make TARGETS=net kselftest
-- make -C tools/testing/selftests run_tests
-- make -C tools/testing/selftests TARGETS=target run_tests
Ability specify targets: e.g TARGETS=net
-- make run_tests from tools/testing/selftests
-- make run_tests from individual test directories:
e.g: make run_tests in tools/testing/selftests/net
Signed-off-by: Shuah Khan <shuahkh@osg.samsung.com>
---
tools/testing/selftests/Makefile | 54 +++++++++++++++++++++++++++++++++++++++-
1 file changed, 53 insertions(+), 1 deletion(-)
diff --git a/tools/testing/selftests/Makefile b/tools/testing/selftests/Makefile
index 4e51122..45661ce 100644
--- a/tools/testing/selftests/Makefile
+++ b/tools/testing/selftests/Makefile
@@ -22,15 +22,67 @@ TARGETS += vm
TARGETS_HOTPLUG = cpu-hotplug
TARGETS_HOTPLUG += memory-hotplug
+# Used in only run_tests target when make kselftest is run in
+# top level source directory
+ifeq "$(origin TARGETS)" "command line"
+no_install_run=1
+endif
+
+ifdef INSTALL_KSFT_PATH
+KSELFTEST=$(INSTALL_KSFT_PATH)/kselftest.sh
+export KSELFTEST
+# TODO add install target for SKIP_INSTALL_TARGETS
+SKIP_INSTALL_TARGETS = exec powerpc
+INSTALL_TARGETS = $(filter-out $(SKIP_INSTALL_TARGETS),$(TARGETS)) ipc
+else
+no_install_run=1
+endif
+
+INSTALL_KSFT_ERR = "Run make kselftest_install in top level source directory"
+
all:
for TARGET in $(TARGETS); do \
make -C $$TARGET; \
done;
-run_tests: all
+install:
+ifdef INSTALL_KSFT_PATH
+ rm -rf $(INSTALL_KSFT_PATH)
+ mkdir -p $(INSTALL_KSFT_PATH)
+
+ make all
+ @echo "#!/bin/sh\n# Kselftest Run Tests ...." >> $(KSELFTEST)
+ @echo "# This file is generated by kselftest_install" >> $(KSELFTEST)
+ @echo "# Please don't change it !!\n" >> $(KSELFTEST)
+ @echo "echo \"============================\"" >> $(KSELFTEST)
+ for TARGET in $(INSTALL_TARGETS); do \
+ echo "Installing $$TARGET"; \
+ echo "echo \"Start $$TARGET test ....\"" >> $(KSELFTEST); \
+ make -C $$TARGET install; \
+ echo "echo \"End $$TARGET test ....\"" >> $(KSELFTEST); \
+ echo "echo \"============================\"" >> $(KSELFTEST); \
+ done;
+ chmod +x $(KSELFTEST)
+else
+ @echo $(INSTALL_KSFT_ERR)
+endif
+
+run_tests:
+ifndef no_install_run
+# ifdef INSTALL_KSFT_PATH
+ make install
+ @cd $(INSTALL_KSFT_PATH); ./kselftest.sh; cd -
+# invoke run_tests for SKIP_INSTALL_TARGETS
+ for TARGET in $(SKIP_INSTALL_TARGETS); do \
+ make -C $$TARGET run_tests; \
+ done;
+# endif
+else
+ make all
for TARGET in $(TARGETS); do \
make -C $$TARGET run_tests; \
done;
+endif
hotplug:
for TARGET in $(TARGETS_HOTPLUG); do \
--
2.1.0
^ permalink raw reply related
* [PATCH v4 20/20] kbuild: add a new kselftest_install make target to install selftests
From: Shuah Khan @ 2015-01-06 19:43 UTC (permalink / raw)
To: mmarek, gregkh, akpm, rostedt, mingo, davem, keescook,
tranmanphong, mpe, cov, dh.herrmann, hughd, bobby.prani,
serge.hallyn, ebiederm, tim.bird, josh, koct9i,
masami.hiramatsu.pt
Cc: Shuah Khan, linux-kbuild, linux-kernel, linux-api, netdev
In-Reply-To: <cover.1420571615.git.shuahkh@osg.samsung.com>
Add a new make target to install to install kernel selftests.
This new target will build and install selftests. kselftest
target now depends on kselftest_install and runs the generated
kselftest script to reduce duplicate work and for common look
and feel when running tests.
make kselftest_target:
-- exports kselftest INSTALL_KSFT_PATH
default $(INSTALL_MOD_PATH)/lib/kselftest/$(KERNELRELEASE)
-- exports INSTALL_KSFT_PATH
-- runs selftests make install target
Signed-off-by: Shuah Khan <shuahkh@osg.samsung.com>
---
Makefile | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/Makefile b/Makefile
index b1c3254..99fac47 100644
--- a/Makefile
+++ b/Makefile
@@ -1072,12 +1072,21 @@ headers_check: headers_install
$(Q)$(MAKE) $(hdr-inst)=arch/$(hdr-arch)/include/uapi/asm $(hdr-dst) HDRCHECK=1
# ---------------------------------------------------------------------------
-# Kernel selftest
+# Kernel selftest targets
+
+# Default base path for kselftest install
+INSTALL_KSFT_PATH = $(INSTALL_MOD_PATH)/lib/kselftest/$(KERNELRELEASE)
+export INSTALL_KSFT_PATH
PHONY += kselftest
kselftest:
$(Q)$(MAKE) -C tools/testing/selftests run_tests
+# Kernel selftest install
+PHONY += kselftest_install
+kselftest_install:
+ $(Q)$(MAKE) -C tools/testing/selftests install
+
# ---------------------------------------------------------------------------
# Modules
@@ -1286,6 +1295,9 @@ help:
@echo ' Build, install, and boot kernel before'
@echo ' running kselftest on it'
@echo ''
+ @echo ' kselftest_install - Install Kselftests to INSTALL_KSFT_PATH'
+ @echo ' default: $(INSTALL_MOD_PATH)/lib/kselftest/$(KERNELRELEASE)'
+ @echo ''
@echo 'Kernel packaging:'
@$(MAKE) $(build)=$(package-dir) help
@echo ''
--
2.1.0
^ permalink raw reply related
* Re: [v8 3/5] ext4: adds project quota support
From: Andreas Dilger @ 2015-01-06 20:01 UTC (permalink / raw)
To: Li Xi
Cc: Linux Filesystem Development List, ext4 development, linux-api,
tytso, jack, viro, hch, dmonakhov
In-Reply-To: <1418102548-5469-4-git-send-email-lixi@ddn.com>
On Dec 8, 2014, at 10:22 PM, Li Xi <pkuelelixi@gmail.com> wrote:
>
> This patch adds mount options for enabling/disabling project quota
> accounting and enforcement. A new specific inode is also used for
> project quota accounting.
Judy looking through these patches again and saw a minor issue:
> Signed-off-by: Li Xi <lixi@ddn.com>
> Signed-off-by: Dmitry Monakhov <dmonakhov@openvz.org>
> Reviewed-by: Jan Kara <jack@suse.cz>
> ---
> fs/ext4/ext4.h | 8 +++-
> fs/ext4/super.c | 95 ++++++++++++++++++++++++++++++++++++++++++++++++------
> 2 files changed, 90 insertions(+), 13 deletions(-)
>
> diff --git a/fs/ext4/ext4.h b/fs/ext4/ext4.h
> index 8bd1da9..136e18c 100644
> --- a/fs/ext4/ext4.h
> +++ b/fs/ext4/ext4.h
> @@ -208,6 +208,7 @@ struct ext4_io_submit {
> #define EXT4_UNDEL_DIR_INO 6 /* Undelete directory inode */
> #define EXT4_RESIZE_INO 7 /* Reserved group descriptors inode */
> #define EXT4_JOURNAL_INO 8 /* Journal inode */
> +#define EXT4_PRJ_QUOTA_INO 9 /* Project quota inode */
>
> /* First non-reserved inode for old ext4 filesystems */
> #define EXT4_GOOD_OLD_FIRST_INO 11
> @@ -982,6 +983,7 @@ struct ext4_inode_info {
> #define EXT4_MOUNT_DIOREAD_NOLOCK 0x400000 /* Enable support for dio read nolocking */
> #define EXT4_MOUNT_JOURNAL_CHECKSUM 0x800000 /* Journal checksums */
> #define EXT4_MOUNT_JOURNAL_ASYNC_COMMIT 0x1000000 /* Journal Async Commit */
> +#define EXT4_MOUNT_PRJQUOTA 0x2000000 /* Project quota support */
> #define EXT4_MOUNT_DELALLOC 0x8000000 /* Delalloc support */
> #define EXT4_MOUNT_DATA_ERR_ABORT 0x10000000 /* Abort on file data write */
> #define EXT4_MOUNT_BLOCK_VALIDITY 0x20000000 /* Block validity checking */
> @@ -1157,7 +1159,8 @@ struct ext4_super_block {
> __le32 s_grp_quota_inum; /* inode for tracking group quota */
> __le32 s_overhead_clusters; /* overhead blocks/clusters in fs */
> __le32 s_backup_bgs[2]; /* groups with sparse_super2 SBs */
> - __le32 s_reserved[106]; /* Padding to the end of the block */
> + __le32 s_prj_quota_inum; /* inode for tracking project quota */
> + __le32 s_reserved[105]; /* Padding to the end of the block */
> __le32 s_checksum; /* crc32c(superblock) */
> };
>
> @@ -1172,7 +1175,7 @@ struct ext4_super_block {
> #define EXT4_MF_FS_ABORTED 0x0002 /* Fatal error detected */
>
> /* Number of quota types we support */
> -#define EXT4_MAXQUOTAS 2
> +#define EXT4_MAXQUOTAS 3
>
> /*
> * fourth extended-fs super-block data in memory
> @@ -1364,6 +1367,7 @@ static inline int ext4_valid_inum(struct super_block *sb, unsigned long ino)
> ino == EXT4_BOOT_LOADER_INO ||
> ino == EXT4_JOURNAL_INO ||
> ino == EXT4_RESIZE_INO ||
> + ino == EXT4_PRJ_QUOTA_INO ||
> (ino >= EXT4_FIRST_INO(sb) &&
> ino <= le32_to_cpu(EXT4_SB(sb)->s_es->s_inodes_count));
> }
> diff --git a/fs/ext4/super.c b/fs/ext4/super.c
> index 6b67795..f5d8ca2 100644
> --- a/fs/ext4/super.c
> +++ b/fs/ext4/super.c
> @@ -1035,8 +1035,8 @@ static int bdev_try_to_free_page(struct super_block *sb, struct page *page,
> }
>
> #ifdef CONFIG_QUOTA
> -#define QTYPE2NAME(t) ((t) == USRQUOTA ? "user" : "group")
> -#define QTYPE2MOPT(on, t) ((t) == USRQUOTA?((on)##USRJQUOTA):((on)##GRPJQUOTA))
> +static char *quotatypes[] = INITQFNAMES;
> +#define QTYPE2NAME(t) (quotatypes[t])
>
> static int ext4_write_dquot(struct dquot *dquot);
> static int ext4_acquire_dquot(struct dquot *dquot);
> @@ -1128,10 +1128,11 @@ enum {
> Opt_journal_path, Opt_journal_checksum, Opt_journal_async_commit,
> Opt_abort, Opt_data_journal, Opt_data_ordered, Opt_data_writeback,
> Opt_data_err_abort, Opt_data_err_ignore,
> - Opt_usrjquota, Opt_grpjquota, Opt_offusrjquota, Opt_offgrpjquota,
> + Opt_usrjquota, Opt_grpjquota, Opt_prjjquota,
> + Opt_offusrjquota, Opt_offgrpjquota, Opt_offprjjquota,
> Opt_jqfmt_vfsold, Opt_jqfmt_vfsv0, Opt_jqfmt_vfsv1, Opt_quota,
> Opt_noquota, Opt_barrier, Opt_nobarrier, Opt_err,
> - Opt_usrquota, Opt_grpquota, Opt_i_version,
> + Opt_usrquota, Opt_grpquota, Opt_prjquota, Opt_i_version,
> Opt_stripe, Opt_delalloc, Opt_nodelalloc, Opt_mblk_io_submit,
> Opt_nomblk_io_submit, Opt_block_validity, Opt_noblock_validity,
> Opt_inode_readahead_blks, Opt_journal_ioprio,
> @@ -1183,6 +1184,8 @@ static const match_table_t tokens = {
> {Opt_usrjquota, "usrjquota=%s"},
> {Opt_offgrpjquota, "grpjquota="},
> {Opt_grpjquota, "grpjquota=%s"},
> + {Opt_offprjjquota, "prjjquota="},
> + {Opt_prjjquota, "prjjquota=%s"},
We don't need to be able to specify the project quota inodes on the
mount command line. This was only needed for supporting old (non-
journaled) user and group quotas, but there is no chance of having
old project quotas.
> {Opt_jqfmt_vfsold, "jqfmt=vfsold"},
> {Opt_jqfmt_vfsv0, "jqfmt=vfsv0"},
> {Opt_jqfmt_vfsv1, "jqfmt=vfsv1"},
> @@ -1190,6 +1193,7 @@ static const match_table_t tokens = {
> {Opt_noquota, "noquota"},
> {Opt_quota, "quota"},
> {Opt_usrquota, "usrquota"},
> + {Opt_prjquota, "prjquota"},
Do we want to allow non-journaled project quota at all? I don't
see that as a benefit, and it was only allowed for user/group
quota for compatibility reasons. Since the project quota support
will need an updated e2fsprogs anyway, it may as well be journaled
from the start.
The rest of the patch looks good.
Cheers, Andreas
> {Opt_barrier, "barrier=%u"},
> {Opt_barrier, "barrier"},
> {Opt_nobarrier, "nobarrier"},
> @@ -1404,12 +1408,17 @@ static const struct mount_opts {
> MOPT_SET | MOPT_Q},
> {Opt_grpquota, EXT4_MOUNT_QUOTA | EXT4_MOUNT_GRPQUOTA,
> MOPT_SET | MOPT_Q},
> + {Opt_prjquota, EXT4_MOUNT_QUOTA | EXT4_MOUNT_PRJQUOTA,
> + MOPT_SET | MOPT_Q},
> {Opt_noquota, (EXT4_MOUNT_QUOTA | EXT4_MOUNT_USRQUOTA |
> - EXT4_MOUNT_GRPQUOTA), MOPT_CLEAR | MOPT_Q},
> + EXT4_MOUNT_GRPQUOTA | EXT4_MOUNT_PRJQUOTA),
> + MOPT_CLEAR | MOPT_Q},
> {Opt_usrjquota, 0, MOPT_Q},
> {Opt_grpjquota, 0, MOPT_Q},
> + {Opt_prjjquota, 0, MOPT_Q},
> {Opt_offusrjquota, 0, MOPT_Q},
> {Opt_offgrpjquota, 0, MOPT_Q},
> + {Opt_offprjjquota, 0, MOPT_Q},
> {Opt_jqfmt_vfsold, QFMT_VFS_OLD, MOPT_QFMT},
> {Opt_jqfmt_vfsv0, QFMT_VFS_V0, MOPT_QFMT},
> {Opt_jqfmt_vfsv1, QFMT_VFS_V1, MOPT_QFMT},
> @@ -1432,10 +1441,14 @@ static int handle_mount_opt(struct super_block *sb, char *opt, int token,
> return set_qf_name(sb, USRQUOTA, &args[0]);
> else if (token == Opt_grpjquota)
> return set_qf_name(sb, GRPQUOTA, &args[0]);
> + else if (token == Opt_prjjquota)
> + return set_qf_name(sb, PRJQUOTA, &args[0]);
> else if (token == Opt_offusrjquota)
> return clear_qf_name(sb, USRQUOTA);
> else if (token == Opt_offgrpjquota)
> return clear_qf_name(sb, GRPQUOTA);
> + else if (token == Opt_offprjjquota)
> + return clear_qf_name(sb, PRJQUOTA);
> #endif
> switch (token) {
> case Opt_noacl:
> @@ -1661,19 +1674,28 @@ static int parse_options(char *options, struct super_block *sb,
> }
> #ifdef CONFIG_QUOTA
> if (EXT4_HAS_RO_COMPAT_FEATURE(sb, EXT4_FEATURE_RO_COMPAT_QUOTA) &&
> - (test_opt(sb, USRQUOTA) || test_opt(sb, GRPQUOTA))) {
> + (test_opt(sb, USRQUOTA) ||
> + test_opt(sb, GRPQUOTA) ||
> + test_opt(sb, PRJQUOTA))) {
> ext4_msg(sb, KERN_ERR, "Cannot set quota options when QUOTA "
> "feature is enabled");
> return 0;
> }
> - if (sbi->s_qf_names[USRQUOTA] || sbi->s_qf_names[GRPQUOTA]) {
> + if (sbi->s_qf_names[USRQUOTA] ||
> + sbi->s_qf_names[GRPQUOTA] ||
> + sbi->s_qf_names[PRJQUOTA]) {
> if (test_opt(sb, USRQUOTA) && sbi->s_qf_names[USRQUOTA])
> clear_opt(sb, USRQUOTA);
>
> if (test_opt(sb, GRPQUOTA) && sbi->s_qf_names[GRPQUOTA])
> clear_opt(sb, GRPQUOTA);
>
> - if (test_opt(sb, GRPQUOTA) || test_opt(sb, USRQUOTA)) {
> + if (test_opt(sb, PRJQUOTA) && sbi->s_qf_names[PRJQUOTA])
> + clear_opt(sb, PRJQUOTA);
> +
> + if (test_opt(sb, GRPQUOTA) ||
> + test_opt(sb, USRQUOTA) ||
> + test_opt(sb, PRJQUOTA)) {
> ext4_msg(sb, KERN_ERR, "old and new quota "
> "format mixing");
> return 0;
> @@ -1733,6 +1755,9 @@ static inline void ext4_show_quota_options(struct seq_file *seq,
>
> if (sbi->s_qf_names[GRPQUOTA])
> seq_printf(seq, ",grpjquota=%s", sbi->s_qf_names[GRPQUOTA]);
> +
> + if (sbi->s_qf_names[PRJQUOTA])
> + seq_printf(seq, ",prjjquota=%s", sbi->s_qf_names[PRJQUOTA]);
> #endif
> }
>
> @@ -5037,6 +5062,46 @@ restore_opts:
> return err;
> }
>
> +static int ext4_statfs_project(struct super_block *sb,
> + kprojid_t projid, struct kstatfs *buf)
> +{
> + struct kqid qid;
> + struct dquot *dquot;
> + u64 limit;
> + u64 curblock;
> +
> + qid = make_kqid_projid(projid);
> + dquot = dqget(sb, qid);
> + if (!dquot)
> + return -ESRCH;
> + spin_lock(&dq_data_lock);
> +
> + limit = dquot->dq_dqb.dqb_bsoftlimit ?
> + dquot->dq_dqb.dqb_bsoftlimit :
> + dquot->dq_dqb.dqb_bhardlimit;
> + if (limit && buf->f_blocks * buf->f_bsize > limit) {
> + curblock = dquot->dq_dqb.dqb_curspace / buf->f_bsize;
> + buf->f_blocks = limit / buf->f_bsize;
> + buf->f_bfree = buf->f_bavail =
> + (buf->f_blocks > curblock) ?
> + (buf->f_blocks - curblock) : 0;
> + }
> +
> + limit = dquot->dq_dqb.dqb_isoftlimit ?
> + dquot->dq_dqb.dqb_isoftlimit :
> + dquot->dq_dqb.dqb_ihardlimit;
> + if (limit && buf->f_files > limit) {
> + buf->f_files = limit;
> + buf->f_ffree =
> + (buf->f_files > dquot->dq_dqb.dqb_curinodes) ?
> + (buf->f_files - dquot->dq_dqb.dqb_curinodes) : 0;
> + }
> +
> + spin_unlock(&dq_data_lock);
> + dqput(dquot);
> + return 0;
> +}
> +
> static int ext4_statfs(struct dentry *dentry, struct kstatfs *buf)
> {
> struct super_block *sb = dentry->d_sb;
> @@ -5045,6 +5110,7 @@ static int ext4_statfs(struct dentry *dentry, struct kstatfs *buf)
> ext4_fsblk_t overhead = 0, resv_blocks;
> u64 fsid;
> s64 bfree;
> + struct inode *inode = dentry->d_inode;
> resv_blocks = EXT4_C2B(sbi, atomic64_read(&sbi->s_resv_clusters));
>
> if (!test_opt(sb, MINIX_DF))
> @@ -5069,6 +5135,9 @@ static int ext4_statfs(struct dentry *dentry, struct kstatfs *buf)
> buf->f_fsid.val[0] = fsid & 0xFFFFFFFFUL;
> buf->f_fsid.val[1] = (fsid >> 32) & 0xFFFFFFFFUL;
>
> + if (ext4_test_inode_flag(inode, EXT4_INODE_PROJINHERIT) &&
> + sb_has_quota_limits_enabled(sb, PRJQUOTA))
> + ext4_statfs_project(sb, EXT4_I(inode)->i_projid, buf);
> return 0;
> }
>
> @@ -5149,7 +5218,9 @@ static int ext4_mark_dquot_dirty(struct dquot *dquot)
>
> /* Are we journaling quotas? */
> if (EXT4_HAS_RO_COMPAT_FEATURE(sb, EXT4_FEATURE_RO_COMPAT_QUOTA) ||
> - sbi->s_qf_names[USRQUOTA] || sbi->s_qf_names[GRPQUOTA]) {
> + sbi->s_qf_names[USRQUOTA] ||
> + sbi->s_qf_names[GRPQUOTA] ||
> + sbi->s_qf_names[PRJQUOTA]) {
> dquot_mark_dquot_dirty(dquot);
> return ext4_write_dquot(dquot);
> } else {
> @@ -5233,7 +5304,8 @@ static int ext4_quota_enable(struct super_block *sb, int type, int format_id,
> struct inode *qf_inode;
> unsigned long qf_inums[EXT4_MAXQUOTAS] = {
> le32_to_cpu(EXT4_SB(sb)->s_es->s_usr_quota_inum),
> - le32_to_cpu(EXT4_SB(sb)->s_es->s_grp_quota_inum)
> + le32_to_cpu(EXT4_SB(sb)->s_es->s_grp_quota_inum),
> + le32_to_cpu(EXT4_SB(sb)->s_es->s_prj_quota_inum)
> };
>
> BUG_ON(!EXT4_HAS_RO_COMPAT_FEATURE(sb, EXT4_FEATURE_RO_COMPAT_QUOTA));
> @@ -5261,7 +5333,8 @@ static int ext4_enable_quotas(struct super_block *sb)
> int type, err = 0;
> unsigned long qf_inums[EXT4_MAXQUOTAS] = {
> le32_to_cpu(EXT4_SB(sb)->s_es->s_usr_quota_inum),
> - le32_to_cpu(EXT4_SB(sb)->s_es->s_grp_quota_inum)
> + le32_to_cpu(EXT4_SB(sb)->s_es->s_grp_quota_inum),
> + le32_to_cpu(EXT4_SB(sb)->s_es->s_prj_quota_inum)
> };
>
> sb_dqopt(sb)->flags |= DQUOT_QUOTA_SYS_FILE;
> --
> 1.7.1
>
Cheers, Andreas
^ permalink raw reply
* Re: [PATCHv2] selftests/exec: allow shell return code of 126
From: Shuah Khan @ 2015-01-06 20:02 UTC (permalink / raw)
To: David Drysdale, linux-kernel, Geert Uytterhoeven
Cc: Andreas Schwab, Andrew Morton, linux-m68k, linux-api
In-Reply-To: <1420532636-7317-1-git-send-email-drysdale@google.com>
On 01/06/2015 01:23 AM, David Drysdale wrote:
> When the shell fails to invoke a script because its path name
> is too long (ENAMETOOLONG), most shells return 127 to indicate
> command not found. However, some systems report 126 (which POSIX
> suggests should indicate a non-executable file) for this case,
> so allow that too.
>
> Reported-by: Geert Uytterhoeven <geert@linux-m68k.org>
> Signed-off-by: David Drysdale <drysdale@google.com>
> Tested-by: Geert Uytterhoeven <geert@linux-m68k.org>
> ---
> tools/testing/selftests/exec/execveat.c | 19 +++++++++++++------
> 1 file changed, 13 insertions(+), 6 deletions(-)
Thanks. Applied to kernel/git/shuah/linux-kselftest fixes branch
-- Shuah
--
Shuah Khan
Sr. Linux Kernel Developer
Open Source Innovation Group
Samsung Research America (Silicon Valley)
shuahkh@osg.samsung.com | (970) 217-8978
^ permalink raw reply
* Re: [PATCH] tools: testing: selftests: mq_perf_tests: Fix infinite loop on ARM
From: Shuah Khan @ 2015-01-06 20:03 UTC (permalink / raw)
To: dann frazier, linux-api-u79uwXL29TY76Z2rM5mHXA
Cc: linux-kernel-u79uwXL29TY76Z2rM5mHXA, Shuah Khan, Doug Ledford
In-Reply-To: <1420512880-392-1-git-send-email-dann.frazier-Z7WLFzj8eWMS+FvcfC7Uqw@public.gmane.org>
On 01/05/2015 07:54 PM, dann frazier wrote:
> We can't use a char type to check for a negative return value since char
> isn't guaranteed to be signed. Indeed, the char type tends to be unsigned on
> ARM.
>
> Signed-off-by: dann frazier <dann.frazier-Z7WLFzj8eWMS+FvcfC7Uqw@public.gmane.org>
> ---
> tools/testing/selftests/mqueue/mq_perf_tests.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/tools/testing/selftests/mqueue/mq_perf_tests.c b/tools/testing/selftests/mqueue/mq_perf_tests.c
> index 94dae65..8519e9e 100644
> --- a/tools/testing/selftests/mqueue/mq_perf_tests.c
> +++ b/tools/testing/selftests/mqueue/mq_perf_tests.c
> @@ -536,10 +536,9 @@ int main(int argc, char *argv[])
> {
> struct mq_attr attr;
> char *option, *next_option;
> - int i, cpu;
> + int i, cpu, rc;
> struct sigaction sa;
> poptContext popt_context;
> - char rc;
> void *retval;
>
> main_thread = pthread_self();
>
Thanks. Applied to kernel/git/shuah/linux-kselftest fixes branch
-- Shuah
--
Shuah Khan
Sr. Linux Kernel Developer
Open Source Innovation Group
Samsung Research America (Silicon Valley)
shuahkh-JPH+aEBZ4P+UEJcrhfAQsw@public.gmane.org | (970) 217-8978
^ permalink raw reply
* Re: [v8 5/5] ext4: cleanup inode flag definitions
From: Andreas Dilger @ 2015-01-06 20:05 UTC (permalink / raw)
To: Li Xi
Cc: linux-fsdevel-u79uwXL29TY76Z2rM5mHXA,
linux-ext4-u79uwXL29TY76Z2rM5mHXA,
linux-api-u79uwXL29TY76Z2rM5mHXA, tytso-3s7WtUTddSA,
jack-AlSwsSmVLrQ, viro-RmSDqhL/yNMiFSDQTTA3OLVCufUGDwFn,
hch-wEGCiKHe2LqWVfeAwA7xHQ, dmonakhov-GEFAQzZX7r8dnm+yROfE0A
In-Reply-To: <1418102548-5469-6-git-send-email-lixi-LfVdkaOWEx8@public.gmane.org>
On Dec 8, 2014, at 10:22 PM, Li Xi <pkuelelixi-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
>
> The inode flags defined in uapi/linux/fs.h were migrated from
> ext4.h. This patch changes the inode flag definitions in ext4.h
> to VFS definitions to make the gaps between them clearer.
>
> Signed-off-by: Li Xi <lixi-LfVdkaOWEx8@public.gmane.org>
Reviewed-by: Andreas Dilger <adilger-m1MBpc4rdrD3fQ9qLvQP4Q@public.gmane.org>
> ---
> fs/ext4/ext4.h | 50 +++++++++++++++++++++++++-------------------------
> 1 files changed, 25 insertions(+), 25 deletions(-)
>
> diff --git a/fs/ext4/ext4.h b/fs/ext4/ext4.h
> index 43a2a88..bcc04c0 100644
> --- a/fs/ext4/ext4.h
> +++ b/fs/ext4/ext4.h
> @@ -353,33 +353,33 @@ struct flex_groups {
> /*
> * Inode flags
> */
> -#define EXT4_SECRM_FL 0x00000001 /* Secure deletion */
> -#define EXT4_UNRM_FL 0x00000002 /* Undelete */
> -#define EXT4_COMPR_FL 0x00000004 /* Compress file */
> -#define EXT4_SYNC_FL 0x00000008 /* Synchronous updates */
> -#define EXT4_IMMUTABLE_FL 0x00000010 /* Immutable file */
> -#define EXT4_APPEND_FL 0x00000020 /* writes to file may only append */
> -#define EXT4_NODUMP_FL 0x00000040 /* do not dump file */
> -#define EXT4_NOATIME_FL 0x00000080 /* do not update atime */
> +#define EXT4_SECRM_FL FS_SECRM_FL /* Secure deletion */
> +#define EXT4_UNRM_FL FS_UNRM_FL /* Undelete */
> +#define EXT4_COMPR_FL FS_COMPR_FL /* Compress file */
> +#define EXT4_SYNC_FL FS_SYNC_FL /* Synchronous updates */
> +#define EXT4_IMMUTABLE_FL FS_IMMUTABLE_FL /* Immutable file */
> +#define EXT4_APPEND_FL FS_APPEND_FL /* writes to file may only append */
> +#define EXT4_NODUMP_FL FS_NODUMP_FL /* do not dump file */
> +#define EXT4_NOATIME_FL FS_NOATIME_FL /* do not update atime */
> /* Reserved for compression usage... */
> -#define EXT4_DIRTY_FL 0x00000100
> -#define EXT4_COMPRBLK_FL 0x00000200 /* One or more compressed clusters */
> -#define EXT4_NOCOMPR_FL 0x00000400 /* Don't compress */
> -#define EXT4_ECOMPR_FL 0x00000800 /* Compression error */
> +#define EXT4_DIRTY_FL FS_DIRTY_FL
> +#define EXT4_COMPRBLK_FL FS_COMPRBLK_FL /* One or more compressed clusters */
> +#define EXT4_NOCOMPR_FL FS_NOCOMP_FL /* Don't compress */
> +#define EXT4_ECOMPR_FL FS_ECOMPR_FL /* Compression error */
> /* End compression flags --- maybe not all used */
> -#define EXT4_INDEX_FL 0x00001000 /* hash-indexed directory */
> -#define EXT4_IMAGIC_FL 0x00002000 /* AFS directory */
> -#define EXT4_JOURNAL_DATA_FL 0x00004000 /* file data should be journaled */
> -#define EXT4_NOTAIL_FL 0x00008000 /* file tail should not be merged */
> -#define EXT4_DIRSYNC_FL 0x00010000 /* dirsync behaviour (directories only) */
> -#define EXT4_TOPDIR_FL 0x00020000 /* Top of directory hierarchies*/
> -#define EXT4_HUGE_FILE_FL 0x00040000 /* Set to each huge file */
> -#define EXT4_EXTENTS_FL 0x00080000 /* Inode uses extents */
> -#define EXT4_EA_INODE_FL 0x00200000 /* Inode used for large EA */
> -#define EXT4_EOFBLOCKS_FL 0x00400000 /* Blocks allocated beyond EOF */
> -#define EXT4_INLINE_DATA_FL 0x10000000 /* Inode has inline data. */
> -#define EXT4_PROJINHERIT_FL FS_PROJINHERIT_FL /* Create with parents projid */
> -#define EXT4_RESERVED_FL 0x80000000 /* reserved for ext4 lib */
> +#define EXT4_INDEX_FL FS_INDEX_FL /* hash-indexed directory */
> +#define EXT4_IMAGIC_FL FS_IMAGIC_FL /* AFS directory */
> +#define EXT4_JOURNAL_DATA_FL FS_JOURNAL_DATA_FL /* file data should be journaled */
> +#define EXT4_NOTAIL_FL FS_NOTAIL_FL /* file tail should not be merged */
> +#define EXT4_DIRSYNC_FL FS_DIRSYNC_FL /* dirsync behaviour (directories only) */
> +#define EXT4_TOPDIR_FL FS_TOPDIR_FL /* Top of directory hierarchies*/
> +#define EXT4_HUGE_FILE_FL 0x00040000 /* Set to each huge file */
> +#define EXT4_EXTENTS_FL FS_EXTENT_FL /* Inode uses extents */
> +#define EXT4_EA_INODE_FL 0x00200000 /* Inode used for large EA */
> +#define EXT4_EOFBLOCKS_FL 0x00400000 /* Blocks allocated beyond EOF */
> +#define EXT4_INLINE_DATA_FL 0x10000000 /* Inode has inline data. */
> +#define EXT4_PROJINHERIT_FL FS_PROJINHERIT_FL /* Create with parents projid */
> +#define EXT4_RESERVED_FL FS_RESERVED_FL /* reserved for ext4 lib */
>
> #define EXT4_FL_USER_VISIBLE 0x204BDFFF /* User visible flags */
> #define EXT4_FL_USER_MODIFIABLE 0x204380FF /* User modifiable flags */
> --
> 1.7.1
>
Cheers, Andreas
^ permalink raw reply
* [PATCHv3 01/20] media: add new types for DVB devnodes
From: Mauro Carvalho Chehab @ 2015-01-06 21:08 UTC (permalink / raw)
To: Laurent Pinchart, Sakari Ailus
Cc: Mauro Carvalho Chehab, Linux Media Mailing List,
Mauro Carvalho Chehab, linux-api
In-Reply-To: <cover.1420578087.git.mchehab@osg.samsung.com>
Most of the DVB subdevs have already their own devnode.
Add support for them at the media controller API.
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
diff --git a/include/uapi/linux/media.h b/include/uapi/linux/media.h
index 7902e800f019..707db275f92b 100644
--- a/include/uapi/linux/media.h
+++ b/include/uapi/linux/media.h
@@ -50,7 +50,14 @@ struct media_device_info {
#define MEDIA_ENT_T_DEVNODE_V4L (MEDIA_ENT_T_DEVNODE + 1)
#define MEDIA_ENT_T_DEVNODE_FB (MEDIA_ENT_T_DEVNODE + 2)
#define MEDIA_ENT_T_DEVNODE_ALSA (MEDIA_ENT_T_DEVNODE + 3)
-#define MEDIA_ENT_T_DEVNODE_DVB (MEDIA_ENT_T_DEVNODE + 4)
+#define MEDIA_ENT_T_DEVNODE_DVB_FE (MEDIA_ENT_T_DEVNODE + 4)
+#define MEDIA_ENT_T_DEVNODE_DVB_DEMUX (MEDIA_ENT_T_DEVNODE + 5)
+#define MEDIA_ENT_T_DEVNODE_DVB_DVR (MEDIA_ENT_T_DEVNODE + 6)
+#define MEDIA_ENT_T_DEVNODE_DVB_CA (MEDIA_ENT_T_DEVNODE + 7)
+#define MEDIA_ENT_T_DEVNODE_DVB_NET (MEDIA_ENT_T_DEVNODE + 8)
+
+/* Legacy symbol. Use it to avoid userspace compilation breakages */
+#define MEDIA_ENT_T_DEVNODE_DVB MEDIA_ENT_T_DEVNODE_DVB_FE
#define MEDIA_ENT_T_V4L2_SUBDEV (2 << MEDIA_ENT_TYPE_SHIFT)
#define MEDIA_ENT_T_V4L2_SUBDEV_SENSOR (MEDIA_ENT_T_V4L2_SUBDEV + 1)
--
2.1.0
^ permalink raw reply related
* [PATCHv3 09/20] tuner-core: properly initialize media controller subdev
From: Mauro Carvalho Chehab @ 2015-01-06 21:08 UTC (permalink / raw)
To: Laurent Pinchart, Sakari Ailus
Cc: Mauro Carvalho Chehab, Linux Media Mailing List,
Mauro Carvalho Chehab, Hans Verkuil, Prabhakar Lad, linux-api
In-Reply-To: <cover.1420578087.git.mchehab@osg.samsung.com>
Properly initialize tuner core subdev at the media controller.
That requires a new subtype at the media controller API.
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
diff --git a/drivers/media/v4l2-core/tuner-core.c b/drivers/media/v4l2-core/tuner-core.c
index 559f8372e2eb..9a83b27a7e8f 100644
--- a/drivers/media/v4l2-core/tuner-core.c
+++ b/drivers/media/v4l2-core/tuner-core.c
@@ -134,6 +134,9 @@ struct tuner {
unsigned int type; /* chip type id */
void *config;
const char *name;
+#if defined(CONFIG_MEDIA_CONTROLLER)
+ struct media_pad pad;
+#endif
};
/*
@@ -434,6 +437,8 @@ static void set_type(struct i2c_client *c, unsigned int type,
t->name = analog_ops->info.name;
}
+ t->sd.entity.name = t->name;
+
tuner_dbg("type set to %s\n", t->name);
t->mode_mask = new_mode_mask;
@@ -592,6 +597,9 @@ static int tuner_probe(struct i2c_client *client,
struct tuner *t;
struct tuner *radio;
struct tuner *tv;
+#ifdef CONFIG_MEDIA_CONTROLLER
+ int ret;
+#endif
t = kzalloc(sizeof(struct tuner), GFP_KERNEL);
if (NULL == t)
@@ -684,6 +692,18 @@ static int tuner_probe(struct i2c_client *client,
/* Should be just before return */
register_client:
+#if defined(CONFIG_MEDIA_CONTROLLER)
+ t->pad.flags = MEDIA_PAD_FL_SOURCE;
+ t->sd.entity.type = MEDIA_ENT_T_V4L2_SUBDEV_TUNER;
+ t->sd.entity.name = t->name;
+
+ ret = media_entity_init(&t->sd.entity, 1, &t->pad, 0);
+ if (ret < 0) {
+ tuner_err("failed to initialize media entity!\n");
+ kfree(t);
+ return -ENODEV;
+ }
+#endif
/* Sets a default mode */
if (t->mode_mask & T_ANALOG_TV)
t->mode = V4L2_TUNER_ANALOG_TV;
diff --git a/include/uapi/linux/media.h b/include/uapi/linux/media.h
index 707db275f92b..5ffde035789b 100644
--- a/include/uapi/linux/media.h
+++ b/include/uapi/linux/media.h
@@ -66,6 +66,8 @@ struct media_device_info {
/* A converter of analogue video to its digital representation. */
#define MEDIA_ENT_T_V4L2_SUBDEV_DECODER (MEDIA_ENT_T_V4L2_SUBDEV + 4)
+#define MEDIA_ENT_T_V4L2_SUBDEV_TUNER (MEDIA_ENT_T_V4L2_SUBDEV + 5)
+
#define MEDIA_ENT_FL_DEFAULT (1 << 0)
struct media_entity_desc {
--
2.1.0
^ permalink raw reply related
* Re: [v8 3/5] ext4: adds project quota support
From: Jan Kara @ 2015-01-06 21:52 UTC (permalink / raw)
To: Andreas Dilger
Cc: Li Xi, Linux Filesystem Development List, ext4 development,
linux-api, tytso, jack, viro, hch, dmonakhov
In-Reply-To: <1D4A37F3-9BA1-42E9-97ED-8F7515FC5E8D@dilger.ca>
On Tue 06-01-15 13:01:21, Andreas Dilger wrote:
> On Dec 8, 2014, at 10:22 PM, Li Xi <pkuelelixi@gmail.com> wrote:
> >
> > This patch adds mount options for enabling/disabling project quota
> > accounting and enforcement. A new specific inode is also used for
> > project quota accounting.
>
> Judy looking through these patches again and saw a minor issue:
>
> > @@ -1128,10 +1128,11 @@ enum {
> > Opt_journal_path, Opt_journal_checksum, Opt_journal_async_commit,
> > Opt_abort, Opt_data_journal, Opt_data_ordered, Opt_data_writeback,
> > Opt_data_err_abort, Opt_data_err_ignore,
> > - Opt_usrjquota, Opt_grpjquota, Opt_offusrjquota, Opt_offgrpjquota,
> > + Opt_usrjquota, Opt_grpjquota, Opt_prjjquota,
> > + Opt_offusrjquota, Opt_offgrpjquota, Opt_offprjjquota,
> > Opt_jqfmt_vfsold, Opt_jqfmt_vfsv0, Opt_jqfmt_vfsv1, Opt_quota,
> > Opt_noquota, Opt_barrier, Opt_nobarrier, Opt_err,
> > - Opt_usrquota, Opt_grpquota, Opt_i_version,
> > + Opt_usrquota, Opt_grpquota, Opt_prjquota, Opt_i_version,
> > Opt_stripe, Opt_delalloc, Opt_nodelalloc, Opt_mblk_io_submit,
> > Opt_nomblk_io_submit, Opt_block_validity, Opt_noblock_validity,
> > Opt_inode_readahead_blks, Opt_journal_ioprio,
> > @@ -1183,6 +1184,8 @@ static const match_table_t tokens = {
> > {Opt_usrjquota, "usrjquota=%s"},
> > {Opt_offgrpjquota, "grpjquota="},
> > {Opt_grpjquota, "grpjquota=%s"},
> > + {Opt_offprjjquota, "prjjquota="},
> > + {Opt_prjjquota, "prjjquota=%s"},
>
> We don't need to be able to specify the project quota inodes on the
> mount command line. This was only needed for supporting old (non-
> journaled) user and group quotas, but there is no chance of having
> old project quotas.
>
> > {Opt_jqfmt_vfsold, "jqfmt=vfsold"},
> > {Opt_jqfmt_vfsv0, "jqfmt=vfsv0"},
> > {Opt_jqfmt_vfsv1, "jqfmt=vfsv1"},
> > @@ -1190,6 +1193,7 @@ static const match_table_t tokens = {
> > {Opt_noquota, "noquota"},
> > {Opt_quota, "quota"},
> > {Opt_usrquota, "usrquota"},
> > + {Opt_prjquota, "prjquota"},
>
> Do we want to allow non-journaled project quota at all? I don't
> see that as a benefit, and it was only allowed for user/group
> quota for compatibility reasons. Since the project quota support
> will need an updated e2fsprogs anyway, it may as well be journaled
> from the start.
Yeah, probably you are right that it doesn't make a whole lot of sense to
support project quotas in user visible files. So these could be removed.
Honza
--
Jan Kara <jack@suse.cz>
SUSE Labs, CR
^ permalink raw reply
* Re: [PATCH net-next v2 0/8] net: extend ethtool link mode bitmaps to 48 bits
From: David Miller @ 2015-01-06 22:29 UTC (permalink / raw)
To: amirv-VPRAkNaXOzVWk0Htik3J/w
Cc: ddecotig-Re5JQEeQqe8AvxtiuMwx3w,
f.fainelli-Re5JQEeQqe8AvxtiuMwx3w, netdev-u79uwXL29TY76Z2rM5mHXA,
linux-kernel-u79uwXL29TY76Z2rM5mHXA,
linux-api-u79uwXL29TY76Z2rM5mHXA, saeedm-VPRAkNaXOzVWk0Htik3J/w,
decot-Ypc/8FJVVoBWk0Htik3J/w, jasowang-H+wXaHxf7aLQT0dZR+AlfA,
mst-H+wXaHxf7aLQT0dZR+AlfA,
herbert-lOAM2aK0SrRLBo1qDEOMRrpzq4S04n8Q,
viro-RmSDqhL/yNMiFSDQTTA3OLVCufUGDwFn, ben-/+tVBieCtBitmTQ+vhA3Yw,
yamato-H+wXaHxf7aLQT0dZR+AlfA, xii-hpIqsD4AKlfQT0dZR+AlfA,
nhorman-2XuSBdqkA4R54TAoqtyWWQ,
xiyou.wangcong-Re5JQEeQqe8AvxtiuMwx3w, fbl-H+wXaHxf7aLQT0dZR+AlfA,
teg-B22kvLQNl6c, jiri-rHqAuBHg3fBzbRFIqnYvSA,
vyasevic-H+wXaHxf7aLQT0dZR+AlfA, ebiederm-aS9lmoZGLiVWk0Htik3J/w,
VenkatKumar.Duvvuru-iH1Dq9VlAzfQT0dZR+AlfA, _govind-KK0ffGbhmjU
In-Reply-To: <54ABE991.3040107-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
From: Amir Vadai <amirv-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
Date: Tue, 6 Jan 2015 15:56:33 +0200
> Mellanox is about to release next month a driver for a new NIC, with 3
> new speeds * few link modes for each + new link modes for 10G.
> It seems that we will need to consume almost all the new bits.
This tells me that the approach to this problem needs to be rethought.
Maybe we just need to bite the bullet and make a new ETHTOOL_GSET_2
and ETHTOOL_SSET_2 or whatever you want to name them.
Then we can define a completely new structure, with 64-bit bitmaps
for link modes or whatever. The ethtool_op callbacks work using
this structure, and only the net/core/ethtool.c code knows about
the older structure and translates to/from for ETHTOOL_{GSET,SSET}.
^ permalink raw reply
* Re: [PATCH net-next v2 0/8] net: extend ethtool link mode bitmaps to 48 bits
From: Ben Hutchings @ 2015-01-06 23:08 UTC (permalink / raw)
To: David Miller
Cc: amirv, ddecotig, f.fainelli, netdev, linux-kernel, linux-api,
saeedm, decot, jasowang, mst, herbert, viro, yamato, xii, nhorman,
xiyou.wangcong, fbl, teg, jiri, vyasevic, ebiederm,
VenkatKumar.Duvvuru, _govind
In-Reply-To: <20150106.172918.70204012105519766.davem@davemloft.net>
[-- Attachment #1: Type: text/plain, Size: 945 bytes --]
On Tue, 2015-01-06 at 17:29 -0500, David Miller wrote:
> From: Amir Vadai <amirv@mellanox.com>
> Date: Tue, 6 Jan 2015 15:56:33 +0200
>
> > Mellanox is about to release next month a driver for a new NIC, with 3
> > new speeds * few link modes for each + new link modes for 10G.
> > It seems that we will need to consume almost all the new bits.
>
> This tells me that the approach to this problem needs to be rethought.
>
> Maybe we just need to bite the bullet and make a new ETHTOOL_GSET_2
> and ETHTOOL_SSET_2 or whatever you want to name them.
>
> Then we can define a completely new structure, with 64-bit bitmaps
> for link modes or whatever. The ethtool_op callbacks work using
> this structure, and only the net/core/ethtool.c code knows about
> the older structure and translates to/from for ETHTOOL_{GSET,SSET}.
Agreed.
Ben.
--
Ben Hutchings
This sentence contradicts itself - no actually it doesn't.
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 811 bytes --]
^ permalink raw reply
* Re: [PATCHv3 8/8] cgroup: Add documentation for cgroup namespaces
From: Aditya Kali @ 2015-01-06 23:20 UTC (permalink / raw)
To: Richard Weinberger
Cc: Eric W. Biederman, Tejun Heo, Li Zefan, Serge Hallyn,
Andy Lutomirski, cgroups mailinglist,
linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Linux API,
Ingo Molnar, Linux Containers, Rohit Jnagal, Vivek Goyal
In-Reply-To: <54AB2992.6060707-/L3Ra7n9ekc@public.gmane.org>
I understand your point. But it will add some complexity to the code.
Before trying to make it work for non-unified hierarchy cases, I would
like to get a clearer idea.
What do you expect to be mounted when you run:
container:/ # mount -t cgroup none /sys/fs/cgroup/
from inside the container?
Note that cgroup-namespace wont be able to change the way cgroups are
mounted .. i.e., if say cpu and cpuacct subsystems are mounted
together at a single mount-point, then we cannot mount them any other
way (inside a container or outside). This restriction exists today and
cgroup-namespaces won't change that.
So, If on the host we have:
root@adityakali-vm2:/sys/fs/cgroup# cat /proc/mounts | grep cgroup
tmpfs /sys/fs/cgroup tmpfs rw,relatime 0 0
cgroup /sys/fs/cgroup/cpu cgroup rw,relatime,cpuset,cpu,cpuacct 0 0
cgroup /sys/fs/cgroup/mem cgroup rw,relatime,memory,hugetlb 0 0
cgroup /sys/fs/cgroup/rest cgroup
rw,relatime,devices,freezer,net_cls,blkio,perf_event,net_prio 0 0
And inside the container we want each subsystem to be on its own
mount-point, then it will fail. Do you think even then its useful to
support virtualizing paths for non-unified hierarchies?
Thanks,
On Mon, Jan 5, 2015 at 4:17 PM, Richard Weinberger <richard-/L3Ra7n9ekc@public.gmane.org> wrote:
> Am 06.01.2015 um 01:10 schrieb Aditya Kali:
>> Since the old/default behavior is on its way out, I didn't invest time
>> in fixing that. Also, some of the properties that make
>> cgroup-namespace simpler are only provided by unified hierarchy (for
>> example: a single root-cgroup per container).
>
> Does the new sane cgroupfs behavior even have a single real world user?
> I always thought it isn't stable yet.
>
> Linux distros currently use systemd v210. They don't dare to use a newer one.
> Even *if* systemd would support the sane sane cgroupfs behavior in the most recent
> version it will take 1-2 years until it would hit a recent distro.
>
> So please support also the old and nasty behavior such that one day we can run current
> systemd distros in Linux containers.
>
> Thanks,
> //richard
--
Aditya
^ permalink raw reply
* Re: [PATCHv3 8/8] cgroup: Add documentation for cgroup namespaces
From: Richard Weinberger @ 2015-01-06 23:39 UTC (permalink / raw)
To: Aditya Kali
Cc: Eric W. Biederman, Tejun Heo, Li Zefan, Serge Hallyn,
Andy Lutomirski, cgroups mailinglist,
linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Linux API,
Ingo Molnar, Linux Containers, Rohit Jnagal, Vivek Goyal
In-Reply-To: <CAGr1F2EGOUSEd3-G4PS0mq=9kU1nWG4CwHUOQaNUATepc11_Sw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
Am 07.01.2015 um 00:20 schrieb Aditya Kali:
> I understand your point. But it will add some complexity to the code.
>
> Before trying to make it work for non-unified hierarchy cases, I would
> like to get a clearer idea.
> What do you expect to be mounted when you run:
> container:/ # mount -t cgroup none /sys/fs/cgroup/
> from inside the container?
I expect cgroupfs to behave exactly as it would in the initial namespace.
Such that the container can do with it whatever it wants.
systemd mounts and manages cgroups on its own.
Like for CONFIG_DEVPTS_MULTIPLE_INSTANCES.
If a new cgroup namespace cannot provide a clean and autonomous cgroupfs
instance it is fundamentally flawed.
You cannot provide a namespace mechanism which depends on the host side
that much.
This will also horrible break container migrations between hosts.
i.e. Migrate a container from a Ubuntu host to a Fedora (systemd!) host.
> Note that cgroup-namespace wont be able to change the way cgroups are
> mounted .. i.e., if say cpu and cpuacct subsystems are mounted
> together at a single mount-point, then we cannot mount them any other
> way (inside a container or outside). This restriction exists today and
> cgroup-namespaces won't change that.
Why can't cgroup namespace change this?
I think of cgroup namespace as a new and clean cgroupfs instance which inherits
all limits from the outside.
> So, If on the host we have:
> root@adityakali-vm2:/sys/fs/cgroup# cat /proc/mounts | grep cgroup
> tmpfs /sys/fs/cgroup tmpfs rw,relatime 0 0
> cgroup /sys/fs/cgroup/cpu cgroup rw,relatime,cpuset,cpu,cpuacct 0 0
> cgroup /sys/fs/cgroup/mem cgroup rw,relatime,memory,hugetlb 0 0
> cgroup /sys/fs/cgroup/rest cgroup
> rw,relatime,devices,freezer,net_cls,blkio,perf_event,net_prio 0 0
>
> And inside the container we want each subsystem to be on its own
> mount-point, then it will fail. Do you think even then its useful to
> support virtualizing paths for non-unified hierarchies?
As I've stated above I expect from cgroup namespaces a clean and sane
cgroupfs instance no matter how the outer mounts are.
Thanks,
//richard
^ permalink raw reply
* Re: [PATCH 2/2] prctl.2: document SECCOMP_MODE_FILTER vs EFAULT
From: Michael Kerrisk (man-pages) @ 2015-01-07 8:43 UTC (permalink / raw)
To: Kees Cook; +Cc: mtk.manpages, linux-api, linux-kernel
In-Reply-To: <1411685267-27949-3-git-send-email-keescook@chromium.org>
On 09/26/2014 12:47 AM, Kees Cook wrote:
> This notes the distinction made between EINVAL and EFAULT when attempting
> to use SECCOMP_MODE_FILTER with PR_SET_SECCOMP.
Thanks, Kees. Applied.
Cheers,
Michael
> Suggested-by: Andy Lutomirski <luto@amacapital.net>
> Signed-off-by: Kees Cook <keescook@chromium.org>
> ---
> man2/prctl.2 | 23 +++++++++++++++++++++++
> 1 file changed, 23 insertions(+)
>
> diff --git a/man2/prctl.2 b/man2/prctl.2
> index 1199891..b7ddaac 100644
> --- a/man2/prctl.2
> +++ b/man2/prctl.2
> @@ -825,6 +825,19 @@ is set appropriately.
> .I arg2
> is an invalid address.
> .TP
> +.B EFAULT
> +.I option
> +is
> +.BR PR_SET_SECCOMP ,
> +.I arg2
> +is
> +.BR SECCOMP_MODE_FILTER ,
> +the system was built with
> +.BR CONFIG_SECCOMP_FILTER
> +and
> +.I arg3
> +is an invalid address.
> +.TP
> .B EINVAL
> The value of
> .I option
> @@ -859,6 +872,16 @@ and the kernel was not configured with
> .B EINVAL
> .I option
> is
> +.BR PR_SET_SECCOMP ,
> +.I arg2
> +is
> +.BR SECCOMP_MODE_FILTER ,
> +and the kernel was not configured with
> +.BR CONFIG_SECCOMP_FILTER .
> +.TP
> +.B EINVAL
> +.I option
> +is
> .BR PR_SET_MM ,
> and one of the following is true
> .RS
>
--
Michael Kerrisk
Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/
Linux/UNIX System Programming Training: http://man7.org/training/
^ permalink raw reply
* Re: [PATCHv3 8/8] cgroup: Add documentation for cgroup namespaces
From: Richard Weinberger @ 2015-01-07 9:28 UTC (permalink / raw)
To: Aditya Kali
Cc: Linux API, Linux Containers, Serge Hallyn,
linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
Andy Lutomirski, Eric W. Biederman, Tejun Heo,
cgroups mailinglist, Ingo Molnar
In-Reply-To: <CAGr1F2EGOUSEd3-G4PS0mq=9kU1nWG4CwHUOQaNUATepc11_Sw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
Am 07.01.2015 um 00:20 schrieb Aditya Kali:
> I understand your point. But it will add some complexity to the code.
>
> Before trying to make it work for non-unified hierarchy cases, I would
> like to get a clearer idea.
> What do you expect to be mounted when you run:
> container:/ # mount -t cgroup none /sys/fs/cgroup/
> from inside the container?
>
> Note that cgroup-namespace wont be able to change the way cgroups are
> mounted .. i.e., if say cpu and cpuacct subsystems are mounted
> together at a single mount-point, then we cannot mount them any other
> way (inside a container or outside). This restriction exists today and
> cgroup-namespaces won't change that.
I wondered why cgroup namespaces won't change that and looked at your patches
in more detail.
What you propose as cgroup namespace is much more a cgroup chroot() than
a namespace.
As you pass relative paths into the namespace you depend on the mount structure
of the host side.
Hence, the abstraction between namespaces happens on the mount paths of the initial
cgroupfs. But we really want a new cgroupfs instance within a container and not just
a cut out of the initial cgroupfs mount.
I fear you approach is over simplified and won't work for all cases. It may work
for your specific use case at Google but we really want something generic.
Eric, what do you think?
Thanks,
//richard
^ permalink raw reply
* Re: Edited seccomp.2 man page for review [v2]
From: Michael Kerrisk (man-pages) @ 2015-01-07 11:53 UTC (permalink / raw)
To: Kees Cook
Cc: mtk.manpages-Re5JQEeQqe8AvxtiuMwx3w, Daniel Borkmann, Linux API,
linux-man-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, lkml,
Will Drewry
In-Reply-To: <CAGXu5jKCR8ft=2XNX+SsCOokEqCt9sZizKj4wfAGrXVzf6adcg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
Hi Kees,
On 01/05/2015 09:25 PM, Kees Cook wrote:
> On Tue, Dec 30, 2014 at 11:45 AM, Michael Kerrisk (man-pages)
> <mtk.manpages-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
>>>> The program counter will be as though the system call happened
>>>> (i.e., it will not point to the system call instruction).
>>>> The return value register will contain an architecture\-dependent value;
>>>> if resuming execution, set it to something sensible.
>>>> .\" FIXME Regarding the preceding line, can you give an example(s)
>>>> .\" of "something sensible"? (Depending on the answer, maybe it
>>>> .\" might be useful to add some text on this point.)
>>>
>>> This means sensible in the context of the syscall made, or the desired
>>> behavior. For example, setting the return value to ELOOP for something
>>> like a "bind" syscall isn't very sensible.
>>
>> Okay -- I did s/sensible/appropriate for the system call/
>
> Yes, perfect. That captures it nicely.
Okay.
>>>> .\"
>>>> .\" FIXME Please check:
>>>> .\" In an attempt to make the text clearer, I changed
>>>> .\" "replacing it with" to "setting the return value register to"
>>>> .\" Okay?
>>>> (The architecture dependency is because setting the return value register to
>>>> .BR ENOSYS
>>>> could overwrite some useful information.)
>>>
>>> Well, the arch dependency is really because _how_ to change the
>>> register, and the register itself, is different between architectures.
>>> (i.e. which ptrace call is needed, and which register is being
>>> changed.) The overwriting of useful information is certainly true too,
>>> though.
>>
>> So, revert to the previous wording? Or do you have a suggested
>> better wording?
>
> I think the previous wording is better. I'm struggling to produce
> language that makes more sense here.
Okay -- reverted.
>> Thanks. We're getting close now.
>
> Excellent! :)
Still hoping to hear from Will Drewy regarding this FIXME in the
page source:
.\" FIXME What is the significance of the line
.\" ftest->code = BPF_LDX | BPF_W | BPF_ABS;
.\" in kernel/seccomp.c::seccomp_check_filter()?
Do you know if he's about?
Cheers,
Michael
--
Michael Kerrisk
Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/
Linux/UNIX System Programming Training: http://man7.org/training/
^ permalink raw reply
* Re: Edited seccomp.2 man page for review [v2]
From: Daniel Borkmann @ 2015-01-07 12:23 UTC (permalink / raw)
To: Michael Kerrisk (man-pages)
Cc: Kees Cook, Linux API,
linux-man-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, lkml,
Will Drewry, ast-uqk4Ao+rVK5Wk0Htik3J/w
In-Reply-To: <54AD1E37.8020509-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
On 01/07/2015 12:53 PM, Michael Kerrisk (man-pages) wrote:
...
> Still hoping to hear from Will Drewy regarding this FIXME in the
> page source:
>
> .\" FIXME What is the significance of the line
> .\" ftest->code = BPF_LDX | BPF_W | BPF_ABS;
> .\" in kernel/seccomp.c::seccomp_check_filter()?
This came in from our rework via commit bd4cf0ed331a ("net: filter:
rework/optimize internal BPF interpreter's instruction set"), and
is kernel-internal only, and unused in classic BPF. It translates
into A = *(u32 *) (ctx + K) and will basically load an offset from
the populated seccomp_data (= ctx) to A. For the man-page itself
it has therefore no relevance, hope that clarifies it.
Cheers,
Daniel
^ permalink raw reply
* Re: Edited seccomp.2 man page for review [v2]
From: Michael Kerrisk (man-pages) @ 2015-01-07 12:41 UTC (permalink / raw)
To: Daniel Borkmann
Cc: mtk.manpages-Re5JQEeQqe8AvxtiuMwx3w, Kees Cook, Linux API,
linux-man-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, lkml,
Will Drewry, ast-uqk4Ao+rVK5Wk0Htik3J/w
In-Reply-To: <54AD2549.9040107-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
On 01/07/2015 01:23 PM, Daniel Borkmann wrote:
> On 01/07/2015 12:53 PM, Michael Kerrisk (man-pages) wrote:
> ...
>> Still hoping to hear from Will Drewy regarding this FIXME in the
>> page source:
>>
>> .\" FIXME What is the significance of the line
>> .\" ftest->code = BPF_LDX | BPF_W | BPF_ABS;
>> .\" in kernel/seccomp.c::seccomp_check_filter()?
>
> This came in from our rework via commit bd4cf0ed331a ("net: filter:
> rework/optimize internal BPF interpreter's instruction set"), and
> is kernel-internal only, and unused in classic BPF. It translates
> into A = *(u32 *) (ctx + K) and will basically load an offset from
> the populated seccomp_data (= ctx) to A. For the man-page itself
> it has therefore no relevance, hope that clarifies it.
Thanks, Daniel.
Okay -- that was the last hurdle. The page should go out with the
next man-pages release.
Cheers,
Michael
--
Michael Kerrisk
Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/
Linux/UNIX System Programming Training: http://man7.org/training/
^ permalink raw reply
* Re: [PATCHv3 01/20] media: add new types for DVB devnodes
From: Sakari Ailus @ 2015-01-07 14:09 UTC (permalink / raw)
To: Mauro Carvalho Chehab, Laurent Pinchart
Cc: Linux Media Mailing List, Mauro Carvalho Chehab,
linux-api-u79uwXL29TY76Z2rM5mHXA
In-Reply-To: <7f1ea82b1055aa490726f3af2ad22bca25e49a28.1420578087.git.mchehab-JPH+aEBZ4P+UEJcrhfAQsw@public.gmane.org>
Hi Mauro,
Mauro Carvalho Chehab wrote:
> Most of the DVB subdevs have already their own devnode.
>
> Add support for them at the media controller API.
>
> Signed-off-by: Mauro Carvalho Chehab <mchehab-JPH+aEBZ4P+UEJcrhfAQsw@public.gmane.org>
>
> diff --git a/include/uapi/linux/media.h b/include/uapi/linux/media.h
> index 7902e800f019..707db275f92b 100644
> --- a/include/uapi/linux/media.h
> +++ b/include/uapi/linux/media.h
> @@ -50,7 +50,14 @@ struct media_device_info {
> #define MEDIA_ENT_T_DEVNODE_V4L (MEDIA_ENT_T_DEVNODE + 1)
> #define MEDIA_ENT_T_DEVNODE_FB (MEDIA_ENT_T_DEVNODE + 2)
> #define MEDIA_ENT_T_DEVNODE_ALSA (MEDIA_ENT_T_DEVNODE + 3)
> -#define MEDIA_ENT_T_DEVNODE_DVB (MEDIA_ENT_T_DEVNODE + 4)
> +#define MEDIA_ENT_T_DEVNODE_DVB_FE (MEDIA_ENT_T_DEVNODE + 4)
> +#define MEDIA_ENT_T_DEVNODE_DVB_DEMUX (MEDIA_ENT_T_DEVNODE + 5)
> +#define MEDIA_ENT_T_DEVNODE_DVB_DVR (MEDIA_ENT_T_DEVNODE + 6)
> +#define MEDIA_ENT_T_DEVNODE_DVB_CA (MEDIA_ENT_T_DEVNODE + 7)
> +#define MEDIA_ENT_T_DEVNODE_DVB_NET (MEDIA_ENT_T_DEVNODE + 8)
I'd create another type for the DVB sub-type devices, as there is for
V4L2 sub-devices. I wonder what Laurent thinks.
> +
> +/* Legacy symbol. Use it to avoid userspace compilation breakages */
> +#define MEDIA_ENT_T_DEVNODE_DVB MEDIA_ENT_T_DEVNODE_DVB_FE
>
> #define MEDIA_ENT_T_V4L2_SUBDEV (2 << MEDIA_ENT_TYPE_SHIFT)
> #define MEDIA_ENT_T_V4L2_SUBDEV_SENSOR (MEDIA_ENT_T_V4L2_SUBDEV + 1)
>
--
Kind regards,
Sakari Ailus
sakari.ailus-VuQAYsv1563Yd54FQh9/CA@public.gmane.org
^ permalink raw reply
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox