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: <CAHmME9rZuQdWtAfiQUw9UG-P4TwhKNkSjajXM_S+0sKY7BiQpQ@mail.gmail.com>
Date:	Mon, 29 Jun 2015 16:00:42 +0200
From:	"Jason A. Donenfeld" <Jason@...c4.com>
To:	Eric Dumazet <eric.dumazet@...il.com>
Cc:	"David S. Miller" <davem@...emloft.net>,
	Eric Dumazet <edumazet@...gle.com>, netdev@...r.kernel.org,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH] sock: honor GFP_ATOMIC when allocating send skbs

Hi Eric,

Thanks for your feedback on this. The precise problem is a BUG in the
scheduler code when sleep is called from atomic context, due to having
to wait on that allocation. This is triggered by a module I'm writing.

I'm probably doing something I shouldn't... I'm calling udp_sendmsg
from atomic context: bad news bears, right? Really what I'd like to do
is create an skb with headroom, fill it with data, and then hand it
off to the udp/ip stack to prepend the udp and ip headers and
calculate the flowi4 and correct dev and checksums for the skb. But I
can't seem to find a correct API for this. So instead I'm using a
socket and calling sendmsg on it, which unfortunately winds up in an
extra allocation and a memcpy when sending. Might there be a better
way to do what I want? That is: pass a buffer off to the networking
stack, a) with zero copies [without having to use sendpage], and b)
from atomic context. I'd like to avoid using workqueues/kthreads/etc
if possible.

Thanks,
Jason
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ