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: <20240716153432.4024a180@rorschach.local.home>
Date: Tue, 16 Jul 2024 15:34:32 -0400
From: Steven Rostedt <rostedt@...dmis.org>
To: Nikita Kiryushin <kiryushin@...ud.ru>
Cc: Alexey Khoroshilov <khoroshilov@...ras.ru>,
 lvc-project@...uxtesting.org, linux-trace-kernel@...r.kernel.org, Mathieu
 Desnoyers <mathieu.desnoyers@...icios.com>, Masami Hiramatsu
 <mhiramat@...nel.org>, linux-kernel@...r.kernel.org
Subject: Re: [lvc-project] [PATCH] tracing: remove unreachable
 trace_array_put

On Tue, 16 Jul 2024 22:19:05 +0300
Nikita Kiryushin <kiryushin@...ud.ru> wrote:

> On 7/16/24 12:45, Alexey Khoroshilov wrote:
> > Yes, but there is another possible modification: replacement of call to
> > nonseekable_open() by a call to some other function that returns error.
> > Current code is already ready for such modification.  
> 
> The change of which function is called would change the behavior indeed, but,
> TBH, I do not see it as a valid point: If we assume that nonseekable_open() changes to something else in the future, we may assume as well that some other call will be
> added later with a risk of resource leaking. This is a thing, that whoever would do
> such changes should be careful about.
> 
> For me, the code as it is now, is not uniform with the other places that use
> nonseekable_open().

The point is moot. If something returns a value, even if it says it
will never return failure, there's no harm in checking it. If we ignore
the return value, that is a unneeded coupling of design between the
function and its users.

It does no harm in checking the value, so I rather just keep doing so.

-- Steve

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ