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]
Date: Fri, 22 Mar 2024 08:03:37 -0700
From: Jakub Kicinski <kuba@...nel.org>
To: Julia Lawall <julia.lawall@...ia.fr>
Cc: Jesse Brandeburg <jesse.brandeburg@...el.com>, Andy Shevchenko
 <andriy.shevchenko@...ux.intel.com>, Dan Carpenter
 <dan.carpenter@...aro.org>, kernel-janitors@...r.kernel.org,
 netdev@...r.kernel.org, intel-wired-lan@...ts.osuosl.org, Maciej
 Fijalkowski <maciej.fijalkowski@...el.com>, Przemek Kitszel
 <przemyslaw.kitszel@...el.com>, Tony Nguyen <anthony.l.nguyen@...el.com>,
 LKML <linux-kernel@...r.kernel.org>, Alexander Lobakin
 <aleksander.lobakin@...el.com>, David Laight <David.Laight@...lab.com>,
 "David S. Miller" <davem@...emloft.net>, Eric Dumazet
 <edumazet@...gle.com>, Jiri Pirko <jiri@...nulli.us>, Jonathan Cameron
 <jic23@...nel.org>, Kees Cook <keescook@...omium.org>, Lukasz Czapnik
 <lukasz.czapnik@...el.com>, Paolo Abeni <pabeni@...hat.com>, Pucha
 Himasekhar Reddy <himasekharx.reddy.pucha@...el.com>, Dan Williams
 <dan.j.williams@...el.com>
Subject: Re: [PATCH net] ice: Fix freeing uninitialized pointers

On Fri, 22 Mar 2024 03:24:56 -0400 (EDT) Julia Lawall wrote:
> > At present I find this construct unreadable.
> > I may get used to it, hard to say.
> >
> > Also I don't see the benefit of the auto-freeing construct,
> > I'd venture a guess that all the bugs it may prevent would
> > have been caught by smatch. But I'm an old curmudgeon stuck
> > in my ways. Feel free to experiment in Intel drivers, and we'll
> > see how it works out 🤷️  
> 
> In my experiments with of_node_put, there seem to be many functions where
> removing the frees makes the function much more readable.  But
> kmalloc/kfree may be used in different contexts, where the management of
> the memory is a smaller percentage of the overall code.  So the tradeoffs
> may be different.

Good point! References are likely a very good use case for this sort
of thing. The act of bumping a counter lacks the feeling of lifetime
we get with an object :(

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ