mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Ben Hutchings <ben.hutchings@codethink.co.uk>
To: Ilya Matveychikov <matvejchikov@gmail.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [RFC PATCH 0/3] Introduce kernel small arrays (KSA)
Date: Wed, 04 Oct 2017 16:22:34 +0100	[thread overview]
Message-ID: <1507130554.26687.8.camel@codethink.co.uk> (raw)
In-Reply-To: <E71EA62B-7331-4718-A935-6E2D7FF4A237@gmail.com>

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.

  parent reply	other threads:[~2017-10-04 15:22 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-19  8:30 Ilya Matveychikov
2017-09-19  8:31 ` [RFC PATCH 1/3] ksmall_array: introduce kernel small arrays Ilya Matveychikov
2017-09-19  8:32 ` [RFC PATCH 2/3] net/dev/core.c: use ksa_parse_ints instead of get_options Ilya Matveychikov
2017-10-04 15:22 ` Ben Hutchings [this message]
2017-10-18 12:41   ` [RFC PATCH 0/3] Introduce kernel small arrays (KSA) Ilya Matveychikov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1507130554.26687.8.camel@codethink.co.uk \
    --to=ben.hutchings@codethink.co.uk \
    --cc=linux-kernel@vger.kernel.org \
    --cc=matvejchikov@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome