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]
Date: Tue, 2 Jan 2024 17:50:31 +0100
From: Markus Elfring <Markus.Elfring@....de>
To: Matthew Wilcox <willy@...radead.org>, virtualization@...ts.linux.dev,
 linux-fsdevel@...r.kernel.org, kernel-janitors@...r.kernel.org
Cc: Miklos Szeredi <miklos@...redi.hu>, Stefan Hajnoczi
 <stefanha@...hat.com>, Vivek Goyal <vgoyal@...hat.com>,
 LKML <linux-kernel@...r.kernel.org>
Subject: Re: [2/2] virtiofs: Improve error handling in virtio_fs_get_tree()

>> It is probably clear that the function call “kfree(NULL)” does not perform
>> data processing which is really useful for the caller.
>> Such a call is kept in some cases because programmers did not like to invest
>> development resources for its avoidance.
>
> on the contrary, it is extremely useful for callers to not have to perform
> the NULL check themselves.

Some function calls indicate a resource allocation failure by a null pointer.
Such pointer checks are generally performed for error detection
so that appropriate exception handling can be chosen.


>                             It also mirrors userspace where free(NULL)
> is valid according to ISO/ANSI C, so eases the transition for programmers
> who are coming from userspace.  It costs nothing in the implementation
> as it is part of the check for the ZERO_PTR.

How many development efforts do you dare to spend on more complete
and efficient error/exception handling?

Regards,
Markus

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ