lkml.org 
[lkml]   [2017]   [Oct]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [RFC PATCH 0/3] Introduce kernel small arrays (KSA)
From
Date
On Tue, 2017-09-19 at 12:30 +0400, Ilya Matveychikov wrote:
> Hi guys,
>
> Please review the approach of using small fixed-sized arrays to improve
> parsing of values like get_options() does.
>
> This comes to me after fixing an overflow in get_options(). See the thread
> for details: https://lkml.org/lkml/2017/5/22/581
>
> If the approach is OK I’ll suggest to replace all of get_options() calls
> to ksa_parse_ints() and remove get_options() at all.

You didn't cc the patches to me, and I can't find patch 3/3 at all.

I don't think the KSA() macro should be casting its argument. Where the
cast is necessary, it ought to be explicit in the caller.

Similarly I think the BUILD_BUG_ON() in ksa_build_check() doesn't belong
there, but in whichever caller of ksa_parse_ints() requires struct
ksmall_array to have the same layout as a simple array of unsigned int.

Ben.

--
Ben Hutchings
Software Developer, Codethink Ltd.


\
 
 \ /
  Last update: 2017-10-04 17:23    [W:0.051 / U:1.988 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site