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] [day] [month] [year] [list]
Message-ID: <g7ymicehyrtnmepvpupzpds7yv3v53h3oui4sbcb5njcwsmigq@x5gtxzyw5tc6>
Date: Fri, 20 Jun 2025 18:49:51 +0200
From: Klara Modin <klarasmodin@...il.com>
To: Herbert Xu <herbert@...dor.apana.org.au>
Cc: Andrew Morton <akpm@...ux-foundation.org>, 
	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>, Song Liu <song@...nel.org>, Yu Kuai <yukuai3@...wei.com>, 
	linux-raid@...r.kernel.org
Subject: Re: [v2 PATCH] lib/raid6: Replace custom zero page with ZERO_PAGE

Hi,

On 2025-03-17 17:02:28 +0800, Herbert Xu wrote:
> Use the system-wide zero page instead of a custom zero page.
> 
> Signed-off-by: Herbert Xu <herbert@...dor.apana.org.au>
> 

...
> diff --git a/include/linux/raid/pq.h b/include/linux/raid/pq.h
> index 98030accf641..428ca76e4deb 100644
> --- a/include/linux/raid/pq.h
> +++ b/include/linux/raid/pq.h
> @@ -11,8 +11,13 @@
>  #ifdef __KERNEL__
>  
>  #include <linux/blkdev.h>
> +#include <linux/mm.h>
>  
> -extern const char raid6_empty_zero_page[PAGE_SIZE];
> +/* This should be const but the raid6 code is too convoluted for that. */
> +static inline void *raid6_get_zero_page(void)
> +{
> +	return page_address(ZERO_PAGE(0));
> +}
>  
>  #else /* ! __KERNEL__ */
>  /* Used for testing in user space */
> @@ -186,6 +191,11 @@ static inline uint32_t raid6_jiffies(void)
>  	return tv.tv_sec*1000 + tv.tv_usec/1000;
>  }
>  
> +static inline void *raid6_get_zero_page(void)
> +{
> +	return raid6_empty_zero_page;
> +}
> +
>  #endif /* ! __KERNEL__ */
>  
>  #endif /* LINUX_RAID_RAID6_H */
...

Note that an RISC-V vector syndrome implementation was added in commit
6093faaf9593 ("raid6: Add RISC-V SIMD syndrome and recovery calculations")
which this patch does not change.

Regards,
Klara Modin

Link: https://lore.kernel.org/r/20250305083707.74218-1-zhangchunyan@iscas.ac.cn

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ