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] [thread-next>] [day] [month] [year] [list]
Date:   Mon, 25 Oct 2021 19:09:54 -0400
From:   Soheil Hassas Yeganeh <soheil@...gle.com>
To:     Eric Dumazet <eric.dumazet@...il.com>
Cc:     "David S . Miller" <davem@...emloft.net>,
        Jakub Kicinski <kuba@...nel.org>,
        netdev <netdev@...r.kernel.org>,
        Eric Dumazet <edumazet@...gle.com>
Subject: Re: [PATCH net-next 3/3] tcp: remove unneeded code from tcp_stream_alloc_skb()

On Mon, Oct 25, 2021 at 6:13 PM Eric Dumazet <eric.dumazet@...il.com> wrote:
>
> From: Eric Dumazet <edumazet@...gle.com>
>
> Aligning @size argument to 4 bytes is not needed.
>
> The header alignment has nothing to do with @size.
>
> It really depends on skb->head alignment and MAX_TCP_HEADER.
>
> Signed-off-by: Eric Dumazet <edumazet@...gle.com>

Acked-by: Soheil Hassas Yeganeh <soheil@...gle.com>

> ---
>  net/ipv4/tcp.c | 3 ---
>  1 file changed, 3 deletions(-)
>
> diff --git a/net/ipv4/tcp.c b/net/ipv4/tcp.c
> index 121400557fde898283a8eae3b09d93479c4a089e..0a27b7ef1a9db8aea8d98cff4b8ab7092994febd 100644
> --- a/net/ipv4/tcp.c
> +++ b/net/ipv4/tcp.c
> @@ -861,9 +861,6 @@ struct sk_buff *tcp_stream_alloc_skb(struct sock *sk, int size, gfp_t gfp,
>  {
>         struct sk_buff *skb;
>
> -       /* The TCP header must be at least 32-bit aligned.  */
> -       size = ALIGN(size, 4);
> -
>         if (unlikely(tcp_under_memory_pressure(sk)))
>                 sk_mem_reclaim_partial(sk);
>
> --
> 2.33.0.1079.g6e70778dc9-goog
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ