Util-Linux package development
 help / color / mirror / Atom feed
From: Karel Zak <kzak@redhat.com>
To: Kees Cook <keescook@chromium.org>
Cc: util-linux@vger.kernel.org
Subject: Re: [PATCH v2 2/2] libmount: handle arbitrary line length for mounts
Date: Thu, 27 Aug 2015 10:18:27 +0200	[thread overview]
Message-ID: <20150827081827.GD2410@ws.net.home> (raw)
In-Reply-To: <CAGXu5jK3zxjp3rSoGxCUGC0KhOQOLFrMyhX6fvOiUMAf+5wdeQ@mail.gmail.com>

On Wed, Aug 26, 2015 at 04:44:04PM -0700, Kees Cook wrote:
> On Wed, Aug 26, 2015 at 4:34 PM, Karel Zak <kzak@redhat.com> wrote:
> > On Wed, Aug 26, 2015 at 03:49:23PM -0700, Kees Cook wrote:
> >> @@ -212,6 +212,8 @@ struct libmnt_table {
> >>       int             comms;          /* enable/disable comment parsing */
> >>       char            *comm_intro;    /* First comment in file */
> >>       char            *comm_tail;     /* Last comment in file */
> >> +     char            *buf;           /* Memory for reading lines */
> >> +     size_t          buf_size;       /* Size of line-reading buffer */
> >
> > It's overkill to add the buffer to the struct, it's necessary
> > only in mnt_table_parse_next().
> 
> It seemed really inefficient to go from a stack buffer to a
> malloc-per-call of mnt_table_parse_next(). I'm fine to write it that
> way, though. What do you think is best here?

I'll try to prepare a patch with new struct libmnt_parser where we can
store another parser specific things like current line number, file
name, etc.

    Karel

-- 
 Karel Zak  <kzak@redhat.com>
 http://karelzak.blogspot.com

  reply	other threads:[~2015-08-27  8:18 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-08-26 22:49 [PATCH v2 2/2] libmount: handle arbitrary line length for mounts Kees Cook
2015-08-26 23:34 ` Karel Zak
2015-08-26 23:44   ` Kees Cook
2015-08-27  8:18     ` Karel Zak [this message]
2015-08-27  0:16 ` Mike Frysinger
2015-08-27  0:44   ` Kees Cook
2015-08-27  9:26 ` Karel Zak
2015-08-27 17:01   ` Kees Cook

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=20150827081827.GD2410@ws.net.home \
    --to=kzak@redhat.com \
    --cc=keescook@chromium.org \
    --cc=util-linux@vger.kernel.org \
    /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