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  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]
Date:   Wed, 6 May 2020 08:47:25 +0200
From:   Greg KH <gregkh@...uxfoundation.org>
To:     ashwin-h <ashwinh@...are.com>
Cc:     vyasevich@...il.com, nhorman@...driver.com, davem@...emloft.net,
        linux-sctp@...r.kernel.org, netdev@...r.kernel.org,
        linux-kernel@...r.kernel.org, srivatsab@...are.com,
        srivatsa@...il.mit.edu, rostedt@...dmis.org, srostedt@...are.com,
        ashwin.hiranniah@...il.com, Xin Long <lucien.xin@...il.com>
Subject: Re: [PATCH 1/2] sctp: implement memory accounting on tx path

On Wed, May 06, 2020 at 07:50:53PM +0530, ashwin-h wrote:
> From: Xin Long <lucien.xin@...il.com>
> 
> commit 1033990ac5b2ab6cee93734cb6d301aa3a35bcaa upstream.
> 
> Now when sending packets, sk_mem_charge() and sk_mem_uncharge() have been
> used to set sk_forward_alloc. We just need to call sk_wmem_schedule() to
> check if the allocated should be raised, and call sk_mem_reclaim() to
> check if the allocated should be reduced when it's under memory pressure.
> 
> If sk_wmem_schedule() returns false, which means no memory is allowed to
> allocate, it will block and wait for memory to become available.
> 
> Note different from tcp, sctp wait_for_buf happens before allocating any
> skb, so memory accounting check is done with the whole msg_len before it
> too.
> 
> Reported-by: Matteo Croce <mcroce@...hat.com>
> Tested-by: Matteo Croce <mcroce@...hat.com>
> Acked-by: Neil Horman <nhorman@...driver.com>
> Acked-by: Marcelo Ricardo Leitner <marcelo.leitner@...il.com>
> Signed-off-by: Xin Long <lucien.xin@...il.com>
> Signed-off-by: David S. Miller <davem@...emloft.net>
> Signed-off-by: Ashwin H <ashwinh@...are.com>
> ---
>  net/sctp/socket.c | 10 ++++++++--
>  1 file changed, 8 insertions(+), 2 deletions(-)

<formletter>

This is not the correct way to submit patches for inclusion in the
stable kernel tree.  Please read:
    https://www.kernel.org/doc/html/latest/process/stable-kernel-rules.html
for how to do this properly.

</formletter>

Powered by blists - more mailing lists