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: <0a742aa1-572f-a62f-677f-af430d47a19c@shipmail.org>
Date:   Fri, 9 Apr 2021 09:43:32 +0200
From:   Thomas Hellström (Intel) 
        <thomas_os@...pmail.org>
To:     Zack Rusin <zackr@...are.com>, linux-kernel@...r.kernel.org
Cc:     Andrew Morton <akpm@...ux-foundation.org>, linux-mm@...ck.org
Subject: Re: [PATCH] mm/mapping_dirty_helpers: Guard hugepage pud's usage


On 4/8/21 9:15 PM, Zack Rusin wrote:
> Lets make sure we don't use pud hugepage helpers on architectures
> which do not support it. This fixes the code on arm64.
nits:

Perhaps be a little more specific about what it fixes? I figure it's a 
compilation failure?
Also please use imperative form: "Fix the code arm64" rather than "This 
fixes the code on arm64"

Other than that LGTM.

Reviewed-by: Thomas Hellström (Intel) <thomas_os@...pmail.org>


>
> Signed-off-by: Zack Rusin <zackr@...are.com>
> Cc: Andrew Morton <akpm@...ux-foundation.org>
> Cc: Thomas Hellström (Intel) <thomas_os@...pmail.org>
> Cc: linux-mm@...ck.org
> Cc: linux-kernel@...r.kernel.org
> ---
>   mm/mapping_dirty_helpers.c | 2 ++
>   1 file changed, 2 insertions(+)
>
> diff --git a/mm/mapping_dirty_helpers.c b/mm/mapping_dirty_helpers.c
> index b59054ef2e10..b890854ec761 100644
> --- a/mm/mapping_dirty_helpers.c
> +++ b/mm/mapping_dirty_helpers.c
> @@ -165,10 +165,12 @@ static int wp_clean_pud_entry(pud_t *pud, unsigned long addr, unsigned long end,
>   		return 0;
>   	}
>   
> +#ifdef CONFIG_HAVE_ARCH_TRANSPARENT_HUGEPAGE_PUD
>   	/* Huge pud */
>   	walk->action = ACTION_CONTINUE;
>   	if (pud_trans_huge(pudval) || pud_devmap(pudval))
>   		WARN_ON(pud_write(pudval) || pud_dirty(pudval));
> +#endif
>   
>   	return 0;
>   }

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ