Re: [PATCH] drm/amdgpu/atom: Work around vbios NULL offset false positive

2025-04-22 Thread Alex Deucher
On Tue, Apr 22, 2025 at 10:56 AM Kees Cook wrote: > > On Tue, Apr 22, 2025 at 09:22:26AM -0400, Alex Deucher wrote: > > On Mon, Apr 21, 2025 at 5:59 PM Kees Cook wrote: > > > > > > GCC really does not want to consider NULL (or near-NULL) addresses as > > > valid, so calculations based off of NULL

Re: [PATCH] drm/amdgpu/atom: Work around vbios NULL offset false positive

2025-04-22 Thread Kees Cook
On Tue, Apr 22, 2025 at 09:22:26AM -0400, Alex Deucher wrote: > On Mon, Apr 21, 2025 at 5:59 PM Kees Cook wrote: > > > > GCC really does not want to consider NULL (or near-NULL) addresses as > > valid, so calculations based off of NULL end up getting range-tracked into > > being an offset wthin a

Re: [PATCH] drm/amdgpu/atom: Work around vbios NULL offset false positive

2025-04-22 Thread Alex Deucher
On Mon, Apr 21, 2025 at 5:59 PM Kees Cook wrote: > > GCC really does not want to consider NULL (or near-NULL) addresses as > valid, so calculations based off of NULL end up getting range-tracked into > being an offset wthin a 0 byte array. It gets especially mad about this: > > if

[PATCH] drm/amdgpu/atom: Work around vbios NULL offset false positive

2025-04-21 Thread Kees Cook
GCC really does not want to consider NULL (or near-NULL) addresses as valid, so calculations based off of NULL end up getting range-tracked into being an offset wthin a 0 byte array. It gets especially mad about this: if (vbios_str == NULL) vbios_str += size