[PATCH v2 0/2] kcsan: debugs: Refactor allocation code

Andy Shevchenko posted 2 patches 2 days, 12 hours ago
kernel/kcsan/debugfs.c | 20 ++++++++------------
1 file changed, 8 insertions(+), 12 deletions(-)
[PATCH v2 0/2] kcsan: debugs: Refactor allocation code
Posted by Andy Shevchenko 2 days, 12 hours ago
Refactor allocation code to be more robust against overflows
and shorted in terms of LoCs.

In v2:
- collected tags (Marco)
- added patch 2

Andy Shevchenko (2):
  kcsan: debugfs: Use krealloc_array() to replace krealloc()
  kcsan: debugfs: Use krealloc_array() for initial allocation as well

 kernel/kcsan/debugfs.c | 20 ++++++++------------
 1 file changed, 8 insertions(+), 12 deletions(-)

-- 
2.43.0.rc1.1336.g36b5255a03ac
Re: [PATCH v2 0/2] kcsan: debugs: Refactor allocation code
Posted by Andy Shevchenko 2 days, 12 hours ago
On Thu, Nov 21, 2024 at 04:12:50PM +0200, Andy Shevchenko wrote:
> Refactor allocation code to be more robust against overflows
> and shorted in terms of LoCs.
> 
> In v2:
> - collected tags (Marco)
> - added patch 2

Okay, it seems I have to check the Linux Next for the current state of
affairs...

-- 
With Best Regards,
Andy Shevchenko
Re: [PATCH v2 0/2] kcsan: debugs: Refactor allocation code
Posted by Marco Elver 2 days, 12 hours ago
On Thu, 21 Nov 2024 at 15:17, Andy Shevchenko
<andriy.shevchenko@linux.intel.com> wrote:
>
> On Thu, Nov 21, 2024 at 04:12:50PM +0200, Andy Shevchenko wrote:
> > Refactor allocation code to be more robust against overflows
> > and shorted in terms of LoCs.
> >
> > In v2:
> > - collected tags (Marco)
> > - added patch 2
>
> Okay, it seems I have to check the Linux Next for the current state of
> affairs...

Right. Please double check this still applies after 59458fa4ddb4
("kcsan: Turn report_filterlist_lock into a raw_spinlock") in latest
mainline (or -next). I had to rework that code to make PREEMPT_RT
happy, and at the same time got rid of all this old code. I suppose a
side-effect was switching over to kmalloc_array() and making it look a
bit cleaner as well.

Thanks,
-- Marco