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: <456ea437-fe6c-474f-bd9f-583c6fce9151@arm.com>
Date: Wed, 16 Oct 2024 15:43:50 +0100
From: Ryan Roberts <ryan.roberts@....com>
To: "David S. Miller" <davem@...emloft.net>,
 Andrew Morton <akpm@...ux-foundation.org>,
 Anshuman Khandual <anshuman.khandual@....com>,
 Ard Biesheuvel <ardb@...nel.org>, Catalin Marinas <catalin.marinas@....com>,
 David Hildenbrand <david@...hat.com>, Eric Dumazet <edumazet@...gle.com>,
 Greg Marsden <greg.marsden@...cle.com>, Ivan Ivanov <ivan.ivanov@...e.com>,
 Jakub Kicinski <kuba@...nel.org>, Kalesh Singh <kaleshsingh@...gle.com>,
 Marc Zyngier <maz@...nel.org>, Mark Rutland <mark.rutland@....com>,
 Matthias Brugger <mbrugger@...e.com>, Miroslav Benes <mbenes@...e.cz>,
 Paolo Abeni <pabeni@...hat.com>, Will Deacon <will@...nel.org>,
 Przemek Kitszel <przemyslaw.kitszel@...el.com>,
 Tony Nguyen <anthony.l.nguyen@...el.com>
Cc: intel-wired-lan@...ts.osuosl.org, linux-arm-kernel@...ts.infradead.org,
 linux-kernel@...r.kernel.org, linux-mm@...ck.org, netdev@...r.kernel.org
Subject: Re: [RFC PATCH v1 27/57] net: e1000: Remove PAGE_SIZE compile-time
 constant assumption

+ Przemek Kitszel, Tony Nguyen

This was a rather tricky series to get the recipients correct for and my script
did not realize that "supporter" was a pseudonym for "maintainer" so you were
missed off the original post. Appologies!

More context in cover letter:
https://lore.kernel.org/all/20241014105514.3206191-1-ryan.roberts@arm.com/


On 14/10/2024 11:58, Ryan Roberts wrote:
> To prepare for supporting boot-time page size selection, refactor code
> to remove assumptions about PAGE_SIZE being compile-time constant. Code
> intended to be equivalent when compile-time page size is active.
> 
> Convert CPP conditionals to C conditionals. The compiler will dead code
> strip when doing a compile-time page size build, for the same end
> effect. But this will also work with boot-time page size builds.
> 
> Signed-off-by: Ryan Roberts <ryan.roberts@....com>
> ---
> 
> ***NOTE***
> Any confused maintainers may want to read the cover note here for context:
> https://lore.kernel.org/all/20241014105514.3206191-1-ryan.roberts@arm.com/
> 
>  drivers/net/ethernet/intel/e1000/e1000_main.c | 6 ++----
>  1 file changed, 2 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/net/ethernet/intel/e1000/e1000_main.c b/drivers/net/ethernet/intel/e1000/e1000_main.c
> index ab7ae418d2948..cc14788f5bb04 100644
> --- a/drivers/net/ethernet/intel/e1000/e1000_main.c
> +++ b/drivers/net/ethernet/intel/e1000/e1000_main.c
> @@ -3553,12 +3553,10 @@ static int e1000_change_mtu(struct net_device *netdev, int new_mtu)
>  
>  	if (max_frame <= E1000_RXBUFFER_2048)
>  		adapter->rx_buffer_len = E1000_RXBUFFER_2048;
> -	else
> -#if (PAGE_SIZE >= E1000_RXBUFFER_16384)
> +	else if (PAGE_SIZE >= E1000_RXBUFFER_16384)
>  		adapter->rx_buffer_len = E1000_RXBUFFER_16384;
> -#elif (PAGE_SIZE >= E1000_RXBUFFER_4096)
> +	else if (PAGE_SIZE >= E1000_RXBUFFER_4096)
>  		adapter->rx_buffer_len = PAGE_SIZE;
> -#endif
>  
>  	/* adjust allocation if LPE protects us, and we aren't using SBP */
>  	if (!hw->tbi_compatibility_on &&


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ