Re: [PATCH] ext2: Don't export ext2_mask_flags() to user space

From: Ted Ts'o
Date: Wed Mar 21 2012 - 19:17:10 EST


On Wed, Mar 21, 2012 at 11:23:57PM +0100, Jan Kara wrote:
> Frankly, anybody seriously wanting to do anything with ext[2-4]
> filesystems should use header files as provided by libext2fs. So I wonder
> if just unexporting the whole file wouldn't be the best solution going
> forward. Ted, do you have opinion?

Agreed, it's been almost 8 years since e2fsprogs used the
include/linux/ext2_fs.h (the last version that needed it was e2fsprogs
1.35, released February 28, 2004).

There shouldn't be *anyone* using any of the ext2/3/4 kernel header
files. The only program that might be cheating and using kernel
header files is ext3grep, as the author wasn't willing to fix his
applications to use libext2fs. (As a result, it doesn't work on ext4
file systems, where as properly coded programs that do use libext2fs
often work just fine on ext4, such as e2tools, which hasn't been
modified for something like eight years but which works on ext4 just
fine.)

So yeah, I'd just unexport ext2_fs.h, and probably ext3_fs.h as well.

- Ted
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/