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: <20170110.210013.2057547033044168090.davem@davemloft.net>
Date:   Tue, 10 Jan 2017 21:00:13 -0500 (EST)
From:   David Miller <davem@...emloft.net>
To:     david.lebrun@...ouvain.be
Cc:     netdev@...r.kernel.org
Subject: Re: [PATCH net] ipv6: sr: fix BUG in HMAC init when preemption is
 enabled

From: David Lebrun <david.lebrun@...ouvain.be>
Date: Tue, 10 Jan 2017 14:39:22 +0100

> When CONFIG_PREEMPT=y, CONFIG_IPV6=m and CONFIG_SEG6_HMAC=y,
> seg6_hmac_init() is called during the initialization of the ipv6 module.
> This causes a subsequent call to smp_processor_id() with preemption
> enabled, resulting in the following trace.
 ...
> This patch disable BHs in seg6_hmac_init() and seg6_hmac_exit(). BHs are
> re-enabled for the call to crypto_alloc_shash. Indeed, this function might
> call try_module_get(), which cannot be called in atomic context.
> 
> Signed-off-by: David Lebrun <david.lebrun@...ouvain.be>
 ...
> -		char *ring = kzalloc(SEG6_HMAC_RING_SIZE, GFP_KERNEL);
> +		char *ring = kzalloc(SEG6_HMAC_RING_SIZE, GFP_ATOMIC);

I agree with Eric that moving to GFP_ATOMIC in this spots is a major step
backwards, and that fixing the per-cpu access during this initializer
is a much better direction to go.

Thanks.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ