gned-off-by: Azeem Shaikh
Reviewed-by: Kees Cook
--
Kees Cook
gned-off-by: Azeem Shaikh
Reviewed-by: Kees Cook
--
Kees Cook
ffort to remove strlcpy() completely [2], replace
> strlcpy() here with strscpy().
> No return values were used, so direct replacement is safe.
>
> [...]
Applied to for-next/hardening, thanks!
[1/1] drm/amd/pm: Replace all non-returning strlcpy with strscpy
https://git.kernel.org/ke
ffort to remove strlcpy() completely [2], replace
> strlcpy() here with strscpy().
> No return values were used, so direct replacement is safe.
>
> [...]
Applied to for-next/hardening, thanks!
[1/1] drm/radeon: Replace all non-returning strlcpy with strscpy
https://git.kernel.org/ke
o
> > > > > Signed-off-by: Hamza Mahfooz
> > > > > ---
> > > > > v2: fix grammatical error
> > > > > ---
> > > > > drivers/gpu/drm/amd/display/Makefile | 2 ++
> > > > > 1 file changed, 2 insertions(+)
> > > > >
> > > > > diff --git a/drivers/gpu/drm/amd/display/Makefile
> > > > b/drivers/gpu/drm/amd/display/Makefile
> > > > > index 0d610cb376bb..3c44162ebe21 100644
> > > > > --- a/drivers/gpu/drm/amd/display/Makefile
> > > > > +++ b/drivers/gpu/drm/amd/display/Makefile
> > > > > @@ -26,6 +26,8 @@
> > > > >
> > > > > AMDDALPATH = $(RELATIVE_AMD_DISPLAY_PATH)
> > > > >
> > > > > +subdir-ccflags-y += -Werror -Wunused -Wmisleading-indentation
> > > > > +
> > > >
> > > > Care to enable this for the rest of amdgpu as well? Or send out an
> > > > additional patch to do that? Either way:
> > > > Reviewed-by: Alex Deucher
> > > >
> > > > Alex
> > > >
> > > > > subdir-ccflags-y += -I$(FULL_AMD_DISPLAY_PATH)/dc/inc/
> > > > > subdir-ccflags-y += -I$(FULL_AMD_DISPLAY_PATH)/dc/inc/hw
> > > > > subdir-ccflags-y += -I$(FULL_AMD_DISPLAY_PATH)/dc/clk_mgr
> > > > > --
> > > > > 2.40.1
> > > > >
> > > >
> --
> Hamza
>
--
Kees Cook
l;
> struct dmcu *dmcu = pipe_ctx->stream->ctx->dc->res_pool->dmcu;
> + uint32_t otg_inst;
> +
> + if (!abm && !tg && !panel_cntl)
> + return;
> +
> + otg_inst = tg->inst;
Is the "if" supposed to be using "||"s instead of "&&"s? I noticed
Coverity complained "tg may be NULL" for the "tg->inst" dereference...
-Kees
--
Kees Cook
Nathan Chancellor
>
Excellent! Thanks for doing this. I spot checked a handful I was
familiar with and everything looks good to me.
Reviewed-by: Kees Cook
--
Kees Cook
s,
>> Justin
>
>+Kees since I've worked with him on several of these flexible array issues.
>
>I just happened to look at kernel logs today for my ath1*k driver maintenance
>and see the subject issue is present on my device, running 6.9.0-rc1. The
>freedesktop issue tracker says the issue is closed, but any fix has not landed
>in the upstream kernel. Is there a -next patch somewhere?
>
>[ 12.105270] UBSAN: array-index-out-of-bounds in
>drivers/gpu/drm/radeon/radeon_atombios.c:2718:34
>[ 12.105272] index 48 is out of range for type 'UCHAR [1]'
>[
>
>If there isn't really an upstream fix, I can probably supply one.
I would expect this to have fixed it:
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/drivers/gpu/drm/radeon/pptable.h?id=c63079c61177ba1b17fa05c6875699a36924fe39
If not, there must be something else happening?
-Kees
--
Kees Cook
typedef struct _NonClockInfoArray{
> @@ -460,7 +460,7 @@ typedef struct _NonClockInfoArray{
> //sizeof(ATOM_PPLIB_NONCLOCK_INFO)
> UCHAR ucEntrySize;
>
> -ATOM_PPLIB_NONCLOCK_INFO nonClockInfo[1];
> +ATOM_PPLIB_NONCLOCK_INFO nonClockInfo[];
> }NonClockInfoArray;
>
> typedef struct _ATOM_PPLIB_Clock_Voltage_Dependency_Record
-Kees
--
Kees Cook
> Closes: https://gitlab.freedesktop.org/drm/amd/-/issues/3323
> Fixes: df8fc4e934c1 ("kbuild: Enable -fstrict-flex-arrays=3")
> Signed-off-by: Alex Deucher
> Cc: Kees Cook
Yup, this looks correct to me. These were trailing arrays that were not
bounds checked prio
M! :)
Reviewed-by: Kees Cook
--
Kees Cook
101 - 111 of 111 matches
Mail list logo