linux-riscv.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] RISC-V: Double the stack size on rv64
@ 2020-07-14  1:19 Palmer Dabbelt
  2020-07-14  5:32 ` Andreas Schwab
  2020-07-14  8:16 ` Colin Ian King
  0 siblings, 2 replies; 4+ messages in thread
From: Palmer Dabbelt @ 2020-07-14  1:19 UTC (permalink / raw)
  To: colin.king, schwab, david.abdurachmanov, dvyukov
  Cc: linux-riscv, Palmer Dabbelt, stable

This was suggested in the syzkaller thread as a fix for a bunch of issues.  It
seems in line with what other architectures are doing, and while I haven't
personally figured out how to reproduce the issues they seem believable enough
to just change it.

Fixes: 7db91e57a0ac ("RISC-V: Task implementation")
Cc: stable@vger.kernel.org
Signed-off-by: Palmer Dabbelt <palmerdabbelt@google.com>
---
I've put this on fixes as I don't see a patch from anyone on that thread, and
it seems straight-forward enough to just do it.  If there's any issues I'm
happy to listen, otherwise this is going up later this week.
---
 arch/riscv/include/asm/thread_info.h | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/arch/riscv/include/asm/thread_info.h b/arch/riscv/include/asm/thread_info.h
index 1dd12a0cbb2b..2026076b1d30 100644
--- a/arch/riscv/include/asm/thread_info.h
+++ b/arch/riscv/include/asm/thread_info.h
@@ -12,7 +12,11 @@
 #include <linux/const.h>
 
 /* thread information allocation */
+#if defined(CONFIG_32BIT)
 #define THREAD_SIZE_ORDER	(1)
+#elif defined(CONFIG_64BIT)
+#define THREAD_SIZE_ORDER   (2)
+#endif
 #define THREAD_SIZE		(PAGE_SIZE << THREAD_SIZE_ORDER)
 
 #ifndef __ASSEMBLY__
-- 
2.27.0.389.gc38d7665816-goog


_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] RISC-V: Double the stack size on rv64
  2020-07-14  1:19 [PATCH] RISC-V: Double the stack size on rv64 Palmer Dabbelt
@ 2020-07-14  5:32 ` Andreas Schwab
  2020-07-14 21:37   ` Palmer Dabbelt
  2020-07-14  8:16 ` Colin Ian King
  1 sibling, 1 reply; 4+ messages in thread
From: Andreas Schwab @ 2020-07-14  5:32 UTC (permalink / raw)
  To: Palmer Dabbelt
  Cc: colin.king, linux-riscv, stable, dvyukov, david.abdurachmanov

On Jul 13 2020, Palmer Dabbelt wrote:

> This was suggested in the syzkaller thread as a fix for a bunch of issues.  It
> seems in line with what other architectures are doing, and while I haven't
> personally figured out how to reproduce the issues they seem believable enough
> to just change it.
>
> Fixes: 7db91e57a0ac ("RISC-V: Task implementation")
> Cc: stable@vger.kernel.org
> Signed-off-by: Palmer Dabbelt <palmerdabbelt@google.com>
> ---
> I've put this on fixes as I don't see a patch from anyone on that thread, and
> it seems straight-forward enough to just do it.  If there's any issues I'm
> happy to listen, otherwise this is going up later this week.

See
<https://lore.kernel.org/linux-riscv/20200708145625.GA438@infradead.org/T/>.

Andreas.

-- 
Andreas Schwab, SUSE Labs, schwab@suse.de
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE  1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."

_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] RISC-V: Double the stack size on rv64
  2020-07-14  1:19 [PATCH] RISC-V: Double the stack size on rv64 Palmer Dabbelt
  2020-07-14  5:32 ` Andreas Schwab
@ 2020-07-14  8:16 ` Colin Ian King
  1 sibling, 0 replies; 4+ messages in thread
From: Colin Ian King @ 2020-07-14  8:16 UTC (permalink / raw)
  To: Palmer Dabbelt, schwab, david.abdurachmanov, dvyukov; +Cc: linux-riscv, stable

On 14/07/2020 02:19, Palmer Dabbelt wrote:
> This was suggested in the syzkaller thread as a fix for a bunch of issues.  It
> seems in line with what other architectures are doing, and while I haven't
> personally figured out how to reproduce the issues they seem believable enough
> to just change it.
> 
> Fixes: 7db91e57a0ac ("RISC-V: Task implementation")
> Cc: stable@vger.kernel.org
> Signed-off-by: Palmer Dabbelt <palmerdabbelt@google.com>
> ---
> I've put this on fixes as I don't see a patch from anyone on that thread, and
> it seems straight-forward enough to just do it.  If there's any issues I'm
> happy to listen, otherwise this is going up later this week.
> ---
>  arch/riscv/include/asm/thread_info.h | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/arch/riscv/include/asm/thread_info.h b/arch/riscv/include/asm/thread_info.h
> index 1dd12a0cbb2b..2026076b1d30 100644
> --- a/arch/riscv/include/asm/thread_info.h
> +++ b/arch/riscv/include/asm/thread_info.h
> @@ -12,7 +12,11 @@
>  #include <linux/const.h>
>  
>  /* thread information allocation */
> +#if defined(CONFIG_32BIT)
>  #define THREAD_SIZE_ORDER	(1)
> +#elif defined(CONFIG_64BIT)
> +#define THREAD_SIZE_ORDER   (2)
> +#endif
>  #define THREAD_SIZE		(PAGE_SIZE << THREAD_SIZE_ORDER)
>  
>  #ifndef __ASSEMBLY__
> 
FWIW, this fixes a gcov issue I was seeing.

_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] RISC-V: Double the stack size on rv64
  2020-07-14  5:32 ` Andreas Schwab
@ 2020-07-14 21:37   ` Palmer Dabbelt
  0 siblings, 0 replies; 4+ messages in thread
From: Palmer Dabbelt @ 2020-07-14 21:37 UTC (permalink / raw)
  To: schwab, Christoph Hellwig
  Cc: colin.king, linux-riscv, stable, dvyukov, david.abdurachmanov

On Mon, 13 Jul 2020 22:32:42 PDT (-0700), schwab@suse.de wrote:
> On Jul 13 2020, Palmer Dabbelt wrote:
>
>> This was suggested in the syzkaller thread as a fix for a bunch of issues.  It
>> seems in line with what other architectures are doing, and while I haven't
>> personally figured out how to reproduce the issues they seem believable enough
>> to just change it.
>>
>> Fixes: 7db91e57a0ac ("RISC-V: Task implementation")
>> Cc: stable@vger.kernel.org
>> Signed-off-by: Palmer Dabbelt <palmerdabbelt@google.com>
>> ---
>> I've put this on fixes as I don't see a patch from anyone on that thread, and
>> it seems straight-forward enough to just do it.  If there's any issues I'm
>> happy to listen, otherwise this is going up later this week.
>
> See
> <https://lore.kernel.org/linux-riscv/20200708145625.GA438@infradead.org/T/>.

Sorry, for some reason that didn't make my inbox.  I'm taking it instead (with
Anup's review and the stable stuff).  It's on fixes.

Christoph: Some sort of CONFIG_IRQSTACKS seems reasonable, as I'm assuming that
very small systems may want to try and save memory.  That seems like too
invasive of a change for rc6, and given this fixes some concrete issues I think
it's better to just take it for now and do the better version later.

I'll add it to my TODO list, though that's pretty long so if someone else wants
to take a look they're more than welcome to.

Thanks!

_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2020-07-14 21:37 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-14  1:19 [PATCH] RISC-V: Double the stack size on rv64 Palmer Dabbelt
2020-07-14  5:32 ` Andreas Schwab
2020-07-14 21:37   ` Palmer Dabbelt
2020-07-14  8:16 ` Colin Ian King

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).