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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20080729105350.009f5af0@lxorguk.ukuu.org.uk>
Date:	Tue, 29 Jul 2008 10:53:50 +0100
From:	Alan Cox <alan@...rguk.ukuu.org.uk>
To:	Alexey Dobriyan <adobriyan@...il.com>
Cc:	akpm@...l.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 01/13] proc tty: introduce ->proc_fops

On Tue, 29 Jul 2008 05:29:08 +0400
Alexey Dobriyan <adobriyan@...il.com> wrote:

> Add struct tty_operations:proc_fops .
> 
> The intent is gradual switch of TTY drivers from ->read_proc usage.
> proc entries are created with proc_create_data() which even fixes
> early-read races.
> 
> Eventually ->read_proc code will be removed from TTY code, thus helping
> remove ->read_proc from whole proc code.

I'm going to NAK this but not because I think the concept is wrong. I
think the way its been done is perhaps wrong.

You've added ifdefs to a lot of drivers and more basically duplicate
code. Is there a reason you can't keep the ->read_proc method in the tty
code but as a function called by a single instance of proc_fops and
seq_file methods for the whole tty driver layer.

Ie have a single tty seq_file method that calls driver->ops->read_proc as
the seqfile iterator ?

>  int count, int *eof, void *data);
> +#ifdef CONFIG_PROC_FS
> +	const struct file_operations *proc_fops;
> +#endif

I'd prefer you didn't put variables in the middle of the methods. Also
the ifdef isn't needed. It's not worth one pointer to create a load of
ifdefs

Alan
--
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