[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20140711193733.GC1304@thunk.org>
Date: Fri, 11 Jul 2014 15:37:33 -0400
From: Theodore Ts'o <tytso@....edu>
To: "Darrick J. Wong" <darrick.wong@...cle.com>
Cc: Ext4 Developers List <linux-ext4@...r.kernel.org>
Subject: Re: [PATCH] mke2fs: add support to align hugefiles relative to
beginning of the disk
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
--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists