[PATCH] ARM: kernel: respect device tree status of cpu nodes

2014-02-24 Thread Jürg Billeter
Skip 'disabled' cpu nodes when building the cpu logical map. This avoids booting cpus that have been disabled in the device tree. Signed-off-by: Jürg Billeter j...@bitron.ch Reviewed-by: Ben Dooks ben.do...@codethink.co.uk --- arch/arm/kernel/devtree.c | 4 1 file changed, 4 insertions

[PATCH] spi: sh-sci: fix use-after-free in sh_sci_spi_remove()

2014-06-16 Thread Jürg Billeter
setbits() uses sp-membase. Signed-off-by: Jürg Billeter j...@bitron.ch --- drivers/spi/spi-sh-sci.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/spi/spi-sh-sci.c b/drivers/spi/spi-sh-sci.c index 1f56ef6..b83dd73 100644 --- a/drivers/spi/spi-sh-sci.c +++ b

[PATCH] gpio: rcar: clamp returned value to [0,1]

2014-06-23 Thread Jürg Billeter
While it will be clamped to bool by gpiolib, let's make this sane in the driver as well. Signed-off-by: Jürg Billeter j...@bitron.ch --- drivers/gpio/gpio-rcar.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpio/gpio-rcar.c b/drivers/gpio/gpio-rcar.c index

[PATCH] ASoC: rsnd: fixup index of SSI mod when SRC is used

2014-07-02 Thread Jürg Billeter
The default index 1 was used as the loop was terminated before the following code could be reached: if (mod[i] == this) index = i; Signed-off-by: Jürg Billeter j...@bitron.ch --- sound/soc/sh/rcar/core.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff

Re: [alsa-devel] [PATCH] ASoC: rsnd: fixup index of SSI mod when SRC is used

2014-07-03 Thread Jürg Billeter
Hi, On Thu, 2014-07-03 at 22:57 +0900, Kuninori Morimoto wrote: If you add this code, if (!ssi) { break; } else ... then, I guess we can remove this code ? if (mod[i] == ssi) break; I checked the issue on mainline master where the above two

[PATCH] dmaengine: rcar-dmac: Handle hardware descriptor allocation failure

2014-11-25 Thread Jürg Billeter
[8000fcd0] (handle_IRQ+0x50/0xc4) [8000fcd0] (handle_IRQ) from [800092cc] (gic_handle_irq+0x28/0x5c) [800092cc] (gic_handle_irq) from [80012700] (__irq_svc+0x40/0x70) Kernel panic - not syncing: Fatal exception in interrupt Signed-off-by: Jürg Billeter j...@bitron.ch --- drivers/dma/sh/rcar-dmac.c | 14

Re: [PATCH] dmaengine: rcar-dmac: Handle hardware descriptor allocation failure

2014-12-08 Thread Jürg Billeter
Hi Vinod, On Mon, 2014-12-08 at 17:06 +0530, Vinod Koul wrote: Can you please rebase this on my next, this fails to apply for me This is a patch for Laurent's new rcar-dmac driver, which doesn't appear to be in your next yet. Laurent has already merged my patch into his dma/next branch and

[PATCH] null_blk: fix blk_mq_init_queue() error handling

2015-01-08 Thread Jürg Billeter
blk_mq_init_queue() returns ERR_PTR() on failure, not NULL. Signed-off-by: Jürg Billeter j...@bitron.ch --- drivers/block/null_blk.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/block/null_blk.c b/drivers/block/null_blk.c index ae9f615..727309c 100644

[PATCH] virtio_blk: fix blk_mq_init_queue() error handling

2015-01-08 Thread Jürg Billeter
blk_mq_init_queue() returns ERR_PTR() on failure, not NULL. Signed-off-by: Jürg Billeter j...@bitron.ch --- drivers/block/virtio_blk.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/block/virtio_blk.c b/drivers/block/virtio_blk.c index 7ef7c09..b1b5c75 100644

[PATCH 1/3] ti-st: st_kim: use ERR_PTR(-ENOMEM) instead of NULL

2015-06-24 Thread Jürg Billeter
This allows return of other error codes. Signed-off-by: Jürg Billeter j...@bitron.ch --- drivers/misc/ti-st/st_kim.c | 14 ++ 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/drivers/misc/ti-st/st_kim.c b/drivers/misc/ti-st/st_kim.c index 5027b8f..af71584 100644

[PATCH 3/3] ti-st: st_kim: use gpio_set_value_cansleep to fix warning

2015-06-24 Thread Jürg Billeter
GPIO accessor functions may sleep. Signed-off-by: Jürg Billeter j...@bitron.ch --- drivers/misc/ti-st/st_kim.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/misc/ti-st/st_kim.c b/drivers/misc/ti-st/st_kim.c index 8df8faa..0ab81d7 100644 --- a/drivers/misc

[PATCH 2/3] ti-st: st_kim: fix nshutdown_gpio in get_platform_data

2015-06-24 Thread Jürg Billeter
Use of_get_named_gpio instead of of_property_read_u32. Signed-off-by: Jürg Billeter j...@bitron.ch --- drivers/misc/ti-st/st_kim.c | 13 ++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/drivers/misc/ti-st/st_kim.c b/drivers/misc/ti-st/st_kim.c index af71584..8df8faa

Re: [PATCH 2/3] ti-st: st_kim: fix nshutdown_gpio in get_platform_data

2015-06-24 Thread Jürg Billeter
On Wed, 2015-06-24 at 11:31 -0400, Peter Hurley wrote: On 06/24/2015 06:24 AM, Jürg Billeter wrote: @@ -761,8 +762,14 @@ static struct ti_st_plat_data *get_platform_data(struct device *dev) dt_property = of_get_property(np, dev_name, len); if (dt_property) memcpy

[PATCH 2/2] iwlwifi: fix double hyphen in MODULE_FIRMWARE for 8000

2016-10-10 Thread Jürg Billeter
There is only a single hyphen between iwlwifi-8000C and the API version in the firmware filename. Fixes: e1ba684f762b ("iwlwifi: 8000: fix MODULE_FIRMWARE input") Signed-off-by: Jürg Billeter <j...@bitron.ch> --- drivers/net/wireless/intel/iwlwifi/iwl-8000.c | 2 +- 1 file chan

[PATCH 1/2] iwlwifi: fix MODULE_FIRMWARE for 6030

2016-10-10 Thread Jürg Billeter
IWL6000G2B_UCODE_API_MAX is not defined. ucode_api_max of IWL_DEVICE_6030 uses IWL6000G2_UCODE_API_MAX. Use this also for MODULE_FIRMWARE. Fixes: 9d9b21d1b616 ("iwlwifi: remove IWL_*_UCODE_API_OK") Signed-off-by: Jürg Billeter <j...@bitron.ch> --- drivers/net/wireless/intel/iw

[PATCH] Bluetooth: btintel: Add MODULE_FIRMWARE entries for iBT 3.5 controllers

2017-05-23 Thread Jürg Billeter
The iBT 3.5 controllers (Intel 8265, Windstorm Peak) need intel/ibt-12-16.sfi and intel/ibt-12-16.ddc firmware files from linux-firmware repository. Signed-off-by: Jürg Billeter <j...@bitron.ch> --- drivers/bluetooth/btintel.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/d

Re: [PATCH] prctl: add PR_[GS]ET_PDEATHSIG_PROC

2017-09-13 Thread Jürg Billeter
On Wed, 2017-09-13 at 19:11 +0200, Oleg Nesterov wrote: > On 09/12, Jürg Billeter wrote: > > > > On Tue, 2017-09-12 at 19:05 +0200, Oleg Nesterov wrote: > > > On 09/09, Jürg Billeter wrote: > > > > Unlike > > > > PR_SET_PDEATHSIG, this i

Re: [RESEND PATCH] prctl: add PR_[GS]ET_PDEATHSIG_PROC

2017-10-08 Thread Jürg Billeter
On Thu, 2017-10-05 at 18:27 +0200, Oleg Nesterov wrote: > On 10/03, Jürg Billeter wrote: > > > > My use case is to provide a way for a process to spawn a child and > > ensure that no descendants survive when that child dies. Avoiding > > runaway processes is desira

Re: [RESEND PATCH] prctl: add PR_[GS]ET_PDEATHSIG_PROC

2017-10-03 Thread Jürg Billeter
On Tue, 2017-10-03 at 12:40 -0500, Eric W. Biederman wrote: > Jürg Billeter <j...@bitron.ch> writes: > > What's actually the reason that CLONE_NEWPID requires CAP_SYS_ADMIN? > > Does CLONE_NEWPID pose any risks that don't exist for > > CLONE_NEWUSER|CLONE_NEWPID? As

[PATCH] fs: add RWF_APPEND

2017-09-09 Thread Jürg Billeter
descriptor. Signed-off-by: Jürg Billeter <j...@bitron.ch> --- include/linux/fs.h | 2 ++ include/uapi/linux/fs.h | 6 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/include/linux/fs.h b/include/linux/fs.h index e723b62c4b81..5f27ef9cce17 100644 --- a/include/linux/fs.h

Re: new ...at() flag: AT_NO_JUMPS

2017-09-10 Thread Jürg Billeter
Hi Al, Might it make sense to specify these lookup restrictions when opening the directory (O_ROOT?) instead of specifying it for each lookup with AT_* (or supporting both)? This might make it more useful when passing directory fds between processes that do not use seccomp (where AT_BENEATH could

[PATCH] prctl: add PR_[GS]ET_PDEATHSIG_PROC

2017-09-09 Thread Jürg Billeter
with a seccomp filter. There have been previous attempts to support this by changing the behavior of PR_SET_PDEATHSIG. However, that would break existing applications. See https://marc.info/?l=linux-kernel=117621804801689 and https://bugzilla.kernel.org/show_bug.cgi?id=43300 Signed-off-by: Jürg

Re: [PATCH] prctl: add PR_[GS]ET_PDEATHSIG_PROC

2017-09-12 Thread Jürg Billeter
Hi Oleg, Thanks for the review. On Tue, 2017-09-12 at 19:05 +0200, Oleg Nesterov wrote: > On 09/09, Jürg Billeter wrote: > > Unlike > > PR_SET_PDEATHSIG, this is inherited across fork to allow killing a whole > > subtree without race conditions. > > but I am s

[RESEND PATCH] fs: add RWF_APPEND

2017-09-29 Thread Jürg Billeter
. Signed-off-by: Jürg Billeter <j...@bitron.ch> --- include/linux/fs.h | 2 ++ include/uapi/linux/fs.h | 6 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/include/linux/fs.h b/include/linux/fs.h index 339e73742e73..fee24eae7523 100644 --- a/include/linux/fs.h +++ b/i

[RESEND PATCH] prctl: add PR_[GS]ET_PDEATHSIG_PROC

2017-09-29 Thread Jürg Billeter
with a seccomp filter. There have been previous attempts to support this by changing the behavior of PR_SET_PDEATHSIG. However, that would break existing applications. See https://marc.info/?l=linux-kernel=117621804801689 and https://bugzilla.kernel.org/show_bug.cgi?id=43300 Signed-off-by: Jürg

Re: [RESEND PATCH] prctl: add PR_[GS]ET_PDEATHSIG_PROC

2017-10-03 Thread Jürg Billeter
On Mon, 2017-10-02 at 22:25 -0500, Eric W. Biederman wrote: > The code where it calls group_send_sig_info is buggy for pdeath_signal. > And it no less buggy for this new case. There is no point to check > permissions when sending a signal to yourself. Especially this signal > gets cleared during

Re: [RESEND PATCH] prctl: add PR_[GS]ET_PDEATHSIG_PROC

2017-10-03 Thread Jürg Billeter
On Tue, 2017-10-03 at 09:46 -0500, Eric W. Biederman wrote: > There is a general need to find out about the death of other processes, > if you are not the parent of the process. I would be inclined to call > it waitfd. Something that you give a pid. It performs a permission > check and the pid

Re: [PATCH v2] prctl: add PR_[GS]ET_KILLABLE

2018-08-03 Thread Jürg Billeter
On Wed, 2018-08-01 at 16:19 +0200, Oleg Nesterov wrote: > On 07/31, Jürg Billeter wrote: > > > > > Could you explain your use-case? Why a shell wants to use > > > CLONE_NEWPID? > > > > To guarantee that there won't be any runaway processes, i.e., ensure >

Re: [PATCH v2] prctl: add PR_[GS]ET_KILLABLE

2018-08-03 Thread Jürg Billeter
On Fri, 2018-08-03 at 08:34 -0500, Eric W. Biederman wrote: > From the other direction I think we can just go ahead and fix handling > of the job control stop signals as well. As far as I understand it > there is a legitimate complaint that SIGTSTP SIGTTIN SIGTTOU do not work > on a pid namespace

[PATCH v3 2/2] prctl: add PR_[GS]ET_KILLABLE

2018-08-03 Thread Jürg Billeter
on the default actions as described in signal(7) and PID isolation may be useful. This new prctl makes the signal protection for "init" processes optional, without breaking backward compatibility. Signed-off-by: Jürg Billeter --- include/uapi/linux/prctl.h | 4 kernel/sys.c

[PATCH v3 1/2] fork: do not rely on SIGNAL_UNKILLABLE for init check

2018-08-03 Thread Jürg Billeter
copy_process() currently checks the SIGNAL_UNKILLABLE flag to determine whether to accept CLONE_PARENT. In preparation for allowing init processes to opt out of SIGNAL_UNKILLABLE, directly check whether the process is an init process with is_child_reaper(). Signed-off-by: Jürg Billeter

Re: [PATCH] prctl: add PR_[GS]ET_KILLABLE

2018-07-30 Thread Jürg Billeter
On Mon, 2018-07-30 at 12:17 +0200, Oleg Nesterov wrote: > On 07/30, Jürg Billeter wrote: > > > > This is required for job control in a shell that uses CLONE_NEWPID for > > child processes. > > Could you explain in more details? The SIGNAL_UNKILLABLE flag, which

Re: [PATCH v2] prctl: add PR_[GS]ET_KILLABLE

2018-07-31 Thread Jürg Billeter
On Tue, 2018-07-31 at 16:39 +0200, Oleg Nesterov wrote: > On 07/31, Jürg Billeter wrote: > > SIGINT, SIGQUIT and SIGTSTP are used in job control for ^C, ^\, ^Z. > > While a task with the SIGNAL_UNKILLABLE flag could install handlers for > > these signals, this is not su

Re: [PATCH] prctl: add PR_[GS]ET_KILLABLE

2018-08-01 Thread Jürg Billeter
On Tue, 2018-07-31 at 18:26 +0200, Jann Horn wrote: > On Mon, Jul 30, 2018 at 10:01 AM Jürg Billeter wrote: > > [...] > > diff --git a/kernel/sys.c b/kernel/sys.c > > index 38509dc1f77b..264de630d548 100644 > > --- a/kernel/sys.c > > +++ b/kernel/sys.c > >

[PATCH v2] prctl: add PR_[GS]ET_KILLABLE

2018-07-31 Thread Jürg Billeter
on the default actions as described in signal(7) and PID isolation may be useful. This new prctl makes the signal protection for "init" processes optional, without breaking backward compatibility. Signed-off-by: Jürg Billeter --- v2: Hold siglock for PR_SET_KILLABLE, expand commit message. in

[PATCH] prctl: add PR_[GS]ET_KILLABLE

2018-07-30 Thread Jürg Billeter
setting the SIGNAL_UNKILLABLE flag, only clearing. Signed-off-by: Jürg Billeter --- include/uapi/linux/prctl.h | 4 kernel/sys.c | 11 +++ 2 files changed, 15 insertions(+) diff --git a/include/uapi/linux/prctl.h b/include/uapi/linux/prctl.h index c0d7ea0bf5b6

[PATCH v2] readv.2, io_submit.2: Document RWF_APPEND added in Linux 4.16

2018-04-06 Thread Jürg Billeter
Signed-off-by: Jürg Billeter <j...@bitron.ch> --- Changes since version 1: - Explain offset handling man2/io_submit.2 | 13 + man2/readv.2 | 17 + 2 files changed, 30 insertions(+) diff --git a/man2/io_submit.2 b/man2/io_submit.2 index 397fd0b75..25961138a

[PATCH] readv.2, io_submit.2: Document RWF_APPEND added in Linux 4.16

2018-03-28 Thread Jürg Billeter
Signed-off-by: Jürg Billeter <j...@bitron.ch> --- man2/io_submit.2 | 10 ++ man2/readv.2 | 10 ++ 2 files changed, 20 insertions(+) diff --git a/man2/io_submit.2 b/man2/io_submit.2 index 397fd0b75..79fcdfee4 100644 --- a/man2/io_submit.2 +++ b/man2/io_submit.2 @@

Re: [PATCH v4] signal: add taskfd_send_signal() syscall

2018-12-06 Thread Jürg Billeter
On Thu, 2018-12-06 at 14:12 +0100, Florian Weimer wrote: > * Jürg Billeter: > > > On Thu, 2018-12-06 at 13:30 +0100, Florian Weimer wrote: > > > * Christian Brauner: > > > > > > > /* zombies */ > > > > Zombies can b

Re: [PATCH v4] signal: add taskfd_send_signal() syscall

2018-12-06 Thread Jürg Billeter
On Thu, 2018-12-06 at 13:30 +0100, Florian Weimer wrote: > * Christian Brauner: > > > /* zombies */ > > Zombies can be signaled just as any other process. No special error will be > > reported since a zombie state is an unreliable state (cf. [3]). > > I still disagree with this analysis. If I

Re: [PATCH v2 0/1] Add prctl to kill descendants on exit

2018-12-06 Thread Jürg Billeter
On Fri, 2018-11-30 at 08:00 +, Jürg Billeter wrote: > This patch adds a new prctl to kill all descendant processes on exit. > See commit message for details of the prctl. > > This is a replacement of PR_SET_PDEATHSIG_PROC I proposed last year [1]. > In the following discussion,

[PATCH v2 1/1] prctl: add PR_{GET,SET}_KILL_DESCENDANTS_ON_EXIT

2018-11-30 Thread Jürg Billeter
orphaned processes. If a descendant gained privileges, the current process may not be allowed to kill it, and the descendant process will survive. PR_SET_NO_NEW_PRIVS can be used to prevent descendant processes from gaining privileges. Suggested-by: Oleg Nesterov Signed-off-by: Jürg Billeter --- fs

[PATCH v2 0/1] Add prctl to kill descendants on exit

2018-11-30 Thread Jürg Billeter
instead of bitfield to avoid race with PR_SET_CHILD_SUBREAPER [1] https://lkml.kernel.org/lkml/20170929123058.48924-...@bitron.ch/ [2] https://bugzilla.kernel.org/show_bug.cgi?id=43300 [3] https://lkml.kernel.org/lkml/20180803144021.56920-...@bitron.ch/ Jürg Billeter (1): prctl: add PR_{GET

Re: [PATCH] prctl: add PR_{GET,SET}_KILL_DESCENDANTS_ON_EXIT

2018-11-29 Thread Jürg Billeter
Hi Oleg, Thanks for the review. On Thu, 2018-11-29 at 13:34 +0100, Oleg Nesterov wrote: > To me it would be more clean to call > walk_process_tree(kill_descendant_visitor) > unconditionally in find_new_reaper() right before "if (has_child_subreaper)", > but > then we will need to shift

Re: [PATCH v2 1/1] prctl: add PR_{GET,SET}_KILL_DESCENDANTS_ON_EXIT

2018-12-01 Thread Jürg Billeter
On Sat, 2018-12-01 at 13:28 +0100, Florian Weimer wrote: > * Jürg Billeter: > > > On Fri, 2018-11-30 at 14:40 +0100, Florian Weimer wrote: > > > * Jürg Billeter: > > > > > > > This introduces a new thread group flag that can be

Re: [PATCH v2 1/1] prctl: add PR_{GET,SET}_KILL_DESCENDANTS_ON_EXIT

2018-12-01 Thread Jürg Billeter
On Fri, 2018-11-30 at 14:40 +0100, Florian Weimer wrote: > * Jürg Billeter: > > > This introduces a new thread group flag that can be set by calling > > > > prctl(PR_SET_KILL_DESCENDANTS_ON_EXIT, 1, 0, 0, 0) > > > > When a thread group exits with

Re: [PATCH v4 2/4] namei: O_BENEATH-style path resolution flags

2018-11-23 Thread Jürg Billeter
Hi Aleksa, On Tue, 2018-11-13 at 01:26 +1100, Aleksa Sarai wrote: > * O_BENEATH: Disallow "escapes" from the starting point of the > filesystem tree during resolution (you must stay "beneath" the > starting point at all times). Currently this is done by disallowing > ".." and absolute paths

[PATCH 0/1] Add prctl to kill descendants on exit

2018-11-27 Thread Jürg Billeter
/lkml/20170929123058.48924-...@bitron.ch/ [2] https://bugzilla.kernel.org/show_bug.cgi?id=43300 [3] https://lkml.kernel.org/lkml/20180803144021.56920-...@bitron.ch/ Jürg Billeter (1): prctl: add PR_{GET,SET}_KILL_DESCENDANTS_ON_EXIT fs/exec.c| 6 ++ include/linux/sched

[PATCH] prctl: add PR_{GET,SET}_KILL_DESCENDANTS_ON_EXIT

2018-11-27 Thread Jürg Billeter
orphaned processes. If a descendant gained privileges, the current process may not be allowed to kill it, and the descendant process will survive. PR_SET_NO_NEW_PRIVS can be used to prevent descendant processes from gaining privileges. Suggested-by: Oleg Nesterov Signed-off-by: Jürg Billeter --- fs

[PATCH] ARM: kernel: respect device tree status of cpu nodes

2014-02-24 Thread Jürg Billeter
Skip 'disabled' cpu nodes when building the cpu logical map. This avoids booting cpus that have been disabled in the device tree. Signed-off-by: Jürg Billeter Reviewed-by: Ben Dooks --- arch/arm/kernel/devtree.c | 4 1 file changed, 4 insertions(+) diff --git a/arch/arm/kernel/devtree.c

[PATCH] gpio: rcar: clamp returned value to [0,1]

2014-06-23 Thread Jürg Billeter
While it will be clamped to bool by gpiolib, let's make this sane in the driver as well. Signed-off-by: Jürg Billeter --- drivers/gpio/gpio-rcar.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpio/gpio-rcar.c b/drivers/gpio/gpio-rcar.c index 0c9f803..7c62121

[PATCH] ASoC: rsnd: fixup index of SSI mod when SRC is used

2014-07-02 Thread Jürg Billeter
The default index 1 was used as the loop was terminated before the following code could be reached: if (mod[i] == this) index = i; Signed-off-by: Jürg Billeter --- sound/soc/sh/rcar/core.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/sound

Re: [alsa-devel] [PATCH] ASoC: rsnd: fixup index of SSI mod when SRC is used

2014-07-03 Thread Jürg Billeter
Hi, On Thu, 2014-07-03 at 22:57 +0900, Kuninori Morimoto wrote: > If you add this code, > > if (!ssi) { >break; > } else ... > > then, I guess we can remove this code ? > > if (mod[i] == ssi) > break; I checked the issue on mainline master where the

[PATCH] spi: sh-sci: fix use-after-free in sh_sci_spi_remove()

2014-06-16 Thread Jürg Billeter
setbits() uses sp->membase. Signed-off-by: Jürg Billeter --- drivers/spi/spi-sh-sci.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/spi/spi-sh-sci.c b/drivers/spi/spi-sh-sci.c index 1f56ef6..b83dd73 100644 --- a/drivers/spi/spi-sh-sci.c +++ b/drivers/spi/spi

[PATCH] readv.2, io_submit.2: Document RWF_APPEND added in Linux 4.16

2018-03-28 Thread Jürg Billeter
Signed-off-by: Jürg Billeter --- man2/io_submit.2 | 10 ++ man2/readv.2 | 10 ++ 2 files changed, 20 insertions(+) diff --git a/man2/io_submit.2 b/man2/io_submit.2 index 397fd0b75..79fcdfee4 100644 --- a/man2/io_submit.2 +++ b/man2/io_submit.2 @@ -111,6 +111,16 @@ field

Re: [RESEND PATCH] prctl: add PR_[GS]ET_PDEATHSIG_PROC

2017-10-08 Thread Jürg Billeter
On Thu, 2017-10-05 at 18:27 +0200, Oleg Nesterov wrote: > On 10/03, Jürg Billeter wrote: > > > > My use case is to provide a way for a process to spawn a child and > > ensure that no descendants survive when that child dies. Avoiding > > runaway processes is desira

Re: [RESEND PATCH] prctl: add PR_[GS]ET_PDEATHSIG_PROC

2017-10-03 Thread Jürg Billeter
On Mon, 2017-10-02 at 22:25 -0500, Eric W. Biederman wrote: > The code where it calls group_send_sig_info is buggy for pdeath_signal. > And it no less buggy for this new case. There is no point to check > permissions when sending a signal to yourself. Especially this signal > gets cleared during

Re: [RESEND PATCH] prctl: add PR_[GS]ET_PDEATHSIG_PROC

2017-10-03 Thread Jürg Billeter
On Tue, 2017-10-03 at 09:46 -0500, Eric W. Biederman wrote: > There is a general need to find out about the death of other processes, > if you are not the parent of the process. I would be inclined to call > it waitfd. Something that you give a pid. It performs a permission > check and the pid

Re: [RESEND PATCH] prctl: add PR_[GS]ET_PDEATHSIG_PROC

2017-10-03 Thread Jürg Billeter
On Tue, 2017-10-03 at 12:40 -0500, Eric W. Biederman wrote: > Jürg Billeter writes: > > What's actually the reason that CLONE_NEWPID requires CAP_SYS_ADMIN? > > Does CLONE_NEWPID pose any risks that don't exist for > > CLONE_NEWUSER|CLONE_NEWPID? Assuming

[RESEND PATCH] fs: add RWF_APPEND

2017-09-29 Thread Jürg Billeter
. Signed-off-by: Jürg Billeter --- include/linux/fs.h | 2 ++ include/uapi/linux/fs.h | 6 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/include/linux/fs.h b/include/linux/fs.h index 339e73742e73..fee24eae7523 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h

[RESEND PATCH] prctl: add PR_[GS]ET_PDEATHSIG_PROC

2017-09-29 Thread Jürg Billeter
with a seccomp filter. There have been previous attempts to support this by changing the behavior of PR_SET_PDEATHSIG. However, that would break existing applications. See https://marc.info/?l=linux-kernel=117621804801689 and https://bugzilla.kernel.org/show_bug.cgi?id=43300 Signed-off-by: Jürg

[PATCH] fs: add RWF_APPEND

2017-09-09 Thread Jürg Billeter
descriptor. Signed-off-by: Jürg Billeter --- include/linux/fs.h | 2 ++ include/uapi/linux/fs.h | 6 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/include/linux/fs.h b/include/linux/fs.h index e723b62c4b81..5f27ef9cce17 100644 --- a/include/linux/fs.h +++ b/include/linux

[PATCH] prctl: add PR_[GS]ET_PDEATHSIG_PROC

2017-09-09 Thread Jürg Billeter
with a seccomp filter. There have been previous attempts to support this by changing the behavior of PR_SET_PDEATHSIG. However, that would break existing applications. See https://marc.info/?l=linux-kernel=117621804801689 and https://bugzilla.kernel.org/show_bug.cgi?id=43300 Signed-off-by: Jürg

Re: [PATCH] prctl: add PR_[GS]ET_PDEATHSIG_PROC

2017-09-13 Thread Jürg Billeter
On Wed, 2017-09-13 at 19:11 +0200, Oleg Nesterov wrote: > On 09/12, Jürg Billeter wrote: > > > > On Tue, 2017-09-12 at 19:05 +0200, Oleg Nesterov wrote: > > > On 09/09, Jürg Billeter wrote: > > > > Unlike > > > > PR_SET_PDEATHSIG, this i

[PATCH v2] readv.2, io_submit.2: Document RWF_APPEND added in Linux 4.16

2018-04-06 Thread Jürg Billeter
Signed-off-by: Jürg Billeter --- Changes since version 1: - Explain offset handling man2/io_submit.2 | 13 + man2/readv.2 | 17 + 2 files changed, 30 insertions(+) diff --git a/man2/io_submit.2 b/man2/io_submit.2 index 397fd0b75..25961138a 100644 --- a/man2

Re: new ...at() flag: AT_NO_JUMPS

2017-09-10 Thread Jürg Billeter
Hi Al, Might it make sense to specify these lookup restrictions when opening the directory (O_ROOT?) instead of specifying it for each lookup with AT_* (or supporting both)? This might make it more useful when passing directory fds between processes that do not use seccomp (where AT_BENEATH could

Re: [PATCH] prctl: add PR_[GS]ET_PDEATHSIG_PROC

2017-09-12 Thread Jürg Billeter
Hi Oleg, Thanks for the review. On Tue, 2017-09-12 at 19:05 +0200, Oleg Nesterov wrote: > On 09/09, Jürg Billeter wrote: > > Unlike > > PR_SET_PDEATHSIG, this is inherited across fork to allow killing a whole > > subtree without race conditions. > > but I am s

[RESEND PATCH v2 1/1] prctl: add PR_{GET,SET}_KILL_DESCENDANTS_ON_EXIT

2019-01-18 Thread Jürg Billeter
orphaned processes. If a descendant gained privileges, the current process may not be allowed to kill it, and the descendant process will survive. PR_SET_NO_NEW_PRIVS can be used to prevent descendant processes from gaining privileges. Suggested-by: Oleg Nesterov Signed-off-by: Jürg Billeter Reviewed

[RESEND PATCH v2 0/1] Add prctl to kill descendants on exit

2019-01-18 Thread Jürg Billeter
instead of bitfield to avoid race with PR_SET_CHILD_SUBREAPER [1] https://lkml.kernel.org/lkml/20170929123058.48924-...@bitron.ch/ [2] https://bugzilla.kernel.org/show_bug.cgi?id=43300 [3] https://lkml.kernel.org/lkml/20180803144021.56920-...@bitron.ch/ Jürg Billeter (1): prctl: add PR_{GET

[PATCH] prctl: add PR_[GS]ET_KILLABLE

2018-07-30 Thread Jürg Billeter
setting the SIGNAL_UNKILLABLE flag, only clearing. Signed-off-by: Jürg Billeter --- include/uapi/linux/prctl.h | 4 kernel/sys.c | 11 +++ 2 files changed, 15 insertions(+) diff --git a/include/uapi/linux/prctl.h b/include/uapi/linux/prctl.h index c0d7ea0bf5b6

Re: [PATCH] prctl: add PR_[GS]ET_KILLABLE

2018-07-30 Thread Jürg Billeter
On Mon, 2018-07-30 at 12:17 +0200, Oleg Nesterov wrote: > On 07/30, Jürg Billeter wrote: > > > > This is required for job control in a shell that uses CLONE_NEWPID for > > child processes. > > Could you explain in more details? The SIGNAL_UNKILLABLE flag, which

[PATCH v2] prctl: add PR_[GS]ET_KILLABLE

2018-07-31 Thread Jürg Billeter
on the default actions as described in signal(7) and PID isolation may be useful. This new prctl makes the signal protection for "init" processes optional, without breaking backward compatibility. Signed-off-by: Jürg Billeter --- v2: Hold siglock for PR_SET_KILLABLE, expand commit message. in

Re: [PATCH v2] prctl: add PR_[GS]ET_KILLABLE

2018-07-31 Thread Jürg Billeter
On Tue, 2018-07-31 at 16:39 +0200, Oleg Nesterov wrote: > On 07/31, Jürg Billeter wrote: > > SIGINT, SIGQUIT and SIGTSTP are used in job control for ^C, ^\, ^Z. > > While a task with the SIGNAL_UNKILLABLE flag could install handlers for > > these signals, this is not su

Re: [PATCH v4 2/4] namei: O_BENEATH-style path resolution flags

2018-11-23 Thread Jürg Billeter
Hi Aleksa, On Tue, 2018-11-13 at 01:26 +1100, Aleksa Sarai wrote: > * O_BENEATH: Disallow "escapes" from the starting point of the > filesystem tree during resolution (you must stay "beneath" the > starting point at all times). Currently this is done by disallowing > ".." and absolute paths

[PATCH] prctl: add PR_{GET,SET}_KILL_DESCENDANTS_ON_EXIT

2018-11-27 Thread Jürg Billeter
orphaned processes. If a descendant gained privileges, the current process may not be allowed to kill it, and the descendant process will survive. PR_SET_NO_NEW_PRIVS can be used to prevent descendant processes from gaining privileges. Suggested-by: Oleg Nesterov Signed-off-by: Jürg Billeter --- fs

[PATCH 0/1] Add prctl to kill descendants on exit

2018-11-27 Thread Jürg Billeter
/lkml/20170929123058.48924-...@bitron.ch/ [2] https://bugzilla.kernel.org/show_bug.cgi?id=43300 [3] https://lkml.kernel.org/lkml/20180803144021.56920-...@bitron.ch/ Jürg Billeter (1): prctl: add PR_{GET,SET}_KILL_DESCENDANTS_ON_EXIT fs/exec.c| 6 ++ include/linux/sched

Re: [PATCH] prctl: add PR_{GET,SET}_KILL_DESCENDANTS_ON_EXIT

2018-11-29 Thread Jürg Billeter
Hi Oleg, Thanks for the review. On Thu, 2018-11-29 at 13:34 +0100, Oleg Nesterov wrote: > To me it would be more clean to call > walk_process_tree(kill_descendant_visitor) > unconditionally in find_new_reaper() right before "if (has_child_subreaper)", > but > then we will need to shift

[PATCH v2 1/1] prctl: add PR_{GET,SET}_KILL_DESCENDANTS_ON_EXIT

2018-11-30 Thread Jürg Billeter
orphaned processes. If a descendant gained privileges, the current process may not be allowed to kill it, and the descendant process will survive. PR_SET_NO_NEW_PRIVS can be used to prevent descendant processes from gaining privileges. Suggested-by: Oleg Nesterov Signed-off-by: Jürg Billeter --- fs

[PATCH v2 0/1] Add prctl to kill descendants on exit

2018-11-30 Thread Jürg Billeter
instead of bitfield to avoid race with PR_SET_CHILD_SUBREAPER [1] https://lkml.kernel.org/lkml/20170929123058.48924-...@bitron.ch/ [2] https://bugzilla.kernel.org/show_bug.cgi?id=43300 [3] https://lkml.kernel.org/lkml/20180803144021.56920-...@bitron.ch/ Jürg Billeter (1): prctl: add PR_{GET

Re: [PATCH v4] signal: add taskfd_send_signal() syscall

2018-12-06 Thread Jürg Billeter
On Thu, 2018-12-06 at 13:30 +0100, Florian Weimer wrote: > * Christian Brauner: > > > /* zombies */ > > Zombies can be signaled just as any other process. No special error will be > > reported since a zombie state is an unreliable state (cf. [3]). > > I still disagree with this analysis. If I

Re: [PATCH v4] signal: add taskfd_send_signal() syscall

2018-12-06 Thread Jürg Billeter
On Thu, 2018-12-06 at 14:12 +0100, Florian Weimer wrote: > * Jürg Billeter: > > > On Thu, 2018-12-06 at 13:30 +0100, Florian Weimer wrote: > > > * Christian Brauner: > > > > > > > /* zombies */ > > > > Zombies can b

Re: [PATCH v2 0/1] Add prctl to kill descendants on exit

2018-12-06 Thread Jürg Billeter
On Fri, 2018-11-30 at 08:00 +, Jürg Billeter wrote: > This patch adds a new prctl to kill all descendant processes on exit. > See commit message for details of the prctl. > > This is a replacement of PR_SET_PDEATHSIG_PROC I proposed last year [1]. > In the following discussion,

Re: [PATCH] prctl: add PR_[GS]ET_KILLABLE

2018-08-01 Thread Jürg Billeter
On Tue, 2018-07-31 at 18:26 +0200, Jann Horn wrote: > On Mon, Jul 30, 2018 at 10:01 AM Jürg Billeter wrote: > > [...] > > diff --git a/kernel/sys.c b/kernel/sys.c > > index 38509dc1f77b..264de630d548 100644 > > --- a/kernel/sys.c > > +++ b/kernel/sys.c > >

Re: [PATCH v2] prctl: add PR_[GS]ET_KILLABLE

2018-08-03 Thread Jürg Billeter
On Wed, 2018-08-01 at 16:19 +0200, Oleg Nesterov wrote: > On 07/31, Jürg Billeter wrote: > > > > > Could you explain your use-case? Why a shell wants to use > > > CLONE_NEWPID? > > > > To guarantee that there won't be any runaway processes, i.e., ensure >

Re: [PATCH v2] prctl: add PR_[GS]ET_KILLABLE

2018-08-03 Thread Jürg Billeter
On Fri, 2018-08-03 at 08:34 -0500, Eric W. Biederman wrote: > From the other direction I think we can just go ahead and fix handling > of the job control stop signals as well. As far as I understand it > there is a legitimate complaint that SIGTSTP SIGTTIN SIGTTOU do not work > on a pid namespace

[PATCH v3 2/2] prctl: add PR_[GS]ET_KILLABLE

2018-08-03 Thread Jürg Billeter
on the default actions as described in signal(7) and PID isolation may be useful. This new prctl makes the signal protection for "init" processes optional, without breaking backward compatibility. Signed-off-by: Jürg Billeter --- include/uapi/linux/prctl.h | 4 kernel/sys.c

[PATCH v3 1/2] fork: do not rely on SIGNAL_UNKILLABLE for init check

2018-08-03 Thread Jürg Billeter
copy_process() currently checks the SIGNAL_UNKILLABLE flag to determine whether to accept CLONE_PARENT. In preparation for allowing init processes to opt out of SIGNAL_UNKILLABLE, directly check whether the process is an init process with is_child_reaper(). Signed-off-by: Jürg Billeter

Re: [PATCH v2 2/5] pid: add pidfd_open()

2019-03-30 Thread Jürg Billeter
On Fri, 2019-03-29 at 16:54 +0100, Christian Brauner wrote: > diff --git a/include/uapi/linux/wait.h b/include/uapi/linux/wait.h > index ac49a220cf2a..d6c7c0701997 100644 > --- a/include/uapi/linux/wait.h > +++ b/include/uapi/linux/wait.h > @@ -18,5 +18,7 @@ > #define P_PID1 >

Re: [PATCH v2 1/1] prctl: add PR_{GET,SET}_KILL_DESCENDANTS_ON_EXIT

2018-12-01 Thread Jürg Billeter
On Fri, 2018-11-30 at 14:40 +0100, Florian Weimer wrote: > * Jürg Billeter: > > > This introduces a new thread group flag that can be set by calling > > > > prctl(PR_SET_KILL_DESCENDANTS_ON_EXIT, 1, 0, 0, 0) > > > > When a thread group exits with

Re: [PATCH v2 1/1] prctl: add PR_{GET,SET}_KILL_DESCENDANTS_ON_EXIT

2018-12-01 Thread Jürg Billeter
On Sat, 2018-12-01 at 13:28 +0100, Florian Weimer wrote: > * Jürg Billeter: > > > On Fri, 2018-11-30 at 14:40 +0100, Florian Weimer wrote: > > > * Jürg Billeter: > > > > > > > This introduces a new thread group flag that can be

[PATCH] null_blk: fix blk_mq_init_queue() error handling

2015-01-08 Thread Jürg Billeter
blk_mq_init_queue() returns ERR_PTR() on failure, not NULL. Signed-off-by: Jürg Billeter --- drivers/block/null_blk.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/block/null_blk.c b/drivers/block/null_blk.c index ae9f615..727309c 100644 --- a/drivers/block

[PATCH] virtio_blk: fix blk_mq_init_queue() error handling

2015-01-08 Thread Jürg Billeter
blk_mq_init_queue() returns ERR_PTR() on failure, not NULL. Signed-off-by: Jürg Billeter --- drivers/block/virtio_blk.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/block/virtio_blk.c b/drivers/block/virtio_blk.c index 7ef7c09..b1b5c75 100644 --- a/drivers

[PATCH] dmaengine: rcar-dmac: Handle hardware descriptor allocation failure

2014-11-25 Thread Jürg Billeter
<8005fdb0>] (generic_handle_irq+0x20/0x30) [<8005fdb0>] (generic_handle_irq) from [<8000fcd0>] (handle_IRQ+0x50/0xc4) [<8000fcd0>] (handle_IRQ) from [<800092cc>] (gic_handle_irq+0x28/0x5c) [<800092cc>] (gic_handle_irq) from [<80012700>] (__irq_svc+0x40/0x70) Kernel p

[PATCH 2/3] ti-st: st_kim: fix nshutdown_gpio in get_platform_data

2015-06-24 Thread Jürg Billeter
Use of_get_named_gpio instead of of_property_read_u32. Signed-off-by: Jürg Billeter --- drivers/misc/ti-st/st_kim.c | 13 ++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/drivers/misc/ti-st/st_kim.c b/drivers/misc/ti-st/st_kim.c index af71584..8df8faa 100644

[PATCH 3/3] ti-st: st_kim: use gpio_set_value_cansleep to fix warning

2015-06-24 Thread Jürg Billeter
GPIO accessor functions may sleep. Signed-off-by: Jürg Billeter --- drivers/misc/ti-st/st_kim.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/misc/ti-st/st_kim.c b/drivers/misc/ti-st/st_kim.c index 8df8faa..0ab81d7 100644 --- a/drivers/misc/ti-st

[PATCH 1/3] ti-st: st_kim: use ERR_PTR(-ENOMEM) instead of NULL

2015-06-24 Thread Jürg Billeter
This allows return of other error codes. Signed-off-by: Jürg Billeter --- drivers/misc/ti-st/st_kim.c | 14 ++ 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/drivers/misc/ti-st/st_kim.c b/drivers/misc/ti-st/st_kim.c index 5027b8f..af71584 100644 --- a/drivers/misc/ti

Re: [PATCH 2/3] ti-st: st_kim: fix nshutdown_gpio in get_platform_data

2015-06-24 Thread Jürg Billeter
On Wed, 2015-06-24 at 11:31 -0400, Peter Hurley wrote: > On 06/24/2015 06:24 AM, Jürg Billeter wrote: > > @@ -761,8 +762,14 @@ static struct ti_st_plat_data > > *get_platform_data(struct device *dev) > > dt_property = of_get_property(np, "dev_name&qu

Re: [PATCH] dmaengine: rcar-dmac: Handle hardware descriptor allocation failure

2014-12-08 Thread Jürg Billeter
Hi Vinod, On Mon, 2014-12-08 at 17:06 +0530, Vinod Koul wrote: > Can you please rebase this on my next, this fails to apply for me This is a patch for Laurent's new rcar-dmac driver, which doesn't appear to be in your next yet. Laurent has already merged my patch into his dma/next branch and

[PATCH] Bluetooth: btintel: Add MODULE_FIRMWARE entries for iBT 3.5 controllers

2017-05-23 Thread Jürg Billeter
The iBT 3.5 controllers (Intel 8265, Windstorm Peak) need intel/ibt-12-16.sfi and intel/ibt-12-16.ddc firmware files from linux-firmware repository. Signed-off-by: Jürg Billeter --- drivers/bluetooth/btintel.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/bluetooth/btintel.c b

[PATCH 2/2] iwlwifi: fix double hyphen in MODULE_FIRMWARE for 8000

2016-10-10 Thread Jürg Billeter
There is only a single hyphen between iwlwifi-8000C and the API version in the firmware filename. Fixes: e1ba684f762b ("iwlwifi: 8000: fix MODULE_FIRMWARE input") Signed-off-by: Jürg Billeter --- drivers/net/wireless/intel/iwlwifi/iwl-8000.c | 2 +- 1 file changed, 1 insertion(+),

  1   2   >