On Wed, Sep 25, 2024 at 4:05 PM Mario Limonciello
<[email protected]> wrote:
>
> Some distributions have been patching amdgpu to enable overdrive by
> default which may compromise stability.  Furthermore when bug reports
> are brought upstream it's not obvious that the system has been tampered
> with.
>
> When overdrive is enabled taint the kernel and leave a critical message
> in the logs for users so that it's obvious in a bug report it's been
> tampered with.
>
> Signed-off-by: Mario Limonciello <[email protected]>
> ---
>  drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 5 +++++
>  1 file changed, 5 insertions(+)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c 
> b/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c
> index f57411ed2dc2..99717a1d7f61 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c
> @@ -3067,6 +3067,11 @@ static int __init amdgpu_init(void)
>         /* Ignore KFD init failures. Normal when CONFIG_HSA_AMD is not set. */
>         amdgpu_amdkfd_init();
>
> +       if (amdgpu_pp_feature_mask & PP_OVERDRIVE_MASK) {
> +               add_taint(TAINT_CPU_OUT_OF_SPEC, LOCKDEP_STILL_OK);
> +               pr_crit("Overdrive is enabled, please disable it before 
> reporting any bugs.\n");

Might want to reword this to something like:
"Overdrive is enabled, please disable it before reporting any bugs
unrelated to overdrive.\n"

Alex

> +       }
> +
>         /* let modprobe override vga console setting */
>         return pci_register_driver(&amdgpu_kms_pci_driver);
>
> --
> 2.43.0
>

Reply via email to