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]
Message-ID: <20211227180219.4fdaaeca@kicinski-fedora-PC1C0HJN.hsd1.ca.comcast.net>
Date:   Mon, 27 Dec 2021 18:02:19 -0800
From:   Jakub Kicinski <kuba@...nel.org>
To:     Zhaoyang Huang <huangzhaoyang@...il.com>
Cc:     "David S. Miller" <davem@...emloft.net>,
        Zhaoyang Huang <zhaoyang.huang@...soc.com>,
        netdev@...r.kernel.org, LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] net: remove judgement based on gfp_flags

On Mon, 27 Dec 2021 15:38:31 +0800 Zhaoyang Huang wrote:
> On Mon, Dec 27, 2021 at 2:14 PM Zhaoyang Huang <huangzhaoyang@...il.com> wrote:
> > On Fri, Dec 24, 2021 at 1:11 AM Jakub Kicinski <kuba@...nel.org> wrote:
> > > This is checking if we can sleep AFAICT. What are you trying to fix?
> > Yes and NO. gfp means *get free pages* which indicate if the embedded
> > memory allocation among the process can sleep or not, but without any
> > other meanings. The driver which invokes this function could have to
> > use GFP_KERNEL for allocating memory as the critical resources but
> > don't want to sleep on the netlink's congestion.

Let's focus on explaining the problem you're trying to solve.
What's the driver you're talking about? Why does it have to
pay attention to the innards of netlink? Details, please.

> Since unique block flags(msg_flags & MSG_DONTWAIT) work as parameters
> for unicast, could we introduce it to broadcast, instead of abusing
> gfp_flag.
> 
>  static int netlink_sendmsg(struct socket *sock, struct msghdr *msg, size_t len)
>  {
> ...
>          if (dst_group) {
>                  refcount_inc(&skb->users);
>                  netlink_broadcast(sk, skb, dst_portid, dst_group, GFP_KERNEL);
>          }
>          err = netlink_unicast(sk, skb, dst_portid, msg->msg_flags & MSG_DONTWAIT);

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ