[PATCH 1/9] selftests/x86: Consolidate redundant signal helper functions

2025-02-25 Thread Chang S. Bae
The x86 selftests frequently register and clean up signal handlers, but the sethandler() and clearhandler() functions have been redundantly copied across multiple .c files. Move these functions to helpers.h to enable reuse across tests, eliminating around 250 lines of duplicate code. Converge

[PATCH 6/9] selftests/x86/xstate: Introduce signal ABI test

2025-02-25 Thread Chang S. Bae
With the refactored test cases, another xstate exposure to userspace is through signal delivery. While amx.c includes signal-related scenarios, its primary focus is on xstate permission management, which is largely specific to dynamic states. The remaining gap is testing xstate preservation and

Re: [PATCH] kselftest/arm64: Check that SVCR is 0 in signal handlers

2024-11-12 Thread Catalin Marinas
On Wed, 06 Nov 2024 17:07:51 +, Mark Brown wrote: > We don't currently validate that we exit streaming mode and clear ZA when > we enter a signal handler. Add simple checks for this in the SSVE and ZA > tests. > > Applied to arm64 (for-next/kselftest), thanks! [1/1] ks

Re: (subset) [PATCH v2 0/6] kselftest/arm64: Test floating point signal context restore in fp-stress

2024-11-12 Thread Catalin Marinas
On Thu, 07 Nov 2024 01:39:19 +, Mark Brown wrote: > Currently we test signal delivery to the programs run by fp-stress but > our signal handlers simply count the number of signals seen and don't do > anything with the floating point state. The original fpsimd-test and > sve-

Re: [PATCH] kselftest/arm64: Check that SVCR is 0 in signal handlers

2024-11-12 Thread Mark Brown
On Tue, Nov 12, 2024 at 11:30:14AM +, Catalin Marinas wrote: > On Wed, Nov 06, 2024 at 05:07:51PM +, Mark Brown wrote: > > + fprintf(stderr, "Unexpected SVCR %llx\n", get_svcr()); > > + return 1; > > + } > I think I'll change both printf specifiers to %lx here since

Re: [PATCH] kselftest/arm64: Check that SVCR is 0 in signal handlers

2024-11-12 Thread Catalin Marinas
On Wed, Nov 06, 2024 at 05:07:51PM +, Mark Brown wrote: > diff --git a/tools/testing/selftests/arm64/signal/testcases/ssve_regs.c > b/tools/testing/selftests/arm64/signal/testcases/ssve_regs.c > index > 6dbe48cf8b09ed8b7a5ab47690bd87e39e18e1e6..3dee68fa36d1cf2716f54d5f328b

Re: (subset) [PATCH v2 0/6] kselftest/arm64: Test floating point signal context restore in fp-stress

2024-11-07 Thread Catalin Marinas
On Thu, 07 Nov 2024 01:39:19 +, Mark Brown wrote: > Currently we test signal delivery to the programs run by fp-stress but > our signal handlers simply count the number of signals seen and don't do > anything with the floating point state. The original fpsimd-test and > sve-

Re: [PATCH v2 0/2] kselftest/arm64: fp-stress signal delivery interval improvements

2024-11-07 Thread Catalin Marinas
can improve the chances of triggering any issues > with context switching the signal handling code. Do a quick change to > increase the rate of signal delivery, trying to avoid excessive impact > on emulated platforms, and a further change to mitigate the impact that > thi

Re: [PATCH v2 0/2] kselftest/arm64: fp-stress signal delivery interval improvements

2024-11-07 Thread Will Deacon
this we can improve the chances of triggering any issues > with context switching the signal handling code. Do a quick change to > increase the rate of signal delivery, trying to avoid excessive impact > on emulated platforms, and a further change to mitigate the impact that > thi

[PATCH v2 6/6] kselftest/arm64: Test signal handler state modification in fp-stress

2024-11-06 Thread Mark Brown
Currently in fp-stress we test signal delivery to the test threads by sending SIGUSR2 which simply counts how many signals are delivered. The test programs now also all have a SIGUSR1 handler which for the threads doing userspace testing additionally modifies the floating point register state in

[PATCH v2 0/6] kselftest/arm64: Test floating point signal context restore in fp-stress

2024-11-06 Thread Mark Brown
Currently we test signal delivery to the programs run by fp-stress but our signal handlers simply count the number of signals seen and don't do anything with the floating point state. The original fpsimd-test and sve-test programs had signal handlers called irritators which modify the

[PATCH] kselftest/arm64: Check that SVCR is 0 in signal handlers

2024-11-06 Thread Mark Brown
We don't currently validate that we exit streaming mode and clear ZA when we enter a signal handler. Add simple checks for this in the SSVE and ZA tests. Signed-off-by: Mark Brown --- tools/testing/selftests/arm64/signal/sve_helpers.h | 13 + tools/testing/selftests/

Re: [PATCH 6/6] kselftest/arm64: Test signal handler state modification in fp-stress

2024-11-06 Thread Mark Rutland
On Wed, Oct 23, 2024 at 09:38:34PM +0100, Mark Brown wrote: > Currently in fp-stress we test signal delivery to the test threads by > sending SIGUSR2 which simply counts how many signals are delivered. The > test programs now also all have a SIGUSR1 handler which for the threads > doi

[PATCH v2 0/2] kselftest/arm64: fp-stress signal delivery interval improvements

2024-10-29 Thread Mark Brown
the signal handling code. Do a quick change to increase the rate of signal delivery, trying to avoid excessive impact on emulated platforms, and a further change to mitigate the impact that this creates during startup. Signed-off-by: Mark Brown --- Changes in v2: - Minor clarifications in commit

[PATCH v2 1/2] kselftest/arm64: Increase frequency of signal delivery in fp-stress

2024-10-29 Thread Mark Brown
Currently we only deliver signals to the processes being tested about once a second, meaning that the signal code paths are subject to relatively little stress. Increase this frequency substantially to 25ms intervals, along with some minor refactoring to make this more readily tuneable and

Re: [PATCH 1/2] kselftest/arm64: Increase frequency of signal delivery in fp-stress

2024-10-29 Thread Mark Brown
On Tue, Oct 29, 2024 at 03:43:37PM +, Mark Rutland wrote: > On those emulated platforms (FVP?), does this change trigger the faukure > more often? Yes. > I gave this a quick test, and with this change, running fp-stress on a > defconfig kernel running on 1 CPU triggers the "Bad SVCR: 0" spla

Re: [PATCH 1/2] kselftest/arm64: Increase frequency of signal delivery in fp-stress

2024-10-29 Thread Mark Rutland
Hi Mark, On Tue, Oct 29, 2024 at 12:10:39AM +, Mark Brown wrote: > Currently we only deliver signals to the processes being tested about > once a second, meaning that the signal code paths are subject to > relatively little stress. Increase this frequency substantially to > 25

Re: [RESEND] [PATCH v6 0/2] Add test to distinguish between thread's signal mask and ucontext_t

2024-10-29 Thread Shuah Khan
On 10/8/24 23:14, Dev Jain wrote: This patch series is motivated by the following observation: Raise a signal, jump to signal handler. The ucontext_t structure dumped by kernel to userspace has a uc_sigmask field having the mask of blocked signals. If you run a fresh minimalistic program doing

[RESEND] [PATCH v6 0/2] Add test to distinguish between thread's signal mask and ucontext_t

2024-10-28 Thread Dev Jain
Pingplease pull this

[PATCH 1/2] kselftest/arm64: Increase frequency of signal delivery in fp-stress

2024-10-28 Thread Mark Brown
Currently we only deliver signals to the processes being tested about once a second, meaning that the signal code paths are subject to relatively little stress. Increase this frequency substantially to 25ms intervals, along with some minor refactoring to make this more readily tuneable and

[PATCH 0/2] kselftest/arm64: fp-stress signal delivery interval improvements

2024-10-28 Thread Mark Brown
the signal handling code. Do a quick change to increase the rate of signal delivery, trying to avoid excessive impact on emulated platforms, and a further change to mitigate the impact that this creates during startup. Signed-off-by: Mark Brown --- Mark Brown (2): kselftest/arm64: Increase

Re: [PATCH 0/6] kselftest/arm64: Test floating point signal context restore in fp-stress

2024-10-28 Thread Mark Rutland
On Wed, Oct 23, 2024 at 09:38:28PM +0100, Mark Brown wrote: > Currently we test signal delivery to the programs run by fp-stress but > our signal handlers simply count the number of signals seen and don't do > anything with the floating point state. The original fpsimd-test

Re: [PATCH 0/6] kselftest/arm64: Test floating point signal context restore in fp-stress

2024-10-28 Thread Mark Brown
fp-stress.c main loop to trigger >a signal every ~1ms (by reducing the epoll_wait() timeout to 1 and >scaling the overall timeout to 1 accordingly), and those changes >make the tests reliably trigger the "Bad SVCR" splats within a few >seconds after a few

[PATCH 6/6] kselftest/arm64: Test signal handler state modification in fp-stress

2024-10-23 Thread Mark Brown
Currently in fp-stress we test signal delivery to the test threads by sending SIGUSR2 which simply counts how many signals are delivered. The test programs now also all have a SIGUSR1 handler which for the threads doing userspace testing additionally modifies the floating point register state in

[PATCH 0/6] kselftest/arm64: Test floating point signal context restore in fp-stress

2024-10-23 Thread Mark Brown
Currently we test signal delivery to the programs run by fp-stress but our signal handlers simply count the number of signals seen and don't do anything with the floating point state. The original fpsimd-test and sve-test programs had signal handlers called irritators which modify the

Re: [PATCH net v2 0/2] mptcp: prevent MPC handshake on port-based signal endpoints

2024-10-15 Thread patchwork-bot+netdevbpf
Hello: This series was applied to netdev/net.git (main) by Jakub Kicinski : On Mon, 14 Oct 2024 16:05:59 +0200 you wrote: > MPTCP connection requests toward a listening socket created by the > in-kernel PM for a port based signal endpoint will never be accepted, > they need to be e

[PATCH net v2 1/2] mptcp: prevent MPC handshake on port-based signal endpoints

2024-10-14 Thread Matthieu Baerts (NGI0)
ted by Cong Wang, the splat is false positive, but the code path leading to the report is an unexpected one: a client is attempting an MPC handshake towards the in-kernel listener created by the in-kernel PM for a port based signal endpoint. Such connection will be never accepted; many of them can ma

[PATCH net v2 0/2] mptcp: prevent MPC handshake on port-based signal endpoints

2024-10-14 Thread Matthieu Baerts (NGI0)
MPTCP connection requests toward a listening socket created by the in-kernel PM for a port based signal endpoint will never be accepted, they need to be explicitly rejected. - Patch 1: Explicitly reject such requests. A fix for >= v5.12. - Patch 2: Cover this case in the MPTCP selftests to av

[RESEND] [PATCH v6 1/2] selftests: Rename sigaltstack to generic signal

2024-10-08 Thread Dev Jain
Rename sigaltstack to generic signal directory, to allow adding more signal tests in the future. Signed-off-by: Dev Jain Reviewed-by: Mark Brown Acked-by: Shuah Khan --- tools/testing/selftests/Makefile| 2 +- tools/testing/selftests/{sigaltstack => sig

[RESEND] [PATCH v6 0/2] Add test to distinguish between thread's signal mask and ucontext_t

2024-10-08 Thread Dev Jain
This patch series is motivated by the following observation: Raise a signal, jump to signal handler. The ucontext_t structure dumped by kernel to userspace has a uc_sigmask field having the mask of blocked signals. If you run a fresh minimalistic program doing this, this field is empty, even if

Re: [PATCH v6 1/2] selftests: Rename sigaltstack to generic signal

2024-10-07 Thread Mark Brown
On Mon, Oct 07, 2024 at 10:07:24AM +0530, Dev Jain wrote: > On 9/16/24 09:28, Dev Jain wrote: > > Gentle ping, adding all x86 maintainers and the x86 list, in case they > > missed. > Gentle ping Given that this was posted prior to the merge window you should probably resend it at this point. s

Re: [PATCH v6 1/2] selftests: Rename sigaltstack to generic signal

2024-10-06 Thread Dev Jain
10:29, Dev Jain wrote: On 8/27/24 17:16, Dev Jain wrote: On 8/27/24 17:14, Shuah Khan wrote: On 8/22/24 06:14, Dev Jain wrote: Rename sigaltstack to generic signal directory, to allow adding more signal tests in the future. Sorry - I think I mentioned I don't like this test renamed.

Re: [PATCH v6 1/2] selftests: Rename sigaltstack to generic signal

2024-09-15 Thread Dev Jain
17:16, Dev Jain wrote: On 8/27/24 17:14, Shuah Khan wrote: On 8/22/24 06:14, Dev Jain wrote: Rename sigaltstack to generic signal directory, to allow adding more signal tests in the future. Sorry - I think I mentioned I don't like this test renamed. Why are you sending this rename

Re: [PATCH v6 1/2] selftests: Rename sigaltstack to generic signal

2024-09-09 Thread Shuah Khan
17:14, Shuah Khan wrote: On 8/22/24 06:14, Dev Jain wrote: Rename sigaltstack to generic signal directory, to allow adding more signal tests in the future. Sorry - I think I mentioned I don't like this test renamed. Why are you sending this rename still included in the patch series? I a

Re: [PATCH v6 1/2] selftests: Rename sigaltstack to generic signal

2024-09-08 Thread Dev Jain
/24 06:14, Dev Jain wrote: Rename sigaltstack to generic signal directory, to allow adding more signal tests in the future. Sorry - I think I mentioned I don't like this test renamed. Why are you sending this rename still included in the patch series? I am not renaming the test, jus

Re: [PATCH v6 1/2] selftests: Rename sigaltstack to generic signal

2024-09-06 Thread Shuah Khan
sigaltstack to generic signal directory, to allow adding more signal tests in the future. Sorry - I think I mentioned I don't like this test renamed. Why are you sending this rename still included in the patch series? I am not renaming the test, just the directory. The directory name is chang

Re: [PATCH v6 1/2] selftests: Rename sigaltstack to generic signal

2024-09-05 Thread Mark Brown
ites, they create runtime overhead. > to > consider the new test as not testing signals, but a specific syscall > "sigaction" > and its interaction with blocking of signals, how about naming the new > directory "sigaction"? That's not going to scale amazingly i

Re: [PATCH v6 1/2] selftests: Rename sigaltstack to generic signal

2024-09-04 Thread Dev Jain
On 9/4/24 22:35, Shuah Khan wrote: On 9/3/24 22:52, Dev Jain wrote: On 9/4/24 03:14, Shuah Khan wrote: On 8/30/24 10:29, Dev Jain wrote: On 8/27/24 17:16, Dev Jain wrote: On 8/27/24 17:14, Shuah Khan wrote: On 8/22/24 06:14, Dev Jain wrote: Rename sigaltstack to generic signal

Re: [PATCH v6 1/2] selftests: Rename sigaltstack to generic signal

2024-09-04 Thread Shuah Khan
On 9/3/24 22:52, Dev Jain wrote: On 9/4/24 03:14, Shuah Khan wrote: On 8/30/24 10:29, Dev Jain wrote: On 8/27/24 17:16, Dev Jain wrote: On 8/27/24 17:14, Shuah Khan wrote: On 8/22/24 06:14, Dev Jain wrote: Rename sigaltstack to generic signal directory, to allow adding more signal tests

Re: [PATCH v6 1/2] selftests: Rename sigaltstack to generic signal

2024-09-03 Thread Dev Jain
On 9/4/24 03:14, Shuah Khan wrote: On 8/30/24 10:29, Dev Jain wrote: On 8/27/24 17:16, Dev Jain wrote: On 8/27/24 17:14, Shuah Khan wrote: On 8/22/24 06:14, Dev Jain wrote: Rename sigaltstack to generic signal directory, to allow adding more signal tests in the future. Sorry - I think

Re: [PATCH v6 1/2] selftests: Rename sigaltstack to generic signal

2024-09-03 Thread Shuah Khan
On 8/30/24 10:29, Dev Jain wrote: On 8/27/24 17:16, Dev Jain wrote: On 8/27/24 17:14, Shuah Khan wrote: On 8/22/24 06:14, Dev Jain wrote: Rename sigaltstack to generic signal directory, to allow adding more signal tests in the future. Sorry - I think I mentioned I don't like this

[PATCH 0/5] OpenRISC FPU and Signal handling fixups

2024-04-11 Thread Stafford Horne
This series has some fixups found when I was doing a deep dive documentation of the OpenRISC FPU support which was added in 2023. http://stffrdhrn.github.io/hardware/embedded/openrisc/2023/08/24/or1k-fpu-linux-and-compilers.html The FPU handling has issues of being inefficient and also not pro

[PATCH RFC v2 24/27] arm64: mte: Handle fatal signal in reserve_tag_storage()

2023-11-19 Thread Alexandru Elisei
As long as a fatal signal is pending, alloc_contig_range() will fail with -EINTR. This makes it impossible for tag storage allocation to succeed, and the page allocator will print an OOM splat. The process is going to be killed, so return 0 (success) from reserve_tag_storage() to allow the page

Re: [PATCH 5.10-rt] arm64: signal: Use ARCH_RT_DELAYS_SIGNAL_SEND

2023-09-13 Thread Luis Claudio R. Goncalves
er+0x3c/0x68 > do_debug_exception+0xac/0x180 > el0_dbg+0x34/0x58 > el0_sync_handler+0x50/0xb8 > el0_sync+0x180/0x1c0 > > It has been fixed by > 0c34700de5e7 ("arm64: signal: Use ARCH_RT_DELAYS_SIGNAL_SEND.") in > higher versions of the kernel. This patch nee

[PATCH 5.10-rt] arm64: signal: Use ARCH_RT_DELAYS_SIGNAL_SEND

2023-09-12 Thread yang.yang29
force_sig_fault_to_task+0x54/0x78 force_sig_fault+0x1c/0x28 arm64_force_sig_fault+0x48/0x78 send_user_sigtrap+0x4c/0x80 brk_handler+0x3c/0x68 do_debug_exception+0xac/0x180 el0_dbg+0x34/0x58 el0_sync_handler+0x50/0xb8 el0_sync+0x180/0x1c0 It has been fixed by 0c34700de5e7 ("arm64: signal

Re: [PATCH v4 05/10] signal: Introduce TRAP_PERF si_code and si_perf to siginfo

2021-04-20 Thread Marco Elver
equested) to the task where an event occurred. > > > > Acked-by: Geert Uytterhoeven # m68k > > Acked-by: Arnd Bergmann # asm-generic > > Signed-off-by: Marco Elver > > This patch landed in linux-next as commit fb6cc127e0b6 ("signal: > Introduce TRAP_PERF

Re: [PATCH v4 05/10] signal: Introduce TRAP_PERF si_code and si_perf to siginfo

2021-04-20 Thread Marek Szyprowski
m68k > Acked-by: Arnd Bergmann # asm-generic > Signed-off-by: Marco Elver This patch landed in linux-next as commit fb6cc127e0b6 ("signal: Introduce TRAP_PERF si_code and si_perf to siginfo"). It causes regression on my test systems (arm 32bit and 64bit). Most systems fails

Re: [PATCH 1/3] arm64: armv8_deprecated: Fix swp_handler() signal generation

2021-04-20 Thread kernel test robot
tree, kindly drop us a note. And when submitting patch, we suggest to use '--base' as documented in https://git-scm.com/docs/git-format-patch] url: https://github.com/0day-ci/linux/commits/Liam-Howlett/arm64-armv8_deprecated-Fix-swp_handler-signal-generation/20210421-005252 bas

Re: [signal] 4bad58ebc8: will-it-scale.per_thread_ops -3.3% regression

2021-04-20 Thread Thomas Gleixner
On Tue, Apr 20 2021 at 11:08, kernel test robot wrote: > FYI, we noticed a -3.3% regression of will-it-scale.per_thread_ops due to > commit: > > commit: 4bad58ebc8bc4f20d89cff95417c9b4674769709 ("signal: Allow tasks to > cache one sigqueue struct") > https://git.kern

[PATCH 1/3] arm64: armv8_deprecated: Fix swp_handler() signal generation

2021-04-20 Thread Liam Howlett
arm64_notify_segfault() was written to decide on the si_code from the assembly emulation of the swp_handler(), but was also used for the signal generation from failed access_ok() and unaligned instructions. When access_ok() fails, there is no need to search for the offending address in the VMA

[PATCH 2/3] arm64: signal: sigreturn() and rt_sigreturn() sometime returns the wrong signals

2021-04-20 Thread Liam Howlett
correct si_code of SI_KERNEL by using arm64_notify_die(). In the case of !access_ok(), simply return SIGSEGV with si_code SEGV_ACCERR. This change requires exporting arm64_notfiy_die() to the arm64 traps.h Fixes: f71016a8a8c5 (arm64: signal: Call arm64_notify_segfault when failing to deliver signal

[PATCH v4 2/2] KVM: selftests: Wait for vcpu thread before signal setup

2021-04-20 Thread Peter Xu
The main thread could start to send SIG_IPI at any time, even before signal blocked on vcpu thread. Reuse the sem_vcpu_stop to sync on that, so when SIG_IPI is sent the signal will always land correctly as an -EINTR. Without this patch, on very busy cores the dirty_log_test could fail directly

Re: [PATCH v3 2/2] KVM: selftests: Wait for vcpu thread before signal setup

2021-04-20 Thread Paolo Bonzini
On 17/04/21 16:36, Peter Xu wrote: The main thread could start to send SIG_IPI at any time, even before signal blocked on vcpu thread. Reuse the sem_vcpu_stop to sync on that, so when SIG_IPI is sent the signal will always land correctly as an -EINTR. Without this patch, on very busy cores the

[PATCH v3 2/2] KVM: selftests: Wait for vcpu thread before signal setup

2021-04-17 Thread Peter Xu
The main thread could start to send SIG_IPI at any time, even before signal blocked on vcpu thread. Reuse the sem_vcpu_stop to sync on that, so when SIG_IPI is sent the signal will always land correctly as an -EINTR. Without this patch, on very busy cores the dirty_log_test could fail directly

[tip: perf/core] signal: Introduce TRAP_PERF si_code and si_perf to siginfo

2021-04-16 Thread tip-bot2 for Marco Elver
: Peter Zijlstra CommitterDate: Fri, 16 Apr 2021 16:32:41 +02:00 signal: Introduce TRAP_PERF si_code and si_perf to siginfo Introduces the TRAP_PERF si_code, and associated siginfo_t field si_perf. These will be used by the perf event subsystem to send signals (if requested) to the task where

Re: the qemu-nbd process automatically exit with the commit 43347d56c 'livepatch: send a fake signal to all blocking tasks'

2021-04-15 Thread Miroslav Benes
/* user requested, ignore socket errors > >>> */ if (test_bit(NBD_RT_DISCONNECT_REQUESTED, > >>> &config->runtime_flags)) ret = > >>> 0; if (test_bit(NBD_RT_TIMEDOUT, > >>> &config->runtime_flags)) ret = > >>> -ETIME

[tip: sched/core] signal: Hand SIGQUEUE_PREALLOC flag to __sigqueue_alloc()

2021-04-15 Thread tip-bot2 for Thomas Gleixner
Committer: Peter Zijlstra CommitterDate: Wed, 14 Apr 2021 18:04:08 +02:00 signal: Hand SIGQUEUE_PREALLOC flag to __sigqueue_alloc() There is no point in having the conditional at the callsite. Just hand in the allocation mode flag to __sigqueue_alloc() and use it to initialize sigqueue::flags

[tip: sched/core] signal: Allow tasks to cache one sigqueue struct

2021-04-15 Thread tip-bot2 for Thomas Gleixner
Committer: Peter Zijlstra CommitterDate: Wed, 14 Apr 2021 18:04:08 +02:00 signal: Allow tasks to cache one sigqueue struct The idea for this originates from the real time tree to make signal delivery for realtime applications more efficient. In quite some of these application scenarios a control

Re: the qemu-nbd process automatically exit with the commit 43347d56c 'livepatch: send a fake signal to all blocking tasks'

2021-04-14 Thread xiaojun . zhao141
> >>> /* user requested, ignore socket errors > >>> */ if (test_bit(NBD_RT_DISCONNECT_REQUESTED, > >>> &config->runtime_flags)) ret = > >>> 0; if (test_bit(NBD_RT_TIMEDOUT, > >>> &config->runtime_flags)) ret = > &g

Re: the qemu-nbd process automatically exit with the commit 43347d56c 'livepatch: send a fake signal to all blocking tasks'

2021-04-14 Thread Josef Bacik
recv_threads) of workqueue jobs and then waits for them to finish. It waits interruptedly. Now, any signal would make wait_event_interruptible() to return -ERESTARTSYS. Livepatch fake signal is no exception there. The error is then propagated back to the userspace. Unless a user requested a disconnecti

Re: the qemu-nbd process automatically exit with the commit 43347d56c 'livepatch: send a fake signal to all blocking tasks'

2021-04-14 Thread xiaojun . zhao141
> > > > /* user requested, ignore socket errors > > */ if (test_bit(NBD_RT_DISCONNECT_REQUESTED, > > &config->runtime_flags)) ret = > > 0; if (test_bit(NBD_RT_TIMEDOUT, > > &config->runtime_flags)) ret = > &g

Re: the qemu-nbd process automatically exit with the commit 43347d56c 'livepatch: send a fake signal to all blocking tasks'

2021-04-14 Thread xiaojun . zhao141
> > > > /* user requested, ignore socket errors > > */ if (test_bit(NBD_RT_DISCONNECT_REQUESTED, > > &config->runtime_flags)) ret = > > 0; if (test_bit(NBD_RT_TIMEDOUT, > > &config->runtime_flags)) ret = > &g

Re: [PATCH v7 5/6] x86/signal: Detect and prevent an alternate signal stack overflow

2021-04-14 Thread Borislav Petkov
ppen. So sigaltstack(2) says in the NOTES: Functions called from a signal handler executing on an alternate signal stack will also use the alternate signal stack. (This also applies to any handlers invoked for other signals while the process is executing on the

Re: [PATCH v7 5/6] x86/signal: Detect and prevent an alternate signal stack overflow

2021-04-14 Thread Florian Weimer
* Borislav Petkov: > On Mon, Apr 12, 2021 at 10:30:23PM +, Bae, Chang Seok wrote: >> On Mar 26, 2021, at 03:30, Borislav Petkov wrote: >> > On Thu, Mar 25, 2021 at 09:56:53PM -0700, Andy Lutomirski wrote: >> >> We really ought to have a SIGSIGFAIL signal that&#x

Re: the qemu-nbd process automatically exit with the commit 43347d56c 'livepatch: send a fake signal to all blocking tasks'

2021-04-14 Thread Miroslav Benes
ret = 0; > > if (test_bit(NBD_RT_TIMEDOUT, &config->runtime_flags)) > > ret = -ETIMEDOUT; > > return ret;

Re: [PATCH v7 5/6] x86/signal: Detect and prevent an alternate signal stack overflow

2021-04-14 Thread Borislav Petkov
On Mon, Apr 12, 2021 at 10:30:23PM +, Bae, Chang Seok wrote: > On Mar 26, 2021, at 03:30, Borislav Petkov wrote: > > On Thu, Mar 25, 2021 at 09:56:53PM -0700, Andy Lutomirski wrote: > >> We really ought to have a SIGSIGFAIL signal that's sent, double-fault > >&g

[PATCH 1/4] signal: add a helper to restore a process state from sigcontex

2021-04-13 Thread Andrei Vagin
It will be used to implement process_vm_exec. Signed-off-by: Andrei Vagin --- arch/x86/kernel/signal.c | 78 ++-- 1 file changed, 43 insertions(+), 35 deletions(-) diff --git a/arch/x86/kernel/signal.c b/arch/x86/kernel/signal.c index be0d7d4152ec..cc269a20dd

the qemu-nbd process automatically exit with the commit 43347d56c 'livepatch: send a fake signal to all blocking tasks'

2021-04-13 Thread xiaojun . zhao141
if (test_bit(NBD_RT_TIMEDOUT, &config->runtime_flags)) ret = -ETIMEDOUT; return ret; } When the nbd waits for atomic_read(&config-&

[PATCH v2 5/5] drm/vc4: hdmi: Signal the proper colorimetry info in the infoframe

2021-04-13 Thread Maxime Ripard
Our driver while supporting HDR didn't send the proper colorimetry info in the AVI infoframe. Let's add the property needed so that the userspace can let us know what the colorspace is supposed to be. Signed-off-by: Maxime Ripard --- Changes from v1: - New patch --- drivers/gpu/drm/vc4/vc4_

Re: [PATCH v1 2/2] mmc: sdhci-of-aspeed: Support toggling SD bus signal voltage by GPIO

2021-04-12 Thread Andrew Jeffery
On Mon, 12 Apr 2021, at 16:20, Steven Lee wrote: > The 04/09/2021 12:14, Andrew Jeffery wrote: > > Hi Steven, > > > > On Thu, 8 Apr 2021, at 11:22, Steven Lee wrote: > > > AST2600-A2 EVB provides reference design to support toggling signal > > > voltag

Re: [PATCH v7 5/6] x86/signal: Detect and prevent an alternate signal stack overflow

2021-04-12 Thread Bae, Chang Seok
On Mar 26, 2021, at 03:30, Borislav Petkov wrote: > On Thu, Mar 25, 2021 at 09:56:53PM -0700, Andy Lutomirski wrote: >> We really ought to have a SIGSIGFAIL signal that's sent, double-fault >> style, when we fail to send a signal. > > Yeap, we should be able to tell

Re: [PATCH v1 2/2] mmc: sdhci-of-aspeed: Support toggling SD bus signal voltage by GPIO

2021-04-11 Thread Steven Lee
The 04/09/2021 12:14, Andrew Jeffery wrote: > Hi Steven, > > On Thu, 8 Apr 2021, at 11:22, Steven Lee wrote: > > AST2600-A2 EVB provides reference design to support toggling signal > > voltage between 3.3v and 1.8v by power-switch-gpio pin that defined in > > th

Re: [PATCH v1 2/2] mmc: sdhci-of-aspeed: Support toggling SD bus signal voltage by GPIO

2021-04-08 Thread Andrew Jeffery
Hi Steven, On Thu, 8 Apr 2021, at 11:22, Steven Lee wrote: > AST2600-A2 EVB provides reference design to support toggling signal > voltage between 3.3v and 1.8v by power-switch-gpio pin that defined in > the device tree. Is this something you think we need support for beyond the EVB? I

[PATCH v4 05/10] signal: Introduce TRAP_PERF si_code and si_perf to siginfo

2021-04-08 Thread Marco Elver
Introduces the TRAP_PERF si_code, and associated siginfo_t field si_perf. These will be used by the perf event subsystem to send signals (if requested) to the task where an event occurred. Acked-by: Geert Uytterhoeven # m68k Acked-by: Arnd Bergmann # asm-generic Signed-off-by: Marco Elver ---

[PATCH v1 2/2] mmc: sdhci-of-aspeed: Support toggling SD bus signal voltage by GPIO

2021-04-07 Thread Steven Lee
AST2600-A2 EVB provides reference design to support toggling signal voltage between 3.3v and 1.8v by power-switch-gpio pin that defined in the device tree. It also supporting enabling/disabling SD bus power by power-gpio. In the reference design, GPIOV0 of AST2600-A2 EVB is connected to power

[PATCH v1 0/2] mmc: sdhci-of-aspeed: Support toggling SD bus signal

2021-04-07 Thread Steven Lee
Hello, This series implements support for toggling SD bus signal voltage by GPIO pin. This series has been tested on AST2600-A2 EVB with APLL and 200MHz HCLK clock source with sdr104, sdr50, sdr25, sdr12 and high speed mode. This series were also be tested on AST2600-A1 EVB and AST2500 EVB that

[PATCH 0/3] drm/msm/mdp5: Emit vsync signal often enough

2021-04-06 Thread Marijn Suijten
This set of patches corrects and improves VSync-related register setup on the MDP5 block. Values written to the registers were way too high leading to the MDSS block counting way too many ticks on the vclk before emitting a vsync interrupt, resulting in significant update issues on command- and vi

Re: [PATCH 1/2] block: shutdown blktrace in case of fatal signal pending

2021-04-05 Thread Christoph Hellwig
On Sat, Apr 03, 2021 at 04:10:16PM +0800, Ming Lei wrote: > We still may shutdown blktrace if current is the last opener, otherwise > new blktrace can't be started and memory should be leaked forever, and > what do you think of the revised version? I don't think this works. For one there might be

Re: [PATCH 1/2] block: shutdown blktrace in case of fatal signal pending

2021-04-03 Thread Ming Lei
On Sat, Apr 03, 2021 at 04:10:16PM +0800, Ming Lei wrote: > On Fri, Apr 02, 2021 at 07:27:30PM +0200, Christoph Hellwig wrote: > > On Wed, Mar 31, 2021 at 08:16:50AM +0800, Ming Lei wrote: > > > On Tue, Mar 30, 2021 at 06:53:30PM +0200, Christoph Hellwig wrote: > > > > On Tue, Mar 23, 2021 at 04:14

Re: [PATCH 1/2] block: shutdown blktrace in case of fatal signal pending

2021-04-03 Thread Ming Lei
On Fri, Apr 02, 2021 at 07:27:30PM +0200, Christoph Hellwig wrote: > On Wed, Mar 31, 2021 at 08:16:50AM +0800, Ming Lei wrote: > > On Tue, Mar 30, 2021 at 06:53:30PM +0200, Christoph Hellwig wrote: > > > On Tue, Mar 23, 2021 at 04:14:39PM +0800, Ming Lei wrote: > > > > blktrace may allocate lots of

Re: [PATCH 1/2] block: shutdown blktrace in case of fatal signal pending

2021-04-02 Thread Christoph Hellwig
On Wed, Mar 31, 2021 at 08:16:50AM +0800, Ming Lei wrote: > On Tue, Mar 30, 2021 at 06:53:30PM +0200, Christoph Hellwig wrote: > > On Tue, Mar 23, 2021 at 04:14:39PM +0800, Ming Lei wrote: > > > blktrace may allocate lots of memory, if the process is terminated > > > by user or OOM, we need to prov

Re: [PATCH 1/2] block: shutdown blktrace in case of fatal signal pending

2021-03-30 Thread Ming Lei
On Tue, Mar 30, 2021 at 06:53:30PM +0200, Christoph Hellwig wrote: > On Tue, Mar 23, 2021 at 04:14:39PM +0800, Ming Lei wrote: > > blktrace may allocate lots of memory, if the process is terminated > > by user or OOM, we need to provide one chance to remove the trace > > buffer, otherwise memory le

Re: [PATCH 1/2] block: shutdown blktrace in case of fatal signal pending

2021-03-30 Thread Christoph Hellwig
On Tue, Mar 23, 2021 at 04:14:39PM +0800, Ming Lei wrote: > blktrace may allocate lots of memory, if the process is terminated > by user or OOM, we need to provide one chance to remove the trace > buffer, otherwise memory leak may be caused. > > Fix the issue by shutdown blktrace in case of task e

Re: [PATCH v2] livepatch: Replace the fake signal sending with TIF_NOTIFY_SIGNAL infrastructure

2021-03-30 Thread Jiri Kosina
On Mon, 29 Mar 2021, Miroslav Benes wrote: > Livepatch sends a fake signal to all remaining blocking tasks of a > running transition after a set period of time. It uses TIF_SIGPENDING > flag for the purpose. Commit 12db8b690010 ("entry: Add support for > TIF_NOTIFY_SIGNAL&

[tip: locking/core] locking/rtmutex: Clean up signal handling in __rt_mutex_slowlock()

2021-03-29 Thread tip-bot2 for Thomas Gleixner
Committer: Ingo Molnar CommitterDate: Mon, 29 Mar 2021 15:57:05 +02:00 locking/rtmutex: Clean up signal handling in __rt_mutex_slowlock() The signal handling in __rt_mutex_slowlock() is open coded. Use signal_pending_state() instead. Aside of the cleanup this also prepares for the RT lock

Re: [PATCH v2] livepatch: Replace the fake signal sending with TIF_NOTIFY_SIGNAL infrastructure

2021-03-29 Thread Joe Lawrence
On 3/29/21 9:28 AM, Miroslav Benes wrote: Livepatch sends a fake signal to all remaining blocking tasks of a running transition after a set period of time. It uses TIF_SIGPENDING flag for the purpose. Commit 12db8b690010 ("entry: Add support for TIF_NOTIFY_SIGNAL") added a generic infr

[PATCH v2] livepatch: Replace the fake signal sending with TIF_NOTIFY_SIGNAL infrastructure

2021-03-29 Thread Miroslav Benes
Livepatch sends a fake signal to all remaining blocking tasks of a running transition after a set period of time. It uses TIF_SIGPENDING flag for the purpose. Commit 12db8b690010 ("entry: Add support for TIF_NOTIFY_SIGNAL") added a generic infrastructure to achieve the same. Replace o

Re: [PATCH] livepatch: Replace the fake signal sending with TIF_NOTIFY_SIGNAL infrastructure

2021-03-29 Thread Petr Mladek
On Fri 2021-03-26 15:30:21, Miroslav Benes wrote: > Livepatch sends a fake signal to all remaining blocking tasks of a > running transition after a set period of time. It uses TIF_SIGPENDING > flag for the purpose. Commit 12db8b690010 ("entry: Add support for > TIF_NOTIFY_SIGNAL&

Re: [PATCH] livepatch: Replace the fake signal sending with TIF_NOTIFY_SIGNAL infrastructure

2021-03-26 Thread Jens Axboe
On 3/26/21 8:30 AM, Miroslav Benes wrote: > Livepatch sends a fake signal to all remaining blocking tasks of a > running transition after a set period of time. It uses TIF_SIGPENDING > flag for the purpose. Commit 12db8b690010 ("entry: Add support for > TIF_NOTIFY_SIGNAL&

[patch V2 15/15] locking/rtmutex: Cleanup signal handling in __rt_mutex_slowlock()

2021-03-26 Thread Thomas Gleixner
From: Thomas Gleixner The signal handling in __rt_mutex_slowlock() is open coded. Use signal_pending_state() instead. Aside of the cleanup this also prepares for the RT lock substituions which require support for TASK_KILLABLE. Signed-off-by: Thomas Gleixner --- kernel/locking/rtmutex.c

[PATCH 4/7] Revert "signal: don't allow sending any signals to PF_IO_WORKER threads"

2021-03-26 Thread Jens Axboe
This reverts commit 5be28c8f85ce99ed2d329d2ad8bdd18ea19473a5. IO threads now take signals just fine, so there's no reason to limit them specifically. Revert the change that prevented that from happening. Signed-off-by: Jens Axboe --- kernel/signal.c | 3 --- 1 file changed, 3 deletions(-) diff

[PATCH 7/7] Revert "signal: don't allow STOP on PF_IO_WORKER threads"

2021-03-26 Thread Jens Axboe
This reverts commit 4db4b1a0d1779dc159f7b87feb97030ec0b12597. The IO threads allow and handle SIGSTOP now, so don't special case them anymore in task_set_jobctl_pending(). Signed-off-by: Jens Axboe --- kernel/signal.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/kernel/

[PATCH 06/10] Revert "signal: don't allow STOP on PF_IO_WORKER threads"

2021-03-26 Thread Jens Axboe
This reverts commit 4db4b1a0d1779dc159f7b87feb97030ec0b12597. The IO threads allow and handle SIGSTOP now, so don't special case them anymore in task_set_jobctl_pending(). Signed-off-by: Jens Axboe --- kernel/signal.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/kernel/

[PATCH 03/10] Revert "signal: don't allow sending any signals to PF_IO_WORKER threads"

2021-03-26 Thread Jens Axboe
This reverts commit 5be28c8f85ce99ed2d329d2ad8bdd18ea19473a5. IO threads now take signals just fine, so there's no reason to limit them specifically. Revert the change that prevented that from happening. Signed-off-by: Jens Axboe --- kernel/signal.c | 3 --- 1 file changed, 3 deletions(-) diff

[PATCH] livepatch: Replace the fake signal sending with TIF_NOTIFY_SIGNAL infrastructure

2021-03-26 Thread Miroslav Benes
Livepatch sends a fake signal to all remaining blocking tasks of a running transition after a set period of time. It uses TIF_SIGPENDING flag for the purpose. Commit 12db8b690010 ("entry: Add support for TIF_NOTIFY_SIGNAL") added a generic infrastructure to achieve the same. Replace o

Re: [PATCH v7 5/6] x86/signal: Detect and prevent an alternate signal stack overflow

2021-03-26 Thread Borislav Petkov
ts gettin' annoying. > We really ought to have a SIGSIGFAIL signal that's sent, double-fault > style, when we fail to send a signal. Yeap, we should be able to tell userspace that we couldn't send a signal, hohumm. Thx. -- Regards/Gruss, Boris. https://people.kernel.org/tglx/notes-about-netiquette

Re: [PATCH v7 5/6] x86/signal: Detect and prevent an alternate signal stack overflow

2021-03-25 Thread Andy Lutomirski
I forgot to mention why I cc'd all you fine Xen folk: On Thu, Mar 25, 2021 at 11:13 AM Andy Lutomirski wrote: > > > } else if (IS_ENABLED(CONFIG_X86_32) && > >!onsigstack && > >regs->ss != __USER_DS && This bit here seems really dubious on Xen PV.

Re: [PATCH v7 5/6] x86/signal: Detect and prevent an alternate signal stack overflow

2021-03-25 Thread Andy Lutomirski
0; > > - int onsigstack = on_sig_stack(sp); > > + bool already_onsigstack = on_sig_stack(sp); > > + bool entering_altstack = false; > > int ret; > > > > /* redzone */ > > @@ -246,15 +247,25 @@ get_sigframe(struct k_sigaction *ka, struct pt_

[PATCH 6/8] Revert "signal: don't allow STOP on PF_IO_WORKER threads"

2021-03-25 Thread Jens Axboe
This reverts commit 4db4b1a0d1779dc159f7b87feb97030ec0b12597. The IO threads allow and handle SIGSTOP now, so don't special case them anymore in task_set_jobctl_pending(). Signed-off-by: Jens Axboe --- kernel/signal.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/kernel/

[PATCH 3/8] Revert "signal: don't allow sending any signals to PF_IO_WORKER threads"

2021-03-25 Thread Jens Axboe
This reverts commit 5be28c8f85ce99ed2d329d2ad8bdd18ea19473a5. IO threads now take signals just fine, so there's no reason to limit them specifically. Revert the change that prevented that from happening. Signed-off-by: Jens Axboe --- kernel/signal.c | 3 --- 1 file changed, 3 deletions(-) diff

  1   2   3   4   5   6   7   8   9   10   >