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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Wed, 13 Mar 2024 17:01:57 +0300
From: Dmitry Antipov <dmantipov@...dex.ru>
To: Eric Dumazet <edumazet@...gle.com>
Cc: Oliver Hartkopp <socketcan@...tkopp.net>,
 Marc Kleine-Budde <mkl@...gutronix.de>, linux-can@...r.kernel.org,
 netdev@...r.kernel.org
Subject: Re: [PATCH] can: gw: prefer kfree_rcu() over call_rcu() with
 cgw_job_free_rcu()

On 3/13/24 13:55, Eric Dumazet wrote:

> kmem_cache_free(struct kmem_cache *s, void *x) has additional checks
> to make sure the object @x was allocated
> from the @s kmem_cache.
> 
> Look for SLAB_CONSISTENCY_CHECKS and CONFIG_SLAB_FREELIST_HARDENED

Yes. Using kfree_rcu() bypasses these (optional) debugging/consistency
checks.

> Your patch is not 'trivial' as you think.

You're shifting from "not going to work" to "not trivial" so nicely.

> Otherwise, we will soon have dozen of patches submissions replacing
> kmem_cache_free() with kfree()

No. The question is about freeing on some (where the freeing callback
function is trivial) RCU-protected paths only.

Dmitry


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ