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: <YUw1gSB2vo8XMUon@kroah.com>
Date:   Thu, 23 Sep 2021 10:06:25 +0200
From:   Greg Kroah-Hartman <gregkh@...uxfoundation.org>
To:     Florian Fainelli <f.fainelli@...il.com>
Cc:     linux-kernel@...r.kernel.org, Sasha Levin <sashal@...nel.org>,
        stable@...r.kernel.org,
        Konrad Rzeszutek Wilk <konrad.wilk@...cle.com>,
        Russell King <linux@...linux.org.uk>,
        Mike Rapoport <rppt@...nel.org>,
        Andrew Morton <akpm@...ux-foundation.org>,
        Ard Biesheuvel <ardb@...nel.org>,
        Max Filippov <jcmvbkbc@...il.com>,
        "moderated list:ARM PORT" <linux-arm-kernel@...ts.infradead.org>
Subject: Re: [PATCH stable 5.10] ARM: Qualify enabling of swiotlb_init()

On Wed, Sep 22, 2021 at 05:14:24PM -0700, Florian Fainelli wrote:
> commit fcf044891c84e38fc90eb736b818781bccf94e38 upstream
> 
> We do not need a SWIOTLB unless we have DRAM that is addressable beyond
> the arm_dma_limit. Compare max_pfn with arm_dma_pfn_limit to determine
> whether we do need a SWIOTLB to be initialized.
> 
> Fixes: ad3c7b18c5b3 ("arm: use swiotlb for bounce buffering on LPAE configs")
> Signed-off-by: Florian Fainelli <f.fainelli@...il.com>
> Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@...cle.com>
> ---
>  arch/arm/mm/init.c | 6 +++++-
>  1 file changed, 5 insertions(+), 1 deletion(-)
> 
> diff --git a/arch/arm/mm/init.c b/arch/arm/mm/init.c
> index d54d69cf1732..75f3ab531bdf 100644
> --- a/arch/arm/mm/init.c
> +++ b/arch/arm/mm/init.c
> @@ -378,7 +378,11 @@ static void __init free_highpages(void)
>  void __init mem_init(void)
>  {
>  #ifdef CONFIG_ARM_LPAE
> -	swiotlb_init(1);
> +	if (swiotlb_force == SWIOTLB_FORCE ||
> +	    max_pfn > arm_dma_pfn_limit)
> +		swiotlb_init(1);
> +	else
> +		swiotlb_force = SWIOTLB_NO_FORCE;
>  #endif
>  
>  	set_max_mapnr(pfn_to_page(max_pfn) - mem_map);
> -- 
> 2.25.1
> 

Both now queued up, thanks.

greg k-h

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ