lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <m1r5ubdgzt.fsf@fess.ebiederm.org>
Date:	Sat, 12 Sep 2009 13:51:02 -0700
From:	ebiederm@...ssion.com (Eric W. Biederman)
To:	Stefani Seibold <stefani@...bold.net>
Cc:	Al Viro <viro@...IV.linux.org.uk>,
	Christoph Hellwig <hch@...radead.org>,
	linux-kernel <linux-kernel@...r.kernel.org>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Alexey Dobriyan <adobriyan@...il.com>
Subject: Re: [PATCH] Fix proc_file_write missing ppos update

Stefani Seibold <stefani@...bold.net> writes:

> Am Samstag, den 12.09.2009, 16:28 +0100 schrieb Al Viro:
>> On Sun, Aug 30, 2009 at 09:05:44PM +0200, Stefani Seibold wrote:
>> > Switching all users of read_proc_t/write_proc_t to file operation is a
>> > huge job. About 180 files must be fixed.
>> > 
>> > But the main reason not to do this is because the breakage of "out of
>> > tree" drivers.
>> 
>> > I like the current simplified proc interface. It saves a lot of code
>> > duplication because the basic operations will be handled inside the
>> > kernel and not in the driver.
>> 
>> _What_ code duplication?  Would that be
>>         struct proc_dir_entry *pde = PDE(file->f_path.dentry->d_inode);
>> and calculation of pde->data currently done by proc_file_write()?
>> Pardon me, but that's hard to take seriously.  As for the ->read() side,
>> most of those suckers end up switched to use of seq_read() and there's
>> not a lot of boilerplate code in the resulting variants...
>
> Hi Al, you are 2 weeks to late, the discussion has already ended. But
> lets start it again.... 
>
> There is some code duplication, proc_file_write has 17 lines of code.
> And together with my path it will be 19 lines of code. How much lines of
> duplicated code are necessary for take them seriously? 
>
> I know that the current mainstream development targets enterprise and
> maybe sometime desktop systems. But the truth is that linux will be
> mostly used in embedded system with very limited memory constrains.
>
> BTW: I personally think the whole seq_.... interface is IMHO to
> complicate to use, procfs is much simpler. But this is only my personal
> opinion! 

The point of all of this is that you are trying to enhance an
interface that is essentially deprecated.  We don't want to use it
anymore because at least on the read side there are recurring problems
with buffer overflows and reads not handling seeks properly, etc.  So
everything is slowing switching being fixed and taken off of the
current proc_file_read/proc_file_write handlers.

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ