Re: [PATCHv5 1/3] syscalls,x86: implement execveat() system call

2014-10-22 Thread David Drysdale
On Wed, Oct 22, 2014 at 7:07 PM, Eric W. Biederman wrote: > David Drysdale writes: > >> Add a new system execveat(2) syscall. execveat() is to execve() as >> openat() is to open(): it takes a file descriptor that refers to a >> directory, and resolves the filename relative to that. >> >> In addit

Re: [PATCH 3/3] selftests/kcmp: Always try to build the test

2014-10-22 Thread Cyrill Gorcunov
On Thu, Oct 23, 2014 at 04:07:14PM +1100, Michael Ellerman wrote: > Don't prevent the test building on non-x86. Just try and build it and > let the chips fall where they may. > > Signed-off-by: Michael Ellerman kcmp depends on checkpoint/restore config symbol which is known to work on x86 and (i

Re: [PATCH 2/3] selftests/kcmp: Don't include kernel headers

2014-10-22 Thread Cyrill Gorcunov
On Thu, Oct 23, 2014 at 04:07:13PM +1100, Michael Ellerman wrote: > The kcmp test mucks with the include path to bring in the kernel > headers, and x86 headers too for reasons that are not clear. > > Now that kcmp.h is exported none of that should be necessary. > > Signed-off-by: Michael Ellerman

Re: [PATCH 1/3] kcmp: Move kcmp.h into uapi

2014-10-22 Thread Cyrill Gorcunov
On Thu, Oct 23, 2014 at 04:07:12PM +1100, Michael Ellerman wrote: > kcmp.h appears to be part of the API, it's documented in kcmp(2), and > the selftests/kcmp code uses it. So move it to uapi so it's actually > exported. > > Signed-off-by: Michael Ellerman Acked-by: Cyrill Gorcunov -- To unsubsc

[PATCH 3/3] selftests/kcmp: Always try to build the test

2014-10-22 Thread Michael Ellerman
Don't prevent the test building on non-x86. Just try and build it and let the chips fall where they may. Signed-off-by: Michael Ellerman --- tools/testing/selftests/kcmp/Makefile | 14 -- 1 file changed, 14 deletions(-) diff --git a/tools/testing/selftests/kcmp/Makefile b/tools/tes

[PATCH 2/3] selftests/kcmp: Don't include kernel headers

2014-10-22 Thread Michael Ellerman
The kcmp test mucks with the include path to bring in the kernel headers, and x86 headers too for reasons that are not clear. Now that kcmp.h is exported none of that should be necessary. Signed-off-by: Michael Ellerman --- tools/testing/selftests/kcmp/Makefile | 4 1 file changed, 4 delet

[PATCH 1/3] kcmp: Move kcmp.h into uapi

2014-10-22 Thread Michael Ellerman
kcmp.h appears to be part of the API, it's documented in kcmp(2), and the selftests/kcmp code uses it. So move it to uapi so it's actually exported. Signed-off-by: Michael Ellerman --- include/linux/kcmp.h | 13 + include/uapi/linux/Kbuild | 1 + include/uapi/linux/kcmp.h | 17

Re: [PATCH V2] kernel, add bug_on_warn

2014-10-22 Thread Yasuaki Ishimatsu
(2014/10/22 1:47), Prarit Bhargava wrote: > There have been several times where I have had to rebuild a kernel to > cause a panic when hitting a WARN() in the code in order to get a crash > dump from a system. Sometimes this is easy to do, other times (such as > in the case of a remote admin) it i

Re: [PATCHv5 man-pages 3/3] execveat.2: initial man page for execveat(2)

2014-10-22 Thread David Drysdale
On Wed, Oct 22, 2014 at 6:55 PM, Eric W. Biederman wrote: > David Drysdale writes: >> +.TH EXECVEAT 2 2014-04-02 "Linux" "Linux Programmer's Manual" >> +.SH NAME >> +execveat \- execute program relative to a directory file descriptor >> +.SH SYNOPSIS >> +.B #include >> +.sp >> +.BI "int execve(i

Re: [PATCHv1 7/8] cgroup: cgroup namespace setns support

2014-10-22 Thread Tejun Heo
Hello, On Wed, Oct 22, 2014 at 11:37:55AM -0700, Aditya Kali wrote: ... > Actually, there is no right answer here. Our options are: > * show relative path > -- this will break userspace as /proc//cgroup does not show > relative paths today. This is also very ambiguous (is it relative to > cgroupns

Re: [PATCHv1 6/8] cgroup: restrict cgroup operations within task's cgroupns

2014-10-22 Thread Aditya Kali
On Fri, Oct 17, 2014 at 2:28 AM, Serge E. Hallyn wrote: > Quoting Aditya Kali (adityak...@google.com): >> Restrict following operations within the calling tasks: >> * cgroup_mkdir & cgroup_rmdir >> * cgroup_attach_task >> * writes to cgroup files outside of task's cgroupns-root >> >> Also, read of

Re: [PATCHv1 7/8] cgroup: cgroup namespace setns support

2014-10-22 Thread Andy Lutomirski
On Wed, Oct 22, 2014 at 11:37 AM, Aditya Kali wrote: > On Tue, Oct 21, 2014 at 5:58 PM, Andy Lutomirski wrote: >> On Tue, Oct 21, 2014 at 5:46 PM, Aditya Kali wrote: >>> On Tue, Oct 21, 2014 at 3:42 PM, Andy Lutomirski >>> wrote: On Tue, Oct 21, 2014 at 3:33 PM, Aditya Kali wrote: >>

[PATCH RFC v3 05/16] virtio: add virtio 1.0 feature bit

2014-10-22 Thread Michael S. Tsirkin
Based on original patches by Rusty Russell, Thomas Huth and Cornelia Huck. Signed-off-by: Michael S. Tsirkin --- include/uapi/linux/virtio_config.h | 7 +-- drivers/virtio/virtio_ring.c | 2 ++ 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/include/uapi/linux/virtio_con

[PATCH RFC v3 01/16] virtio: memory access APIs

2014-10-22 Thread Michael S. Tsirkin
virtio 1.0 makes all memory structures LE, so we need APIs to conditionally do a byteswap on BE architectures. To make it easier to check code statically, add virtio specific types for multi-byte integers in memory. Add low level wrappers that do a byteswap conditionally, these will be useful e.g

Re: [PATCHv5 1/3] syscalls,x86: implement execveat() system call

2014-10-22 Thread Andy Lutomirski
On Wed, Oct 22, 2014 at 4:44 AM, David Drysdale wrote: > Add a new system execveat(2) syscall. execveat() is to execve() as > openat() is to open(): it takes a file descriptor that refers to a > directory, and resolves the filename relative to that. > > bprm->file = file; > - bprm->

[PATCH RFC v3 09/16] virtio: set FEATURES_OK

2014-10-22 Thread Michael S. Tsirkin
set FEATURES_OK as per virtio 1.0 spec Signed-off-by: Michael S. Tsirkin --- include/uapi/linux/virtio_config.h | 2 ++ drivers/virtio/virtio.c| 29 ++--- 2 files changed, 24 insertions(+), 7 deletions(-) diff --git a/include/uapi/linux/virtio_config.h b/in

[PATCH RFC v3 16/16] virtio_blk: fix types for in memory structures

2014-10-22 Thread Michael S. Tsirkin
Signed-off-by: Michael S. Tsirkin --- include/uapi/linux/virtio_blk.h | 15 --- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/include/uapi/linux/virtio_blk.h b/include/uapi/linux/virtio_blk.h index 9ad67b2..247c8ba 100644 --- a/include/uapi/linux/virtio_blk.h +++ b/inc

[PATCH RFC v3 15/16] virtio_net: fix types for in memory structures

2014-10-22 Thread Michael S. Tsirkin
Signed-off-by: Michael S. Tsirkin --- include/uapi/linux/virtio_net.h | 15 --- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/include/uapi/linux/virtio_net.h b/include/uapi/linux/virtio_net.h index 172a7f0..b5f1677 100644 --- a/include/uapi/linux/virtio_net.h +++ b/inc

Re: [PATCHv1 7/8] cgroup: cgroup namespace setns support

2014-10-22 Thread Aditya Kali
On Tue, Oct 21, 2014 at 5:58 PM, Andy Lutomirski wrote: > On Tue, Oct 21, 2014 at 5:46 PM, Aditya Kali wrote: >> On Tue, Oct 21, 2014 at 3:42 PM, Andy Lutomirski wrote: >>> On Tue, Oct 21, 2014 at 3:33 PM, Aditya Kali wrote: On Tue, Oct 21, 2014 at 12:02 PM, Andy Lutomirski wrote: >

Re: [PATCH RFC v2 01/16] virtio: memory access APIs

2014-10-22 Thread Michael S. Tsirkin
On Wed, Oct 22, 2014 at 01:45:55PM -0400, Christopher Covington wrote: > Hi Michael, > > On 10/22/2014 11:50 AM, Michael S. Tsirkin wrote: > > virtio 1.0 makes all memory structures LE, so > > we need APIs to conditionally do a byteswap on BE > > architectures. > > > > To make it easier to check

Re: [PATCHv5 1/3] syscalls,x86: implement execveat() system call

2014-10-22 Thread Eric W. Biederman
David Drysdale writes: > Add a new system execveat(2) syscall. execveat() is to execve() as > openat() is to open(): it takes a file descriptor that refers to a > directory, and resolves the filename relative to that. > > In addition, if the filename is empty and AT_EMPTY_PATH is specified, > exe

Re: [PATCHv5 man-pages 3/3] execveat.2: initial man page for execveat(2)

2014-10-22 Thread Eric W. Biederman
David Drysdale writes: > Signed-off-by: David Drysdale > --- > man2/execveat.2 | 144 > > 1 file changed, 144 insertions(+) > create mode 100644 man2/execveat.2 > > diff --git a/man2/execveat.2 b/man2/execveat.2 > new file mode 100644 >

Re: [PATCH RFC v2 01/16] virtio: memory access APIs

2014-10-22 Thread Christopher Covington
Hi Michael, On 10/22/2014 11:50 AM, Michael S. Tsirkin wrote: > virtio 1.0 makes all memory structures LE, so > we need APIs to conditionally do a byteswap on BE > architectures. > > To make it easier to check code statically, > add virtio specific types for multi-byte integers > in memory. > >

Re: [PATCHv4 RESEND 0/3] syscalls,x86: Add execveat() system call

2014-10-22 Thread Eric W. Biederman
David Drysdale writes: > On Tue, Oct 21, 2014 at 5:29 AM, Eric W. Biederman > wrote: >> Andy Lutomirski writes: >> >>> On Mon, Oct 20, 2014 at 6:48 AM, David Drysdale wrote: On Sun, Oct 19, 2014 at 1:20 AM, Eric W. Biederman wrote: > Andy Lutomirski writes: > >> [Added

Re: [PATCH v1 3/3] tpm: fix multiple race conditions in tpm_ppi.c

2014-10-22 Thread Jason Gunthorpe
On Wed, Oct 22, 2014 at 07:23:56PM +0300, Jarkko Sakkinen wrote: > Traversal of the ACPI device tree was not done right. It should lookup > PPI only under the ACPI device that it is associated. Otherwise, it could > match to a wrong PPI interface if there are two TPM devices in the device > tree. >

Re: [PATCH v1 2/3] tpm: two-phase chip management functions

2014-10-22 Thread Jason Gunthorpe
On Wed, Oct 22, 2014 at 07:23:55PM +0300, Jarkko Sakkinen wrote: > tpm_register_hardware() and tpm_remove_hardware() are called often > before initializing the device. This is wrong order since it could > be that main TPM driver needs a fully initialized chip to be able to > do its job. For example

Re: [PATCH v1 1/3] tpm: merge duplicate transmit_cmd() functions

2014-10-22 Thread Jason Gunthorpe
On Wed, Oct 22, 2014 at 07:23:54PM +0300, Jarkko Sakkinen wrote: > Merged transmit_cmd() functions in tpm-interface.c and tpm-sysfs.c. > Added "tpm_" prefix for consistency sake. Changed cmd parameter as > opaque. This enables to use separate command structures for TPM1 > and TPM2 commands in futur

Aw: [PATCH v1 0/3] tpm: prepare for TPM2

2014-10-22 Thread Peter Huewe
Hi Jarkko, > Jarkko Sakkinen (3): > tpm: merge duplicate transmit_cmd() functions > tpm: two-phase chip management functions > tpm: fix multiple race conditions in tpm_ppi.c the patchset introduces a sparse error: CHECK /home/phuewe/linux-2.6-host/drivers/char/tpm/tpm_tis.c /home/phuewe/linux

[PATCH v1 2/3] tpm: two-phase chip management functions

2014-10-22 Thread Jarkko Sakkinen
tpm_register_hardware() and tpm_remove_hardware() are called often before initializing the device. This is wrong order since it could be that main TPM driver needs a fully initialized chip to be able to do its job. For example, now it is impossible to move common startup functions such as tpm_do_se

[PATCH v1 3/3] tpm: fix multiple race conditions in tpm_ppi.c

2014-10-22 Thread Jarkko Sakkinen
Traversal of the ACPI device tree was not done right. It should lookup PPI only under the ACPI device that it is associated. Otherwise, it could match to a wrong PPI interface if there are two TPM devices in the device tree. Removed global ACPI handle and version string from tpm_ppi.c as this is r

[PATCH v1 1/3] tpm: merge duplicate transmit_cmd() functions

2014-10-22 Thread Jarkko Sakkinen
Merged transmit_cmd() functions in tpm-interface.c and tpm-sysfs.c. Added "tpm_" prefix for consistency sake. Changed cmd parameter as opaque. This enables to use separate command structures for TPM1 and TPM2 commands in future. Loose coupling works fine here. Signed-off-by: Jarkko Sakkinen ---

[PATCH v1 0/3] tpm: prepare for TPM2

2014-10-22 Thread Jarkko Sakkinen
This patch set fixes two race conditions in the TPM subsystem: * Two-phase initialization for struct tpm_chip so that device can initialize fully initialize before exposing itself to the user space. Also, in future TPM2 devices must be flagged before they can be registered. * Machines where

[PATCH RFC v2 09/16] virtio: set FEATURES_OK

2014-10-22 Thread Michael S. Tsirkin
set FEATURES_OK as per virtio 1.0 spec Signed-off-by: Michael S. Tsirkin --- include/uapi/linux/virtio_config.h | 2 ++ drivers/virtio/virtio.c| 29 ++--- 2 files changed, 24 insertions(+), 7 deletions(-) diff --git a/include/uapi/linux/virtio_config.h b/in

[PATCH RFC v2 05/16] virtio: add virtio 1.0 feature bit

2014-10-22 Thread Michael S. Tsirkin
Based on original patches by Rusty Russell, Thomas Huth and Cornelia Huck. Signed-off-by: Michael S. Tsirkin --- include/uapi/linux/virtio_config.h | 7 +-- drivers/virtio/virtio_ring.c | 2 ++ 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/include/uapi/linux/virtio_con

[PATCH RFC v2 16/16] virtio_blk: fix types for in memory structures

2014-10-22 Thread Michael S. Tsirkin
Signed-off-by: Michael S. Tsirkin --- include/uapi/linux/virtio_blk.h | 15 --- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/include/uapi/linux/virtio_blk.h b/include/uapi/linux/virtio_blk.h index 9ad67b2..247c8ba 100644 --- a/include/uapi/linux/virtio_blk.h +++ b/inc

[PATCH RFC v2 01/16] virtio: memory access APIs

2014-10-22 Thread Michael S. Tsirkin
virtio 1.0 makes all memory structures LE, so we need APIs to conditionally do a byteswap on BE architectures. To make it easier to check code statically, add virtio specific types for multi-byte integers in memory. Add low level wrappers that do a byteswap conditionally, these will be useful e.g

[PATCH RFC v2 15/16] virtio_net: fix types for in memory structures

2014-10-22 Thread Michael S. Tsirkin
Signed-off-by: Michael S. Tsirkin --- include/uapi/linux/virtio_net.h | 15 --- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/include/uapi/linux/virtio_net.h b/include/uapi/linux/virtio_net.h index 172a7f0..b5f1677 100644 --- a/include/uapi/linux/virtio_net.h +++ b/inc

Re: [PATCH v8 02/18] vfio: platform: probe to devices on the platform bus

2014-10-22 Thread Antonios Motakis
On Tue, Oct 21, 2014 at 6:37 PM, Eric Auger wrote: > On 10/21/2014 06:17 PM, Alex Williamson wrote: >> On Mon, 2014-10-13 at 15:10 +0200, Antonios Motakis wrote: >>> Driver to bind to Linux platform devices, and callbacks to discover their >>> resources to be used by the main VFIO PLATFORM code. >

Re: [PATCH] [media] Fix smatch warning: unknown field name in initializer

2014-10-22 Thread Hans Verkuil
I sadly missed this patch and it is merged now. But: Nacked-by: Hans Verkuil This sparse warnings are due to a sparse bug that has been fixed in the sparse git repo. It's not included in sparse-0.5.0, the fix came in later. The #define that you kept it the version that does not comply with th

[PATCHv5 1/3] syscalls,x86: implement execveat() system call

2014-10-22 Thread David Drysdale
Add a new system execveat(2) syscall. execveat() is to execve() as openat() is to open(): it takes a file descriptor that refers to a directory, and resolves the filename relative to that. In addition, if the filename is empty and AT_EMPTY_PATH is specified, execveat() executes the file to which t

[PATCHv5 0/3] syscalls,x86: Add execveat() system call

2014-10-22 Thread David Drysdale
This patch set adds execveat(2) for x86, and is derived from Meredydd Luff's patch from Sept 2012 (https://lkml.org/lkml/2012/9/11/528). The primary aim of adding an execveat syscall is to allow an implementation of fexecve(3) that does not rely on the /proc filesystem. The current glibc version

[PATCHv5 man-pages 3/3] execveat.2: initial man page for execveat(2)

2014-10-22 Thread David Drysdale
Signed-off-by: David Drysdale --- man2/execveat.2 | 144 1 file changed, 144 insertions(+) create mode 100644 man2/execveat.2 diff --git a/man2/execveat.2 b/man2/execveat.2 new file mode 100644 index ..d19571a3eb9d --- /dev/nu

Re: [PATCHv4 RESEND 0/3] syscalls,x86: Add execveat() system call

2014-10-22 Thread Christoph Hellwig
On Wed, Oct 22, 2014 at 04:54:05AM -0700, Christoph Hellwig wrote: > [adding Rich Felker to the Cc list, who has been very interested in a > O_SEARCH implementation for which this would be an important building > block] s/O_SEARCH/O_EXEC/, sorry. -- To unsubscribe from this list: send the line "u

Re: [PATCHv4 RESEND 0/3] syscalls,x86: Add execveat() system call

2014-10-22 Thread Christoph Hellwig
[adding Rich Felker to the Cc list, who has been very interested in a O_SEARCH implementation for which this would be an important building block] On Fri, Oct 17, 2014 at 02:45:03PM -0700, Andy Lutomirski wrote: > [Added Eric Biederman, since I think your tree might be a reasonable > route forward

[PATCHv5 2/3] syscalls,x86: add selftest for execveat(2)

2014-10-22 Thread David Drysdale
Signed-off-by: David Drysdale --- tools/testing/selftests/Makefile| 1 + tools/testing/selftests/exec/.gitignore | 6 + tools/testing/selftests/exec/Makefile | 22 +++ tools/testing/selftests/exec/execveat.c | 295 4 files changed, 324 insertions(+)

Re: [PATCHv4 RESEND 0/3] syscalls,x86: Add execveat() system call

2014-10-22 Thread David Drysdale
On Tue, Oct 21, 2014 at 5:29 AM, Eric W. Biederman wrote: > Andy Lutomirski writes: > >> On Mon, Oct 20, 2014 at 6:48 AM, David Drysdale wrote: >>> On Sun, Oct 19, 2014 at 1:20 AM, Eric W. Biederman >>> wrote: Andy Lutomirski writes: > [Added Eric Biederman, since I think your tr

Re: [PATCH V2] kernel, add bug_on_warn

2014-10-22 Thread Prarit Bhargava
On 10/22/2014 12:27 AM, Rusty Russell wrote: > Prarit Bhargava writes: >> There have been several times where I have had to rebuild a kernel to >> cause a panic when hitting a WARN() in the code in order to get a crash >> dump from a system. Sometimes this is easy to do, other times (such as >>