* [Qemu-trivial] [PATCH] coroutine-sigaltstack: Change jmp_buf to sigjmp_buf
@ 2014-11-08 3:51 ` Willem Pinckaers
0 siblings, 0 replies; 8+ messages in thread
From: Willem Pinckaers @ 2014-11-08 3:51 UTC (permalink / raw)
To: qemu-devel; +Cc: qemu-trivial
This is a simple patch to change the type of old_env from jmp_buf
to sigjmp_buf. old_env is used by sigsetjmp and as such should be
a sigjmp_buf.
This fixes a stack_chk fail in a OSX 32bit build. Since at least on
OSX sigjmp_buf is four bytes larger then a jmpbuf, resulting in an
overflow in sigsetjmp. Due to variable reordering this overwrites
the stack cookie.
Signed-off-by: Willem Pinckaers <willem_qemu@lekkertech.net>
---
coroutine-sigaltstack.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/coroutine-sigaltstack.c b/coroutine-sigaltstack.c
index 3de0bb3..63519ff 100644
--- a/coroutine-sigaltstack.c
+++ b/coroutine-sigaltstack.c
@@ -155,7 +155,7 @@ Coroutine *qemu_coroutine_new(void)
stack_t oss;
sigset_t sigs;
sigset_t osigs;
- jmp_buf old_env;
+ sigjmp_buf old_env;
/* The way to manipulate stack is with the sigaltstack function. We
* prepare a stack, with it delivering a signal to ourselves and then
--
1.9.3 (Apple Git-50)
^ permalink raw reply related [flat|nested] 8+ messages in thread* [Qemu-devel] [PATCH] coroutine-sigaltstack: Change jmp_buf to sigjmp_buf
@ 2014-11-08 3:51 ` Willem Pinckaers
0 siblings, 0 replies; 8+ messages in thread
From: Willem Pinckaers @ 2014-11-08 3:51 UTC (permalink / raw)
To: qemu-devel; +Cc: qemu-trivial
This is a simple patch to change the type of old_env from jmp_buf
to sigjmp_buf. old_env is used by sigsetjmp and as such should be
a sigjmp_buf.
This fixes a stack_chk fail in a OSX 32bit build. Since at least on
OSX sigjmp_buf is four bytes larger then a jmpbuf, resulting in an
overflow in sigsetjmp. Due to variable reordering this overwrites
the stack cookie.
Signed-off-by: Willem Pinckaers <willem_qemu@lekkertech.net>
---
coroutine-sigaltstack.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/coroutine-sigaltstack.c b/coroutine-sigaltstack.c
index 3de0bb3..63519ff 100644
--- a/coroutine-sigaltstack.c
+++ b/coroutine-sigaltstack.c
@@ -155,7 +155,7 @@ Coroutine *qemu_coroutine_new(void)
stack_t oss;
sigset_t sigs;
sigset_t osigs;
- jmp_buf old_env;
+ sigjmp_buf old_env;
/* The way to manipulate stack is with the sigaltstack function. We
* prepare a stack, with it delivering a signal to ourselves and then
--
1.9.3 (Apple Git-50)
^ permalink raw reply related [flat|nested] 8+ messages in thread* Re: [Qemu-trivial] [Qemu-devel] [PATCH] coroutine-sigaltstack: Change jmp_buf to sigjmp_buf
2014-11-08 3:51 ` [Qemu-devel] " Willem Pinckaers
@ 2014-11-08 15:26 ` Peter Maydell
-1 siblings, 0 replies; 8+ messages in thread
From: Peter Maydell @ 2014-11-08 15:26 UTC (permalink / raw)
To: Willem Pinckaers; +Cc: QEMU Trivial, QEMU Developers
On 8 November 2014 03:51, Willem Pinckaers <willem_qemu@lekkertech.net> wrote:
> This is a simple patch to change the type of old_env from jmp_buf
> to sigjmp_buf. old_env is used by sigsetjmp and as such should be
> a sigjmp_buf.
>
> This fixes a stack_chk fail in a OSX 32bit build. Since at least on
> OSX sigjmp_buf is four bytes larger then a jmpbuf, resulting in an
> overflow in sigsetjmp. Due to variable reordering this overwrites
> the stack cookie.
>
> Signed-off-by: Willem Pinckaers <willem_qemu@lekkertech.net>
> ---
> coroutine-sigaltstack.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/coroutine-sigaltstack.c b/coroutine-sigaltstack.c
> index 3de0bb3..63519ff 100644
> --- a/coroutine-sigaltstack.c
> +++ b/coroutine-sigaltstack.c
> @@ -155,7 +155,7 @@ Coroutine *qemu_coroutine_new(void)
> stack_t oss;
> sigset_t sigs;
> sigset_t osigs;
> - jmp_buf old_env;
> + sigjmp_buf old_env;
>
> /* The way to manipulate stack is with the sigaltstack function. We
> * prepare a stack, with it delivering a signal to ourselves and then
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
I think I must have missed this one when I converted all the jmp_buf
to sigjmp_buf in commit 6ab7e546.
-- PMM
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [Qemu-devel] [PATCH] coroutine-sigaltstack: Change jmp_buf to sigjmp_buf
@ 2014-11-08 15:26 ` Peter Maydell
0 siblings, 0 replies; 8+ messages in thread
From: Peter Maydell @ 2014-11-08 15:26 UTC (permalink / raw)
To: Willem Pinckaers; +Cc: QEMU Trivial, QEMU Developers
On 8 November 2014 03:51, Willem Pinckaers <willem_qemu@lekkertech.net> wrote:
> This is a simple patch to change the type of old_env from jmp_buf
> to sigjmp_buf. old_env is used by sigsetjmp and as such should be
> a sigjmp_buf.
>
> This fixes a stack_chk fail in a OSX 32bit build. Since at least on
> OSX sigjmp_buf is four bytes larger then a jmpbuf, resulting in an
> overflow in sigsetjmp. Due to variable reordering this overwrites
> the stack cookie.
>
> Signed-off-by: Willem Pinckaers <willem_qemu@lekkertech.net>
> ---
> coroutine-sigaltstack.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/coroutine-sigaltstack.c b/coroutine-sigaltstack.c
> index 3de0bb3..63519ff 100644
> --- a/coroutine-sigaltstack.c
> +++ b/coroutine-sigaltstack.c
> @@ -155,7 +155,7 @@ Coroutine *qemu_coroutine_new(void)
> stack_t oss;
> sigset_t sigs;
> sigset_t osigs;
> - jmp_buf old_env;
> + sigjmp_buf old_env;
>
> /* The way to manipulate stack is with the sigaltstack function. We
> * prepare a stack, with it delivering a signal to ourselves and then
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
I think I must have missed this one when I converted all the jmp_buf
to sigjmp_buf in commit 6ab7e546.
-- PMM
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [Qemu-trivial] [Qemu-devel] [PATCH] coroutine-sigaltstack: Change jmp_buf to sigjmp_buf
2014-11-08 15:26 ` Peter Maydell
@ 2014-11-10 8:18 ` Markus Armbruster
-1 siblings, 0 replies; 8+ messages in thread
From: Markus Armbruster @ 2014-11-10 8:18 UTC (permalink / raw)
To: Peter Maydell; +Cc: Willem Pinckaers, QEMU Trivial, QEMU Developers
Peter Maydell <peter.maydell@linaro.org> writes:
> On 8 November 2014 03:51, Willem Pinckaers <willem_qemu@lekkertech.net> wrote:
>> This is a simple patch to change the type of old_env from jmp_buf
>> to sigjmp_buf. old_env is used by sigsetjmp and as such should be
>> a sigjmp_buf.
>>
>> This fixes a stack_chk fail in a OSX 32bit build. Since at least on
>> OSX sigjmp_buf is four bytes larger then a jmpbuf, resulting in an
>> overflow in sigsetjmp. Due to variable reordering this overwrites
>> the stack cookie.
>>
>> Signed-off-by: Willem Pinckaers <willem_qemu@lekkertech.net>
>> ---
>> coroutine-sigaltstack.c | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/coroutine-sigaltstack.c b/coroutine-sigaltstack.c
>> index 3de0bb3..63519ff 100644
>> --- a/coroutine-sigaltstack.c
>> +++ b/coroutine-sigaltstack.c
>> @@ -155,7 +155,7 @@ Coroutine *qemu_coroutine_new(void)
>> stack_t oss;
>> sigset_t sigs;
>> sigset_t osigs;
>> - jmp_buf old_env;
>> + sigjmp_buf old_env;
>>
>> /* The way to manipulate stack is with the sigaltstack function. We
>> * prepare a stack, with it delivering a signal to ourselves and then
>
> Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
>
> I think I must have missed this one when I converted all the jmp_buf
> to sigjmp_buf in commit 6ab7e546.
Useful bit of information, perhaps you can amend the commit message with
it on commit.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [Qemu-devel] [PATCH] coroutine-sigaltstack: Change jmp_buf to sigjmp_buf
@ 2014-11-10 8:18 ` Markus Armbruster
0 siblings, 0 replies; 8+ messages in thread
From: Markus Armbruster @ 2014-11-10 8:18 UTC (permalink / raw)
To: Peter Maydell; +Cc: Willem Pinckaers, QEMU Trivial, QEMU Developers
Peter Maydell <peter.maydell@linaro.org> writes:
> On 8 November 2014 03:51, Willem Pinckaers <willem_qemu@lekkertech.net> wrote:
>> This is a simple patch to change the type of old_env from jmp_buf
>> to sigjmp_buf. old_env is used by sigsetjmp and as such should be
>> a sigjmp_buf.
>>
>> This fixes a stack_chk fail in a OSX 32bit build. Since at least on
>> OSX sigjmp_buf is four bytes larger then a jmpbuf, resulting in an
>> overflow in sigsetjmp. Due to variable reordering this overwrites
>> the stack cookie.
>>
>> Signed-off-by: Willem Pinckaers <willem_qemu@lekkertech.net>
>> ---
>> coroutine-sigaltstack.c | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/coroutine-sigaltstack.c b/coroutine-sigaltstack.c
>> index 3de0bb3..63519ff 100644
>> --- a/coroutine-sigaltstack.c
>> +++ b/coroutine-sigaltstack.c
>> @@ -155,7 +155,7 @@ Coroutine *qemu_coroutine_new(void)
>> stack_t oss;
>> sigset_t sigs;
>> sigset_t osigs;
>> - jmp_buf old_env;
>> + sigjmp_buf old_env;
>>
>> /* The way to manipulate stack is with the sigaltstack function. We
>> * prepare a stack, with it delivering a signal to ourselves and then
>
> Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
>
> I think I must have missed this one when I converted all the jmp_buf
> to sigjmp_buf in commit 6ab7e546.
Useful bit of information, perhaps you can amend the commit message with
it on commit.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [Qemu-trivial] [Qemu-devel] [PATCH] coroutine-sigaltstack: Change jmp_buf to sigjmp_buf
2014-11-08 15:26 ` Peter Maydell
@ 2014-11-11 8:08 ` Michael Tokarev
-1 siblings, 0 replies; 8+ messages in thread
From: Michael Tokarev @ 2014-11-11 8:08 UTC (permalink / raw)
To: Peter Maydell, Willem Pinckaers; +Cc: QEMU Trivial, QEMU Developers
Applied to -trivial, adding Peter's comment.
Thanks,
/mjt
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2014-11-11 8:09 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-11-08 3:51 [Qemu-trivial] [PATCH] coroutine-sigaltstack: Change jmp_buf to sigjmp_buf Willem Pinckaers
2014-11-08 3:51 ` [Qemu-devel] " Willem Pinckaers
2014-11-08 15:26 ` [Qemu-trivial] " Peter Maydell
2014-11-08 15:26 ` Peter Maydell
2014-11-10 8:18 ` [Qemu-trivial] " Markus Armbruster
2014-11-10 8:18 ` Markus Armbruster
2014-11-11 8:08 ` [Qemu-trivial] " Michael Tokarev
2014-11-11 8:08 ` [Qemu-devel] [Qemu-trivial] " Michael Tokarev
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.