From: Markos Chandras <Markos.Chandras@imgtec.com>
To: David Daney <ddaney.cavm@gmail.com>
Cc: <linux-mips@linux-mips.org>
Subject: Re: [PATCH 2/2] MIPS: kernel: signal: Drop unused arguments for traditional signal handlers
Date: Mon, 24 Aug 2015 09:01:09 +0100 [thread overview]
Message-ID: <55DACF45.9050209@imgtec.com> (raw)
In-Reply-To: <55D759CA.7060409@gmail.com>
On 08/21/2015 06:03 PM, David Daney wrote:
> On 08/20/2015 04:45 AM, Markos Chandras wrote:
>> Traditional signal handlers (ie !SA_SIGINFO) only need only argument
>> holding the signal number so we drop the additional arguments and fix
>> the related comments. We also update the comments for the SA_SIGINFO
>> case where the second argument is a pointer to a siginfo_t structure.
>>
>> Signed-off-by: Markos Chandras <markos.chandras@imgtec.com>
>> ---
>> arch/mips/kernel/signal.c | 6 +-----
>> arch/mips/kernel/signal32.c | 6 +-----
>> arch/mips/kernel/signal_n32.c | 2 +-
>> 3 files changed, 3 insertions(+), 11 deletions(-)
>>
>> diff --git a/arch/mips/kernel/signal.c b/arch/mips/kernel/signal.c
>> index be3ac5f7cbbb..3a125331bf8b 100644
>> --- a/arch/mips/kernel/signal.c
>> +++ b/arch/mips/kernel/signal.c
>> @@ -683,15 +683,11 @@ static int setup_frame(void *sig_return, struct
>> ksignal *ksig,
>> * Arguments to signal handler:
>> *
>> * a0 = signal number
>> - * a1 = 0 (should be cause)
>> - * a2 = pointer to struct sigcontext
>> *
>> * $25 and c0_epc point to the signal handler, $29 points to the
>> * struct sigframe.
>> */
>> regs->regs[ 4] = ksig->sig;
>> - regs->regs[ 5] = 0;
>> - regs->regs[ 6] = (unsigned long) &frame->sf_sc;
>
> This changes the kernel ABI.
>
> Have you tested this change against all userspace applications that use
> signals to make sure it doesn't break anything?
>
> David Daney
i am confident there is no userland application that uses inline asm to
fetch additional arguments from (*sa_handler) when using !SA_SIGINFO
--
markos
WARNING: multiple messages have this Message-ID (diff)
From: Markos Chandras <Markos.Chandras@imgtec.com>
To: David Daney <ddaney.cavm@gmail.com>
Cc: linux-mips@linux-mips.org
Subject: Re: [PATCH 2/2] MIPS: kernel: signal: Drop unused arguments for traditional signal handlers
Date: Mon, 24 Aug 2015 09:01:09 +0100 [thread overview]
Message-ID: <55DACF45.9050209@imgtec.com> (raw)
Message-ID: <20150824080109.0fp8l-OKqE2Mare7sEFYpob3xCSztlZ3iCSXAroCWaI@z> (raw)
In-Reply-To: <55D759CA.7060409@gmail.com>
On 08/21/2015 06:03 PM, David Daney wrote:
> On 08/20/2015 04:45 AM, Markos Chandras wrote:
>> Traditional signal handlers (ie !SA_SIGINFO) only need only argument
>> holding the signal number so we drop the additional arguments and fix
>> the related comments. We also update the comments for the SA_SIGINFO
>> case where the second argument is a pointer to a siginfo_t structure.
>>
>> Signed-off-by: Markos Chandras <markos.chandras@imgtec.com>
>> ---
>> arch/mips/kernel/signal.c | 6 +-----
>> arch/mips/kernel/signal32.c | 6 +-----
>> arch/mips/kernel/signal_n32.c | 2 +-
>> 3 files changed, 3 insertions(+), 11 deletions(-)
>>
>> diff --git a/arch/mips/kernel/signal.c b/arch/mips/kernel/signal.c
>> index be3ac5f7cbbb..3a125331bf8b 100644
>> --- a/arch/mips/kernel/signal.c
>> +++ b/arch/mips/kernel/signal.c
>> @@ -683,15 +683,11 @@ static int setup_frame(void *sig_return, struct
>> ksignal *ksig,
>> * Arguments to signal handler:
>> *
>> * a0 = signal number
>> - * a1 = 0 (should be cause)
>> - * a2 = pointer to struct sigcontext
>> *
>> * $25 and c0_epc point to the signal handler, $29 points to the
>> * struct sigframe.
>> */
>> regs->regs[ 4] = ksig->sig;
>> - regs->regs[ 5] = 0;
>> - regs->regs[ 6] = (unsigned long) &frame->sf_sc;
>
> This changes the kernel ABI.
>
> Have you tested this change against all userspace applications that use
> signals to make sure it doesn't break anything?
>
> David Daney
i am confident there is no userland application that uses inline asm to
fetch additional arguments from (*sa_handler) when using !SA_SIGINFO
--
markos
next prev parent reply other threads:[~2015-08-24 8:01 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-08-20 11:45 [PATCH 0/2] Minor signal clean up Markos Chandras
2015-08-20 11:45 ` Markos Chandras
2015-08-20 11:45 ` [PATCH 1/2] MIPS: asm: signal.h: Fix traditional signal handling for o32 on 64-bit kernels Markos Chandras
2015-08-20 11:45 ` Markos Chandras
2015-08-20 11:45 ` [PATCH 2/2] MIPS: kernel: signal: Drop unused arguments for traditional signal handlers Markos Chandras
2015-08-20 11:45 ` Markos Chandras
2015-08-21 17:03 ` David Daney
2015-08-24 8:01 ` Markos Chandras [this message]
2015-08-24 8:01 ` Markos Chandras
2015-08-25 20:38 ` Paul Burton
2015-08-25 20:38 ` Paul Burton
2015-08-25 21:02 ` David Daney
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=55DACF45.9050209@imgtec.com \
--to=markos.chandras@imgtec.com \
--cc=ddaney.cavm@gmail.com \
--cc=linux-mips@linux-mips.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox