Re: [REVIEW][PATCH 00/15] signal/arm64: siginfo cleanups

2018-09-27 Thread Eric W. Biederman
Catalin Marinas writes: > Hi Eric, > > On Mon, Sep 24, 2018 at 11:07:05AM +0200, Eric W. Biederman wrote: >> This is the continuation of my work to sort out signaling of exceptions >> with siginfo. The old signal sending functions by taking a siginfo >> argument resul

Re: [REVIEW][PATCH 00/15] signal/arm64: siginfo cleanups

2018-09-27 Thread Eric W. Biederman
Catalin Marinas writes: > Hi Eric, > > On Mon, Sep 24, 2018 at 11:07:05AM +0200, Eric W. Biederman wrote: >> This is the continuation of my work to sort out signaling of exceptions >> with siginfo. The old signal sending functions by taking a siginfo >> argument resul

Re: [RFC 00/20] ns: Introduce Time Namespace

2018-09-26 Thread Eric W. Biederman
Andrey Vagin writes: > On Tue, Sep 25, 2018 at 12:02:32AM +0200, Eric W. Biederman wrote: >> Andrey Vagin writes: >> >> > On Fri, Sep 21, 2018 at 02:27:29PM +0200, Eric W. Biederman wrote: >> >> Dmitry Safonov writes: >> >> >> >> &

Re: [RFC 00/20] ns: Introduce Time Namespace

2018-09-26 Thread Eric W. Biederman
Andrey Vagin writes: > On Tue, Sep 25, 2018 at 12:02:32AM +0200, Eric W. Biederman wrote: >> Andrey Vagin writes: >> >> > On Fri, Sep 21, 2018 at 02:27:29PM +0200, Eric W. Biederman wrote: >> >> Dmitry Safonov writes: >> >> >> >> &

[REVIEW][PATCH 5/6] signal: Distinguish between kernel_siginfo and siginfo

2018-09-25 Thread Eric W. Biederman
as siginfo. The reduction in size comes in a following change. Signed-off-by: "Eric W. Biederman" --- arch/x86/include/asm/compat.h | 2 +- drivers/usb/core/devio.c | 4 +- fs/binfmt_elf.c | 6 +- fs/coredump.c | 2 +- fs/fcntl.c|

[REVIEW][PATCH 5/6] signal: Distinguish between kernel_siginfo and siginfo

2018-09-25 Thread Eric W. Biederman
as siginfo. The reduction in size comes in a following change. Signed-off-by: "Eric W. Biederman" --- arch/x86/include/asm/compat.h | 2 +- drivers/usb/core/devio.c | 4 +- fs/binfmt_elf.c | 6 +- fs/coredump.c | 2 +- fs/fcntl.c|

[REVIEW][PATCH 6/6] signal: Use a smaller struct siginfo in the kernel

2018-09-25 Thread Eric W. Biederman
signals the kernel has sent. Reducing the stack footprint and the work to copy siginfo around from 2 cachelines to 1 cachelines seems worth doing even if I don't have benchmarks to show a performance difference. Suggested-by: Linus Torvalds Signed-off-by: "Eric W. Biederman" --- inc

[REVIEW][PATCH 6/6] signal: Use a smaller struct siginfo in the kernel

2018-09-25 Thread Eric W. Biederman
signals the kernel has sent. Reducing the stack footprint and the work to copy siginfo around from 2 cachelines to 1 cachelines seems worth doing even if I don't have benchmarks to show a performance difference. Suggested-by: Linus Torvalds Signed-off-by: "Eric W. Biederman" --- inc

[REVIEW][PATCH 3/6] signal: Remove the need for __ARCH_SI_PREABLE_SIZE and SI_PAD_SIZE

2018-09-25 Thread Eric W. Biederman
Rework the defintion of struct siginfo so that the array padding struct siginfo to SI_MAX_SIZE can be placed in a union along side of the rest of the struct siginfo members. The result is that we no longer need the __ARCH_SI_PREAMBLE_SIZE or SI_PAD_SIZE definitions. Signed-off-by: "E

[REVIEW][PATCH 3/6] signal: Remove the need for __ARCH_SI_PREABLE_SIZE and SI_PAD_SIZE

2018-09-25 Thread Eric W. Biederman
Rework the defintion of struct siginfo so that the array padding struct siginfo to SI_MAX_SIZE can be placed in a union along side of the rest of the struct siginfo members. The result is that we no longer need the __ARCH_SI_PREAMBLE_SIZE or SI_PAD_SIZE definitions. Signed-off-by: "E

[REVIEW][PATCH 4/6] signal: Introduce copy_siginfo_from_user and use it's return value

2018-09-25 Thread Eric W. Biederman
. This is a necessary prerequisite for using a smaller siginfo in the kernel than the kernel exports to userspace. Signed-off-by: "Eric W. Biederman" --- include/linux/signal.h | 1 + kernel/ptrace.c| 12 +--- kernel/signal.c| 25 - 3 files c

[REVIEW][PATCH 4/6] signal: Introduce copy_siginfo_from_user and use it's return value

2018-09-25 Thread Eric W. Biederman
. This is a necessary prerequisite for using a smaller siginfo in the kernel than the kernel exports to userspace. Signed-off-by: "Eric W. Biederman" --- include/linux/signal.h | 1 + kernel/ptrace.c| 12 +--- kernel/signal.c| 25 - 3 files c

[REVIEW][PATCH 2/6] signal: Fail sigqueueinfo if si_signo != sig

2018-09-25 Thread Eric W. Biederman
CRIU just returns to the kernel what the kernel gave to it. If there is some application that calls sigqueueinfo directly that has a problem with this added sanity check we can revisit this when we see what kind of crazy that application is doing. Signed-off-by: "Eric W. Biederman" ---

[REVIEW][PATCH 2/6] signal: Fail sigqueueinfo if si_signo != sig

2018-09-25 Thread Eric W. Biederman
CRIU just returns to the kernel what the kernel gave to it. If there is some application that calls sigqueueinfo directly that has a problem with this added sanity check we can revisit this when we see what kind of crazy that application is doing. Signed-off-by: "Eric W. Biederman" ---

[REVIEW][PATCH 1/6] signal/sparc: Move EMT_TAGOVF into the generic siginfo.h

2018-09-25 Thread Eric W. Biederman
When moving all of the architectures specific si_codes into siginfo.h, I apparently overlooked EMT_TAGOVF. Move it now. Remove the now redundant test in siginfo_layout for SIGEMT as now NSIGEMT is always defined. Signed-off-by: "Eric W. Biederman" --- arch/sparc/include/uapi/asm/sig

[REVIEW][PATCH 1/6] signal/sparc: Move EMT_TAGOVF into the generic siginfo.h

2018-09-25 Thread Eric W. Biederman
When moving all of the architectures specific si_codes into siginfo.h, I apparently overlooked EMT_TAGOVF. Move it now. Remove the now redundant test in siginfo_layout for SIGEMT as now NSIGEMT is always defined. Signed-off-by: "Eric W. Biederman" --- arch/sparc/include/uapi/asm/sig

[REVIEW][PATCH 0/6] signal: Shrinking the kernel's siginfo structure

2018-09-25 Thread Eric W. Biederman
is a kernel that only uses 48 bytes for siginfo internally when the ABI defines siginfo to be 128 bytes. The first EMT_TAGOVF change is not necesssary to strinking siginfo. Eric W. Biederman (6): signal/sparc: Move EMT_TAGOVF into the generic siginfo.h signal: Fail sigqueueinfo if si_signo

[REVIEW][PATCH 0/6] signal: Shrinking the kernel's siginfo structure

2018-09-25 Thread Eric W. Biederman
is a kernel that only uses 48 bytes for siginfo internally when the ABI defines siginfo to be 128 bytes. The first EMT_TAGOVF change is not necesssary to strinking siginfo. Eric W. Biederman (6): signal/sparc: Move EMT_TAGOVF into the generic siginfo.h signal: Fail sigqueueinfo if si_signo

Re: [RFC 00/20] ns: Introduce Time Namespace

2018-09-24 Thread Eric W. Biederman
Andrey Vagin writes: > On Fri, Sep 21, 2018 at 02:27:29PM +0200, Eric W. Biederman wrote: >> Dmitry Safonov writes: >> >> > Discussions around time virtualization are there for a long time. >> > The first attempt to implement time namespace was in 2006

Re: [RFC 00/20] ns: Introduce Time Namespace

2018-09-24 Thread Eric W. Biederman
Andrey Vagin writes: > On Fri, Sep 21, 2018 at 02:27:29PM +0200, Eric W. Biederman wrote: >> Dmitry Safonov writes: >> >> > Discussions around time virtualization are there for a long time. >> > The first attempt to implement time namespace was in 2006

[REVIEW][PATCH 1/3] signal/unicore32: Use send_sig_fault where appropriate

2018-09-24 Thread Eric W. Biederman
Signed-off-by: "Eric W. Biederman" --- arch/unicore32/kernel/fpu-ucf64.c | 12 +++- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/arch/unicore32/kernel/fpu-ucf64.c b/arch/unicore32/kernel/fpu-ucf64.c index 8594b168f25e..fc5dad32a982 100644 --- a/arch/unicore32/

[REVIEW][PATCH 3/3] signal/unicore32: Use force_sig_fault where appropriate

2018-09-24 Thread Eric W. Biederman
Signed-off-by: "Eric W. Biederman" --- arch/unicore32/mm/fault.c | 9 + 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/arch/unicore32/mm/fault.c b/arch/unicore32/mm/fault.c index a942776110a0..b9a3a50644c1 100644 --- a/arch/unicore32/mm/fault.c +++ b/arch/un

[REVIEW][PATCH 1/3] signal/unicore32: Use send_sig_fault where appropriate

2018-09-24 Thread Eric W. Biederman
Signed-off-by: "Eric W. Biederman" --- arch/unicore32/kernel/fpu-ucf64.c | 12 +++- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/arch/unicore32/kernel/fpu-ucf64.c b/arch/unicore32/kernel/fpu-ucf64.c index 8594b168f25e..fc5dad32a982 100644 --- a/arch/unicore32/

[REVIEW][PATCH 3/3] signal/unicore32: Use force_sig_fault where appropriate

2018-09-24 Thread Eric W. Biederman
Signed-off-by: "Eric W. Biederman" --- arch/unicore32/mm/fault.c | 9 + 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/arch/unicore32/mm/fault.c b/arch/unicore32/mm/fault.c index a942776110a0..b9a3a50644c1 100644 --- a/arch/unicore32/mm/fault.c +++ b/arch/un

[REVIEW][PATCH 2/3] signal/unicore32: Generate siginfo in ucs32_notify_die

2018-09-24 Thread Eric W. Biederman
making the chances of bugs much less likely. Signed-off-by: "Eric W. Biederman" --- arch/unicore32/include/asm/bug.h | 3 ++- arch/unicore32/kernel/traps.c| 5 +++-- arch/unicore32/mm/fault.c| 18 -- 3 files changed, 9 insertions(+), 17 deletions(-)

[REVIEW][PATCH 2/3] signal/unicore32: Generate siginfo in ucs32_notify_die

2018-09-24 Thread Eric W. Biederman
making the chances of bugs much less likely. Signed-off-by: "Eric W. Biederman" --- arch/unicore32/include/asm/bug.h | 3 ++- arch/unicore32/kernel/traps.c| 5 +++-- arch/unicore32/mm/fault.c| 18 -- 3 files changed, 9 insertions(+), 17 deletions(-)

[REVIEW][PATCH 0/3] signal/unicore32: siginfo cleanups

2018-09-24 Thread Eric W. Biederman
feel it should go through your arch tree let me know. All of the prerequisites should have been merged several releases ago. Eric W. Biederman (3): signal/unicore32: Use send_sig_fault where appropriate signal/unicore32: Generate siginfo in ucs32_notify_die signal/unicore32

[REVIEW][PATCH 0/3] signal/unicore32: siginfo cleanups

2018-09-24 Thread Eric W. Biederman
feel it should go through your arch tree let me know. All of the prerequisites should have been merged several releases ago. Eric W. Biederman (3): signal/unicore32: Use send_sig_fault where appropriate signal/unicore32: Generate siginfo in ucs32_notify_die signal/unicore32

[REVIEW][PATCH 1/2] signal/arc: Push siginfo generation into unhandled_exception

2018-09-24 Thread Eric W. Biederman
Pass signr, sicode, and address into unhandled_exception as explicit parameters instead of members of struct siginfo. Then in unhandled exception generate and send the siginfo using force_sig_fault. This keeps the code simpler and less error prone. Signed-off-by: "Eric W. Biederman"

[REVIEW][PATCH 1/2] signal/arc: Push siginfo generation into unhandled_exception

2018-09-24 Thread Eric W. Biederman
Pass signr, sicode, and address into unhandled_exception as explicit parameters instead of members of struct siginfo. Then in unhandled exception generate and send the siginfo using force_sig_fault. This keeps the code simpler and less error prone. Signed-off-by: "Eric W. Biederman"

[REVIEW][PATCH 2/3] signal/ia64: Use the force_sig(SIGSEGV,...) in ia64_rt_sigreturn

2018-09-24 Thread Eric W. Biederman
this out by causing ia64 to use force_sig(SIGSEGV) like other architectures. Fixes: 2.3.43 Cc: Tony Luck Cc: Fenghua Yu Cc: linux-i...@vger.kernel.org Signed-off-by: "Eric W. Biederman" --- arch/ia64/kernel/signal.c | 10 +- 1 file changed, 1 insertion(+), 9 deletions(-)

[REVIEW][PATCH 3/3] signal/ia64: Use force_sig_fault where appropriate

2018-09-24 Thread Eric W. Biederman
Signed-off-by: "Eric W. Biederman" --- arch/ia64/kernel/brl_emu.c | 31 ++-- arch/ia64/kernel/traps.c | 144 ++- arch/ia64/kernel/unaligned.c | 12 +-- arch/ia64/mm/fault.c | 12 +-- 4 files changed, 49 insertions(+), 150 deletion

[REVIEW][PATCH 2/3] signal/ia64: Use the force_sig(SIGSEGV,...) in ia64_rt_sigreturn

2018-09-24 Thread Eric W. Biederman
this out by causing ia64 to use force_sig(SIGSEGV) like other architectures. Fixes: 2.3.43 Cc: Tony Luck Cc: Fenghua Yu Cc: linux-i...@vger.kernel.org Signed-off-by: "Eric W. Biederman" --- arch/ia64/kernel/signal.c | 10 +- 1 file changed, 1 insertion(+), 9 deletions(-)

[REVIEW][PATCH 3/3] signal/ia64: Use force_sig_fault where appropriate

2018-09-24 Thread Eric W. Biederman
Signed-off-by: "Eric W. Biederman" --- arch/ia64/kernel/brl_emu.c | 31 ++-- arch/ia64/kernel/traps.c | 144 ++- arch/ia64/kernel/unaligned.c | 12 +-- arch/ia64/mm/fault.c | 12 +-- 4 files changed, 49 insertions(+), 150 deletion

[REVIEW][PATCH 1/3] signal/ia64: Use the generic force_sigsegv in setup_frame

2018-09-24 Thread Eric W. Biederman
and simplify the code by using force_sigsegv in this case just like other architectures. Fixes: 2.3.43 Cc: Tony Luck Cc: Fenghua Yu Cc: linux-i...@vger.kernel.org Signed-off-by: "Eric W. Biederman" --- arch/ia64/kernel/signal.c | 50 ++- 1 file c

[REVIEW][PATCH 1/3] signal/ia64: Use the generic force_sigsegv in setup_frame

2018-09-24 Thread Eric W. Biederman
and simplify the code by using force_sigsegv in this case just like other architectures. Fixes: 2.3.43 Cc: Tony Luck Cc: Fenghua Yu Cc: linux-i...@vger.kernel.org Signed-off-by: "Eric W. Biederman" --- arch/ia64/kernel/signal.c | 50 ++- 1 file c

[REVIEW][PATCH 0/3] signal/ia64: siginfo fixes and cleanups

2018-09-24 Thread Eric W. Biederman
would appreciate it. My intention is to merge this through my siginfo tree. If you feel it should go through your arch tree let me know. All of the prerequisites should have been merged several releases ago. Eric W. Biederman (3): signal/ia64: Use the generic force_sigsegv in setup_frame

[REVIEW][PATCH 0/3] signal/ia64: siginfo fixes and cleanups

2018-09-24 Thread Eric W. Biederman
would appreciate it. My intention is to merge this through my siginfo tree. If you feel it should go through your arch tree let me know. All of the prerequisites should have been merged several releases ago. Eric W. Biederman (3): signal/ia64: Use the generic force_sigsegv in setup_frame

[REVIEW][PATCH 3/4] signal/arm: Use send_sig_fault where appropriate

2018-09-24 Thread Eric W. Biederman
Signed-off-by: "Eric W. Biederman" --- arch/arm/vfp/vfpmodule.c | 11 +++ 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/arch/arm/vfp/vfpmodule.c b/arch/arm/vfp/vfpmodule.c index dc7e6b50ef67..aa96cc5c9fe9 100644 --- a/arch/arm/vfp/vfpmodule.c +++ b/ar

[REVIEW][PATCH 3/4] signal/arm: Use send_sig_fault where appropriate

2018-09-24 Thread Eric W. Biederman
Signed-off-by: "Eric W. Biederman" --- arch/arm/vfp/vfpmodule.c | 11 +++ 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/arch/arm/vfp/vfpmodule.c b/arch/arm/vfp/vfpmodule.c index dc7e6b50ef67..aa96cc5c9fe9 100644 --- a/arch/arm/vfp/vfpmodule.c +++ b/ar

[REVIEW][PATCH 4/4] signal/arm/kvm: Use send_sig_mceerr

2018-09-24 Thread Eric W. Biederman
This simplifies the code making it clearer what is going on, and making the siginfo generation easier to maintain. Signed-off-by: "Eric W. Biederman" --- virt/kvm/arm/mmu.c | 14 -- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/virt/kvm/arm/mmu.c b/vi

[REVIEW][PATCH 4/4] signal/arm/kvm: Use send_sig_mceerr

2018-09-24 Thread Eric W. Biederman
This simplifies the code making it clearer what is going on, and making the siginfo generation easier to maintain. Signed-off-by: "Eric W. Biederman" --- virt/kvm/arm/mmu.c | 14 -- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/virt/kvm/arm/mmu.c b/vi

[REVIEW][PATCH 1/4] signal/arm: Push siginfo generation into arm_notify_die

2018-09-24 Thread Eric W. Biederman
In arm_notify_die call force_sig_fault to let the generic code handle siginfo generation. This removes some boiler plate making the code easier to maintain in the long run. Signed-off-by: "Eric W. Biederman" --- arch/arm/include/asm/bug.h| 4 +-- arch/arm/kernel/swp_emul

[REVIEW][PATCH 1/4] signal/arm: Push siginfo generation into arm_notify_die

2018-09-24 Thread Eric W. Biederman
In arm_notify_die call force_sig_fault to let the generic code handle siginfo generation. This removes some boiler plate making the code easier to maintain in the long run. Signed-off-by: "Eric W. Biederman" --- arch/arm/include/asm/bug.h| 4 +-- arch/arm/kernel/swp_emul

[REVIEW][PATCH 2/4] signal/arm: Use force_sig_fault where appropriate

2018-09-24 Thread Eric W. Biederman
Signed-off-by: "Eric W. Biederman" --- arch/arm/kernel/ptrace.c | 11 ++- arch/arm/mm/alignment.c | 10 +- arch/arm/mm/fault.c | 10 +- 3 files changed, 4 insertions(+), 27 deletions(-) diff --git a/arch/arm/kernel/ptrace.c b/arch/arm/kernel/ptra

[REVIEW][PATCH 2/4] signal/arm: Use force_sig_fault where appropriate

2018-09-24 Thread Eric W. Biederman
Signed-off-by: "Eric W. Biederman" --- arch/arm/kernel/ptrace.c | 11 ++- arch/arm/mm/alignment.c | 10 +- arch/arm/mm/fault.c | 10 +- 3 files changed, 4 insertions(+), 27 deletions(-) diff --git a/arch/arm/kernel/ptrace.c b/arch/arm/kernel/ptra

[REVIEW][PATCH 0/4] signal/arm: siginfo cleanups

2018-09-24 Thread Eric W. Biederman
I have made made any mistakes in this coversion but if people can look the code over and see if they can spot anything I would appreciate it. Eric W. Biederman (4): signal/arm: Push siginfo generation into arm_notify_die signal/arm: Use force_sig_fault where appropriate signal/arm

[REVIEW][PATCH 0/4] signal/arm: siginfo cleanups

2018-09-24 Thread Eric W. Biederman
I have made made any mistakes in this coversion but if people can look the code over and see if they can spot anything I would appreciate it. Eric W. Biederman (4): signal/arm: Push siginfo generation into arm_notify_die signal/arm: Use force_sig_fault where appropriate signal/arm

[REVIEW][PATCH 15/15] signal/arm64: Use send_sig_fault where appropriate

2018-09-24 Thread Eric W. Biederman
Signed-off-by: "Eric W. Biederman" --- arch/arm64/kernel/fpsimd.c | 10 +++--- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/arch/arm64/kernel/fpsimd.c b/arch/arm64/kernel/fpsimd.c index 58c53bc96928..5ebe73b69961 100644 --- a/arch/arm64/kernel/fpsimd.c +++ b/

[REVIEW][PATCH 15/15] signal/arm64: Use send_sig_fault where appropriate

2018-09-24 Thread Eric W. Biederman
Signed-off-by: "Eric W. Biederman" --- arch/arm64/kernel/fpsimd.c | 10 +++--- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/arch/arm64/kernel/fpsimd.c b/arch/arm64/kernel/fpsimd.c index 58c53bc96928..5ebe73b69961 100644 --- a/arch/arm64/kernel/fpsimd.c +++ b/

[REVIEW][PATCH 11/15] signal/arm64: Add and use arm64_force_sig_mceerr as appropriate

2018-09-24 Thread Eric W. Biederman
Add arm64_force_sig_mceerr for consistency with arm64_force_sig_fault, and use it in the one location that can take advantage of it. This removes the fiddly filling out of siginfo before sending a signal reporting an memory error to userspace. Signed-off-by: "Eric W. Biederman" ---

[REVIEW][PATCH 12/15] signal/arm64: Remove arm64_force_sig_info

2018-09-24 Thread Eric W. Biederman
The function has no more callers so remove it. Signed-off-by: "Eric W. Biederman" --- arch/arm64/include/asm/traps.h | 1 - arch/arm64/kernel/traps.c | 6 -- 2 files changed, 7 deletions(-) diff --git a/arch/arm64/include/asm/traps.h b/arch/arm64/include/asm/traps.h index 19

[REVIEW][PATCH 11/15] signal/arm64: Add and use arm64_force_sig_mceerr as appropriate

2018-09-24 Thread Eric W. Biederman
Add arm64_force_sig_mceerr for consistency with arm64_force_sig_fault, and use it in the one location that can take advantage of it. This removes the fiddly filling out of siginfo before sending a signal reporting an memory error to userspace. Signed-off-by: "Eric W. Biederman" ---

[REVIEW][PATCH 12/15] signal/arm64: Remove arm64_force_sig_info

2018-09-24 Thread Eric W. Biederman
The function has no more callers so remove it. Signed-off-by: "Eric W. Biederman" --- arch/arm64/include/asm/traps.h | 1 - arch/arm64/kernel/traps.c | 6 -- 2 files changed, 7 deletions(-) diff --git a/arch/arm64/include/asm/traps.h b/arch/arm64/include/asm/traps.h index 19

[REVIEW][PATCH 14/15] signal/arm64: Add and use arm64_force_sig_ptrace_errno_trap

2018-09-24 Thread Eric W. Biederman
Add arm64_force_sig_ptrace_errno_trap for consistency with arm64_force_sig_fault and use it where appropriate. This adds the show_signal logic to the force_sig_errno_trap case, where it was apparently overlooked earlier. Signed-off-by: "Eric W. Biederman" --- arch/arm64/include/asm/t

[REVIEW][PATCH 13/15] signal/arm64: In ptrace_hbptriggered name the signal description string

2018-09-24 Thread Eric W. Biederman
This will let the description be reused shortly. Signed-off-by: "Eric W. Biederman" --- arch/arm64/kernel/ptrace.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/arch/arm64/kernel/ptrace.c b/arch/arm64/kernel/ptrace.c index 7ab75e78aa08..921267f59d0d 100644

[REVIEW][PATCH 14/15] signal/arm64: Add and use arm64_force_sig_ptrace_errno_trap

2018-09-24 Thread Eric W. Biederman
Add arm64_force_sig_ptrace_errno_trap for consistency with arm64_force_sig_fault and use it where appropriate. This adds the show_signal logic to the force_sig_errno_trap case, where it was apparently overlooked earlier. Signed-off-by: "Eric W. Biederman" --- arch/arm64/include/asm/t

[REVIEW][PATCH 13/15] signal/arm64: In ptrace_hbptriggered name the signal description string

2018-09-24 Thread Eric W. Biederman
This will let the description be reused shortly. Signed-off-by: "Eric W. Biederman" --- arch/arm64/kernel/ptrace.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/arch/arm64/kernel/ptrace.c b/arch/arm64/kernel/ptrace.c index 7ab75e78aa08..921267f59d0d 100644

[REVIEW][PATCH 07/15] signal/arm64: Expand __do_user_fault and remove it

2018-09-24 Thread Eric W. Biederman
Not all of the signals passed to __do_user_fault can be handled the same way so expand the now tiny __do_user_fault in it's callers and remove it. Signed-off-by: "Eric W. Biederman" --- arch/arm64/mm/fault.c | 18 -- 1 file changed, 8 insertions(+), 10 deletions(-)

[REVIEW][PATCH 08/15] signal/arm64: Only perform one esr_to_fault_info call in do_page_fault

2018-09-24 Thread Eric W. Biederman
As this work is truly common between all of the signal sending cases there is no need to repeat it between the different cases. Signed-off-by: Eric W. Biederman --- arch/arm64/mm/fault.c | 8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/arch/arm64/mm/fault.c b/arch

[REVIEW][PATCH 08/15] signal/arm64: Only perform one esr_to_fault_info call in do_page_fault

2018-09-24 Thread Eric W. Biederman
As this work is truly common between all of the signal sending cases there is no need to repeat it between the different cases. Signed-off-by: Eric W. Biederman --- arch/arm64/mm/fault.c | 8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/arch/arm64/mm/fault.c b/arch

[REVIEW][PATCH 07/15] signal/arm64: Expand __do_user_fault and remove it

2018-09-24 Thread Eric W. Biederman
Not all of the signals passed to __do_user_fault can be handled the same way so expand the now tiny __do_user_fault in it's callers and remove it. Signed-off-by: "Eric W. Biederman" --- arch/arm64/mm/fault.c | 18 -- 1 file changed, 8 insertions(+), 10 deletions(-)

[REVIEW][PATCH 10/15] signal/arm64: Add and use arm64_force_sig_fault where appropriate

2018-09-24 Thread Eric W. Biederman
Wrap force_sig_fault with a helper that calls arm64_show_signal and call arm64_force_sig_fault where appropraite. Signed-off-by: Eric W. Biederman --- arch/arm64/include/asm/traps.h | 1 + arch/arm64/kernel/debug-monitors.c | 11 +++ arch/arm64/kernel/ptrace.c | 11

[REVIEW][PATCH 09/15] signal/arm64: Only call set_thread_esr once in do_page_fault

2018-09-24 Thread Eric W. Biederman
This code is truly common between the signal sending cases so share it. Signed-off-by: Eric W. Biederman --- arch/arm64/mm/fault.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/arch/arm64/mm/fault.c b/arch/arm64/mm/fault.c index ab85533e2255..959c4a565c8e 100644

[REVIEW][PATCH 10/15] signal/arm64: Add and use arm64_force_sig_fault where appropriate

2018-09-24 Thread Eric W. Biederman
Wrap force_sig_fault with a helper that calls arm64_show_signal and call arm64_force_sig_fault where appropraite. Signed-off-by: Eric W. Biederman --- arch/arm64/include/asm/traps.h | 1 + arch/arm64/kernel/debug-monitors.c | 11 +++ arch/arm64/kernel/ptrace.c | 11

[REVIEW][PATCH 09/15] signal/arm64: Only call set_thread_esr once in do_page_fault

2018-09-24 Thread Eric W. Biederman
This code is truly common between the signal sending cases so share it. Signed-off-by: Eric W. Biederman --- arch/arm64/mm/fault.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/arch/arm64/mm/fault.c b/arch/arm64/mm/fault.c index ab85533e2255..959c4a565c8e 100644

[REVIEW][PATCH 06/15] signal/arm64: For clarity separate the 3 signal sending cases in do_page_fault

2018-09-24 Thread Eric W. Biederman
It gets easy to confuse what is going on when some code is shared and some not so stop sharing the trivial bits of signal generation to make future updates easier to understand. Signed-off-by: "Eric W. Biederman" --- arch/arm64/mm/fault.c | 13 + 1 file changed, 9 insert

[REVIEW][PATCH 06/15] signal/arm64: For clarity separate the 3 signal sending cases in do_page_fault

2018-09-24 Thread Eric W. Biederman
It gets easy to confuse what is going on when some code is shared and some not so stop sharing the trivial bits of signal generation to make future updates easier to understand. Signed-off-by: "Eric W. Biederman" --- arch/arm64/mm/fault.c | 13 + 1 file changed, 9 insert

[REVIEW][PATCH 02/15] signal/arm64: Remove unneeded tsk parameter from arm64_force_sig_info

2018-09-24 Thread Eric W. Biederman
Every caller passes in current for tsk so there is no need to pass tsk. Instead make tsk a local variable initialized to current. Signed-off-by: "Eric W. Biederman" --- arch/arm64/include/asm/traps.h | 3 +-- arch/arm64/kernel/debug-monitors.c | 2 +- arch/arm64/kernel/ptrace.c

[REVIEW][PATCH 05/15] signal/arm64: Consolidate the two hwpoison cases in do_page_fault

2018-09-24 Thread Eric W. Biederman
These two cases are practically the same and use siginfo differently from the other signals sent from do_page_fault. So consolidate them to make future changes easier. Signed-off-by: "Eric W. Biederman" --- arch/arm64/mm/fault.c | 14 +++--- 1 file changed, 7 insertions(+), 7

[REVIEW][PATCH 02/15] signal/arm64: Remove unneeded tsk parameter from arm64_force_sig_info

2018-09-24 Thread Eric W. Biederman
Every caller passes in current for tsk so there is no need to pass tsk. Instead make tsk a local variable initialized to current. Signed-off-by: "Eric W. Biederman" --- arch/arm64/include/asm/traps.h | 3 +-- arch/arm64/kernel/debug-monitors.c | 2 +- arch/arm64/kernel/ptrace.c

[REVIEW][PATCH 05/15] signal/arm64: Consolidate the two hwpoison cases in do_page_fault

2018-09-24 Thread Eric W. Biederman
These two cases are practically the same and use siginfo differently from the other signals sent from do_page_fault. So consolidate them to make future changes easier. Signed-off-by: "Eric W. Biederman" --- arch/arm64/mm/fault.c | 14 +++--- 1 file changed, 7 insertions(+), 7

[REVIEW][PATCH 04/15] signal/arm64: Factor set_thread_esr out of __do_user_fault

2018-09-24 Thread Eric W. Biederman
This pepares for sending signals with something other than arm64_force_sig_info. Signed-off-by: "Eric W. Biederman" --- arch/arm64/mm/fault.c | 9 +++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/arch/arm64/mm/fault.c b/arch/arm64/mm/fault.c index f4

[REVIEW][PATCH 03/15] signal/arm64: Factor out arm64_show_signal from arm64_force_sig_info

2018-09-24 Thread Eric W. Biederman
. Signed-off-by: "Eric W. Biederman" --- arch/arm64/kernel/traps.c | 24 +++- 1 file changed, 11 insertions(+), 13 deletions(-) diff --git a/arch/arm64/kernel/traps.c b/arch/arm64/kernel/traps.c index 24035d124608..daee8c2ca561 100644 --- a/arch/arm64/kernel/tra

[REVIEW][PATCH 01/15] signal/arm64: Push siginfo generation into arm64_notify_die

2018-09-24 Thread Eric W. Biederman
that all of the fiddly details for a structure passed to userspace are handled properly. Signed-off-by: "Eric W. Biederman" --- arch/arm64/include/asm/system_misc.h | 3 +- arch/arm64/kernel/sys_compat.c | 13 - arch/arm64/kernel/traps.c| 24 arc

[REVIEW][PATCH 04/15] signal/arm64: Factor set_thread_esr out of __do_user_fault

2018-09-24 Thread Eric W. Biederman
This pepares for sending signals with something other than arm64_force_sig_info. Signed-off-by: "Eric W. Biederman" --- arch/arm64/mm/fault.c | 9 +++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/arch/arm64/mm/fault.c b/arch/arm64/mm/fault.c index f4

[REVIEW][PATCH 03/15] signal/arm64: Factor out arm64_show_signal from arm64_force_sig_info

2018-09-24 Thread Eric W. Biederman
. Signed-off-by: "Eric W. Biederman" --- arch/arm64/kernel/traps.c | 24 +++- 1 file changed, 11 insertions(+), 13 deletions(-) diff --git a/arch/arm64/kernel/traps.c b/arch/arm64/kernel/traps.c index 24035d124608..daee8c2ca561 100644 --- a/arch/arm64/kernel/tra

[REVIEW][PATCH 01/15] signal/arm64: Push siginfo generation into arm64_notify_die

2018-09-24 Thread Eric W. Biederman
that all of the fiddly details for a structure passed to userspace are handled properly. Signed-off-by: "Eric W. Biederman" --- arch/arm64/include/asm/system_misc.h | 3 +- arch/arm64/kernel/sys_compat.c | 13 - arch/arm64/kernel/traps.c| 24 arc

[REVIEW][PATCH 00/15] signal/arm64: siginfo cleanups

2018-09-24 Thread Eric W. Biederman
releases ago. Eric W. Biederman (15): signal/arm64: Push siginfo generation into arm64_notify_die signal/arm64: Remove unneeded tsk parameter from arm64_force_sig_info signal/arm64: Factor out arm64_show_signal from arm64_force_sig_info signal/arm64: Factor set_thread_esr out

[REVIEW][PATCH 00/15] signal/arm64: siginfo cleanups

2018-09-24 Thread Eric W. Biederman
releases ago. Eric W. Biederman (15): signal/arm64: Push siginfo generation into arm64_notify_die signal/arm64: Remove unneeded tsk parameter from arm64_force_sig_info signal/arm64: Factor out arm64_show_signal from arm64_force_sig_info signal/arm64: Factor set_thread_esr out

Re: [REVIEW][PATCH 08/20] signal/x86/traps: Move setting error_code and trap_nr into do_trap_no_signal

2018-09-21 Thread Eric W. Biederman
ebied...@xmission.com (Eric W. Biederman) writes: > I also realized for clarity of the code I could have moved show_signal > into do_trap_no_signal as well. I will post a follow up change where I > do that. Except of course do_trap_no_signal does not take a signal number show it can't

Re: [REVIEW][PATCH 08/20] signal/x86/traps: Move setting error_code and trap_nr into do_trap_no_signal

2018-09-21 Thread Eric W. Biederman
ebied...@xmission.com (Eric W. Biederman) writes: > I also realized for clarity of the code I could have moved show_signal > into do_trap_no_signal as well. I will post a follow up change where I > do that. Except of course do_trap_no_signal does not take a signal number show it can't

Re: [REVIEW][PATCH 08/20] signal/x86/traps: Move setting error_code and trap_nr into do_trap_no_signal

2018-09-21 Thread Eric W. Biederman
Thomas Gleixner writes: > On Tue, 18 Sep 2018, Eric W. Biederman wrote: > >> Half of the times when error_code and trap_nr are set are already in > > s/when// I think Yes that changelog was not a good description of why I was changing things. >> do_trap_no_sign

Re: [REVIEW][PATCH 08/20] signal/x86/traps: Move setting error_code and trap_nr into do_trap_no_signal

2018-09-21 Thread Eric W. Biederman
Thomas Gleixner writes: > On Tue, 18 Sep 2018, Eric W. Biederman wrote: > >> Half of the times when error_code and trap_nr are set are already in > > s/when// I think Yes that changelog was not a good description of why I was changing things. >> do_trap_no_sign

Re: [REVIEW][PATCH 12/20] signal/x86: Remove pkey parameter from bad_area_nosemaphore

2018-09-21 Thread Eric W. Biederman
Dave Hansen writes: > On 09/18/2018 01:44 PM, Thomas Gleixner wrote: >> On Tue, 18 Sep 2018, Eric W. Biederman wrote: >>> The function bad_area_nosemaphore always sets si_code to SEGV_MAPERR >>> and as such can never return a pkey parameter. Therefore remove the >&

Re: [REVIEW][PATCH 12/20] signal/x86: Remove pkey parameter from bad_area_nosemaphore

2018-09-21 Thread Eric W. Biederman
Dave Hansen writes: > On 09/18/2018 01:44 PM, Thomas Gleixner wrote: >> On Tue, 18 Sep 2018, Eric W. Biederman wrote: >>> The function bad_area_nosemaphore always sets si_code to SEGV_MAPERR >>> and as such can never return a pkey parameter. Therefore remove the >&

Re: [RFC 00/20] ns: Introduce Time Namespace

2018-09-21 Thread Eric W. Biederman
l how the real time clock is abstracted. I would start by leaving the real time clock hardware out of the time namespace and see if there is any part of userspace that cares. Eric > Cc: Dmitry Safonov <0x7f454...@gmail.com> > Cc: Adrian Reber > Cc: Andrei Vagin > Cc: Andy Lutomirski

Re: [RFC 00/20] ns: Introduce Time Namespace

2018-09-21 Thread Eric W. Biederman
l how the real time clock is abstracted. I would start by leaving the real time clock hardware out of the time namespace and see if there is any part of userspace that cares. Eric > Cc: Dmitry Safonov <0x7f454...@gmail.com> > Cc: Adrian Reber > Cc: Andrei Vagin > Cc: Andy Lutomirski

Re: [REVIEW][PATCH 06/20] signal/x86: Move mpx siginfo generation into do_bounds

2018-09-19 Thread Eric W. Biederman
Christoph Hellwig writes: >> +struct mpx_fault_info >> +{ > > Normal kernel style would be: > > struct mpx_fault_info { Good point. Fixed. Eric

Re: [REVIEW][PATCH 06/20] signal/x86: Move mpx siginfo generation into do_bounds

2018-09-19 Thread Eric W. Biederman
Christoph Hellwig writes: >> +struct mpx_fault_info >> +{ > > Normal kernel style would be: > > struct mpx_fault_info { Good point. Fixed. Eric

Re: [REVIEW][PATCH 03/20] signal/x86: Move MCE error reporting out of force_sig_info_fault

2018-09-19 Thread Eric W. Biederman
Thomas Gleixner writes: > On Tue, 18 Sep 2018, Eric W. Biederman wrote: >> #ifdef CONFIG_MEMORY_FAILURE >> if (fault & (VM_FAULT_HWPOISON|VM_FAULT_HWPOISON_LARGE)) { >> +unsigned lsb = 0; > > Newline between variable declaration and code p

Re: [REVIEW][PATCH 03/20] signal/x86: Move MCE error reporting out of force_sig_info_fault

2018-09-19 Thread Eric W. Biederman
Thomas Gleixner writes: > On Tue, 18 Sep 2018, Eric W. Biederman wrote: >> #ifdef CONFIG_MEMORY_FAILURE >> if (fault & (VM_FAULT_HWPOISON|VM_FAULT_HWPOISON_LARGE)) { >> +unsigned lsb = 0; > > Newline between variable declaration and code p

Re: [REVIEW][PATCH 02/20] signal/x86: Inline fill_sigtrap_info in it's only caller send_sigtrap

2018-09-19 Thread Eric W. Biederman
Christoph Hellwig writes: >> >> clear_siginfo(); >> -fill_sigtrap_info(tsk, regs, error_code, si_code, ); >> +tsk->thread.trap_nr = X86_TRAP_DB; >> +tsk->thread.error_code = error_code; >> + >> +info.si_signo = SIGTRAP; >> +info.si_code = si_code; >> +info.si_addr

Re: [REVIEW][PATCH 02/20] signal/x86: Inline fill_sigtrap_info in it's only caller send_sigtrap

2018-09-19 Thread Eric W. Biederman
Christoph Hellwig writes: >> >> clear_siginfo(); >> -fill_sigtrap_info(tsk, regs, error_code, si_code, ); >> +tsk->thread.trap_nr = X86_TRAP_DB; >> +tsk->thread.error_code = error_code; >> + >> +info.si_signo = SIGTRAP; >> +info.si_code = si_code; >> +info.si_addr

Re: [RFC][PATCH 0/3] exec: Moving unshare_files_struct

2018-09-18 Thread Eric W. Biederman
Oleg Nesterov writes: > On 09/16, Eric W. Biederman wrote: >> >> Oleg's patch to remove get_files_struct from proc means we don't need >> two counts in files_struct. > > So it seems you agree with this patch at least in general. I do I think in the context we are look

Re: [RFC][PATCH 0/3] exec: Moving unshare_files_struct

2018-09-18 Thread Eric W. Biederman
Oleg Nesterov writes: > On 09/16, Eric W. Biederman wrote: >> >> Oleg's patch to remove get_files_struct from proc means we don't need >> two counts in files_struct. > > So it seems you agree with this patch at least in general. I do I think in the context we are look

Re: [REVIEW][PATCH 00/20] siginfo cleanups for x86

2018-09-18 Thread Eric W. Biederman
Thomas Gleixner writes: > On Tue, 18 Sep 2018, Eric W. Biederman wrote: >> I have been slowly going thought and reworking the arch specific >> functions that generate siginfo. The problems I have been addressing >> is that using siginfo directly is error prone. Using sigi

Re: [REVIEW][PATCH 00/20] siginfo cleanups for x86

2018-09-18 Thread Eric W. Biederman
Thomas Gleixner writes: > On Tue, 18 Sep 2018, Eric W. Biederman wrote: >> I have been slowly going thought and reworking the arch specific >> functions that generate siginfo. The problems I have been addressing >> is that using siginfo directly is error prone. Using sigi

[REVIEW][PATCH 11/20] signal/x86/traps: Simplify trap generation

2018-09-17 Thread Eric W. Biederman
when all of the information is present. Making this a more obvious, simpler and less error prone construction. Signed-off-by: "Eric W. Biederman" --- arch/x86/kernel/traps.c | 85 - 1 file changed, 24 insertions(+), 61 deletions(-) diff --git

[REVIEW][PATCH 19/20] signal/x86: Pass pkey by value

2018-09-17 Thread Eric W. Biederman
Now that si_code == SEGV_PKUERR is the flag indicating that a pkey is present there is no longer a need to pass a pointer to a local pkey value, instead pkey can be passed more efficiently by value. Signed-off-by: "Eric W. Biederman" --- arch/x86/mm/fault.c | 14 +++--- 1 fi

<    5   6   7   8   9   10   11   12   13   14   >