All of lore.kernel.org
 help / color / mirror / Atom feed
From: Theodore Ts'o <tytso@mit.edu>
To: "Darrick J. Wong" <darrick.wong@oracle.com>
Cc: Ext4 Developers List <linux-ext4@vger.kernel.org>
Subject: Re: [PATCH] mke2fs: add support to align hugefiles relative to beginning of the disk
Date: Fri, 11 Jul 2014 15:37:33 -0400	[thread overview]
Message-ID: <20140711193733.GC1304@thunk.org> (raw)
In-Reply-To: <20140711182558.GG10417@birch.djwong.org>

On Fri, Jul 11, 2014 at 11:25:58AM -0700, Darrick J. Wong wrote:
> The third argument is the maximum number of bytes to concatenate from the
> second argument ("/start").  Though it's unlikely that we'll ever find anything
> in /sys/block approaching 255 characters, we might as well guard against stack
> corruption:
> 
> 	if (strlen(path) > SYSFS_PATH_LEN - strlen("/start") - 1)
> 		return 0;
> 	strcat(path, "/start");
> 
> Oh, I guess coverity is complaining about this too.
> 
> Though FWIW, "find /sys | while read f; do echo "$f" | wc -c; done | sort -g |
> tail -n 5" spits out "133" as the longest sysfs path ever.  I guess that could
> be much longer on some multi-node NUMA box or whatever.
> 
> <shrug> /me codes up a fix, tosses it on the patch pile.

Already fixed on the maint branch.

Cheers,

						- Ted

  reply	other threads:[~2014-07-11 19:37 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-09  0:44 [PATCH] mke2fs: add support to align hugefiles relative to beginning of the disk Theodore Ts'o
2014-07-11 18:25 ` Darrick J. Wong
2014-07-11 19:37   ` Theodore Ts'o [this message]
2014-07-11 19:48     ` Darrick J. Wong

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=20140711193733.GC1304@thunk.org \
    --to=tytso@mit.edu \
    --cc=darrick.wong@oracle.com \
    --cc=linux-ext4@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.