Re: [RFC 1/1] proc: constify seq_operations

2014-07-01 Thread Fabian Frederick
> On 01 July 2014 at 10:17 Christoph Hellwig wrote: > > > On Mon, Jun 30, 2014 at 01:39:39PM -0700, Andrew Morton wrote: > > On Mon, 30 Jun 2014 21:03:17 +0200 Fabian Frederick wrote: > > > > > proc_uid_seq_operations, proc_gid_seq_operations and > > > proc_projid_seq_operations > > > are only

Re: [RFC 1/1] proc: constify seq_operations

2014-07-01 Thread Joe Perches
On Tue, 2014-07-01 at 10:41 +0200, Richard Weinberger wrote: > BTW: Daniel Walter and I are currently working with grsec's constify gcc > plugin. > This plugin automatically makes structs const which contain only > function pointers. http://pax.grsecurity.net/docs/PaXTeam-H2HC13-PaX-gcc-plugins.p

Re: [RFC 1/1] proc: constify seq_operations

2014-07-01 Thread Richard Weinberger
On Tue, Jul 1, 2014 at 10:17 AM, Christoph Hellwig wrote: > On Mon, Jun 30, 2014 at 01:39:39PM -0700, Andrew Morton wrote: >> On Mon, 30 Jun 2014 21:03:17 +0200 Fabian Frederick wrote: >> >> > proc_uid_seq_operations, proc_gid_seq_operations and >> > proc_projid_seq_operations >> > are only call

Re: [RFC 1/1] proc: constify seq_operations

2014-07-01 Thread Christoph Hellwig
On Mon, Jun 30, 2014 at 01:39:39PM -0700, Andrew Morton wrote: > On Mon, 30 Jun 2014 21:03:17 +0200 Fabian Frederick wrote: > > > proc_uid_seq_operations, proc_gid_seq_operations and > > proc_projid_seq_operations > > are only called in proc_id_map_open with seq_open as > > const struct seq_oper

Re: [RFC 1/1] proc: constify seq_operations

2014-06-30 Thread Andrew Morton
On Mon, 30 Jun 2014 14:09:05 -0700 Joe Perches wrote: > On Mon, 2014-06-30 at 13:57 -0700, Andrew Morton wrote: > > On Mon, 30 Jun 2014 13:49:30 -0700 Joe Perches wrote: > > > > It moves ~100 bytes from data to text > > > > $ size kernel/user_namespace.o* > > >textdata bss dec

Re: [RFC 1/1] proc: constify seq_operations

2014-06-30 Thread Joe Perches
On Mon, 2014-06-30 at 13:57 -0700, Andrew Morton wrote: > On Mon, 30 Jun 2014 13:49:30 -0700 Joe Perches wrote: > > It moves ~100 bytes from data to text > > $ size kernel/user_namespace.o* > >textdata bss dec hex filename > >667631072248 120312eff kernel/us

Re: [RFC 1/1] proc: constify seq_operations

2014-06-30 Thread Andrew Morton
On Mon, 30 Jun 2014 13:49:30 -0700 Joe Perches wrote: > On Mon, 2014-06-30 at 13:39 -0700, Andrew Morton wrote: > > On Mon, 30 Jun 2014 21:03:17 +0200 Fabian Frederick wrote: > > > > > proc_uid_seq_operations, proc_gid_seq_operations and > > > proc_projid_seq_operations > > > are only called i

Re: [RFC 1/1] proc: constify seq_operations

2014-06-30 Thread Joe Perches
On Mon, 2014-06-30 at 13:39 -0700, Andrew Morton wrote: > On Mon, 30 Jun 2014 21:03:17 +0200 Fabian Frederick wrote: > > > proc_uid_seq_operations, proc_gid_seq_operations and > > proc_projid_seq_operations > > are only called in proc_id_map_open with seq_open as > > const struct seq_operations

Re: [RFC 1/1] proc: constify seq_operations

2014-06-30 Thread Andrew Morton
On Mon, 30 Jun 2014 21:03:17 +0200 Fabian Frederick wrote: > proc_uid_seq_operations, proc_gid_seq_operations and > proc_projid_seq_operations > are only called in proc_id_map_open with seq_open as > const struct seq_operations so we can constify the 3 structures and update > proc_id_map_open pr

[RFC 1/1] proc: constify seq_operations

2014-06-30 Thread Fabian Frederick
proc_uid_seq_operations, proc_gid_seq_operations and proc_projid_seq_operations are only called in proc_id_map_open with seq_open as const struct seq_operations so we can constify the 3 structures and update proc_id_map_open prototype. ( If it's correct, do I have to send separate patches or diffe