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:   Fri, 08 Apr 2022 13:26:50 +0000
From:   Simon Ser <contact@...rsion.fr>
To:     Grigory Vasilyev <h0tc0d3@...il.com>
Cc:     Bas Nieuwenhuizen <bas@...nieuwenhuizen.nl>,
        Rodrigo Siqueira <Rodrigo.Siqueira@....com>,
        Melissa Wen <mwen@...lia.com>,
        Alex Deucher <alexander.deucher@....com>,
        Christian König <christian.koenig@....com>,
        "Pan, Xinhui" <Xinhui.Pan@....com>,
        David Airlie <airlied@...ux.ie>,
        Daniel Vetter <daniel@...ll.ch>,
        Michel Dänzer <mdaenzer@...hat.com>,
        Evan Quan <evan.quan@....com>,
        Sean Paul <seanpaul@...omium.org>,
        Qingqing Zhuo <qingqing.zhuo@....com>,
        amd-gfx mailing list <amd-gfx@...ts.freedesktop.org>,
        ML dri-devel <dri-devel@...ts.freedesktop.org>,
        LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] drm/amdgpu: Fix NULL pointer dereference

On Friday, April 8th, 2022 at 15:21, Grigory Vasilyev <h0tc0d3@...il.com> wrote:

> Simon Ser and Bas Nieuwenhuizen, do you understand that you are
> proposing to make the code less safe in the future? In the future,
> someone might rewrite the code and we'll get an error.

I don't think we should blindly add NULL checks for all functions which
take a pointer as argument. This makes it way more complicated to find
a bug when the function is mis-used. Crashing is better because it
indicates a programmer error. In the future, any new call with a NULL
pointer will produce a clear error.

Using pointers for output values is a common pattern in C, it allows a
function to return multiple values.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ