KSPP / linux

Linux kernel source tree (Kernel Self Protection Project)
https://kernsec.org/wiki/index.php/Kernel_Self_Protection_Project
Other
80 stars 5 forks source link

Replace 1-element array in drivers/gpu/drm/amd/amdkfd/kfd_pm4_headers_diq.h #237

Closed PauloMigAlmeida closed 1 year ago

PauloMigAlmeida commented 1 year ago

Replace 1-element array in drivers/gpu/drm/amd/amdkfd/kfd_pm4_headers_diq.h

183 struct pm4__set_config_reg {
184         union {
185                 union PM4_MES_TYPE_3_HEADER header;     /*header */
186                 unsigned int ordinal1;
187         };
188 
189         union {
190                 struct {
191                         unsigned int reg_offset:16;
192                         unsigned int reserved1:7;
193                         unsigned int vmid_shift:5;
194                         unsigned int insert_vmid:1;
195                         unsigned int reserved2:3;
196                 } bitfields2;
197                 unsigned int ordinal2;
198         };
199 
200         unsigned int reg_data[1];       /*1..N of these fields */
201 
202 };
PauloMigAlmeida commented 1 year ago

It turns out that the whole header file was no longer being used in the kernel (dead-code). I will seize the opportunity and delete it:

Patch: https://lore.kernel.org/lkml/Y1eoYDDZWdyLNlBc@mail.google.com/

PauloMigAlmeida commented 1 year ago

Patch merged! https://lore.kernel.org/lkml/f2b6f0e1-1ae0-21ec-372e-6e90827ccea6@amd.com/

PauloMigAlmeida commented 1 year ago

@GustavoARSilva I don't have enough permissions to add the required labels here. I will close it (so the work made her is logged in this repo) but if you have sometime, please add the labels that you may want/need.