* [PATCH for-7.1?] linux-user/riscv: Align signal frame to 16 bytes
@ 2022-07-29 20:19 Richard Henderson
2022-08-01 7:29 ` Alistair Francis
2022-08-01 23:01 ` Alistair Francis
0 siblings, 2 replies; 3+ messages in thread
From: Richard Henderson @ 2022-07-29 20:19 UTC (permalink / raw)
To: qemu-devel; +Cc: laurent
Follow the kernel's alignment, as we already noted.
Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1093
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
linux-user/riscv/signal.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/linux-user/riscv/signal.c b/linux-user/riscv/signal.c
index 296e39fbf0..eaa168199a 100644
--- a/linux-user/riscv/signal.c
+++ b/linux-user/riscv/signal.c
@@ -64,9 +64,7 @@ static abi_ulong get_sigframe(struct target_sigaction *ka,
/* This is the X/Open sanctioned signal stack switching. */
sp = target_sigsp(sp, ka) - framesize;
-
- /* XXX: kernel aligns with 0xf ? */
- sp &= ~3UL; /* align sp on 4-byte boundary */
+ sp &= ~0xf;
return sp;
}
--
2.34.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH for-7.1?] linux-user/riscv: Align signal frame to 16 bytes
2022-07-29 20:19 [PATCH for-7.1?] linux-user/riscv: Align signal frame to 16 bytes Richard Henderson
@ 2022-08-01 7:29 ` Alistair Francis
2022-08-01 23:01 ` Alistair Francis
1 sibling, 0 replies; 3+ messages in thread
From: Alistair Francis @ 2022-08-01 7:29 UTC (permalink / raw)
To: Richard Henderson; +Cc: qemu-devel@nongnu.org Developers, Laurent Vivier
On Sat, Jul 30, 2022 at 6:19 AM Richard Henderson
<richard.henderson@linaro.org> wrote:
>
> Follow the kernel's alignment, as we already noted.
>
> Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1093
> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
Alistair
> ---
> linux-user/riscv/signal.c | 4 +---
> 1 file changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/linux-user/riscv/signal.c b/linux-user/riscv/signal.c
> index 296e39fbf0..eaa168199a 100644
> --- a/linux-user/riscv/signal.c
> +++ b/linux-user/riscv/signal.c
> @@ -64,9 +64,7 @@ static abi_ulong get_sigframe(struct target_sigaction *ka,
>
> /* This is the X/Open sanctioned signal stack switching. */
> sp = target_sigsp(sp, ka) - framesize;
> -
> - /* XXX: kernel aligns with 0xf ? */
> - sp &= ~3UL; /* align sp on 4-byte boundary */
> + sp &= ~0xf;
>
> return sp;
> }
> --
> 2.34.1
>
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH for-7.1?] linux-user/riscv: Align signal frame to 16 bytes
2022-07-29 20:19 [PATCH for-7.1?] linux-user/riscv: Align signal frame to 16 bytes Richard Henderson
2022-08-01 7:29 ` Alistair Francis
@ 2022-08-01 23:01 ` Alistair Francis
1 sibling, 0 replies; 3+ messages in thread
From: Alistair Francis @ 2022-08-01 23:01 UTC (permalink / raw)
To: Richard Henderson; +Cc: qemu-devel@nongnu.org Developers, Laurent Vivier
On Sat, Jul 30, 2022 at 6:19 AM Richard Henderson
<richard.henderson@linaro.org> wrote:
>
> Follow the kernel's alignment, as we already noted.
>
> Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1093
> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Thanks!
Applied to riscv-to-apply.next
Alistair
> ---
> linux-user/riscv/signal.c | 4 +---
> 1 file changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/linux-user/riscv/signal.c b/linux-user/riscv/signal.c
> index 296e39fbf0..eaa168199a 100644
> --- a/linux-user/riscv/signal.c
> +++ b/linux-user/riscv/signal.c
> @@ -64,9 +64,7 @@ static abi_ulong get_sigframe(struct target_sigaction *ka,
>
> /* This is the X/Open sanctioned signal stack switching. */
> sp = target_sigsp(sp, ka) - framesize;
> -
> - /* XXX: kernel aligns with 0xf ? */
> - sp &= ~3UL; /* align sp on 4-byte boundary */
> + sp &= ~0xf;
>
> return sp;
> }
> --
> 2.34.1
>
>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2022-08-01 23:02 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-07-29 20:19 [PATCH for-7.1?] linux-user/riscv: Align signal frame to 16 bytes Richard Henderson
2022-08-01 7:29 ` Alistair Francis
2022-08-01 23:01 ` Alistair Francis
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.