lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Mon, 11 Mar 2024 18:33:25 +0800
From: Dawei Li <dawei.li@...ngroup.cn>
To: geert@...ux-m68k.org
Cc: linux-m68k@...ts.linux-m68k.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] m68k: Calculate THREAD_SIZE from THREAD_SIZE_ORDER

Hi Geert,

On Mon, Mar 04, 2024 at 04:54:55PM +0800, Dawei Li wrote:
> Current THREAD_SIZE_OERDER implementatin is not generic for common case.
> 
> Improve it by:
> - Define THREAD_SIZE_ORDER by specific platform configs.
> - Calculate THREAD_SIZE by THREAD_SIZE_ORDER.
> 
> Suggested-by: Geert Uytterhoeven <geert@...ux-m68k.org>
> Signed-off-by: Dawei Li <dawei.li@...ngroup.cn>
> ---
> 
> V1 -> V2:
> - Remove ilog2().
> - Calculate THREAD_SIZE by THREAD_SIZE_ORDER.
> 
> V1:
> https://lore.kernel.org/lkml/20240228085824.74639-1-dawei.li@shingroup.cn/
> 
>  arch/m68k/include/asm/thread_info.h | 9 +++++----
>  1 file changed, 5 insertions(+), 4 deletions(-)
> 
> diff --git a/arch/m68k/include/asm/thread_info.h b/arch/m68k/include/asm/thread_info.h
> index 31be2ad999ca..3e31adbddc75 100644
> --- a/arch/m68k/include/asm/thread_info.h
> +++ b/arch/m68k/include/asm/thread_info.h
> @@ -12,14 +12,15 @@
>   */
>  #if PAGE_SHIFT < 13
>  #ifdef CONFIG_4KSTACKS
> -#define THREAD_SIZE	4096
> +#define THREAD_SIZE_ORDER	0
>  #else
> -#define THREAD_SIZE	8192
> +#define THREAD_SIZE_ORDER	1
>  #endif
>  #else
> -#define THREAD_SIZE	PAGE_SIZE
> +#define THREAD_SIZE_ORDER	0
>  #endif
> -#define THREAD_SIZE_ORDER	((THREAD_SIZE / PAGE_SIZE) - 1)
> +
> +#define THREAD_SIZE	(PAGE_SIZE << THREAD_SIZE_ORDER)
>  
>  #ifndef __ASSEMBLY__
>  

Sorry to bother, but any comments on this version?

I know it's awkward cuz it's in middle of merge window, sorry for that.

Thanks,

    Dawei

> -- 
> 2.27.0
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ