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: Tue, 19 Dec 2023 23:47:42 +0200
From: Andy Shevchenko <>
To: Tanzir Hasan <>
Cc: Kees Cook <>, Nick DeSaulniers <>, 
	Andy Shevchenko <>,,, Andrew Morton <>,, Al Viro <>
Subject: Re: [PATCH v4 1/2] kernel.h: removed REPEAT_BYTE from kernel.h

On Tue, Dec 19, 2023 at 8:10 PM Tanzir Hasan <> wrote:
> This patch creates wordpart.h and includes it in asm/word-at-a-time.h
> for the all architectures. WORD_AT_A_TIME_CONSTANTS depends on kernel.h

for all

("all" doesn't go with article)

> because of REPEAT_BYTE. Moving this to another header and including it
> where necessary allows us to not include the bloated kernel.h. Making
> this implicit dependency on REPEAT_BYTE explicit allows for later
> improvements in the lib/string.c inclusion list.


> --- a/arch/arm/include/asm/word-at-a-time.h
> +++ b/arch/arm/include/asm/word-at-a-time.h

> -#include <linux/kernel.h>
> +#include <linux/wordpart.h>

No, please, read what I told you carefully.


> --- a/arch/x86/include/asm/word-at-a-time.h
> +++ b/arch/x86/include/asm/word-at-a-time.h
> @@ -3,6 +3,7 @@
>  #define _ASM_WORD_AT_A_TIME_H
>  #include <linux/kernel.h>

No, the macros used in this file doesn't require (after your patch)
the kernel.h, these are in particular in asm/asm.h and
asm/extable_fixup_types.h. I haven't looked at this closely to find a
common header that kinda guarantees those two to be included.
Otherwise we can use them directly.

> +#include <linux/wordpart.h>


>  #include <linux/init.h>
>  #include <linux/export.h>
> -#include <linux/kernel.h>
> +#include <linux/wordpart.h>

Try to keep it more or less ordered. At list with given context it
goes either after the slab.h or below (after those starting with 'f').

>  #include <linux/slab.h>
>  #include <linux/fs.h>
>  #include <linux/filelock.h>


> --- a/include/asm-generic/word-at-a-time.h
> +++ b/include/asm-generic/word-at-a-time.h
> @@ -2,7 +2,7 @@
>  #ifndef _ASM_WORD_AT_A_TIME_H
>  #define _ASM_WORD_AT_A_TIME_H
> -#include <linux/kernel.h>
> +#include <linux/wordpart.h>
>  #include <asm/byteorder.h>

Same as in the above remark, read what I said in the previous round of reviews.

With Best Regards,
Andy Shevchenko

Powered by blists - more mailing lists