Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

drm/amdgpu: mark a bunch of module parameters unsafe

We sometimes have people trying to use debugging options in production
environments.

Mark options only meant to be used for debugging as unsafe so that the
kernel is tainted when they are used.

Signed-off-by: Christian König <christian.koenig@amd.com>
Acked-by: Felix Kuehling <felix.kuehling@amd.com>
Acked-by: Simona Vetter <simona.vetter@ffwll.ch>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>

authored by

Christian König and committed by
Alex Deucher
177b76a8 e996127e

+7 -7
+7 -7
drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c
··· 399 399 * the kernel log for the list of IPs on the asic. The default is 0xffffffff (enable all blocks on a device). 400 400 */ 401 401 MODULE_PARM_DESC(ip_block_mask, "IP Block Mask (all blocks enabled (default))"); 402 - module_param_named(ip_block_mask, amdgpu_ip_block_mask, uint, 0444); 402 + module_param_named_unsafe(ip_block_mask, amdgpu_ip_block_mask, uint, 0444); 403 403 404 404 /** 405 405 * DOC: bapm (int) ··· 457 457 * Enable experimental hw support (1 = enable). The default is 0 (disabled). 458 458 */ 459 459 MODULE_PARM_DESC(exp_hw_support, "experimental hw support (1 = enable, 0 = disable (default))"); 460 - module_param_named(exp_hw_support, amdgpu_exp_hw_support, int, 0444); 460 + module_param_named_unsafe(exp_hw_support, amdgpu_exp_hw_support, int, 0444); 461 461 462 462 /** 463 463 * DOC: dc (int) ··· 568 568 * Set to enable GPU recovery mechanism (1 = enable, 0 = disable). The default is -1 (auto, disabled except SRIOV). 569 569 */ 570 570 MODULE_PARM_DESC(gpu_recovery, "Enable GPU recovery mechanism, (1 = enable, 0 = disable, -1 = auto)"); 571 - module_param_named(gpu_recovery, amdgpu_gpu_recovery, int, 0444); 571 + module_param_named_unsafe(gpu_recovery, amdgpu_gpu_recovery, int, 0444); 572 572 573 573 /** 574 574 * DOC: emu_mode (int) 575 575 * Set value 1 to enable emulation mode. This is only needed when running on an emulator. The default is 0 (disabled). 576 576 */ 577 577 MODULE_PARM_DESC(emu_mode, "Emulation mode, (1 = enable, 0 = disable)"); 578 - module_param_named(emu_mode, amdgpu_emu_mode, int, 0444); 578 + module_param_named_unsafe(emu_mode, amdgpu_emu_mode, int, 0444); 579 579 580 580 /** 581 581 * DOC: ras_enable (int) ··· 730 730 */ 731 731 MODULE_PARM_DESC(force_asic_type, 732 732 "A non negative value used to specify the asic type for all supported GPUs"); 733 - module_param_named(force_asic_type, amdgpu_force_asic_type, int, 0444); 733 + module_param_named_unsafe(force_asic_type, amdgpu_force_asic_type, int, 0444); 734 734 735 735 /** 736 736 * DOC: use_xgmi_p2p (int) ··· 953 953 * GPU reset method (-1 = auto (default), 0 = legacy, 1 = mode0, 2 = mode1, 3 = mode2, 4 = baco) 954 954 */ 955 955 MODULE_PARM_DESC(reset_method, "GPU reset method (-1 = auto (default), 0 = legacy, 1 = mode0, 2 = mode1, 3 = mode2, 4 = baco/bamaco)"); 956 - module_param_named(reset_method, amdgpu_reset_method, int, 0644); 956 + module_param_named_unsafe(reset_method, amdgpu_reset_method, int, 0644); 957 957 958 958 /** 959 959 * DOC: bad_page_threshold (int) Bad page threshold is specifies the ··· 1049 1049 * - 0x4: Disable GPU soft recovery, always do a full reset 1050 1050 */ 1051 1051 MODULE_PARM_DESC(debug_mask, "debug options for amdgpu, disabled by default"); 1052 - module_param_named(debug_mask, amdgpu_debug_mask, uint, 0444); 1052 + module_param_named_unsafe(debug_mask, amdgpu_debug_mask, uint, 0444); 1053 1053 1054 1054 /** 1055 1055 * DOC: agp (int)