Re: [PATCH] acpi: nfit: fix narrowing conversion in acpi_nfit_ctl

2025-01-27 Thread Murad Masimov
> I tend to agree this is not ideal. But IMO the issue is that family is > treated as an int throughout the code rather than u64. Even u32 would > have been better than int because negative numbers are not allowed AFAICT > just skimming the code. > > Unfortunately, ripping through the code to ch

Re: [PATCH] acpi: nfit: fix narrowing conversion in acpi_nfit_ctl

2025-01-24 Thread Ira Weiny
.org; > linux-kernel@vger.kernel.org; lvc-proj...@linuxtesting.org; > sta...@vger.kernel.org; syzbot+c80d8dc0d9fa81a3c...@syzkaller.appspotmail.com > Тема: Re: [PATCH] acpi: nfit: fix narrowing conversion in acpi_nfit_ctl > > > On 1/23/25 9:39 AM, Murad Masimov wrote: &g

Re: [PATCH] acpi: nfit: fix narrowing conversion in acpi_nfit_ctl

2025-01-24 Thread Alison Schofield
ists.linux.dev; linux-a...@vger.kernel.org; > linux-kernel@vger.kernel.org; lvc-proj...@linuxtesting.org; > sta...@vger.kernel.org; syzbot+c80d8dc0d9fa81a3c...@syzkaller.appspotmail.com > Тема: Re: [PATCH] acpi: nfit: fix narrowing conversion in acpi_nfit_ctl > > >

Re: [PATCH] acpi: nfit: fix narrowing conversion in acpi_nfit_ctl

2025-01-24 Thread Murad Masimov
...@linuxtesting.org; sta...@vger.kernel.org; syzbot+c80d8dc0d9fa81a3c...@syzkaller.appspotmail.com Тема: Re: [PATCH] acpi: nfit: fix narrowing conversion in acpi_nfit_ctl > On 1/23/25 9:39 AM, Murad Masimov wrote: > > Syzkaller has reported a warning in to_nfit_bus_uuid(): "only secondary > >

Re: [PATCH] acpi: nfit: fix narrowing conversion in acpi_nfit_ctl

2025-01-23 Thread Dave Jiang
On 1/23/25 9:39 AM, Murad Masimov wrote: > Syzkaller has reported a warning in to_nfit_bus_uuid(): "only secondary > bus families can be translated". This warning is emited if the argument > is equal to NVDIMM_BUS_FAMILY_NFIT == 0. Function acpi_nfit_ctl() first > verifies that a user-provided v

[PATCH] acpi: nfit: fix narrowing conversion in acpi_nfit_ctl

2025-01-23 Thread Murad Masimov
Syzkaller has reported a warning in to_nfit_bus_uuid(): "only secondary bus families can be translated". This warning is emited if the argument is equal to NVDIMM_BUS_FAMILY_NFIT == 0. Function acpi_nfit_ctl() first verifies that a user-provided value call_pkg->nd_family of type u64 is not equal to