OpenVZ Forum - RDF feed
type: channel
items: [PATCH 0/59] Cleanup sysctl
items: [PATCH 1/59] sysctl x25: Remove unnecessary insert_at_head from register_sysctl_table.
items: [PATCH 2/59] sysctl: Move CTL_SUNRPC to sysctl.h where it belongs
items: [PATCH 3/59] sysctl: sunrpc Remove unnecessary insert_at_head flag
items: [PATCH 4/59] sysctl: sunrpc Don't unnecessarily set ctl_table->de
items: [PATCH 5/59] sysctl: rose remove unnecessary insert_at_head flag
items: [PATCH 6/59] sysctl: netrom remove unnecessary insert_at_head flag
items: [PATCH 7/59] sysctl: llc remove unnecessary insert_at_head flag
items: [PATCH 8/59] sysctl: ipx remove unnecessary insert_at_head flag
items: [PATCH 9/59] sysctl: decnet remove unnecessary insert_at_head flag
items: [PATCH 10/59] sysctl: dccp remove unnecessary insert_at_head flag
items: [PATCH 11/59] sysctl: ax25 remove unnecessary insert_at_head flag
items: [PATCH 12/59] sysctl: atalk remove unnecessary insert_at_head flag
items: [PATCH 13/59] sysctl: xfs remove unnecessary insert_at_head flag
items: [PATCH 14/59] sysctl: C99 convert xfs ctl_tables
items: [PATCH 15/59] sysctl: scsi remove unnecessary insert_at_head flag
items: [PATCH 16/59] sysctl: md Remove unnecessary insert_at_head flag
items: [PATCH 17/59] sysctl: mac_hid remove unnecessary insert_at_head flag
items: [PATCH 18/59] sysctl: ipmi remove unnecessary insert_at_head flag
items: [PATCH 19/59] sysctl: cdrom remove unnecessary insert_at_head flag
items: [PATCH 20/59] sysctl: cdrom Don't set de->owner
items: [PATCH 21/59] sysctl: Move CTL_PM into sysctl.h where it belongs.
items: [PATCH 22/59] sysctl: frv pm remove unnecessary insert_at_head flag
items: [PATCH 23/59] sysctl: Move CTL_FRV into sysctl.h where it belongs
items: [PATCH 24/59] sysctl: frv remove unnecessary insert_at_head flag
items: [PATCH 25/59] sysctl: C99 convert arch/frv/kernel/pm.c
items: [PATCH 26/59] sysctl: C99 convert arch/frv/kernel/sysctl.c
items: [PATCH 27/59] sysctl: sn Remove sysctl ABI BREAKAGE
items: [PATCH 28/59] sysctl: C99 Convert arch/ia64/sn/kernel/xpc_main.c
items: [PATCH 29/59] sysctl: C99 convert arch/ia64/kernel/perfmon and remove ABI breakage
items: [PATCH 30/59] sysctl: mips/au1000 Remove sys_sysctl support
items: [PATCH 31/59] sysctl: C99 convert the ctl_tables in arch/mips/au1000/common/power.c
items: [PATCH 32/59] sysctl: C99 convert arch/mips/lasat/sysctl.c and remove ABI breakage.
items: [PATCH 33/59] sysctl: s390 move sysctl definitions to sysctl.h
items: [PATCH 34/59] sysctl: s390 Remove unnecessary use of insert_at_head
items: [PATCH 35/59] sysctl: C99 convert ctl_tables in arch/powerpc/kernel/idle.c
items: [PATCH 36/59] sysctl: C99 convert ctl_tables entries in arch/ppc/kernel/ppc_htab.c
items: [PATCH 37/59] sysctl: C99 convert arch/sh64/kernel/traps.c and remove ABI breakage.
items: [PATCH 38/59] sysctl: x86_64 Remove unnecessary use of insert_at_head
items: [PATCH 39/59] sysctl: C99 convert ctl_tables in arch/x86_64/ia32/ia32_binfmt.c
items: [PATCH 40/59] sysctl: C99 convert ctl_tables in arch/x86_64/kernel/vsyscall.c
items: [PATCH 41/59] sysctl: C99 convert ctl_tables in arch/x86_64/mm/init.c
items: [PATCH 42/59] sysctl: Remove sys_sysctl support from the hpet timer driver.
items: [PATCH 43/59] sysctl: Remove sys_sysctl support from drivers/char/rtc.c
items: [PATCH 44/59] sysctl: Register the sysctl number used by the arlan driver.
items: [PATCH 45/59] sysctl: C99 convert ctl_tables in drivers/parport/procfs.c
items: [PATCH 46/59] sysctl: C99 convert coda ctl_tables and remove binary sysctls.
items: [PATCH 47/59] sysctl: C99 convert ctl_tables in NTFS and remove sys_sysctl support
items: [PATCH 48/59] sysctl: Register the ocfs2 sysctl numbers
items: [PATCH 49/59] sysctl: Move init_irq_proc into init/main where it belongs
items: [PATCH 50/59] sysctl: Move utsname sysctls to their own file
items: [PATCH 51/59] sysctl: Move SYSV IPC sysctls to their own file
items: [PATCH 52/59] sysctl: Create sys/fs/binfmt_misc as an ordinary sysctl entry
items: [PATCH 53/59] sysctl: Remove support for CTL_ANY
items: [PATCH 54/59] sysctl: Remove support for directory strategy routines.
items: [PATCH 55/59] sysctl: Remove insert_at_head from register_sysctl
items: [PATCH 56/59] sysctl: factor out sysctl_head_next from do_sysctl
items: [PATCH 57/59] sysctl: allow sysctl_perm to be called from outside of sysctl.c
items: [PATCH 58/59] sysctl: Reimplement the sysctl proc support
items: [PATCH 59/59] sysctl: Remove the proc_dir_entry member for the sysctl tables.
items: Re: [PATCH 5/59] sysctl: rose remove unnecessary insert_at_head flag
items: Re: [PATCH 20/59] sysctl: cdrom Don't set de->owner
items: Re: [PATCH 0/59] Cleanup sysctl
items: Re: [PATCH 48/59] sysctl: Register the ocfs2 sysctl numbers
items: Re: [PATCH 37/59] sysctl: C99 convert arch/sh64/kernel/traps.c and remove ABI breakage.
items: Re: [PATCH 45/59] sysctl: C99 convert ctl_tables in drivers/parport/procfs.c
items: Re: [PATCH 31/59] sysctl: C99 convert the ctl_tables in arch/mips/au1000/common/power.c
items: Re: [PATCH 18/59] sysctl: ipmi remove unnecessary insert_at_head flag
items: Re: [PATCH 35/59] sysctl: C99 convert ctl_tables in arch/powerpc/kernel/idle.c
items: Re: [PATCH 36/59] sysctl: C99 convert ctl_tables entries in arch/ppc/kernel/ppc_htab.c

[PATCH 0/59] Cleanup sysctl
type: item
description: There has not been much maintenance on sysctl in years, and as a result is there is a lot to do to allow future interesting work to happen, and being ambitious I'm trying to do it all at once :) The patches in this series fall into several general categories. - Removal of useless attempts to override the standard sysctls - Registers of sysctl numbers in sysctl.h so someone else does not use the magic number and conflict. - C99 conversions so it becomes possible to change the layout of struct ctl_table without breaking everything. - Removal of useless claims of module ownership, in the proc dir entries - Removal of sys_sysctl support where people had used conflicting sysctl numbers. Trying to break glibc or other applications by changing the ABI is not cool. 9 instances of this in the kernel seems a little extreme. - General enhancements when I got the junk I could see out. Odds are I missed something, most of the cleanups are simply a result of me working on the sysctl core and glancing at the users and going: What? Eric _______________________________________________ Containers mailing list Containers@lists.osdl.org https://lists.osdl.org/mailman/listinfo/containers
creator: ebiederm
date: 2007-01-16T16:33:47-00:00

[PATCH 1/59] sysctl x25: Remove unnecessary insert_at_head from register_sysctl_table.
type: item
description: Since x25 uses unique binary numbers inserting yourself at the head of the search list for sysctls so you can override already registered sysctls is pointless. Signed-off-by: Eric W. Biederman <ebiederm@xmission.com> --- net/x25/sysctl_net_x25.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/net/x25/sysctl_net_x25.c b/net/x25/sysctl_net_x25.c index aabda59..94aff67 100644 --- a/net/x25/sysctl_net_x25.c +++ b/net/x25/sysctl_net_x25.c @@ -98,7 +98,7 @@ static struct ctl_table x25_root_table[] = { void __init x25_register_sysctl(void) { - x25_table_header = register_sysctl_table(x25_root_table, 1); + x25_table_header = register_sysctl_table(x25_root_table, 0); } void x25_unregister_sysctl(void) -- 1.4.4.1.g278f _______________________________________________ Containers mailing list Containers@lists.osdl.org https://lists.osdl.org/mailman/listinfo/containers
creator: ebiederm
date: 2007-01-16T16:39:06-00:00

[PATCH 2/59] sysctl: Move CTL_SUNRPC to sysctl.h where it belongs
type: item
description: From: Eric W. Biederman <ebiederm@xmission.com> - unquoted Signed-off-by: Eric W. Biederman <ebiederm@xmission.com> --- include/linux/sunrpc/debug.h | 1 - include/linux/sysctl.h | 3 ++- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/include/linux/sunrpc/debug.h b/include/linux/sunrpc/debug.h index 60fce3c..b7c7307 100644 --- a/include/linux/sunrpc/debug.h +++ b/include/linux/sunrpc/debug.h @@ -78,7 +78,6 @@ void rpc_unregister_sysctl(void); * module currently registers its sysctl table dynamically, the sysctl path * for module FOO is <CTL_SUNRPC, CTL_FOODEBUG>. */ -#define CTL_SUNRPC 7249 /* arbitrary and hopefully unused */ enum { CTL_RPCDEBUG = 1, diff --git a/include/linux/sysctl.h b/include/linux/sysctl.h index 81480e6..54a9cf5 100644 --- a/include/linux/sysctl.h +++ b/include/linux/sysctl.h @@ -69,7 +69,8 @@ enum CTL_DEV=7, /* Devices */ CTL_BUS=8, /* Busses */ CTL_ABI=9, /* Binary emulation */ - CTL_CPU=10 /* CPU stuff (speed scaling, etc) */ + CTL_CPU=10, /* CPU stuff (speed scaling, etc) */ + CTL_SUNRPC=7249, /* sunrpc debug */ }; /* CTL_BUS names: */ -- 1.4.4.1.g278f _______________________________________________ Containers mailing list Containers@lists.osdl.org https://lists.osdl.org/mailman/listinfo/containers
creator: ebiederm
date: 2007-01-16T16:39:07-00:00

[PATCH 3/59] sysctl: sunrpc Remove unnecessary insert_at_head flag
type: item
description: From: Eric W. Biederman <ebiederm@xmission.com> - unquoted Because the sunrpc sysctls don't conflict with any other sysctls the setting the insert at head flag to register_sysctl has no semantic meaning. Signed-off-by: Eric W. Biederman <ebiederm@xmission.com> --- net/sunrpc/sysctl.c | 2 +- net/sunrpc/xprtsock.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/net/sunrpc/sysctl.c b/net/sunrpc/sysctl.c index 82b2752..3852689 100644 --- a/net/sunrpc/sysctl.c +++ b/net/sunrpc/sysctl.c @@ -36,7 +36,7 @@ void rpc_register_sysctl(void) { if (!sunrpc_table_header) { - sunrpc_table_header = register_sysctl_table(sunrpc_table, 1); + sunrpc_table_header = register_sysctl_table(sunrpc_table, 0); #ifdef CONFIG_PROC_FS if (sunrpc_table[0].de) sunrpc_table[0].de->owner = THIS_MODULE; diff --git a/net/sunrpc/xprtsock.c b/net/sunrpc/xprtsock.c index 49cabff..98d1af9 100644 --- a/net/sunrpc/xprtsock.c +++ b/net/sunrpc/xprtsock.c @@ -1630,7 +1630,7 @@ int init_socket_xprt(void) { #ifdef RPC_DEBUG if (!sunrpc_table_header) { - sunrpc_table_header = register_sysctl_table(sunrpc_table, 1); + sunrpc_table_header = register_sysctl_table(sunrpc_table, 0); #ifdef CONFIG_PROC_FS if (sunrpc_table[0].de) sunrpc_table[0].de->owner = THIS_MODULE; -- 1.4.4.1.g278f _______________________________________________ Containers mailing list Containers@lists.osdl.org https://lists.osdl.org/mailman/listinfo/containers
creator: ebiederm
date: 2007-01-16T16:39:08-00:00

[PATCH 4/59] sysctl: sunrpc Don't unnecessarily set ctl_table->de
type: item
description: From: Eric W. Biederman <ebiederm@xmission.com> - unquoted We don't need this to prevent module unload races so remove the unnecessary code. Signed-off-by: Eric W. Biederman <ebiederm@xmission.com> --- net/sunrpc/sysctl.c | 8 +------- net/sunrpc/xprtsock.c | 7 +------ 2 files changed, 2 insertions(+), 13 deletions(-) diff --git a/net/sunrpc/sysctl.c b/net/sunrpc/sysctl.c index 3852689..6a82ed2 100644 --- a/net/sunrpc/sysctl.c +++ b/net/sunrpc/sysctl.c @@ -35,14 +35,8 @@ static ctl_table sunrpc_table[]; void rpc_register_sysctl(void) { - if (!sunrpc_table_header) { + if (!sunrpc_table_header) sunrpc_table_header = register_sysctl_table(sunrpc_table, 0); -#ifdef CONFIG_PROC_FS - if (sunrpc_table[0].de) - sunrpc_table[0].de->owner = THIS_MODULE; -#endif - } - } void diff --git a/net/sunrpc/xprtsock.c b/net/sunrpc/xprtsock.c index 98d1af9..51964cf 100644 --- a/net/sunrpc/xprtsock.c +++ b/net/sunrpc/xprtsock.c @@ -1629,13 +1629,8 @@ struct rpc_xprt *xs_setup_tcp(struct sockaddr *addr, size_t addrlen, struct rpc_ int init_socket_xprt(void) { #ifdef RPC_DEBUG - if (!sunrpc_table_header) { + if (!sunrpc_table_header) sunrpc_table_header = register_sysctl_table(sunrpc_table, 0); -#ifdef CONFIG_PROC_FS - if (sunrpc_table[0].de) - sunrpc_table[0].de->owner = THIS_MODULE; -#endif - } #endif return 0; -- 1.4.4.1.g278f _______________________________________________ Containers mailing list Containers@lists.osdl.org https://lists.osdl.org/mailman/listinfo/containers
creator: ebiederm
date: 2007-01-16T16:39:09-00:00

[PATCH 5/59] sysctl: rose remove unnecessary insert_at_head flag
type: item
description: From: Eric W. Biederman <ebiederm@xmission.com> - unquoted The sysctl numbers used are unique so setting the insert_at_head flag serves no semantic purpose. Signed-off-by: Eric W. Biederman <ebiederm@xmission.com> --- net/rose/sysctl_net_rose.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/net/rose/sysctl_net_rose.c b/net/rose/sysctl_net_rose.c index 8548c7c..0190a07 100644 --- a/net/rose/sysctl_net_rose.c +++ b/net/rose/sysctl_net_rose.c @@ -160,7 +160,7 @@ static ctl_table rose_root_table[] = { void __init rose_register_sysctl(void) { - rose_table_header = register_sysctl_table(rose_root_table, 1); + rose_table_header = register_sysctl_table(rose_root_table, 0); } void rose_unregister_sysctl(void) -- 1.4.4.1.g278f _______________________________________________ Containers mailing list Containers@lists.osdl.org https://lists.osdl.org/mailman/listinfo/containers
creator: ebiederm
date: 2007-01-16T16:39:10-00:00

[PATCH 6/59] sysctl: netrom remove unnecessary insert_at_head flag
type: item
description: From: Eric W. Biederman <ebiederm@xmission.com> - unquoted The sysctl numbers used are unique so setting the insert_at_head flag serves no semantic purpose, so it is just confusing. Signed-off-by: Eric W. Biederman <ebiederm@xmission.com> --- net/netrom/sysctl_net_netrom.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/net/netrom/sysctl_net_netrom.c b/net/netrom/sysctl_net_netrom.c index 6bb8dda..09f4246 100644 --- a/net/netrom/sysctl_net_netrom.c +++ b/net/netrom/sysctl_net_netrom.c @@ -192,7 +192,7 @@ static ctl_table nr_root_table[] = { void __init nr_register_sysctl(void) { - nr_table_header = register_sysctl_table(nr_root_table, 1); + nr_table_header = register_sysctl_table(nr_root_table, 0); } void nr_unregister_sysctl(void) -- 1.4.4.1.g278f _______________________________________________ Containers mailing list Containers@lists.osdl.org https://lists.osdl.org/mailman/listinfo/containers
creator: ebiederm
date: 2007-01-16T16:39:11-00:00

[PATCH 7/59] sysctl: llc remove unnecessary insert_at_head flag
type: item
description: From: Eric W. Biederman <ebiederm@xmission.com> - unquoted The sysctl numbers used are unique so setting the insert_at_head flag serves no semantis purpose, and is just confusing. Signed-off-by: Eric W. Biederman <ebiederm@xmission.com> --- net/llc/sysctl_net_llc.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/net/llc/sysctl_net_llc.c b/net/llc/sysctl_net_llc.c index 45d7dd9..4aab676 100644 --- a/net/llc/sysctl_net_llc.c +++ b/net/llc/sysctl_net_llc.c @@ -116,7 +116,7 @@ static struct ctl_table_header *llc_table_header; int __init llc_sysctl_init(void) { - llc_table_header = register_sysctl_table(llc_root_table, 1); + llc_table_header = register_sysctl_table(llc_root_table, 0); return llc_table_header ? 0 : -ENOMEM; } -- 1.4.4.1.g278f _______________________________________________ Containers mailing list Containers@lists.osdl.org https://lists.osdl.org/mailman/listinfo/containers
creator: ebiederm
date: 2007-01-16T16:39:12-00:00

[PATCH 8/59] sysctl: ipx remove unnecessary insert_at_head flag
type: item
description: From: Eric W. Biederman <ebiederm@xmission.com> - unquoted The sysctl numbers used are unique so setting the insert_at_head flag servers no semantic purpose and is just confusing. Signed-off-by: Eric W. Biederman <ebiederm@xmission.com> --- net/ipx/sysctl_net_ipx.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/net/ipx/sysctl_net_ipx.c b/net/ipx/sysctl_net_ipx.c index fa57473..0442f44 100644 --- a/net/ipx/sysctl_net_ipx.c +++ b/net/ipx/sysctl_net_ipx.c @@ -52,7 +52,7 @@ static struct ctl_table_header *ipx_table_header; void ipx_register_sysctl(void) { - ipx_table_header = register_sysctl_table(ipx_root_table, 1); + ipx_table_header = register_sysctl_table(ipx_root_table, 0); } void ipx_unregister_sysctl(void) -- 1.4.4.1.g278f _______________________________________________ Containers mailing list Containers@lists.osdl.org https://lists.osdl.org/mailman/listinfo/containers
creator: ebiederm
date: 2007-01-16T16:39:13-00:00

[PATCH 9/59] sysctl: decnet remove unnecessary insert_at_head flag
type: item
description: From: Eric W. Biederman <ebiederm@xmission.com> - unquoted The sysctl numbers used are unique so setting the insert_at_head flag does not succeed in overriding any sysctls, and is just confusing because it doesn't. Clear the flag. Signed-off-by: Eric W. Biederman <ebiederm@xmission.com> --- net/decnet/sysctl_net_decnet.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/net/decnet/sysctl_net_decnet.c b/net/decnet/sysctl_net_decnet.c index a4065eb..81469fd 100644 --- a/net/decnet/sysctl_net_decnet.c +++ b/net/decnet/sysctl_net_decnet.c @@ -491,7 +491,7 @@ static ctl_table dn_root_table[] = { void dn_register_sysctl(void) { - dn_table_header = register_sysctl_table(dn_root_table, 1); + dn_table_header = register_sysctl_table(dn_root_table, 0); } void dn_unregister_sysctl(void) -- 1.4.4.1.g278f _______________________________________________ Containers mailing list Containers@lists.osdl.org https://lists.osdl.org/mailman/listinfo/containers
creator: ebiederm
date: 2007-01-16T16:39:14-00:00

[PATCH 10/59] sysctl: dccp remove unnecessary insert_at_head flag
type: item
description: From: Eric W. Biederman <ebiederm@xmission.com> - unquoted Signed-off-by: Eric W. Biederman <ebiederm@xmission.com> --- net/dccp/sysctl.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/net/dccp/sysctl.c b/net/dccp/sysctl.c index fdcfca3..3391631 100644 --- a/net/dccp/sysctl.c +++ b/net/dccp/sysctl.c @@ -127,7 +127,7 @@ static struct ctl_table_header *dccp_table_header; int __init dccp_sysctl_init(void) { - dccp_table_header = register_sysctl_table(dccp_root_table, 1); + dccp_table_header = register_sysctl_table(dccp_root_table, 0); return dccp_table_header != NULL ? 0 : -ENOMEM; } -- 1.4.4.1.g278f _______________________________________________ Containers mailing list Containers@lists.osdl.org https://lists.osdl.org/mailman/listinfo/containers
creator: ebiederm
date: 2007-01-16T16:39:15-00:00

[PATCH 11/59] sysctl: ax25 remove unnecessary insert_at_head flag
type: item
description: From: Eric W. Biederman <ebiederm@xmission.com> - unquoted Signed-off-by: Eric W. Biederman <ebiederm@xmission.com> --- net/ax25/sysctl_net_ax25.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/net/ax25/sysctl_net_ax25.c b/net/ax25/sysctl_net_ax25.c index d23a27f..afdba04 100644 --- a/net/ax25/sysctl_net_ax25.c +++ b/net/ax25/sysctl_net_ax25.c @@ -245,7 +245,7 @@ void ax25_register_sysctl(void) ax25_dir_table[0].child = ax25_table; - ax25_table_header = register_sysctl_table(ax25_root_table, 1); + ax25_table_header = register_sysctl_table(ax25_root_table, 0); } void ax25_unregister_sysctl(void) -- 1.4.4.1.g278f _______________________________________________ Containers mailing list Containers@lists.osdl.org https://lists.osdl.org/mailman/listinfo/containers
creator: ebiederm
date: 2007-01-16T16:39:16-00:00

[PATCH 12/59] sysctl: atalk remove unnecessary insert_at_head flag
type: item
description: From: Eric W. Biederman <ebiederm@xmission.com> - unquoted Signed-off-by: Eric W. Biederman <ebiederm@xmission.com> --- net/appletalk/sysctl_net_atalk.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/net/appletalk/sysctl_net_atalk.c b/net/appletalk/sysctl_net_atalk.c index 40b0af7..4f806b6 100644 --- a/net/appletalk/sysctl_net_atalk.c +++ b/net/appletalk/sysctl_net_atalk.c @@ -73,7 +73,7 @@ static struct ctl_table_header *atalk_table_header; void atalk_register_sysctl(void) { - atalk_table_header = register_sysctl_table(atalk_root_table, 1); + atalk_table_header = register_sysctl_table(atalk_root_table, 0); } void atalk_unregister_sysctl(void) -- 1.4.4.1.g278f _______________________________________________ Containers mailing list Containers@lists.osdl.org https://lists.osdl.org/mailman/listinfo/containers
creator: ebiederm
date: 2007-01-16T16:39:17-00:00

[PATCH 13/59] sysctl: xfs remove unnecessary insert_at_head flag
type: item
description: From: Eric W. Biederman <ebiederm@xmission.com> - unquoted Signed-off-by: Eric W. Biederman <ebiederm@xmission.com> --- fs/xfs/linux-2.6/xfs_sysctl.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/fs/xfs/linux-2.6/xfs_sysctl.c b/fs/xfs/linux-2.6/xfs_sysctl.c index af24653..af777e9 100644 --- a/fs/xfs/linux-2.6/xfs_sysctl.c +++ b/fs/xfs/linux-2.6/xfs_sysctl.c @@ -149,7 +149,7 @@ STATIC ctl_table xfs_root_table[] = { void xfs_sysctl_register(void) { - xfs_table_header = register_sysctl_table(xfs_root_table, 1); + xfs_table_header = register_sysctl_table(xfs_root_table, 0); } void -- 1.4.4.1.g278f _______________________________________________ Containers mailing list Containers@lists.osdl.org https://lists.osdl.org/mailman/listinfo/containers
creator: ebiederm
date: 2007-01-16T16:39:18-00:00

[PATCH 14/59] sysctl: C99 convert xfs ctl_tables
type: item
description: From: Eric W. Biederman <ebiederm@xmission.com> - unquoted Signed-off-by: Eric W. Biederman <ebiederm@xmission.com> --- fs/xfs/linux-2.6/xfs_sysctl.c | 258 ++++++++++++++++++++++++++++------------ 1 files changed, 180 insertions(+), 78 deletions(-) diff --git a/fs/xfs/linux-2.6/xfs_sysctl.c b/fs/xfs/linux-2.6/xfs_sysctl.c index af777e9..5a0eefc 100644 --- a/fs/xfs/linux-2.6/xfs_sysctl.c +++ b/fs/xfs/linux-2.6/xfs_sysctl.c @@ -55,95 +55,197 @@ xfs_stats_clear_proc_handler( #endif /* CONFIG_PROC_FS */ STATIC ctl_table xfs_table[] = { - {XFS_RESTRICT_CHOWN, "restrict_chown", &xfs_params.restrict_chown.val, - sizeof(int), 0644, NULL, &proc_dointvec_minmax, - &sysctl_intvec, NULL, - &xfs_params.restrict_chown.min, &xfs_params.restrict_chown.max}, - - {XFS_SGID_INHERIT, "irix_sgid_inherit", &xfs_params.sgid_inherit.val, - sizeof(int), 0644, NULL, &proc_dointvec_minmax, - &sysctl_intvec, NULL, - &xfs_params.sgid_inherit.min, &xfs_params.sgid_inherit.max}, - - {XFS_SYMLINK_MODE, "irix_symlink_mode", &xfs_params.symlink_mode.val, - sizeof(int), 0644, NULL, &proc_dointvec_minmax, - &sysctl_intvec, NULL, - &xfs_params.symlink_mode.min, &xfs_params.symlink_mode.max}, - - {XFS_PANIC_MASK, "panic_mask", &xfs_params.panic_mask.val, - sizeof(int), 0644, NULL, &proc_dointvec_minmax, - &sysctl_intvec, NULL, - &xfs_params.panic_mask.min, &xfs_params.panic_mask.max}, - - {XFS_ERRLEVEL, "error_level", &xfs_params.error_level.val, - sizeof(int), 0644, NULL, &proc_dointvec_minmax, - &sysctl_intvec, NULL, - &xfs_params.error_level.min, &xfs_params.error_level.max}, - - {XFS_SYNCD_TIMER, "xfssyncd_centisecs", &xfs_params.syncd_timer.val, - sizeof(int), 0644, NULL, &proc_dointvec_minmax, - &sysctl_intvec, NULL, - &xfs_params.syncd_timer.min, &xfs_params.syncd_timer.max}, - - {XFS_INHERIT_SYNC, "inherit_sync", &xfs_params.inherit_sync.val, - sizeof(int), 0644, NULL, &proc_dointvec_minmax, - &sysctl_intvec, NULL, - &xfs_params.inherit_sync.min, &xfs_params.inherit_sync.max}, - - {XFS_INHERIT_N…
creator: ebiederm
date: 2007-01-16T16:39:19-00:00

[PATCH 15/59] sysctl: scsi remove unnecessary insert_at_head flag
type: item
description: From: Eric W. Biederman <ebiederm@xmission.com> - unquoted Signed-off-by: Eric W. Biederman <ebiederm@xmission.com> --- drivers/scsi/scsi_sysctl.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/drivers/scsi/scsi_sysctl.c b/drivers/scsi/scsi_sysctl.c index 04d06c2..b16b775 100644 --- a/drivers/scsi/scsi_sysctl.c +++ b/drivers/scsi/scsi_sysctl.c @@ -41,7 +41,7 @@ static struct ctl_table_header *scsi_table_header; int __init scsi_init_sysctl(void) { - scsi_table_header = register_sysctl_table(scsi_root_table, 1); + scsi_table_header = register_sysctl_table(scsi_root_table, 0); if (!scsi_table_header) return -ENOMEM; return 0; -- 1.4.4.1.g278f _______________________________________________ Containers mailing list Containers@lists.osdl.org https://lists.osdl.org/mailman/listinfo/containers
creator: ebiederm
date: 2007-01-16T16:39:20-00:00

[PATCH 16/59] sysctl: md Remove unnecessary insert_at_head flag
type: item
description: From: Eric W. Biederman <ebiederm@xmission.com> - unquoted The sysctls used by the md driver are have unique binary numbers so remove the insert_at_head flag as it serves no useful purpose. Signed-off-by: Eric W. Biederman <ebiederm@xmission.com> --- drivers/md/md.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/drivers/md/md.c b/drivers/md/md.c index d1cb45f..966e8be 100644 --- a/drivers/md/md.c +++ b/drivers/md/md.c @@ -5551,7 +5551,7 @@ static int __init md_init(void) md_probe, NULL, NULL); register_reboot_notifier(&md_notifier); - raid_table_header = register_sysctl_table(raid_root_table, 1); + raid_table_header = register_sysctl_table(raid_root_table, 0); md_geninit(); return (0); -- 1.4.4.1.g278f _______________________________________________ Containers mailing list Containers@lists.osdl.org https://lists.osdl.org/mailman/listinfo/containers
creator: ebiederm
date: 2007-01-16T16:39:21-00:00

[PATCH 17/59] sysctl: mac_hid remove unnecessary insert_at_head flag
type: item
description: From: Eric W. Biederman <ebiederm@xmission.com> - unquoted With unique sysctl binary numbers setting insert_at_head is pointless. Signed-off-by: Eric W. Biederman <ebiederm@xmission.com> --- drivers/macintosh/mac_hid.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/drivers/macintosh/mac_hid.c b/drivers/macintosh/mac_hid.c index ee6b4ca..c676740 100644 --- a/drivers/macintosh/mac_hid.c +++ b/drivers/macintosh/mac_hid.c @@ -138,7 +138,7 @@ int __init mac_hid_init(void) return err; #if defined(CONFIG_SYSCTL) - mac_hid_sysctl_header = register_sysctl_table(mac_hid_root_dir, 1); + mac_hid_sysctl_header = register_sysctl_table(mac_hid_root_dir, 0); #endif /* CONFIG_SYSCTL */ return 0; -- 1.4.4.1.g278f _______________________________________________ Containers mailing list Containers@lists.osdl.org https://lists.osdl.org/mailman/listinfo/containers
creator: ebiederm
date: 2007-01-16T16:39:22-00:00

[PATCH 18/59] sysctl: ipmi remove unnecessary insert_at_head flag
type: item
description: From: Eric W. Biederman <ebiederm@xmission.com> - unquoted With unique sysctl binary numbers setting insert_at_head is pointless. Signed-off-by: Eric W. Biederman <ebiederm@xmission.com> --- drivers/char/ipmi/ipmi_poweroff.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/drivers/char/ipmi/ipmi_poweroff.c b/drivers/char/ipmi/ipmi_poweroff.c index 9d23136..b3ae65e 100644 --- a/drivers/char/ipmi/ipmi_poweroff.c +++ b/drivers/char/ipmi/ipmi_poweroff.c @@ -686,7 +686,7 @@ static int ipmi_poweroff_init (void) printk(KERN_INFO PFX "Power cycle is enabled.\n"); #ifdef CONFIG_PROC_FS - ipmi_table_header = register_sysctl_table(ipmi_root_table, 1); + ipmi_table_header = register_sysctl_table(ipmi_root_table, 0); if (!ipmi_table_header) { printk(KERN_ERR PFX "Unable to register powercycle sysctl\n"); rv = -ENOMEM; -- 1.4.4.1.g278f _______________________________________________ Containers mailing list Containers@lists.osdl.org https://lists.osdl.org/mailman/listinfo/containers
creator: ebiederm
date: 2007-01-16T16:39:23-00:00

[PATCH 19/59] sysctl: cdrom remove unnecessary insert_at_head flag
type: item
description: From: Eric W. Biederman <ebiederm@xmission.com> - unquoted With unique binary sysctl numbers setting insert_at_head to override other sysctl entries is pointless. Signed-off-by: Eric W. Biederman <ebiederm@xmission.com> --- drivers/cdrom/cdrom.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/drivers/cdrom/cdrom.c b/drivers/cdrom/cdrom.c index 3105ddd..f0a6801 100644 --- a/drivers/cdrom/cdrom.c +++ b/drivers/cdrom/cdrom.c @@ -3553,7 +3553,7 @@ static void cdrom_sysctl_register(void) if (initialized == 1) return; - cdrom_sysctl_header = register_sysctl_table(cdrom_root_table, 1); + cdrom_sysctl_header = register_sysctl_table(cdrom_root_table, 0); if (cdrom_root_table->ctl_name && cdrom_root_table->child->de) cdrom_root_table->child->de->owner = THIS_MODULE; -- 1.4.4.1.g278f _______________________________________________ Containers mailing list Containers@lists.osdl.org https://lists.osdl.org/mailman/listinfo/containers
creator: ebiederm
date: 2007-01-16T16:39:24-00:00

[PATCH 20/59] sysctl: cdrom Don't set de->owner
type: item
description: From: Eric W. Biederman <ebiederm@xmission.com> - unquoted There is no need for open files in /proc/sys/XXX to hold a reference count on the module that provides the file to prevent module unload races. While there is code active in the module p->used in the sysctl_table_header is incremented, preventing the sysctl from being unregisted. Once the sysctl is unregistered it cannot be found. Open files are also not a problem as they revalidate the sysctl information and bump p->used before accessing module code. So setting de->owner is unnecessary, makes for a bad example and gets in my way of removing ctl_table->de. Signed-off-by: Eric W. Biederman <ebiederm@xmission.com> --- drivers/cdrom/cdrom.c | 2 -- 1 files changed, 0 insertions(+), 2 deletions(-) diff --git a/drivers/cdrom/cdrom.c b/drivers/cdrom/cdrom.c index f0a6801..14f72c4 100644 --- a/drivers/cdrom/cdrom.c +++ b/drivers/cdrom/cdrom.c @@ -3554,8 +3554,6 @@ static void cdrom_sysctl_register(void) return; cdrom_sysctl_header = register_sysctl_table(cdrom_root_table, 0); - if (cdrom_root_table->ctl_name && cdrom_root_table->child->de) - cdrom_root_table->child->de->owner = THIS_MODULE; /* set the defaults */ cdrom_sysctl_settings.autoclose = autoclose; -- 1.4.4.1.g278f _______________________________________________ Containers mailing list Containers@lists.osdl.org https://lists.osdl.org/mailman/listinfo/containers
creator: ebiederm
date: 2007-01-16T16:39:25-00:00

[PATCH 21/59] sysctl: Move CTL_PM into sysctl.h where it belongs.
type: item
description: From: Eric W. Biederman <ebiederm@xmission.com> - unquoted Signed-off-by: Eric W. Biederman <ebiederm@xmission.com> --- arch/frv/kernel/pm.c | 1 - include/linux/sysctl.h | 1 + 2 files changed, 1 insertions(+), 1 deletions(-) diff --git a/arch/frv/kernel/pm.c b/arch/frv/kernel/pm.c index ee677ce..6b76466 100644 --- a/arch/frv/kernel/pm.c +++ b/arch/frv/kernel/pm.c @@ -125,7 +125,6 @@ unsigned long sleep_phys_sp(void *sp) * Use a temporary sysctl number. Horrid, but will be cleaned up in 2.6 * when all the PM interfaces exist nicely. */ -#define CTL_PM 9899 #define CTL_PM_SUSPEND 1 #define CTL_PM_CMODE 2 #define CTL_PM_P0 4 diff --git a/include/linux/sysctl.h b/include/linux/sysctl.h index 54a9cf5..e7c40b6 100644 --- a/include/linux/sysctl.h +++ b/include/linux/sysctl.h @@ -71,6 +71,7 @@ enum CTL_ABI=9, /* Binary emulation */ CTL_CPU=10, /* CPU stuff (speed scaling, etc) */ CTL_SUNRPC=7249, /* sunrpc debug */ + CTL_PM=9899, /* frv power management */ }; /* CTL_BUS names: */ -- 1.4.4.1.g278f _______________________________________________ Containers mailing list Containers@lists.osdl.org https://lists.osdl.org/mailman/listinfo/containers
creator: ebiederm
date: 2007-01-16T16:39:26-00:00

[PATCH 22/59] sysctl: frv pm remove unnecessary insert_at_head flag
type: item
description: From: Eric W. Biederman <ebiederm@xmission.com> - unquoted With unique binary numbers setting insert_at_head to insert yourself at the head of sysctl list and thus override existing sysctl entries serves no point. Signed-off-by: Eric W. Biederman <ebiederm@xmission.com> --- arch/frv/kernel/pm.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/arch/frv/kernel/pm.c b/arch/frv/kernel/pm.c index 6b76466..c1840d6 100644 --- a/arch/frv/kernel/pm.c +++ b/arch/frv/kernel/pm.c @@ -419,7 +419,7 @@ static struct ctl_table pm_dir_table[] = */ static int __init pm_init(void) { - register_sysctl_table(pm_dir_table, 1); + register_sysctl_table(pm_dir_table, 0); return 0; } -- 1.4.4.1.g278f _______________________________________________ Containers mailing list Containers@lists.osdl.org https://lists.osdl.org/mailman/listinfo/containers
creator: ebiederm
date: 2007-01-16T16:39:27-00:00

[PATCH 23/59] sysctl: Move CTL_FRV into sysctl.h where it belongs
type: item
description: From: Eric W. Biederman <ebiederm@xmission.com> - unquoted Signed-off-by: Eric W. Biederman <ebiederm@xmission.com> --- arch/frv/kernel/sysctl.c | 1 - include/linux/sysctl.h | 1 + 2 files changed, 1 insertions(+), 1 deletions(-) diff --git a/arch/frv/kernel/sysctl.c b/arch/frv/kernel/sysctl.c index ce67680..2f4da32 100644 --- a/arch/frv/kernel/sysctl.c +++ b/arch/frv/kernel/sysctl.c @@ -186,7 +186,6 @@ static struct ctl_table frv_table[] = * Use a temporary sysctl number. Horrid, but will be cleaned up in 2.6 * when all the PM interfaces exist nicely. */ -#define CTL_FRV 9898 static struct ctl_table frv_dir_table[] = { {CTL_FRV, "frv", NULL, 0, 0555, frv_table}, diff --git a/include/linux/sysctl.h b/include/linux/sysctl.h index e7c40b6..71c16b4 100644 --- a/include/linux/sysctl.h +++ b/include/linux/sysctl.h @@ -72,6 +72,7 @@ enum CTL_CPU=10, /* CPU stuff (speed scaling, etc) */ CTL_SUNRPC=7249, /* sunrpc debug */ CTL_PM=9899, /* frv power management */ + CTL_FRV=9898, /* frv specific sysctls */ }; /* CTL_BUS names: */ -- 1.4.4.1.g278f _______________________________________________ Containers mailing list Containers@lists.osdl.org https://lists.osdl.org/mailman/listinfo/containers
creator: ebiederm
date: 2007-01-16T16:39:28-00:00

[PATCH 24/59] sysctl: frv remove unnecessary insert_at_head flag
type: item
description: From: Eric W. Biederman <ebiederm@xmission.com> - unquoted Since the binary sysctl numbers are unique putting the registered sysctls at the head of the sysctl list where they can override existing sysctls serves no useful purpose. Signed-off-by: Eric W. Biederman <ebiederm@xmission.com> --- arch/frv/kernel/sysctl.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/arch/frv/kernel/sysctl.c b/arch/frv/kernel/sysctl.c index 2f4da32..37528eb 100644 --- a/arch/frv/kernel/sysctl.c +++ b/arch/frv/kernel/sysctl.c @@ -197,7 +197,7 @@ static struct ctl_table frv_dir_table[] = */ static int __init frv_sysctl_init(void) { - register_sysctl_table(frv_dir_table, 1); + register_sysctl_table(frv_dir_table, 0); return 0; } -- 1.4.4.1.g278f _______________________________________________ Containers mailing list Containers@lists.osdl.org https://lists.osdl.org/mailman/listinfo/containers
creator: ebiederm
date: 2007-01-16T16:39:29-00:00

[PATCH 25/59] sysctl: C99 convert arch/frv/kernel/pm.c
type: item
description: From: Eric W. Biederman <ebiederm@xmission.com> - unquoted Signed-off-by: Eric W. Biederman <ebiederm@xmission.com> --- arch/frv/kernel/pm.c | 50 +++++++++++++++++++++++++++++++++++++++++++------- 1 files changed, 43 insertions(+), 7 deletions(-) diff --git a/arch/frv/kernel/pm.c b/arch/frv/kernel/pm.c index c1840d6..aa50333 100644 --- a/arch/frv/kernel/pm.c +++ b/arch/frv/kernel/pm.c @@ -401,17 +401,53 @@ static int cm_sysctl(ctl_table *table, int __user *name, int nlen, static struct ctl_table pm_table[] = { - {CTL_PM_SUSPEND, "suspend", NULL, 0, 0200, NULL, &sysctl_pm_do_suspend}, - {CTL_PM_CMODE, "cmode", &clock_cmode_current, sizeof(int), 0644, NULL, &cmode_procctl, &cmode_sysctl, NULL}, - {CTL_PM_P0, "p0", &clock_p0_current, sizeof(int), 0644, NULL, &p0_procctl, &p0_sysctl, NULL}, - {CTL_PM_CM, "cm", &clock_cm_current, sizeof(int), 0644, NULL, &cm_procctl, &cm_sysctl, NULL}, - {0} + { + .ctl_name = CTL_PM_SUSPEND, + .procname = "suspend", + .data = NULL, + .maxlen = 0, + .mode = 0200, + .proc_handler = &sysctl_pm_do_suspend, + }, + { + .ctl_name = CTL_PM_CMODE, + .procname = "cmode", + .data = &clock_cmode_current, + .maxlen = sizeof(int), + .mode = 0644, + .proc_handler = &cmode_procctl, + .strategy = &cmode_sysctl, + }, + { + .ctl_name = CTL_PM_P0, + .procname = "p0", + .data = &clock_p0_current, + .maxlen = sizeof(int), + .mode = 0644, + .proc_handler = &p0_procctl, + .strategy = &p0_sysctl, + }, + { + .ctl_name = CTL_PM_CM, + .procname = "cm", + .data = &clock_cm_current, + .maxlen = sizeof(int), + .mode = 0644, + .proc_handler = &cm_procctl, + .strategy = &cm_sysctl, + }, + { .ctl_name = 0} }; static struct ctl_table pm_dir_table[] = { - {CTL_PM, "pm", NULL, 0, 0555, pm_table}, - {0} + { + .ctl_name = CTL_PM, + .procname = "pm", + .mode = 0555, + .child = pm_table, + }, + { .ctl_name = 0} }; /* -- 1.4.4.1.g278f _______________________________________________ Containers mailing list Containers@lists.osdl.org https://lists.osdl.org/mailman/listinfo/containe…
creator: ebiederm
date: 2007-01-16T16:39:30-00:00

[PATCH 26/59] sysctl: C99 convert arch/frv/kernel/sysctl.c
type: item
description: From: Eric W. Biederman <ebiederm@xmission.com> - unquoted Signed-off-by: Eric W. Biederman <ebiederm@xmission.com> --- arch/frv/kernel/sysctl.c | 29 ++++++++++++++++++++++++----- 1 files changed, 24 insertions(+), 5 deletions(-) diff --git a/arch/frv/kernel/sysctl.c b/arch/frv/kernel/sysctl.c index 37528eb..577ad16 100644 --- a/arch/frv/kernel/sysctl.c +++ b/arch/frv/kernel/sysctl.c @@ -175,11 +175,25 @@ static int procctl_frv_pin_cxnr(ctl_table *table, int write, struct file *filp, */ static struct ctl_table frv_table[] = { - { 1, "cache-mode", NULL, 0, 0644, NULL, &procctl_frv_cachemode }, + { + .ctl_name = 1, + .procname = "cache-mode", + .data = NULL, + .maxlen = 0, + .mode = 0644, + .proc_handler = &procctl_frv_cachemode, + }, #ifdef CONFIG_MMU - { 2, "pin-cxnr", NULL, 0, 0644, NULL, &procctl_frv_pin_cxnr }, + { + .ctl_name = 2, + .procname = "pin-cxnr", + .data = NULL, + .maxlen = 0, + .mode = 0644, + .proc_handler = &procctl_frv_pin_cxnr + }, #endif - { 0 } + {} }; /* @@ -188,8 +202,13 @@ static struct ctl_table frv_table[] = */ static struct ctl_table frv_dir_table[] = { - {CTL_FRV, "frv", NULL, 0, 0555, frv_table}, - {0} + { + .ctl_name = CTL_FRV, + .procname = "frv", + .mode = 0555, + .child = frv_table + }, + {} }; /* -- 1.4.4.1.g278f _______________________________________________ Containers mailing list Containers@lists.osdl.org https://lists.osdl.org/mailman/listinfo/containers
creator: ebiederm
date: 2007-01-16T16:39:31-00:00

[PATCH 27/59] sysctl: sn Remove sysctl ABI BREAKAGE
type: item
description: From: Eric W. Biederman <ebiederm@xmission.com> - unquoted By not using the enumeration in sysctl.h (or even understanding it) the SN platform placed their arch specific xpc directory on top of CTL_KERN and only because they didn't have 4 entries in their xpc directory got lucky and didn't break glibc. This is totally irresponsible. So this patch entirely removes sys_sysctl support from their sysctl code. Hopefully they don't have ascii name conflicts as well. And now that they have no ABI numbers add them to the end instead of the sysctl list instead of the head so nothing else will be overridden. Cc: Tony Luck <tony.luck@intel.com> Signed-off-by: Eric W. Biederman <ebiederm@xmission.com> --- arch/ia64/sn/kernel/xpc_main.c | 12 ++++++------ 1 files changed, 6 insertions(+), 6 deletions(-) diff --git a/arch/ia64/sn/kernel/xpc_main.c b/arch/ia64/sn/kernel/xpc_main.c index 7a387d2..24adb75 100644 --- a/arch/ia64/sn/kernel/xpc_main.c +++ b/arch/ia64/sn/kernel/xpc_main.c @@ -101,7 +101,7 @@ static int xpc_disengage_request_max_timelimit = 120; static ctl_table xpc_sys_xpc_hb_dir[] = { { - 1, + CTL_UNNUMBERED, "hb_interval", &xpc_hb_interval, sizeof(int), @@ -114,7 +114,7 @@ static ctl_table xpc_sys_xpc_hb_dir[] = { &xpc_hb_max_interval }, { - 2, + CTL_UNNUMBERED, "hb_check_interval", &xpc_hb_check_interval, sizeof(int), @@ -130,7 +130,7 @@ static ctl_table xpc_sys_xpc_hb_dir[] = { }; static ctl_table xpc_sys_xpc_dir[] = { { - 1, + CTL_UNNUMBERED, "hb", NULL, 0, @@ -138,7 +138,7 @@ static ctl_table xpc_sys_xpc_dir[] = { xpc_sys_xpc_hb_dir }, { - 2, + CTL_UNNUMBERED, "disengage_request_timelimit", &xpc_disengage_request_timelimit, sizeof(int), @@ -154,7 +154,7 @@ static ctl_table xpc_sys_xpc_dir[] = { }; static ctl_table xpc_sys_dir[] = { { - 1, + CTL_UNNUMBERED, "xpc", NULL, 0, @@ -1251,7 +1251,7 @@ xpc_init(void) snprintf(xpc_part->bus_id, BUS_ID_SIZE, "part"); snprintf(xpc_chan->bus_id, BUS_ID_SIZE, "chan"); - xpc_sysctl = register_sysctl_table(xpc_sys_dir, 1); + xpc_s…
creator: ebiederm
date: 2007-01-16T16:39:32-00:00

[PATCH 28/59] sysctl: C99 Convert arch/ia64/sn/kernel/xpc_main.c
type: item
description: From: Eric W. Biederman <ebiederm@xmission.com> - unquoted Signed-off-by: Eric W. Biederman <ebiederm@xmission.com> --- arch/ia64/sn/kernel/xpc_main.c | 86 +++++++++++++++++---------------------- 1 files changed, 38 insertions(+), 48 deletions(-) diff --git a/arch/ia64/sn/kernel/xpc_main.c b/arch/ia64/sn/kernel/xpc_main.c index 24adb75..e04f7b5 100644 --- a/arch/ia64/sn/kernel/xpc_main.c +++ b/arch/ia64/sn/kernel/xpc_main.c @@ -101,67 +101,57 @@ static int xpc_disengage_request_max_timelimit = 120; static ctl_table xpc_sys_xpc_hb_dir[] = { { - CTL_UNNUMBERED, - "hb_interval", - &xpc_hb_interval, - sizeof(int), - 0644, - NULL, - &proc_dointvec_minmax, - &sysctl_intvec, - NULL, - &xpc_hb_min_interval, - &xpc_hb_max_interval + .ctl_name = CTL_UNNUMBERED, + .procname = "hb_interval", + .data = &xpc_hb_interval, + .maxlen = sizeof(int), + .mode = 0644, + .proc_handler = &proc_dointvec_minmax, + .strategy = &sysctl_intvec, + .extra1 = &xpc_hb_min_interval, + .extra2 = &xpc_hb_max_interval }, { - CTL_UNNUMBERED, - "hb_check_interval", - &xpc_hb_check_interval, - sizeof(int), - 0644, - NULL, - &proc_dointvec_minmax, - &sysctl_intvec, - NULL, - &xpc_hb_check_min_interval, - &xpc_hb_check_max_interval + .ctl_name = CTL_UNNUMBERED, + .procname = "hb_check_interval", + .data = &xpc_hb_check_interval, + .maxlen = sizeof(int), + .mode = 0644, + .proc_handler = &proc_dointvec_minmax, + .strategy = &sysctl_intvec, + .extra1 = &xpc_hb_check_min_interval, + .extra2 = &xpc_hb_check_max_interval }, - {0} + {} }; static ctl_table xpc_sys_xpc_dir[] = { { - CTL_UNNUMBERED, - "hb", - NULL, - 0, - 0555, - xpc_sys_xpc_hb_dir + .ctl_name = CTL_UNNUMBERED, + .procname = "hb", + .mode = 0555, + .child = xpc_sys_xpc_hb_dir }, { - CTL_UNNUMBERED, - "disengage_request_timelimit", - &xpc_disengage_request_timelimit, - sizeof(int), - 0644, - NULL, - &proc_dointvec_minmax, - &sysctl_intvec, - NULL, - &xpc_disengage_request_min_timelimit, - &xpc_disengage_request_max_timelimit + .ctl_name = CTL_UNNUMB…
creator: ebiederm
date: 2007-01-16T16:39:33-00:00

[PATCH 29/59] sysctl: C99 convert arch/ia64/kernel/perfmon and remove ABI breakage
type: item
description: From: Eric W. Biederman <ebiederm@xmission.com> - unquoted This convers the sysctl ctl_tables to use C99 initializers. While I was looking at it I discovered it was using a portion of the sysctl binary addresses space under CTL_KERN KERN_OSTYPE which was completely inappropriate. So I completely removed all of the sysctl binary names, to remove and avoid the ABI conflict. Signed-off-by: Eric W. Biederman <ebiederm@xmission.com> --- arch/ia64/kernel/perfmon.c | 56 ++++++++++++++++++++++++++++++++++++------- 1 files changed, 47 insertions(+), 9 deletions(-) diff --git a/arch/ia64/kernel/perfmon.c b/arch/ia64/kernel/perfmon.c index aa94f60..8c679ab 100644 --- a/arch/ia64/kernel/perfmon.c +++ b/arch/ia64/kernel/perfmon.c @@ -521,19 +521,57 @@ pfm_sysctl_t pfm_sysctl; EXPORT_SYMBOL(pfm_sysctl); static ctl_table pfm_ctl_table[]={ - {1, "debug", &pfm_sysctl.debug, sizeof(int), 0666, NULL, &proc_dointvec, NULL,}, - {2, "debug_ovfl", &pfm_sysctl.debug_ovfl, sizeof(int), 0666, NULL, &proc_dointvec, NULL,}, - {3, "fastctxsw", &pfm_sysctl.fastctxsw, sizeof(int), 0600, NULL, &proc_dointvec, NULL,}, - {4, "expert_mode", &pfm_sysctl.expert_mode, sizeof(int), 0600, NULL, &proc_dointvec, NULL,}, - { 0, }, + { + .ctl_name = CTL_UNNUMBERED, + .procname = "debug", + .data = &pfm_sysctl.debug, + .maxlen = sizeof(int), + .mode = 0666, + .proc_handler = &proc_dointvec, + }, + { + .ctl_name = CTL_UNNUMBERED, + .procname = "debug_ovfl", + .data = &pfm_sysctl.debug_ovfl, + .maxlen = sizeof(int), + .mode = 0666, + .proc_handler = &proc_dointvec, + }, + { + .ctl_name = CTL_UNNUMBERED, + .procname = "fastctxsw", + .data = &pfm_sysctl.fastctxsw, + .maxlen = sizeof(int), + .mode = 0600, + .proc_handler = &proc_dointvec, + }, + { + .ctl_name = CTL_UNNUMBERED, + .procname = "expert_mode", + .data = &pfm_sysctl.expert_mode, + .maxlen = sizeof(int), + .mode = 0600, + .proc_handler = &proc_dointvec, + }, + {} }; static ctl_table pfm_sysctl_dir[] = { - {1, "perfmon", NULL, 0, 0755, pfm_ctl_table, }, - …
creator: ebiederm
date: 2007-01-16T16:39:34-00:00

[PATCH 30/59] sysctl: mips/au1000 Remove sys_sysctl support
type: item
description: From: Eric W. Biederman <ebiederm@xmission.com> - unquoted The assignment of binary numbers for sys_sysctl use was in shambles and despite requiring methods. Nothing was implemented on the sys_sysctl side. So this patch gives a mercy killing to the sys_sysctl support for powermanagment on mips/au1000. Signed-off-by: Eric W. Biederman <ebiederm@xmission.com> --- arch/mips/au1000/common/power.c | 16 +++++----------- 1 files changed, 5 insertions(+), 11 deletions(-) diff --git a/arch/mips/au1000/common/power.c b/arch/mips/au1000/common/power.c index 7504a63..b531ab7 100644 --- a/arch/mips/au1000/common/power.c +++ b/arch/mips/au1000/common/power.c @@ -62,12 +62,6 @@ extern unsigned long save_local_and_disable(int controller); extern void restore_local_and_enable(int controller, unsigned long mask); extern void local_enable_irq(unsigned int irq_nr); -/* Quick acpi hack. This will have to change! */ -#define CTL_ACPI 9999 -#define ACPI_S1_SLP_TYP 19 -#define ACPI_SLEEP 21 - - static DEFINE_SPINLOCK(pm_lock); /* We need to save/restore a bunch of core registers that are @@ -425,14 +419,14 @@ static int pm_do_freq(ctl_table * ctl, int write, struct file *file, static struct ctl_table pm_table[] = { - {ACPI_S1_SLP_TYP, "suspend", NULL, 0, 0600, NULL, &pm_do_suspend}, - {ACPI_SLEEP, "sleep", NULL, 0, 0600, NULL, &pm_do_sleep}, - {CTL_ACPI, "freq", NULL, 0, 0600, NULL, &pm_do_freq}, + {CTL_UNNUMBERED, "suspend", NULL, 0, 0600, NULL, &pm_do_suspend}, + {CTL_UNNUMBERED, "sleep", NULL, 0, 0600, NULL, &pm_do_sleep}, + {CTL_UNNUMBERED, "freq", NULL, 0, 0600, NULL, &pm_do_freq}, {0} }; static struct ctl_table pm_dir_table[] = { - {CTL_ACPI, "pm", NULL, 0, 0555, pm_table}, + {CTL_UNNUMBERED, "pm", NULL, 0, 0555, pm_table}, {0} }; @@ -441,7 +435,7 @@ static struct ctl_table pm_dir_table[] = { */ static int __init pm_init(void) { - register_sysctl_table(pm_dir_table, 1); + register_sysctl_table(pm_dir_table, 0); return 0; } -- 1.4.4.1.g278f ____________________________________________…
creator: ebiederm
date: 2007-01-16T16:39:35-00:00

[PATCH 31/59] sysctl: C99 convert the ctl_tables in arch/mips/au1000/common/power.c
type: item
description: From: Eric W. Biederman <ebiederm@xmission.com> - unquoted Signed-off-by: Eric W. Biederman <ebiederm@xmission.com> --- arch/mips/au1000/common/power.c | 38 ++++++++++++++++++++++++++++++++------ 1 files changed, 32 insertions(+), 6 deletions(-) diff --git a/arch/mips/au1000/common/power.c b/arch/mips/au1000/common/power.c index b531ab7..31256b8 100644 --- a/arch/mips/au1000/common/power.c +++ b/arch/mips/au1000/common/power.c @@ -419,15 +419,41 @@ static int pm_do_freq(ctl_table * ctl, int write, struct file *file, static struct ctl_table pm_table[] = { - {CTL_UNNUMBERED, "suspend", NULL, 0, 0600, NULL, &pm_do_suspend}, - {CTL_UNNUMBERED, "sleep", NULL, 0, 0600, NULL, &pm_do_sleep}, - {CTL_UNNUMBERED, "freq", NULL, 0, 0600, NULL, &pm_do_freq}, - {0} + { + .ctl_name = CTL_UNNUMBERED, + .procname = "suspend", + .data = NULL, + .maxlen = 0, + .mode = 0600, + .proc_handler = &pm_do_suspend + }, + { + .ctl_name = CTL_UNNUMBERED, + .procname = "sleep", + .data = NULL, + .maxlen = 0, + .mode = 0600, + .proc_handler = &pm_do_sleep + }, + { + .ctl_name = CTL_UNNUMBERED, + .procname = "freq", + .data = NULL, + .maxlen = 0, + .mode = 0600, + .proc_handler = &pm_do_freq + }, + {} }; static struct ctl_table pm_dir_table[] = { - {CTL_UNNUMBERED, "pm", NULL, 0, 0555, pm_table}, - {0} + { + .ctl_name = CTL_UNNUMBERED, + .procname = "pm", + .mode = 0555, + .child = pm_table + }, + {} }; /* -- 1.4.4.1.g278f _______________________________________________ Containers mailing list Containers@lists.osdl.org https://lists.osdl.org/mailman/listinfo/containers
creator: ebiederm
date: 2007-01-16T16:39:36-00:00

[PATCH 32/59] sysctl: C99 convert arch/mips/lasat/sysctl.c and remove ABI breakage.
type: item
description: From: Eric W. Biederman <ebiederm@xmission.com> - unquoted While C99 converting the ctl_table initializers I realized that the binary sysctl numbers were in conflict with the binary values under CTL_KERN. Including CTL_KERN KERN_VERSION as used by glibc. So I just removed the sysctl binary interface for these values, as it was unsupportable. Luckily these sysctl were inserted at the end of the sysctl list so this bug was not visible to userspace. Signed-off-by: Eric W. Biederman <ebiederm@xmission.com> --- arch/mips/lasat/sysctl.c | 145 ++++++++++++++++++++++++++++++++++++--------- 1 files changed, 116 insertions(+), 29 deletions(-) diff --git a/arch/mips/lasat/sysctl.c b/arch/mips/lasat/sysctl.c index 1287835..c04e82f 100644 --- a/arch/mips/lasat/sysctl.c +++ b/arch/mips/lasat/sysctl.c @@ -302,42 +302,129 @@ extern int lasat_boot_to_service; #ifdef CONFIG_SYSCTL static ctl_table lasat_table[] = { - {LASAT_CPU_HZ, "cpu-hz", &lasat_board_info.li_cpu_hz, sizeof(int), - 0444, NULL, &proc_dointvec, &sysctl_intvec}, - {LASAT_BUS_HZ, "bus-hz", &lasat_board_info.li_bus_hz, sizeof(int), - 0444, NULL, &proc_dointvec, &sysctl_intvec}, - {LASAT_MODEL, "bmid", &lasat_board_info.li_bmid, sizeof(int), - 0444, NULL, &proc_dointvec, &sysctl_intvec}, - {LASAT_PRID, "prid", &lasat_board_info.li_prid, sizeof(int), - 0644, NULL, &proc_lasat_eeprom_value, &sysctl_lasat_eeprom_value}, + { + .ctl_name = CTL_UNNUMBERED, + .procname = "cpu-hz", + .data = &lasat_board_info.li_cpu_hz, + .maxlen = sizeof(int), + .mode = 0444, + .proc_handler = &proc_dointvec, + .strategy = &sysctl_intvec + }, + { + .ctl_name = CTL_UNNUMBERED, + .procname = "bus-hz", + .data = &lasat_board_info.li_bus_hz, + .maxlen = sizeof(int), + .mode = 0444, + .proc_handler = &proc_dointvec, + .strategy = &sysctl_intvec + }, + { + .ctl_name = CTL_UNNUMBERED, + .procname = "bmid", + .data = &lasat_board_info.li_bmid, + .maxlen = sizeof(int), + .mode = 0444, + .proc_handler = &proc_dointvec, + .strategy = &sysctl_intvec + }, …
creator: ebiederm
date: 2007-01-16T16:39:37-00:00

[PATCH 33/59] sysctl: s390 move sysctl definitions to sysctl.h
type: item
description: From: Eric W. Biederman <ebiederm@xmission.com> - unquoted We need to have the the definition of all top level sysctl directories registers in sysctl.h so we don't conflict by accident and cause abi problems. Signed-off-by: Eric W. Biederman <ebiederm@xmission.com> --- arch/s390/appldata/appldata.h | 3 +-- arch/s390/kernel/debug.c | 1 - arch/s390/mm/cmm.c | 4 ---- include/linux/sysctl.h | 7 +++++++ 4 files changed, 8 insertions(+), 7 deletions(-) diff --git a/arch/s390/appldata/appldata.h b/arch/s390/appldata/appldata.h index 0429481..4069b81 100644 --- a/arch/s390/appldata/appldata.h +++ b/arch/s390/appldata/appldata.h @@ -21,8 +21,7 @@ #define APPLDATA_RECORD_NET_SUM_ID 0x03 /* must be < 256 ! */ #define APPLDATA_RECORD_PROC_ID 0x04 -#define CTL_APPLDATA 2120 /* sysctl IDs, must be unique */ -#define CTL_APPLDATA_TIMER 2121 +#define CTL_APPLDATA_TIMER 2121 /* sysctl IDs, must be unique */ #define CTL_APPLDATA_INTERVAL 2122 #define CTL_APPLDATA_MEM 2123 #define CTL_APPLDATA_OS 2124 diff --git a/arch/s390/kernel/debug.c b/arch/s390/kernel/debug.c index bb57bc0..c81f8e5 100644 --- a/arch/s390/kernel/debug.c +++ b/arch/s390/kernel/debug.c @@ -852,7 +852,6 @@ debug_finish_entry(debug_info_t * id, debug_entry_t* active, int level, static int debug_stoppable=1; static int debug_active=1; -#define CTL_S390DBF 5677 #define CTL_S390DBF_STOPPABLE 5678 #define CTL_S390DBF_ACTIVE 5679 diff --git a/arch/s390/mm/cmm.c b/arch/s390/mm/cmm.c index 607f50e..df733d5 100644 --- a/arch/s390/mm/cmm.c +++ b/arch/s390/mm/cmm.c @@ -256,10 +256,6 @@ cmm_skip_blanks(char *cp, char **endp) } #ifdef CONFIG_CMM_PROC -/* These will someday get removed. */ -#define VM_CMM_PAGES 1111 -#define VM_CMM_TIMED_PAGES 1112 -#define VM_CMM_TIMEOUT 1113 static struct ctl_table cmm_table[]; diff --git a/include/linux/sysctl.h b/include/linux/sysctl.h index 71c16b4..56d0161 100644 --- a/include/linux/sysctl.h +++ b/include/linux/sysctl.h @@ -73,6 +73,8 @@ enum CTL_SUNRPC=7249, /* sunrpc debug */ CTL_PM=9899,…
creator: ebiederm
date: 2007-01-16T16:39:38-00:00

[PATCH 34/59] sysctl: s390 Remove unnecessary use of insert_at_head
type: item
description: From: Eric W. Biederman <ebiederm@xmission.com> - unquoted Signed-off-by: Eric W. Biederman <ebiederm@xmission.com> --- arch/s390/appldata/appldata_base.c | 4 ++-- arch/s390/kernel/debug.c | 2 +- arch/s390/mm/cmm.c | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/arch/s390/appldata/appldata_base.c b/arch/s390/appldata/appldata_base.c index b8c2372..cdc4109 100644 --- a/arch/s390/appldata/appldata_base.c +++ b/arch/s390/appldata/appldata_base.c @@ -506,7 +506,7 @@ int appldata_register_ops(struct appldata_ops *ops) ops->ctl_table[3].ctl_name = 0; - ops->sysctl_header = register_sysctl_table(ops->ctl_table,1); + ops->sysctl_header = register_sysctl_table(ops->ctl_table,0); P_INFO("%s-ops registered!\n", ops->name); return 0; @@ -606,7 +606,7 @@ static int __init appldata_init(void) /* Register cpu hotplug notifier */ register_hotcpu_notifier(&appldata_nb); - appldata_sysctl_header = register_sysctl_table(appldata_dir_table, 1); + appldata_sysctl_header = register_sysctl_table(appldata_dir_table, 0); #ifdef MODULE appldata_dir_table[0].de->owner = THIS_MODULE; appldata_table[0].de->owner = THIS_MODULE; diff --git a/arch/s390/kernel/debug.c b/arch/s390/kernel/debug.c index c81f8e5..d38cb27 100644 --- a/arch/s390/kernel/debug.c +++ b/arch/s390/kernel/debug.c @@ -1053,7 +1053,7 @@ __init debug_init(void) { int rc = 0; - s390dbf_sysctl_header = register_sysctl_table(s390dbf_dir_table, 1); + s390dbf_sysctl_header = register_sysctl_table(s390dbf_dir_table, 0); down(&debug_lock); debug_debugfs_root_entry = debugfs_create_dir(DEBUG_DIR_ROOT,NULL); printk(KERN_INFO "debug: Initialization complete\n"); diff --git a/arch/s390/mm/cmm.c b/arch/s390/mm/cmm.c index df733d5..5f83a3f 100644 --- a/arch/s390/mm/cmm.c +++ b/arch/s390/mm/cmm.c @@ -418,7 +418,7 @@ cmm_init (void) int rc = -ENOMEM; #ifdef CONFIG_CMM_PROC - cmm_sysctl_header = register_sysctl_table(cmm_dir_table, 1); + cmm_sysctl_header = register_sysctl_table(cmm_dir_table, 0); if (!cmm_sysctl_header) got…
creator: ebiederm
date: 2007-01-16T16:39:39-00:00

[PATCH 35/59] sysctl: C99 convert ctl_tables in arch/powerpc/kernel/idle.c
type: item
description: From: Eric W. Biederman <ebiederm@xmission.com> - unquoted This was partially done already and there was no ABI breakage what a relief. Signed-off-by: Eric W. Biederman <ebiederm@xmission.com> --- arch/powerpc/kernel/idle.c | 11 ++++++++--- 1 files changed, 8 insertions(+), 3 deletions(-) diff --git a/arch/powerpc/kernel/idle.c b/arch/powerpc/kernel/idle.c index 8994af3..8b27bb1 100644 --- a/arch/powerpc/kernel/idle.c +++ b/arch/powerpc/kernel/idle.c @@ -110,11 +110,16 @@ static ctl_table powersave_nap_ctl_table[]={ .mode = 0644, .proc_handler = &proc_dointvec, }, - { 0, }, + {} }; static ctl_table powersave_nap_sysctl_root[] = { - { 1, "kernel", NULL, 0, 0755, powersave_nap_ctl_table, }, - { 0,}, + { + .ctl_name = CTL_KERN, + .procname = "kernel", + .mode = 0755, + .child = powersave_nap_ctl_table, + }, + {} }; static int __init -- 1.4.4.1.g278f _______________________________________________ Containers mailing list Containers@lists.osdl.org https://lists.osdl.org/mailman/listinfo/containers
creator: ebiederm
date: 2007-01-16T16:39:40-00:00

[PATCH 36/59] sysctl: C99 convert ctl_tables entries in arch/ppc/kernel/ppc_htab.c
type: item
description: From: Eric W. Biederman <ebiederm@xmission.com> - unquoted And make the mode of the kernel directory 0555 no one is allowed to write to sysctl directories. Signed-off-by: Eric W. Biederman <ebiederm@xmission.com> --- arch/ppc/kernel/ppc_htab.c | 11 ++++++++--- 1 files changed, 8 insertions(+), 3 deletions(-) diff --git a/arch/ppc/kernel/ppc_htab.c b/arch/ppc/kernel/ppc_htab.c index bd129d3..77b20ff 100644 --- a/arch/ppc/kernel/ppc_htab.c +++ b/arch/ppc/kernel/ppc_htab.c @@ -442,11 +442,16 @@ static ctl_table htab_ctl_table[]={ .mode = 0644, .proc_handler = &proc_dol2crvec, }, - { 0, }, + {} }; static ctl_table htab_sysctl_root[] = { - { 1, "kernel", NULL, 0, 0755, htab_ctl_table, }, - { 0,}, + { + .ctl_name = CTL_KERN, + .procname = "kernel", + .mode = 0555, + .child = htab_ctl_table, + }, + {} }; static int __init -- 1.4.4.1.g278f _______________________________________________ Containers mailing list Containers@lists.osdl.org https://lists.osdl.org/mailman/listinfo/containers
creator: ebiederm
date: 2007-01-16T16:39:41-00:00

[PATCH 37/59] sysctl: C99 convert arch/sh64/kernel/traps.c and remove ABI breakage.
type: item
description: From: Eric W. Biederman <ebiederm@xmission.com> - unquoted While doing the C99 conversion I notices that the top level sh64 directory was using the binary number for CTL_KERN. That is a no-no so I removed the support for the sysctl binary interface only leaving sysctl /proc support. At least the sysctl tables were placed at the end of the list so user space did not see this mistake. Signed-off-by: Eric W. Biederman <ebiederm@xmission.com> --- arch/sh64/kernel/traps.c | 49 +++++++++++++++++++++++++++++++++++---------- 1 files changed, 38 insertions(+), 11 deletions(-) diff --git a/arch/sh64/kernel/traps.c b/arch/sh64/kernel/traps.c index 224b7f5..02cca74 100644 --- a/arch/sh64/kernel/traps.c +++ b/arch/sh64/kernel/traps.c @@ -910,25 +910,52 @@ static int misaligned_fixup(struct pt_regs *regs) } static ctl_table unaligned_table[] = { - {1, "kernel_reports", &kernel_mode_unaligned_fixup_count, - sizeof(int), 0644, NULL, &proc_dointvec}, + { + .ctl_name = CTL_UNNUMBERED, + .procname = "kernel_reports", + .data = &kernel_mode_unaligned_fixup_count, + .maxlen = sizeof(int), + .mode = 0644, + .proc_handler = &proc_dointvec + }, #if defined(CONFIG_SH64_USER_MISALIGNED_FIXUP) - {2, "user_reports", &user_mode_unaligned_fixup_count, - sizeof(int), 0644, NULL, &proc_dointvec}, - {3, "user_enable", &user_mode_unaligned_fixup_enable, - sizeof(int), 0644, NULL, &proc_dointvec}, + { + .ctl_name = CTL_UNNUMBERED, + .procname = "user_reports", + .data = &user_mode_unaligned_fixup_count, + .maxlen = sizeof(int), + .mode = 0644, + .proc_handler = &proc_dointvec + }, + { + .ctl_name = CTL_UNNUMBERED, + .procname = "user_enable", + .data = &user_mode_unaligned_fixup_enable, + .maxlen = sizeof(int), + .mode = 0644, + .proc_handler = &proc_dointvec}, #endif - {0} + {} }; static ctl_table unaligned_root[] = { - {1, "unaligned_fixup", NULL, 0, 0555, unaligned_table}, - {0} + { + .ctl_name = CTL_UNNUMBERED, + .procname = "unaligned_fixup", + .mode = 0555, + unaligned_table + }, + {} }; static…
creator: ebiederm
date: 2007-01-16T16:39:42-00:00

[PATCH 38/59] sysctl: x86_64 Remove unnecessary use of insert_at_head
type: item
description: From: Eric W. Biederman <ebiederm@xmission.com> - unquoted The only sysctl x86_64 provides are not provided elsewhere, so insert_at_head is unnecessary. Signed-off-by: Eric W. Biederman <ebiederm@xmission.com> --- arch/x86_64/ia32/ia32_binfmt.c | 2 +- arch/x86_64/mm/init.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/x86_64/ia32/ia32_binfmt.c b/arch/x86_64/ia32/ia32_binfmt.c index 543ef4f..75677ad 100644 --- a/arch/x86_64/ia32/ia32_binfmt.c +++ b/arch/x86_64/ia32/ia32_binfmt.c @@ -408,7 +408,7 @@ static ctl_table abi_root_table2[] = { static __init int ia32_binfmt_init(void) { - register_sysctl_table(abi_root_table2, 1); + register_sysctl_table(abi_root_table2, 0); return 0; } __initcall(ia32_binfmt_init); diff --git a/arch/x86_64/mm/init.c b/arch/x86_64/mm/init.c index 2968b90..65aa66c 100644 --- a/arch/x86_64/mm/init.c +++ b/arch/x86_64/mm/init.c @@ -724,7 +724,7 @@ static ctl_table debug_root_table2[] = { static __init int x8664_sysctl_init(void) { - register_sysctl_table(debug_root_table2, 1); + register_sysctl_table(debug_root_table2, 0); return 0; } __initcall(x8664_sysctl_init); -- 1.4.4.1.g278f _______________________________________________ Containers mailing list Containers@lists.osdl.org https://lists.osdl.org/mailman/listinfo/containers
creator: ebiederm
date: 2007-01-16T16:39:43-00:00

[PATCH 39/59] sysctl: C99 convert ctl_tables in arch/x86_64/ia32/ia32_binfmt.c
type: item
description: From: Eric W. Biederman <ebiederm@xmission.com> - unquoted Signed-off-by: Eric W. Biederman <ebiederm@xmission.com> --- arch/x86_64/ia32/ia32_binfmt.c | 30 ++++++++++++++++++++---------- 1 files changed, 20 insertions(+), 10 deletions(-) diff --git a/arch/x86_64/ia32/ia32_binfmt.c b/arch/x86_64/ia32/ia32_binfmt.c index 75677ad..644b203 100644 --- a/arch/x86_64/ia32/ia32_binfmt.c +++ b/arch/x86_64/ia32/ia32_binfmt.c @@ -395,16 +395,26 @@ EXPORT_SYMBOL(ia32_setup_arg_pages); #include <linux/sysctl.h> static ctl_table abi_table2[] = { - { 99, "vsyscall32", &sysctl_vsyscall32, sizeof(int), 0644, NULL, - proc_dointvec }, - { 0, } -}; - -static ctl_table abi_root_table2[] = { - { .ctl_name = CTL_ABI, .procname = "abi", .mode = 0555, - .child = abi_table2 }, - { 0 }, -}; + { + .ctl_name = 99, + .procname = "vsyscall32", + .data = &sysctl_vsyscall32, + .maxlen = sizeof(int), + .mode = 0644, + .proc_handler = proc_dointvec + }, + {} +}; + +static ctl_table abi_root_table2[] = { + { + .ctl_name = CTL_ABI, + .procname = "abi", + .mode = 0555, + .child = abi_table2 + }, + {} +}; static __init int ia32_binfmt_init(void) { -- 1.4.4.1.g278f _______________________________________________ Containers mailing list Containers@lists.osdl.org https://lists.osdl.org/mailman/listinfo/containers
creator: ebiederm
date: 2007-01-16T16:39:44-00:00

[PATCH 40/59] sysctl: C99 convert ctl_tables in arch/x86_64/kernel/vsyscall.c
type: item
description: From: Eric W. Biederman <ebiederm@xmission.com> - unquoted Basically everything was done but I removed all element initializers from the trailing entries to make it clear the entire last entry should be zero filled. Signed-off-by: Eric W. Biederman <ebiederm@xmission.com> --- arch/x86_64/kernel/vsyscall.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/x86_64/kernel/vsyscall.c b/arch/x86_64/kernel/vsyscall.c index 2433d6f..c0e2b48 100644 --- a/arch/x86_64/kernel/vsyscall.c +++ b/arch/x86_64/kernel/vsyscall.c @@ -235,13 +235,13 @@ static ctl_table kernel_table2[] = { .data = &sysctl_vsyscall, .maxlen = sizeof(int), .mode = 0644, .strategy = vsyscall_sysctl_nostrat, .proc_handler = vsyscall_sysctl_change }, - { 0, } + {} }; static ctl_table kernel_root_table2[] = { { .ctl_name = CTL_KERN, .procname = "kernel", .mode = 0555, .child = kernel_table2 }, - { 0 }, + {} }; #endif -- 1.4.4.1.g278f _______________________________________________ Containers mailing list Containers@lists.osdl.org https://lists.osdl.org/mailman/listinfo/containers
creator: ebiederm
date: 2007-01-16T16:39:45-00:00

[PATCH 41/59] sysctl: C99 convert ctl_tables in arch/x86_64/mm/init.c
type: item
description: From: Eric W. Biederman <ebiederm@xmission.com> - unquoted Signed-off-by: Eric W. Biederman <ebiederm@xmission.com> --- arch/x86_64/mm/init.c | 22 ++++++++++++++++------ 1 files changed, 16 insertions(+), 6 deletions(-) diff --git a/arch/x86_64/mm/init.c b/arch/x86_64/mm/init.c index 65aa66c..a04535d 100644 --- a/arch/x86_64/mm/init.c +++ b/arch/x86_64/mm/init.c @@ -711,15 +711,25 @@ int kern_addr_valid(unsigned long addr) extern int exception_trace, page_fault_trace; static ctl_table debug_table2[] = { - { 99, "exception-trace", &exception_trace, sizeof(int), 0644, NULL, - proc_dointvec }, - { 0, } + { + .ctl_name = 99, + .procname = "exception-trace", + .data = &exception_trace, + .maxlen = sizeof(int), + .mode = 0644, + .proc_handler = proc_dointvec + }, + {} }; static ctl_table debug_root_table2[] = { - { .ctl_name = CTL_DEBUG, .procname = "debug", .mode = 0555, - .child = debug_table2 }, - { 0 }, + { + .ctl_name = CTL_DEBUG, + .procname = "debug", + .mode = 0555, + .child = debug_table2 + }, + {} }; static __init int x8664_sysctl_init(void) -- 1.4.4.1.g278f _______________________________________________ Containers mailing list Containers@lists.osdl.org https://lists.osdl.org/mailman/listinfo/containers
creator: ebiederm
date: 2007-01-16T16:39:46-00:00

[PATCH 42/59] sysctl: Remove sys_sysctl support from the hpet timer driver.
type: item
description: From: Eric W. Biederman <ebiederm@xmission.com> - unquoted In the binary sysctl interface the hpet driver was claiming to be the cdrom driver. This is a no-no so remove support for the binary interface. Signed-off-by: Eric W. Biederman <ebiederm@xmission.com> --- drivers/char/hpet.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/char/hpet.c b/drivers/char/hpet.c index 20dc3be..81be1db 100644 --- a/drivers/char/hpet.c +++ b/drivers/char/hpet.c @@ -703,7 +703,7 @@ int hpet_control(struct hpet_task *tp, unsigned int cmd, unsigned long arg) static ctl_table hpet_table[] = { { - .ctl_name = 1, + .ctl_name = CTL_UNNUMBERED, .procname = "max-user-freq", .data = &hpet_max_freq, .maxlen = sizeof(int), @@ -715,7 +715,7 @@ static ctl_table hpet_table[] = { static ctl_table hpet_root[] = { { - .ctl_name = 1, + .ctl_name = CTL_UNNUMBERED, .procname = "hpet", .maxlen = 0, .mode = 0555, -- 1.4.4.1.g278f _______________________________________________ Containers mailing list Containers@lists.osdl.org https://lists.osdl.org/mailman/listinfo/containers
creator: ebiederm
date: 2007-01-16T16:39:47-00:00

[PATCH 43/59] sysctl: Remove sys_sysctl support from drivers/char/rtc.c
type: item
description: From: Eric W. Biederman <ebiederm@xmission.com> - unquoted The real time clock driver was using the binary number reserved for cdroms in the sysctl binary number interface, which is a no-no. So since the sysctl binary interface is wrong remove it. Signed-off-by: Eric W. Biederman <ebiederm@xmission.com> --- drivers/char/rtc.c | 6 ++---- 1 files changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/char/rtc.c b/drivers/char/rtc.c index 664f36c..df11289 100644 --- a/drivers/char/rtc.c +++ b/drivers/char/rtc.c @@ -282,7 +282,7 @@ irqreturn_t rtc_interrupt(int irq, void *dev_id) */ static ctl_table rtc_table[] = { { - .ctl_name = 1, + .ctl_name = CTL_UNNUMBERED, .procname = "max-user-freq", .data = &rtc_max_user_freq, .maxlen = sizeof(int), @@ -294,9 +294,8 @@ static ctl_table rtc_table[] = { static ctl_table rtc_root[] = { { - .ctl_name = 1, + .ctl_name = CTL_UNNUMBERED, .procname = "rtc", - .maxlen = 0, .mode = 0555, .child = rtc_table, }, @@ -307,7 +306,6 @@ static ctl_table dev_root[] = { { .ctl_name = CTL_DEV, .procname = "dev", - .maxlen = 0, .mode = 0555, .child = rtc_root, }, -- 1.4.4.1.g278f _______________________________________________ Containers mailing list Containers@lists.osdl.org https://lists.osdl.org/mailman/listinfo/containers
creator: ebiederm
date: 2007-01-16T16:39:48-00:00

[PATCH 44/59] sysctl: Register the sysctl number used by the arlan driver.
type: item
description: From: Eric W. Biederman <ebiederm@xmission.com> - unquoted Signed-off-by: Eric W. Biederman <ebiederm@xmission.com> --- drivers/net/wireless/arlan-proc.c | 2 +- include/linux/sysctl.h | 1 + 2 files changed, 2 insertions(+), 1 deletions(-) diff --git a/drivers/net/wireless/arlan-proc.c b/drivers/net/wireless/arlan-proc.c index 5fa9854..20499a6 100644 --- a/drivers/net/wireless/arlan-proc.c +++ b/drivers/net/wireless/arlan-proc.c @@ -1216,7 +1216,7 @@ static ctl_table arlan_table[MAX_ARLANS + 1] = static ctl_table arlan_root_table[] = { { - .ctl_name = 254, + .ctl_name = CTL_ARLAN, .procname = "arlan", .maxlen = 0, .mode = 0555, diff --git a/include/linux/sysctl.h b/include/linux/sysctl.h index 56d0161..f4ba72e 100644 --- a/include/linux/sysctl.h +++ b/include/linux/sysctl.h @@ -70,6 +70,7 @@ enum CTL_BUS=8, /* Busses */ CTL_ABI=9, /* Binary emulation */ CTL_CPU=10, /* CPU stuff (speed scaling, etc) */ + CTL_ARLAN=254, /* arlan wireless driver */ CTL_SUNRPC=7249, /* sunrpc debug */ CTL_PM=9899, /* frv power management */ CTL_FRV=9898, /* frv specific sysctls */ -- 1.4.4.1.g278f _______________________________________________ Containers mailing list Containers@lists.osdl.org https://lists.osdl.org/mailman/listinfo/containers
creator: ebiederm
date: 2007-01-16T16:39:49-00:00

[PATCH 45/59] sysctl: C99 convert ctl_tables in drivers/parport/procfs.c
type: item
description: From: Eric W. Biederman <ebiederm@xmission.com> - unquoted Signed-off-by: Eric W. Biederman <ebiederm@xmission.com> --- drivers/parport/procfs.c | 264 +++++++++++++++++++++++++++++++++------------- 1 files changed, 189 insertions(+), 75 deletions(-) diff --git a/drivers/parport/procfs.c b/drivers/parport/procfs.c index 2e744a2..5337789 100644 --- a/drivers/parport/procfs.c +++ b/drivers/parport/procfs.c @@ -233,12 +233,12 @@ static int do_hardware_modes (ctl_table *table, int write, return copy_to_user(result, buffer, len) ? -EFAULT : 0; } -#define PARPORT_PORT_DIR(child) { 0, NULL, NULL, 0, 0555, child } -#define PARPORT_PARPORT_DIR(child) { DEV_PARPORT, "parport", \ - NULL, 0, 0555, child } -#define PARPORT_DEV_DIR(child) { CTL_DEV, "dev", NULL, 0, 0555, child } -#define PARPORT_DEVICES_ROOT_DIR { DEV_PARPORT_DEVICES, "devices", \ - NULL, 0, 0555, NULL } +#define PARPORT_PORT_DIR(CHILD) { .ctl_name = 0, .procname = NULL, .mode = 0555, .child = CHILD } +#define PARPORT_PARPORT_DIR(CHILD) { .ctl_name = DEV_PARPORT, .procname = "parport", \ + .mode = 0555, .child = CHILD } +#define PARPORT_DEV_DIR(CHILD) { .ctl_name = CTL_DEV, .procname = "dev", .mode = 0555, .child = CHILD } +#define PARPORT_DEVICES_ROOT_DIR { .ctl_name = DEV_PARPORT_DEVICES, .procname = "devices", \ + .mode = 0555, .child = NULL } static const unsigned long parport_min_timeslice_value = PARPORT_MIN_TIMESLICE_VALUE; @@ -263,50 +263,118 @@ struct parport_sysctl_table { }; static const struct parport_sysctl_table parport_sysctl_template = { - NULL, + .sysctl_header = NULL, { - { DEV_PARPORT_SPINTIME, "spintime", - NULL, sizeof(int), 0644, NULL, - &proc_dointvec_minmax, NULL, NULL, - (void*) &parport_min_spintime_value, - (void*) &parport_max_spintime_value }, - { DEV_PARPORT_BASE_ADDR, "base-addr", - NULL, 0, 0444, NULL, - &do_hardware_base_addr }, - { DEV_PARPORT_IRQ, "irq", - NULL, 0, 0444, NULL, - &do_hardware_irq }, - { DEV_PARPORT_DMA, "dma", - NULL, 0, 0444, NULL, - &do_hardware_dma }, - { DEV_P…
creator: ebiederm
date: 2007-01-16T16:39:50-00:00

[PATCH 46/59] sysctl: C99 convert coda ctl_tables and remove binary sysctls.
type: item
description: From: Eric W. Biederman <ebiederm@xmission.com> - unquoted Will converting the coda sysctl initializers I discovered that it is yet another user of sysctl that was stomping CTL_KERN. So off with it's sys_sysctl support since it wasn't done in a supportable way. Signed-off-by: Eric W. Biederman <ebiederm@xmission.com> --- fs/coda/sysctl.c | 58 ++++++++++++++++++++++++++++++++++++++++++++--------- 1 files changed, 48 insertions(+), 10 deletions(-) diff --git a/fs/coda/sysctl.c b/fs/coda/sysctl.c index 1c82e9a..df682e2 100644 --- a/fs/coda/sysctl.c +++ b/fs/coda/sysctl.c @@ -32,8 +32,6 @@ static struct ctl_table_header *fs_table_header; -#define FS_CODA 1 /* Coda file system */ - #define CODA_TIMEOUT 3 /* timeout on upcalls to become intrble */ #define CODA_HARD 5 /* mount type "hard" or "soft" */ #define CODA_VFS 6 /* vfs statistics */ @@ -184,17 +182,57 @@ static int coda_cache_inv_stats_get_info( char * buffer, char ** start, } static ctl_table coda_table[] = { - {CODA_TIMEOUT, "timeout", &coda_timeout, sizeof(int), 0644, NULL, &proc_dointvec}, - {CODA_HARD, "hard", &coda_hard, sizeof(int), 0644, NULL, &proc_dointvec}, - {CODA_VFS, "vfs_stats", NULL, 0, 0644, NULL, &do_reset_coda_vfs_stats}, - {CODA_CACHE_INV, "cache_inv_stats", NULL, 0, 0644, NULL, &do_reset_coda_cache_inv_stats}, - {CODA_FAKE_STATFS, "fake_statfs", &coda_fake_statfs, sizeof(int), 0600, NULL, &proc_dointvec}, - { 0 } + { + .ctl_name = CTL_UNNUMBERED, + .procname = "timeout", + .data = &coda_timeout, + .maxlen = sizeof(int), + .mode = 0644, + .proc_handler = &proc_dointvec + }, + { + .ctl_name = CTL_UNNUMBERED, + .procname = "hard", + .data = &coda_hard, + .maxlen = sizeof(int), + .mode = 0644, + .proc_handler = &proc_dointvec + }, + { + .ctl_name = CTL_UNNUMBERED, + .procname = "vfs_stats", + .data = NULL, + .maxlen = 0, + .mode = 0644, + .proc_handler = &do_reset_coda_vfs_stats + }, + { + .ctl_name = CTL_UNNUMBERED, + .procname = "cache_inv_stats", + .data = NULL, + .maxlen = 0, + .mode = 0644, + …
creator: ebiederm
date: 2007-01-16T16:39:51-00:00

[PATCH 47/59] sysctl: C99 convert ctl_tables in NTFS and remove sys_sysctl support
type: item
description: From: Eric W. Biederman <ebiederm@xmission.com> - unquoted Putting ntfs-debug under FS_NRINODE was not a kosher thing to do so don't give it any binary number. Signed-off-by: Eric W. Biederman <ebiederm@xmission.com> --- fs/ntfs/sysctl.c | 24 ++++++++++++++++-------- 1 files changed, 16 insertions(+), 8 deletions(-) diff --git a/fs/ntfs/sysctl.c b/fs/ntfs/sysctl.c index 1c23138..bc217de 100644 --- a/fs/ntfs/sysctl.c +++ b/fs/ntfs/sysctl.c @@ -33,20 +33,28 @@ #include "sysctl.h" #include "debug.h" -#define FS_NTFS 1 - /* Definition of the ntfs sysctl. */ static ctl_table ntfs_sysctls[] = { - { FS_NTFS, "ntfs-debug", /* Binary and text IDs. */ - &debug_msgs,sizeof(debug_msgs), /* Data pointer and size. */ - 0644, NULL, &proc_dointvec }, /* Mode, child, proc handler. */ - { 0 } + { + .ctl_name = CTL_UNUMBERED, /* Binary and text IDs. */ + .procname = "ntfs-debug", + .data = &debug_msgs, /* Data pointer and size. */ + .maxlen = sizeof(debug_msgs), + .mode = 0644, /* Mode, proc handler. */ + .proc_handler = &proc_dointvec + }, + {} }; /* Define the parent directory /proc/sys/fs. */ static ctl_table sysctls_root[] = { - { CTL_FS, "fs", NULL, 0, 0555, ntfs_sysctls }, - { 0 } + { + .ctl_name = CTL_FS, + .procname = "fs", + .mode = 0555, + .child = ntfs_sysctls + }, + {} }; /* Storage for the sysctls header. */ -- 1.4.4.1.g278f _______________________________________________ Containers mailing list Containers@lists.osdl.org https://lists.osdl.org/mailman/listinfo/containers
creator: ebiederm
date: 2007-01-16T16:39:52-00:00

[PATCH 48/59] sysctl: Register the ocfs2 sysctl numbers
type: item
description: From: Eric W. Biederman <ebiederm@xmission.com> - unquoted ocfs2 was did not have the binary number it uses under CTL_FS registered in sysctl.h. Register it to avoid future conflicts, and change the name of the definition to be in line with the rest of the sysctl numbers. Signed-off-by: Eric W. Biederman <ebiederm@xmission.com> --- fs/ocfs2/cluster/nodemanager.c | 4 ++-- fs/ocfs2/cluster/nodemanager.h | 3 +-- include/linux/sysctl.h | 1 + 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/fs/ocfs2/cluster/nodemanager.c b/fs/ocfs2/cluster/nodemanager.c index b17333a..df763c7 100644 --- a/fs/ocfs2/cluster/nodemanager.c +++ b/fs/ocfs2/cluster/nodemanager.c @@ -55,7 +55,7 @@ static ctl_table ocfs2_nm_table[] = { static ctl_table ocfs2_mod_table[] = { { - .ctl_name = KERN_OCFS2_NM, + .ctl_name = FS_OCFS2_NM, .procname = "nm", .data = NULL, .maxlen = 0, @@ -67,7 +67,7 @@ static ctl_table ocfs2_mod_table[] = { static ctl_table ocfs2_kern_table[] = { { - .ctl_name = KERN_OCFS2, + .ctl_name = FS_OCFS2, .procname = "ocfs2", .data = NULL, .maxlen = 0, diff --git a/fs/ocfs2/cluster/nodemanager.h b/fs/ocfs2/cluster/nodemanager.h index 8fb23ca..0705221 100644 --- a/fs/ocfs2/cluster/nodemanager.h +++ b/fs/ocfs2/cluster/nodemanager.h @@ -33,8 +33,7 @@ #include <linux/configfs.h> #include <linux/rbtree.h> -#define KERN_OCFS2 988 -#define KERN_OCFS2_NM 1 +#define FS_OCFS2_NM 1 const char *o2nm_get_hb_ctl_path(void); diff --git a/include/linux/sysctl.h b/include/linux/sysctl.h index f4ba72e..63e1bac 100644 --- a/include/linux/sysctl.h +++ b/include/linux/sysctl.h @@ -813,6 +813,7 @@ enum FS_AIO_NR=18, /* current system-wide number of aio requests */ FS_AIO_MAX_NR=19, /* system-wide maximum number of aio requests */ FS_INOTIFY=20, /* inotify submenu */ + FS_OCFS2=988, /* ocfs2 */ }; /* /proc/sys/fs/quota/ */ -- 1.4.4.1.g278f _______________________________________________ Containers mailing list Containers@lists.osdl.org https://lists.osdl.org/mailman/listinfo/containers
creator: ebiederm
date: 2007-01-16T16:39:53-00:00

[PATCH 49/59] sysctl: Move init_irq_proc into init/main where it belongs
type: item
description: From: Eric W. Biederman <ebiederm@xmission.com> - unquoted Signed-off-by: Eric W. Biederman <ebiederm@xmission.com> --- init/main.c | 3 +++ kernel/sysctl.c | 3 --- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/init/main.c b/init/main.c index 8b4a7d7..8af5c6e 100644 --- a/init/main.c +++ b/init/main.c @@ -691,6 +691,9 @@ static void __init do_basic_setup(void) #ifdef CONFIG_SYSCTL sysctl_init(); #endif +#ifdef CONFIG_PROC_FS + init_irq_proc(); +#endif do_initcalls(); } diff --git a/kernel/sysctl.c b/kernel/sysctl.c index 600b333..7420761 100644 --- a/kernel/sysctl.c +++ b/kernel/sysctl.c @@ -1172,8 +1172,6 @@ static ctl_table dev_table[] = { { .ctl_name = 0 } }; -extern void init_irq_proc (void); - static DEFINE_SPINLOCK(sysctl_lock); /* called under sysctl_lock */ @@ -1219,7 +1217,6 @@ void __init sysctl_init(void) { #ifdef CONFIG_PROC_SYSCTL register_proc_table(root_table, proc_sys_root, &root_table_header); - init_irq_proc(); #endif } -- 1.4.4.1.g278f _______________________________________________ Containers mailing list Containers@lists.osdl.org https://lists.osdl.org/mailman/listinfo/containers
creator: ebiederm
date: 2007-01-16T16:39:54-00:00

[PATCH 50/59] sysctl: Move utsname sysctls to their own file
type: item
description: From: Eric W. Biederman <ebiederm@xmission.com> - unquoted This is just a simple cleanup to keep kernel/sysctl.c from getting to crowded with special cases, and by keeping all of the utsname logic to together it makes the code a little more readable. Signed-off-by: Eric W. Biederman <ebiederm@xmission.com> --- kernel/Makefile | 1 + kernel/sysctl.c | 115 ------------------------------------- kernel/utsname_sysctl.c | 146 +++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 147 insertions(+), 115 deletions(-) diff --git a/kernel/Makefile b/kernel/Makefile index 14f4d45..d286c44 100644 --- a/kernel/Makefile +++ b/kernel/Makefile @@ -48,6 +48,7 @@ obj-$(CONFIG_SECCOMP) += seccomp.o obj-$(CONFIG_RCU_TORTURE_TEST) += rcutorture.o obj-$(CONFIG_RELAY) += relay.o obj-$(CONFIG_UTS_NS) += utsname.o +obj-$(CONFIG_SYSCTL) += utsname_sysctl.o obj-$(CONFIG_TASK_DELAY_ACCT) += delayacct.o obj-$(CONFIG_TASKSTATS) += taskstats.o tsacct.o diff --git a/kernel/sysctl.c b/kernel/sysctl.c index 7420761..a8c0a03 100644 --- a/kernel/sysctl.c +++ b/kernel/sysctl.c @@ -135,13 +135,6 @@ static int parse_table(int __user *, int, void __user *, size_t __user *, void __user *, size_t, ctl_table *); #endif -static int proc_do_uts_string(ctl_table *table, int write, struct file *filp, - void __user *buffer, size_t *lenp, loff_t *ppos); - -static int sysctl_uts_string(ctl_table *table, int __user *name, int nlen, - void __user *oldval, size_t __user *oldlenp, - void __user *newval, size_t newlen); - #ifdef CONFIG_SYSVIPC static int sysctl_ipc_data(ctl_table *table, int __user *name, int nlen, void __user *oldval, size_t __user *oldlenp, @@ -174,27 +167,6 @@ extern ctl_table inotify_table[]; int sysctl_legacy_va_layout; #endif -static void *get_uts(ctl_table *table, int write) -{ - char *which = table->data; -#ifdef CONFIG_UTS_NS - struct uts_namespace *uts_ns = current->nsproxy->uts_ns; - which = (which - (char *)&init_uts_ns) + (char *)uts_ns; -#endif - if (!write) - down_read(&uts_sem)…
creator: ebiederm
date: 2007-01-16T16:39:55-00:00

[PATCH 51/59] sysctl: Move SYSV IPC sysctls to their own file
type: item
description: From: Eric W. Biederman <ebiederm@xmission.com> - unquoted This is just a simple cleanup to keep kernel/sysctl.c from getting to crowded with special cases, and by keeping all of the ipc logic to together it makes the code a little more readable. Signed-off-by: Eric W. Biederman <ebiederm@xmission.com> --- init/Kconfig | 6 ++ ipc/Makefile | 1 + ipc/ipc_sysctl.c | 182 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ kernel/sysctl.c | 174 --------------------------------------------------- 4 files changed, 189 insertions(+), 174 deletions(-) diff --git a/init/Kconfig b/init/Kconfig index a3f83e2..33bc38d 100644 --- a/init/Kconfig +++ b/init/Kconfig @@ -116,6 +116,12 @@ config SYSVIPC section 6.4 of the Linux Programmer's Guide, available from <http://www.tldp.org/guides.html>. +config SYSVIPC_SYSCTL + bool + depends on SYSVIPC + depends on SYSCTL + default y + config IPC_NS bool "IPC Namespaces" depends on SYSVIPC diff --git a/ipc/Makefile b/ipc/Makefile index 0a6d626..b93bba6 100644 --- a/ipc/Makefile +++ b/ipc/Makefile @@ -4,6 +4,7 @@ obj-$(CONFIG_SYSVIPC_COMPAT) += compat.o obj-$(CONFIG_SYSVIPC) += util.o msgutil.o msg.o sem.o shm.o +obj-$(CONFIG_SYSVIPC_SYSCTL) += ipc_sysctl.o obj_mq-$(CONFIG_COMPAT) += compat_mq.o obj-$(CONFIG_POSIX_MQUEUE) += mqueue.o msgutil.o $(obj_mq-y) diff --git a/ipc/ipc_sysctl.c b/ipc/ipc_sysctl.c new file mode 100644 index 0000000..9018009 --- /dev/null +++ b/ipc/ipc_sysctl.c @@ -0,0 +1,182 @@ +/* + * Copyright (C) 2007 + * + * Author: Eric Biederman <ebiederm@xmision.com> + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation, version 2 of the + * License. + */ + +#include <linux/module.h> +#include <linux/ipc.h> +#include <linux/nsproxy.h> +#include <linux/sysctl.h> + +#ifdef CONFIG_IPC_NS +static void *get_ipc(ctl_table *table) +{ + char *which = table->data; + struct ipc_namespace *ipc_ns = current->ns…
creator: ebiederm
date: 2007-01-16T16:39:56-00:00

[PATCH 52/59] sysctl: Create sys/fs/binfmt_misc as an ordinary sysctl entry
type: item
description: From: Eric W. Biederman <ebiederm@xmission.com> - unquoted binfmt_misc has a mount point in the middle of the sysctl and that mount point is created as a proc_generic directory. Doing it that way gets in the way of cleaning up the sysctl proc support as it continues the existence of a horrible hack. So instead simply create the directory as an ordinary sysctl directory. At least that removes the magic special case. Signed-off-by: Eric W. Biederman <ebiederm@xmission.com> --- fs/proc/root.c | 4 ---- kernel/sysctl.c | 13 +++++++++++++ 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/fs/proc/root.c b/fs/proc/root.c index 64d242b..8059e92 100644 --- a/fs/proc/root.c +++ b/fs/proc/root.c @@ -74,10 +74,6 @@ void __init proc_root_init(void) #ifdef CONFIG_SYSCTL proc_sys_root = proc_mkdir("sys", NULL); #endif -#if defined(CONFIG_BINFMT_MISC) || defined(CONFIG_BINFMT_MISC_MODULE) - proc_mkdir("sys/fs", NULL); - proc_mkdir("sys/fs/binfmt_misc", NULL); -#endif proc_root_fs = proc_mkdir("fs", NULL); proc_root_driver = proc_mkdir("driver", NULL); proc_mkdir("fs/nfsd", NULL); /* somewhere for the nfsd filesystem to be mounted */ diff --git a/kernel/sysctl.c b/kernel/sysctl.c index 6e2e608..8da6647 100644 --- a/kernel/sysctl.c +++ b/kernel/sysctl.c @@ -142,6 +142,7 @@ static struct ctl_table_header root_table_header = static ctl_table kern_table[]; static ctl_table vm_table[]; static ctl_table fs_table[]; +static ctl_table binfmt_misc_table[]; static ctl_table debug_table[]; static ctl_table dev_table[]; extern ctl_table random_table[]; @@ -1001,6 +1002,18 @@ static ctl_table fs_table[] = { .mode = 0644, .proc_handler = &proc_dointvec, }, +#if defined(CONFIG_BINFMT_MISC) || defined(CONFIG_BINFMT_MISC_MODULE) + { + .ctl_name = CTL_UNNUMBERED, + .procname = "binfmt_misc", + .mode = 0555, + .child = binfmt_misc_table, + }, +#endif + { .ctl_name = 0 } +}; + +static ctl_table binfmt_misc_table[] = { { .ctl_name = 0 } }; -- 1.4.4.1.g278f ___________________________________…
creator: ebiederm
date: 2007-01-16T16:39:57-00:00

[PATCH 53/59] sysctl: Remove support for CTL_ANY
type: item
description: From: Eric W. Biederman <ebiederm@xmission.com> - unquoted There are currently no users in the kernel for CTL_ANY and it only has effect on the binary interface which is practically unused. So this complicates sysctl lookups for no good reason so just remove it. Signed-off-by: Eric W. Biederman <ebiederm@xmission.com> --- include/linux/sysctl.h | 1 - kernel/sysctl.c | 2 +- 2 files changed, 1 insertions(+), 2 deletions(-) diff --git a/include/linux/sysctl.h b/include/linux/sysctl.h index 63e1bac..c99e4bb 100644 --- a/include/linux/sysctl.h +++ b/include/linux/sysctl.h @@ -53,7 +53,6 @@ struct __sysctl_args { /* For internal pattern-matching use only: */ #ifdef __KERNEL__ -#define CTL_ANY -1 /* Matches any name */ #define CTL_NONE 0 #define CTL_UNNUMBERED CTL_NONE /* sysctl without a binary number */ #endif diff --git a/kernel/sysctl.c b/kernel/sysctl.c index 8da6647..e655b11 100644 --- a/kernel/sysctl.c +++ b/kernel/sysctl.c @@ -1166,7 +1166,7 @@ repeat: for ( ; table->ctl_name || table->procname; table++) { if (!table->ctl_name) continue; - if (n == table->ctl_name || table->ctl_name == CTL_ANY) { + if (n == table->ctl_name) { int error; if (table->child) { if (ctl_perm(table, 001)) -- 1.4.4.1.g278f _______________________________________________ Containers mailing list Containers@lists.osdl.org https://lists.osdl.org/mailman/listinfo/containers
creator: ebiederm
date: 2007-01-16T16:39:58-00:00

[PATCH 54/59] sysctl: Remove support for directory strategy routines.
type: item
description: From: Eric W. Biederman <ebiederm@xmission.com> - unquoted parse_table has support for calling a strategy routine when descending into a directory. To date no one has used this functionality and the /proc/sys interface has no analog to it. So no one is using this functionality kill it and make the binary sysctl code easier to follow. Signed-off-by: Eric W. Biederman <ebiederm@xmission.com> --- kernel/sysctl.c | 8 -------- 1 files changed, 0 insertions(+), 8 deletions(-) diff --git a/kernel/sysctl.c b/kernel/sysctl.c index e655b11..2c3703d 100644 --- a/kernel/sysctl.c +++ b/kernel/sysctl.c @@ -1171,14 +1171,6 @@ repeat: if (table->child) { if (ctl_perm(table, 001)) return -EPERM; - if (table->strategy) { - error = table->strategy( - table, name, nlen, - oldval, oldlenp, - newval, newlen); - if (error) - return error; - } name++; nlen--; table = table->child; -- 1.4.4.1.g278f _______________________________________________ Containers mailing list Containers@lists.osdl.org https://lists.osdl.org/mailman/listinfo/containers
creator: ebiederm
date: 2007-01-16T16:39:59-00:00

[PATCH 55/59] sysctl: Remove insert_at_head from register_sysctl
type: item
description: From: Eric W. Biederman <ebiederm@xmission.com> - unquoted The semantic effect of insert_at_head is that it would allow new registered sysctl entries to override existing sysctl entries of the same name. Which is pain for caching and the proc interface never implemented. I have done an audit and discovered that none of the current users of register_sysctl care as (excpet for directories) they do not register duplicate sysctl entries. So this patch simply removes the support for overriding existing entries in the sys_sysctl interface since no one uses it or cares and it makes future enhancments harder. Signed-off-by: Eric W. Biederman <ebiederm@xmission.com> --- arch/arm/kernel/isa.c | 2 +- arch/frv/kernel/pm.c | 2 +- arch/frv/kernel/sysctl.c | 2 +- arch/ia64/kernel/crash.c | 2 +- arch/ia64/kernel/perfmon.c | 2 +- arch/ia64/sn/kernel/xpc_main.c | 2 +- arch/mips/au1000/common/power.c | 2 +- arch/mips/lasat/sysctl.c | 2 +- arch/powerpc/kernel/idle.c | 2 +- arch/ppc/kernel/ppc_htab.c | 2 +- arch/s390/appldata/appldata_base.c | 4 ++-- arch/s390/kernel/debug.c | 2 +- arch/s390/mm/cmm.c | 2 +- arch/sh64/kernel/traps.c | 2 +- arch/x86_64/ia32/ia32_binfmt.c | 2 +- arch/x86_64/kernel/vsyscall.c | 2 +- arch/x86_64/mm/init.c | 2 +- drivers/cdrom/cdrom.c | 2 +- drivers/char/hpet.c | 2 +- drivers/char/ipmi/ipmi_poweroff.c | 2 +- drivers/char/rtc.c | 2 +- drivers/macintosh/mac_hid.c | 2 +- drivers/md/md.c | 2 +- drivers/net/wireless/arlan-proc.c | 2 +- drivers/parport/procfs.c | 6 +++--- drivers/scsi/scsi_sysctl.c | 2 +- fs/coda/sysctl.c | 2 +- fs/dquot.c | 2 +- fs/lockd/svc.c | 2 +- fs/nfs/sysctl.c | 2 +- fs/ntfs/sysctl.c | 2 +- fs/ocfs2/cluster/nodemanager.c | 2 +- fs/xfs/linux-2.6/xfs_sysctl.c | 2 +- include/linux/sysctl.h | 4 ++-- ipc/ipc_sysctl.c | 2 +- ipc/mqueue.c | 2 +- kernel/sysctl.c | 9 ++------- kernel/utsname_sysctl.c | 2 +- net/appletalk/sysctl_net_atalk.c | 2 +- net/ax25/sysctl_net_ax25.c | 2 +- net/bridge/br_netfilter.c | 2 +- net/core/neighbour.c | 2 +- net/dccp/s…
creator: ebiederm
date: 2007-01-16T16:40:00-00:00

[PATCH 56/59] sysctl: factor out sysctl_head_next from do_sysctl
type: item
description: From: Eric W. Biederman <ebiederm@xmission.com> - unquoted The current logic to walk through the list of sysctl table headers is slightly painful and implement in a way it cannot be used by code outside sysctl.c I am in the process of implementing a version of the sysctl proc support that instead of using the proc generic non-caching monster, just uses the existing sysctl data structure as backing store for building the dcache entries and for doing directory reads. To use the existing data structures however I need a way to get at them. Signed-off-by: Eric W. Biederman <ebiederm@xmission.com> --- include/linux/sysctl.h | 4 +++ kernel/sysctl.c | 57 +++++++++++++++++++++++++++++++++++------------ 2 files changed, 46 insertions(+), 15 deletions(-) diff --git a/include/linux/sysctl.h b/include/linux/sysctl.h index 6113f3b..81ee9ea 100644 --- a/include/linux/sysctl.h +++ b/include/linux/sysctl.h @@ -923,6 +923,10 @@ enum #ifdef __KERNEL__ #include <linux/list.h> +/* For the /proc/sys support */ +extern struct ctl_table_header *sysctl_head_next(struct ctl_table_header *prev); +extern void sysctl_head_finish(struct ctl_table_header *prev); + extern void sysctl_init(void); typedef struct ctl_table ctl_table; diff --git a/kernel/sysctl.c b/kernel/sysctl.c index 5beee1f..ca2831a 100644 --- a/kernel/sysctl.c +++ b/kernel/sysctl.c @@ -1066,6 +1066,42 @@ static void start_unregistering(struct ctl_table_header *p) list_del_init(&p->ctl_entry); } +void sysctl_head_finish(struct ctl_table_header *head) +{ + if (!head) + return; + spin_lock(&sysctl_lock); + unuse_table(head); + spin_unlock(&sysctl_lock); +} + +struct ctl_table_header *sysctl_head_next(struct ctl_table_header *prev) +{ + struct ctl_table_header *head; + struct list_head *tmp; + spin_lock(&sysctl_lock); + if (prev) { + tmp = &prev->ctl_entry; + unuse_table(prev); + goto next; + } + tmp = &root_table_header.ctl_entry; + for (;;) { + head = list_entry(tmp, struct ctl_table_header, ctl_entry); + + if (!use_table(head)) +…
creator: ebiederm
date: 2007-01-16T16:40:01-00:00

[PATCH 57/59] sysctl: allow sysctl_perm to be called from outside of sysctl.c
type: item
description: From: Eric W. Biederman <ebiederm@xmission.com> - unquoted Signed-off-by: Eric W. Biederman <ebiederm@xmission.com> --- include/linux/sysctl.h | 2 ++ kernel/sysctl.c | 10 +++++----- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/include/linux/sysctl.h b/include/linux/sysctl.h index 81ee9ea..20c23b5 100644 --- a/include/linux/sysctl.h +++ b/include/linux/sysctl.h @@ -924,8 +924,10 @@ enum #include <linux/list.h> /* For the /proc/sys support */ +struct ctl_table; extern struct ctl_table_header *sysctl_head_next(struct ctl_table_header *prev); extern void sysctl_head_finish(struct ctl_table_header *prev); +extern int sysctl_perm(struct ctl_table *table, int op); extern void sysctl_init(void); diff --git a/kernel/sysctl.c b/kernel/sysctl.c index ca2831a..ec5e4a1 100644 --- a/kernel/sysctl.c +++ b/kernel/sysctl.c @@ -1154,7 +1154,7 @@ asmlinkage long sys_sysctl(struct __sysctl_args __user *args) #endif /* CONFIG_SYSCTL_SYSCALL */ /* - * ctl_perm does NOT grant the superuser all rights automatically, because + * sysctl_perm does NOT grant the superuser all rights automatically, because * some sysctl variables are readonly even to root. */ @@ -1169,7 +1169,7 @@ static int test_perm(int mode, int op) return -EACCES; } -static inline int ctl_perm(ctl_table *table, int op) +int sysctl_perm(ctl_table *table, int op) { int error; error = security_sysctl(table, op); @@ -1196,7 +1196,7 @@ repeat: if (n == table->ctl_name) { int error; if (table->child) { - if (ctl_perm(table, 001)) + if (sysctl_perm(table, 001)) return -EPERM; name++; nlen--; @@ -1225,7 +1225,7 @@ int do_sysctl_strategy (ctl_table *table, op |= 004; if (newval) op |= 002; - if (ctl_perm(table, op)) + if (sysctl_perm(table, op)) return -EPERM; if (table->strategy) { @@ -1495,7 +1495,7 @@ static ssize_t do_rw_proc(int write, struct file * file, char __user * buf, goto out; error = -EPERM; op = (write ? 002 : 004); - if (ctl_perm(table, op)) + if (sysctl_perm(table, op)) goto out; /* careful: calling …
creator: ebiederm
date: 2007-01-16T16:40:02-00:00

[PATCH 58/59] sysctl: Reimplement the sysctl proc support
type: item
description: From: Eric W. Biederman <ebiederm@xmission.com> - unquoted With this change the sysctl inodes can be cached and nothing needs to be done when removing a sysctl table. For a costk of 2K code we will save about 4K of static tables (when we remove de from ctl_table) and 70K in proc_dir_entries that we will not allocate, or about half that on a 32bit arch. The speed feels about the same, even though we can now cache the sysctl dentries :( We get the core advantage that we don't need to have a 1 to 1 mapping between ctl table entries and proc files. Making it possible to have /proc/sys vary depending on the namespace you are in. The currently merged namespaces don't have an issue here but the network namespace under /proc/sys/net needs to have different directories depending on which network adapters are visible. By simply being a cache different directories being visible depending on who you are is trivial to implement. Signed-off-by: Eric W. Biederman <ebiederm@xmission.com> --- fs/proc/Makefile | 2 +- fs/proc/inode.c | 1 + fs/proc/internal.h | 2 + fs/proc/proc_sysctl.c | 477 +++++++++++++++++++++++++++++++++++++++++++++++++ fs/proc/root.c | 10 +- init/main.c | 4 - kernel/sysctl.c | 182 ------------------- 7 files changed, 484 insertions(+), 194 deletions(-) diff --git a/fs/proc/Makefile b/fs/proc/Makefile index f6c7762..a6b3a8f 100644 --- a/fs/proc/Makefile +++ b/fs/proc/Makefile @@ -8,7 +8,7 @@ proc-y := nommu.o task_nommu.o proc-$(CONFIG_MMU) := mmu.o task_mmu.o proc-y += inode.o root.o base.o generic.o array.o \ - proc_tty.o proc_misc.o + proc_tty.o proc_misc.o proc_sysctl.o proc-$(CONFIG_PROC_KCORE) += kcore.o proc-$(CONFIG_PROC_VMCORE) += vmcore.o diff --git a/fs/proc/inode.c b/fs/proc/inode.c index e26945b..0ea8265 100644 --- a/fs/proc/inode.c +++ b/fs/proc/inode.c @@ -161,6 +161,7 @@ struct inode *proc_get_inode(struct super_block *sb, unsigned int ino, if (!inode) goto out_ino; + PROC_I(inode)->fd = 0; PROC_I(inode)->pde = de; if (de) { if (de->mode) { diff --…
creator: ebiederm
date: 2007-01-16T16:40:03-00:00

[PATCH 59/59] sysctl: Remove the proc_dir_entry member for the sysctl tables.
type: item
description: From: Eric W. Biederman <ebiederm@xmission.com> - unquoted It isn't needed anymore, all of the users are gone, and all of the ctl_table initializers have been converted to use explicit names of the fields they are initializing. Signed-off-by: Eric W. Biederman <ebiederm@xmission.com> --- include/linux/sysctl.h | 1 - net/decnet/dn_dev.c | 5 ----- net/ipv4/devinet.c | 5 ----- net/ipv6/addrconf.c | 5 ----- 4 files changed, 0 insertions(+), 16 deletions(-) diff --git a/include/linux/sysctl.h b/include/linux/sysctl.h index 20c23b5..8c2fab5 100644 --- a/include/linux/sysctl.h +++ b/include/linux/sysctl.h @@ -1025,7 +1025,6 @@ struct ctl_table ctl_table *child; proc_handler *proc_handler; /* Callback for text formatting */ ctl_handler *strategy; /* Callback function for all r/w */ - struct proc_dir_entry *de; /* /proc control block */ void *extra1; void *extra2; }; diff --git a/net/decnet/dn_dev.c b/net/decnet/dn_dev.c index baaa02e..324eb47 100644 --- a/net/decnet/dn_dev.c +++ b/net/decnet/dn_dev.c @@ -261,7 +261,6 @@ static void dn_dev_sysctl_register(struct net_device *dev, struct dn_dev_parms * for(i = 0; i < ARRAY_SIZE(t->dn_dev_vars) - 1; i++) { long offset = (long)t->dn_dev_vars[i].data; t->dn_dev_vars[i].data = ((char *)parms) + offset; - t->dn_dev_vars[i].de = NULL; } if (dev) { @@ -273,13 +272,9 @@ static void dn_dev_sysctl_register(struct net_device *dev, struct dn_dev_parms * } t->dn_dev_dev[0].child = t->dn_dev_vars; - t->dn_dev_dev[0].de = NULL; t->dn_dev_conf_dir[0].child = t->dn_dev_dev; - t->dn_dev_conf_dir[0].de = NULL; t->dn_dev_proto_dir[0].child = t->dn_dev_conf_dir; - t->dn_dev_proto_dir[0].de = NULL; t->dn_dev_root_dir[0].child = t->dn_dev_proto_dir; - t->dn_dev_root_dir[0].de = NULL; t->dn_dev_vars[0].extra1 = (void *)dev; t->sysctl_header = register_sysctl_table(t->dn_dev_root_dir); diff --git a/net/ipv4/devinet.c b/net/ipv4/devinet.c index b731a0c..8cfcc78 100644 --- a/net/ipv4/devinet.c +++ b/net/ipv4/devinet.c @@ -1573,7 +1573,6 @@ static void d…
creator: ebiederm
date: 2007-01-16T16:40:04-00:00

Re: [PATCH 5/59] sysctl: rose remove unnecessary insert_at_head flag
type: item
description: On Tue, Jan 16, 2007 at 09:39:10AM -0700, Eric W. Biederman wrote: Looks ok, for these: Subject: [PATCH 5/59] sysctl: rose remove unnecessary insert_at_head flag Subject: [PATCH 6/59] sysctl: netrom remove unnecessary insert_at_head flag Subject: [PATCH 11/59] sysctl: ax25 remove unnecessary insert_at_head flag Subject: [PATCH 30/59] sysctl: mips/au1000 Remove sys_sysctl support Subject: [PATCH 31/59] sysctl: C99 convert the ctl_tables in arch/mips/au1000/common/power.c Subject: [PATCH 32/59] sysctl: C99 convert arch/mips/lasat/sysctl.c and remove ABI breakage. Subject: [PATCH 43/59] sysctl: Remove sys_sysctl support from drivers/char/rtc.c Subject: [PATCH 55/59] sysctl: Remove insert_at_head from register_sysctl Acked-by: Ralf Baechle <ralf@linux-mips.org> Ralf _______________________________________________ Containers mailing list Containers@lists.osdl.org https://lists.osdl.org/mailman/listinfo/containers
creator: Ralf Baechle
date: 2007-01-16T17:36:51-00:00

Re: [PATCH 20/59] sysctl: cdrom Don't set de->owner
type: item
description: On Tue, 2007-01-16 at 09:39 -0700, Eric W. Biederman wrote: > From: Eric W. Biederman <ebiederm@xmission.com> - unquoted These three look OK: [PATCH 15/59] sysctl: scsi remove unnecessary insert_at_head flag [PATCH 19/59] sysctl: cdrom remove unnecessary insert_at_head flag [PATCH 20/59] sysctl: cdrom Don't set de->owner So you can add an ACK from me. It would have been nice not to have 56 other irrelevant patches sprayed over the list and into my inbox, though ... James _______________________________________________ Containers mailing list Containers@lists.osdl.org https://lists.osdl.org/mailman/listinfo/containers
creator: James Bottomley
date: 2007-01-16T18:19:34-00:00

Re: [PATCH 0/59] Cleanup sysctl
type: item
description: Eric W. Biederman wrote: > >> I think it would be fair to say that if they're not in <linux/sysctl.h> they're >> not architectural, but that doesn't resolve the counterpositive (are there >> sysctls in <linux/sysctl.h> which aren't architectural? From the looks of it, I >> would say yes.) Non-architectural sysctl numbers should not be exported to >> userspace, and should eventually be rejected by sys_sysctl. > > This last bit doesn't make much sense. I believe you are saying all sysctl > numbers should be per architecture. > With "architectural" I mean "guaranteed to be stable" (as opposed to "incidental"). Sorry for the confusion. -hpa _______________________________________________ Containers mailing list Containers@lists.osdl.org https://lists.osdl.org/mailman/listinfo/containers
creator: hpa
date: 2007-01-16T18:35:03-00:00

Re: [PATCH 0/59] Cleanup sysctl
type: item
description: "H. Peter Anvin" <hpa@zytor.com> writes: > Eric W. Biederman wrote: >> >>> I think it would be fair to say that if they're not in <linux/sysctl.h> > they're >>> not architectural, but that doesn't resolve the counterpositive (are there >>> sysctls in <linux/sysctl.h> which aren't architectural? From the looks of > it, I >>> would say yes.) Non-architectural sysctl numbers should not be exported to >>> userspace, and should eventually be rejected by sys_sysctl. >> >> This last bit doesn't make much sense. I believe you are saying all sysctl >> numbers should be per architecture. >> > > With "architectural" I mean "guaranteed to be stable" (as opposed to > "incidental"). Sorry for the confusion. Ok. Then largely we are in agreement. To implement that the rule is simple. If it isn't CTL_UNNUMBERED and the number is in Linus's tree, it is our responsibility to never change the meaning of that number. If a new sysctl entry is introduced it should be CTL_UNNUMBERED until it reaches Linus's tree to avoid conflicts. There is simply no point in having any kind of support for numbers whose meanings can change. Which is why I removed the few cases of binary number duplication I found. Eric _______________________________________________ Containers mailing list Containers@lists.osdl.org https://lists.osdl.org/mailman/listinfo/containers
creator: ebiederm
date: 2007-01-16T18:54:09-00:00

Re: [PATCH 0/59] Cleanup sysctl
type: item
description: Eric W. Biederman wrote: >>> >> With "architectural" I mean "guaranteed to be stable" (as opposed to >> "incidental"). Sorry for the confusion. > > Ok. Then largely we are in agreement. To implement that the rule is simple. > If it isn't CTL_UNNUMBERED and the number is in Linus's tree, it is > our responsibility to never change the meaning of that number. > > If a new sysctl entry is introduced it should be CTL_UNNUMBERED until > it reaches Linus's tree to avoid conflicts. > > There is simply no point in having any kind of support for numbers > whose meanings can change. > > Which is why I removed the few cases of binary number duplication I > found. > Agreed. *Furthermore*, if the number isn't in <linux/sysctl.h> it shouldn't exist anywhere else, either. -hpa _______________________________________________ Containers mailing list Containers@lists.osdl.org https://lists.osdl.org/mailman/listinfo/containers
creator: hpa
date: 2007-01-16T18:58:10-00:00

Re: [PATCH 0/59] Cleanup sysctl
type: item
description: "H. Peter Anvin" <hpa@zytor.com> writes: > Eric W. Biederman wrote: >>>> >>> With "architectural" I mean "guaranteed to be stable" (as opposed to >>> "incidental"). Sorry for the confusion. >> >> Ok. Then largely we are in agreement. To implement that the rule is simple. >> If it isn't CTL_UNNUMBERED and the number is in Linus's tree, it is >> our responsibility to never change the meaning of that number. >> >> If a new sysctl entry is introduced it should be CTL_UNNUMBERED until >> it reaches Linus's tree to avoid conflicts. >> >> There is simply no point in having any kind of support for numbers >> whose meanings can change. >> >> Which is why I removed the few cases of binary number duplication I >> found. >> > > Agreed. *Furthermore*, if the number isn't in <linux/sysctl.h> it shouldn't > exist anywhere else, either. That would be a good habit. Feel free to send the patches to ensure that is so. I'm a practical fix it when it is in my way kind of guy ;) Eric _______________________________________________ Containers mailing list Containers@lists.osdl.org https://lists.osdl.org/mailman/listinfo/containers
creator: ebiederm
date: 2007-01-16T19:03:36-00:00

Re: [PATCH 0/59] Cleanup sysctl
type: item
description: Eric W. Biederman wrote: >> >> Agreed. *Furthermore*, if the number isn't in <linux/sysctl.h> it shouldn't >> exist anywhere else, either. > > That would be a good habit. Feel free to send the patches to ensure that > is so. > > I'm a practical fix it when it is in my way kind of guy ;) That's fine. However, I am wondering if there are things in <linux/sysctl.h> which really doesn't need architectural numbers, i.e. which should be removed from the binary interface. -hpa _______________________________________________ Containers mailing list Containers@lists.osdl.org https://lists.osdl.org/mailman/listinfo/containers
creator: hpa
date: 2007-01-16T19:15:05-00:00

Re: [PATCH 0/59] Cleanup sysctl
type: item
description: "H. Peter Anvin" <hpa@zytor.com> writes: > Eric W. Biederman wrote: >>> >>> Agreed. *Furthermore*, if the number isn't in <linux/sysctl.h> it shouldn't >>> exist anywhere else, either. >> >> That would be a good habit. Feel free to send the patches to ensure that >> is so. >> >> I'm a practical fix it when it is in my way kind of guy ;) > > That's fine. However, I am wondering if there are things in <linux/sysctl.h> > which really doesn't need architectural numbers, i.e. which should be removed > from the binary interface. As a practical measure the 32bit hierarchical numeric namespace is extremely sparsely populated. So even if there are things that we never intend to export again it doesn't hurt to reserve the number for them so we don't confuse something that thought the number actually meant something. In the worst case we want to comment out the entry so we keep the number reserved even if we don't use it. To see if there are entries we are not currently using just requires going through the loop. <pseudo shell> For DEFINE in sysctl.h ; do if ! grep -r DEFINE /usr/src/linux/ ; then echo DEFINE not used. fi done </pseudo shell> Eric _______________________________________________ Containers mailing list Containers@lists.osdl.org https://lists.osdl.org/mailman/listinfo/containers
creator: ebiederm
date: 2007-01-16T19:30:53-00:00

Re: [PATCH 0/59] Cleanup sysctl
type: item
description: The FRV bits look okay. I can't test them until I get back from Australia in Feb. David _______________________________________________ Containers mailing list Containers@lists.osdl.org https://lists.osdl.org/mailman/listinfo/containers
creator: David Howells
date: 2007-01-16T20:02:21-00:00

Re: [PATCH 48/59] sysctl: Register the ocfs2 sysctl numbers
type: item
description: On Tue, Jan 16, 2007 at 09:39:53AM -0700, Eric W. Biederman wrote: > From: Eric W. Biederman <ebiederm@xmission.com> - unquoted > > ocfs2 was did not have the binary number it uses under CTL_FS > registered in sysctl.h. Register it to avoid future conflicts, > and change the name of the definition to be in line with the > rest of the sysctl numbers. This looks good - ACK. --Mark -- Mark Fasheh Senior Software Developer, Oracle mark.fasheh@oracle.com _______________________________________________ Containers mailing list Containers@lists.osdl.org https://lists.osdl.org/mailman/listinfo/containers
creator: Mark Fasheh
date: 2007-01-16T20:37:10-00:00

Re: [PATCH 37/59] sysctl: C99 convert arch/sh64/kernel/traps.c and remove ABI breakage.
type: item
description: On Tue, Jan 16, 2007 at 09:39:42AM -0700, Eric W. Biederman wrote: > From: Eric W. Biederman <ebiederm@xmission.com> - unquoted > > While doing the C99 conversion I notices that the top level sh64 > directory was using the binary number for CTL_KERN. That is a > no-no so I removed the support for the sysctl binary interface > only leaving sysctl /proc support. > > At least the sysctl tables were placed at the end of > the list so user space did not see this mistake. > > Signed-off-by: Eric W. Biederman <ebiederm@xmission.com> Looks good, thanks Eric. Acked-by: Paul Mundt <lethal@linux-sh.org> _______________________________________________ Containers mailing list Containers@lists.osdl.org https://lists.osdl.org/mailman/listinfo/containers
creator: Paul Mundt
date: 2007-01-16T22:07:08-00:00

Re: [PATCH 45/59] sysctl: C99 convert ctl_tables in drivers/parport/procfs.c
type: item
description: Hi Eric, On Tuesday, 16. January 2007 17:39, Eric W. Biederman wrote: > diff --git a/drivers/parport/procfs.c b/drivers/parport/procfs.c > index 2e744a2..5337789 100644 > --- a/drivers/parport/procfs.c > +++ b/drivers/parport/procfs.c > @@ -263,50 +263,118 @@ struct parport_sysctl_table { > + { > + .ctl_name = DEV_PARPORT_BASE_ADDR, > + .procname = "base-addr", > + .data = NULL, > + .maxlen = 0, > + .mode = 0444, > + .proc_handler = &do_hardware_base_addr > + }, No need to initialize to zero or NULL. Just list any variable, which is NOT zero or NULL. > + { > + .ctl_name = DEV_PARPORT_AUTOPROBE + 1, > + .procname = "autoprobe0", > + .data = NULL, > + .maxlen = 0, > + .maxlen = 0444, > + .proc_handler = &do_autoprobe > + }, Typo here? .mode = 0444 makes mor sense. Regards Ingo Oeser _______________________________________________ Containers mailing list Containers@lists.osdl.org https://lists.osdl.org/mailman/listinfo/containers
creator: Ingo Oeser
date: 2007-01-16T22:15:43-00:00

Re: [PATCH 31/59] sysctl: C99 convert the ctl_tables in arch/mips/au1000/common/power.c
type: item
description: Hi Eric, On Tuesday, 16. January 2007 17:39, Eric W. Biederman wrote: > diff --git a/arch/mips/au1000/common/power.c b/arch/mips/au1000/common/power.c > index b531ab7..31256b8 100644 > --- a/arch/mips/au1000/common/power.c > +++ b/arch/mips/au1000/common/power.c > @@ -419,15 +419,41 @@ static int pm_do_freq(ctl_table * ctl, int write, struct file *file, > + { > + .ctl_name = CTL_UNNUMBERED, > + .procname = "suspend", > + .data = NULL, > + .maxlen = 0, > + .mode = 0600, > + .proc_handler = &pm_do_suspend > + }, No need for zero initialization for maxlen. > + { > + .ctl_name = CTL_UNNUMBERED, > + .procname = "sleep", > + .data = NULL, > + .maxlen = 0, > + .mode = 0600, > + .proc_handler = &pm_do_sleep > + }, dito > + { > + .ctl_name = CTL_UNNUMBERED, > + .procname = "freq", > + .data = NULL, > + .maxlen = 0, > + .mode = 0600, > + .proc_handler = &pm_do_freq > + }, > + {} > }; dito Regards Ingo Oeser _______________________________________________ Containers mailing list Containers@lists.osdl.org https://lists.osdl.org/mailman/listinfo/containers
creator: Ingo Oeser
date: 2007-01-16T22:20:17-00:00

Re: [PATCH 45/59] sysctl: C99 convert ctl_tables in drivers/parport/procfs.c
type: item
description: Ingo Oeser <ioe-lkml@rameria.de> writes: > Hi Eric, > > On Tuesday, 16. January 2007 17:39, Eric W. Biederman wrote: >> diff --git a/drivers/parport/procfs.c b/drivers/parport/procfs.c >> index 2e744a2..5337789 100644 >> --- a/drivers/parport/procfs.c >> +++ b/drivers/parport/procfs.c >> @@ -263,50 +263,118 @@ struct parport_sysctl_table { >> + { >> + .ctl_name = DEV_PARPORT_BASE_ADDR, >> + .procname = "base-addr", >> + .data = NULL, >> + .maxlen = 0, >> + .mode = 0444, >> + .proc_handler = &do_hardware_base_addr >> + }, > > No need to initialize to zero or NULL. Just list any variable, which is NOT zero > or NULL. Agreed. In this case it was left for clarity. >> + { >> + .ctl_name = DEV_PARPORT_AUTOPROBE + 1, >> + .procname = "autoprobe0", >> + .data = NULL, >> + .maxlen = 0, >> + .maxlen = 0444, >> + .proc_handler = &do_autoprobe >> + }, > > Typo here? .mode = 0444 makes mor sense. Yep looks like it. On my todo. Eric _______________________________________________ Containers mailing list Containers@lists.osdl.org https://lists.osdl.org/mailman/listinfo/containers
creator: ebiederm
date: 2007-01-16T23:00:56-00:00

Re: [PATCH 18/59] sysctl: ipmi remove unnecessary insert_at_head flag
type: item
description: On Tue, 2007-01-16 at 09:39 -0700, Eric W. Biederman wrote: > From: Eric W. Biederman <ebiederm@xmission.com> - unquoted > > With unique sysctl binary numbers setting insert_at_head is pointless. > > Signed-off-by: Eric W. Biederman <ebiederm@xmission.com> Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> > --- > drivers/char/ipmi/ipmi_poweroff.c | 2 +- > 1 files changed, 1 insertions(+), 1 deletions(-) > > diff --git a/drivers/char/ipmi/ipmi_poweroff.c b/drivers/char/ipmi/ipmi_poweroff.c > index 9d23136..b3ae65e 100644 > --- a/drivers/char/ipmi/ipmi_poweroff.c > +++ b/drivers/char/ipmi/ipmi_poweroff.c > @@ -686,7 +686,7 @@ static int ipmi_poweroff_init (void) > printk(KERN_INFO PFX "Power cycle is enabled.\n"); > > #ifdef CONFIG_PROC_FS > - ipmi_table_header = register_sysctl_table(ipmi_root_table, 1); > + ipmi_table_header = register_sysctl_table(ipmi_root_table, 0); > if (!ipmi_table_header) { > printk(KERN_ERR PFX "Unable to register powercycle sysctl\n"); > rv = -ENOMEM; _______________________________________________ Containers mailing list Containers@lists.osdl.org https://lists.osdl.org/mailman/listinfo/containers
creator: Benjamin Herrenschmid
date: 2007-01-17T03:14:54-00:00

Re: [PATCH 35/59] sysctl: C99 convert ctl_tables in arch/powerpc/kernel/idle.c
type: item
description: On Tue, 2007-01-16 at 09:39 -0700, Eric W. Biederman wrote: > From: Eric W. Biederman <ebiederm@xmission.com> - unquoted > > This was partially done already and there was no ABI breakage what > a relief. > > Signed-off-by: Eric W. Biederman <ebiederm@xmission.com> Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> > --- > arch/powerpc/kernel/idle.c | 11 ++++++++--- > 1 files changed, 8 insertions(+), 3 deletions(-) > > diff --git a/arch/powerpc/kernel/idle.c b/arch/powerpc/kernel/idle.c > index 8994af3..8b27bb1 100644 > --- a/arch/powerpc/kernel/idle.c > +++ b/arch/powerpc/kernel/idle.c > @@ -110,11 +110,16 @@ static ctl_table powersave_nap_ctl_table[]={ > .mode = 0644, > .proc_handler = &proc_dointvec, > }, > - { 0, }, > + {} > }; > static ctl_table powersave_nap_sysctl_root[] = { > - { 1, "kernel", NULL, 0, 0755, powersave_nap_ctl_table, }, > - { 0,}, > + { > + .ctl_name = CTL_KERN, > + .procname = "kernel", > + .mode = 0755, > + .child = powersave_nap_ctl_table, > + }, > + {} > }; > > static int __init _______________________________________________ Containers mailing list Containers@lists.osdl.org https://lists.osdl.org/mailman/listinfo/containers
creator: Benjamin Herrenschmid
date: 2007-01-17T03:16:27-00:00

Re: [PATCH 36/59] sysctl: C99 convert ctl_tables entries in arch/ppc/kernel/ppc_htab.c
type: item
description: On Tue, 2007-01-16 at 09:39 -0700, Eric W. Biederman wrote: > From: Eric W. Biederman <ebiederm@xmission.com> - unquoted > > And make the mode of the kernel directory 0555 no one is allowed > to write to sysctl directories. > > Signed-off-by: Eric W. Biederman <ebiederm@xmission.com> Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> > --- > arch/ppc/kernel/ppc_htab.c | 11 ++++++++--- > 1 files changed, 8 insertions(+), 3 deletions(-) > > diff --git a/arch/ppc/kernel/ppc_htab.c b/arch/ppc/kernel/ppc_htab.c > index bd129d3..77b20ff 100644 > --- a/arch/ppc/kernel/ppc_htab.c > +++ b/arch/ppc/kernel/ppc_htab.c > @@ -442,11 +442,16 @@ static ctl_table htab_ctl_table[]={ > .mode = 0644, > .proc_handler = &proc_dol2crvec, > }, > - { 0, }, > + {} > }; > static ctl_table htab_sysctl_root[] = { > - { 1, "kernel", NULL, 0, 0755, htab_ctl_table, }, > - { 0,}, > + { > + .ctl_name = CTL_KERN, > + .procname = "kernel", > + .mode = 0555, > + .child = htab_ctl_table, > + }, > + {} > }; > > static int __init _______________________________________________ Containers mailing list Containers@lists.osdl.org https://lists.osdl.org/mailman/listinfo/containers
creator: Benjamin Herrenschmid
date: 2007-01-17T03:16:54-00:00

Re: [PATCH 0/59] Cleanup sysctl
type: item
description: On Wednesday 17 January 2007 03:33, Eric W. Biederman wrote: > There has not been much maintenance on sysctl in years, and as a result is > there is a lot to do to allow future interesting work to happen, and being > ambitious I'm trying to do it all at once :) > > The patches in this series fall into several general categories. [...] The patches look good to me. -Andi _______________________________________________ Containers mailing list Containers@lists.osdl.org https://lists.osdl.org/mailman/listinfo/containers
creator: Andi Kleen
date: 2007-01-17T04:21:43-00:00

Re: [PATCH 0/59] Cleanup sysctl
type: item
description: On Tue, 2007-01-16 at 09:33 -0700, Eric W. Biederman wrote: > There has not been much maintenance on sysctl in years, and as a result is > there is a lot to do to allow future interesting work to happen, and being > ambitious I'm trying to do it all at once :) s390 parts look good. Kernels boots and the system controls are still working. I had to add an #include <linux/uaccess.h> to ipc/ipc_sysctl.c to get the kernel compiled. That include should be added to patch #51. Acked-by: Martin Schwidefsky <schwidefsky@de.ibm.com> for: [PATCH 33/59] sysctl: s390 move sysctl definitions to sysctl.h [PATCH 34/59] sysctl: s390 Remove unnecessary use of insert_at_head and the s390 parts of [PATCH 55/59] sysctl: Remove insert_at_head from register_sysctl -- blue skies, Martin. Martin Schwidefsky Linux for zSeries Development & Services IBM Deutschland Entwicklung GmbH "Reality continues to ruin my life." - Calvin. _______________________________________________ Containers mailing list Containers@lists.osdl.org https://lists.osdl.org/mailman/listinfo/containers
creator: Martin Schwidefsky
date: 2007-01-17T12:10:13-00:00

Re: [PATCH 14/59] sysctl: C99 convert xfs ctl_tables
type: item
description: minor extra space in table below... Kirill > From: Eric W. Biederman <ebiederm@xmission.com> - unquoted > > Signed-off-by: Eric W. Biederman <ebiederm@xmission.com> > --- > fs/xfs/linux-2.6/xfs_sysctl.c | 258 ++++++++++++++++++++++++++++------------ > 1 files changed, 180 insertions(+), 78 deletions(-) > > diff --git a/fs/xfs/linux-2.6/xfs_sysctl.c b/fs/xfs/linux-2.6/xfs_sysctl.c > index af777e9..5a0eefc 100644 > --- a/fs/xfs/linux-2.6/xfs_sysctl.c > +++ b/fs/xfs/linux-2.6/xfs_sysctl.c > @@ -55,95 +55,197 @@ xfs_stats_clear_proc_handler( > #endif /* CONFIG_PROC_FS */ > > STATIC ctl_table xfs_table[] = { > - {XFS_RESTRICT_CHOWN, "restrict_chown", &xfs_params.restrict_chown.val, > - sizeof(int), 0644, NULL, &proc_dointvec_minmax, > - &sysctl_intvec, NULL, > - &xfs_params.restrict_chown.min, &xfs_params.restrict_chown.max}, > - > - {XFS_SGID_INHERIT, "irix_sgid_inherit", &xfs_params.sgid_inherit.val, > - sizeof(int), 0644, NULL, &proc_dointvec_minmax, > - &sysctl_intvec, NULL, > - &xfs_params.sgid_inherit.min, &xfs_params.sgid_inherit.max}, > - > - {XFS_SYMLINK_MODE, "irix_symlink_mode", &xfs_params.symlink_mode.val, > - sizeof(int), 0644, NULL, &proc_dointvec_minmax, > - &sysctl_intvec, NULL, > - &xfs_params.symlink_mode.min, &xfs_params.symlink_mode.max}, > - > - {XFS_PANIC_MASK, "panic_mask", &xfs_params.panic_mask.val, > - sizeof(int), 0644, NULL, &proc_dointvec_minmax, > - &sysctl_intvec, NULL, > - &xfs_params.panic_mask.min, &xfs_params.panic_mask.max}, > - > - {XFS_ERRLEVEL, "error_level", &xfs_params.error_level.val, > - sizeof(int), 0644, NULL, &proc_dointvec_minmax, > - &sysctl_intvec, NULL, > - &xfs_params.error_level.min, &xfs_params.error_level.max}, > - > - {XFS_SYNCD_TIMER, "xfssyncd_centisecs", &xfs_params.syncd_timer.val, > - sizeof(int), 0644, NULL, &proc_dointvec_minmax, > - &sysctl_intvec, NULL, > - &xfs_params.syncd_timer.min, &xfs_params.syncd_timer.max}, > - > - {XFS_INHERIT_SYNC, "inherit_sync", &xfs_params.inherit_sync.val, > - sizeof(int), 064…
creator: dev
date: 2007-01-17T17:01:48-00:00

Re: [PATCH 25/59] sysctl: C99 convert arch/frv/kernel/pm.c
type: item
description: another small minor note. > From: Eric W. Biederman <ebiederm@xmission.com> - unquoted > > Signed-off-by: Eric W. Biederman <ebiederm@xmission.com> > --- > arch/frv/kernel/pm.c | 50 +++++++++++++++++++++++++++++++++++++++++++------- > 1 files changed, 43 insertions(+), 7 deletions(-) > > diff --git a/arch/frv/kernel/pm.c b/arch/frv/kernel/pm.c > index c1840d6..aa50333 100644 > --- a/arch/frv/kernel/pm.c > +++ b/arch/frv/kernel/pm.c > @@ -401,17 +401,53 @@ static int cm_sysctl(ctl_table *table, int __user *name, int nlen, > > static struct ctl_table pm_table[] = > { > - {CTL_PM_SUSPEND, "suspend", NULL, 0, 0200, NULL, &sysctl_pm_do_suspend}, > - {CTL_PM_CMODE, "cmode", &clock_cmode_current, sizeof(int), 0644, NULL, &cmode_procctl, &cmode_sysctl, NULL}, > - {CTL_PM_P0, "p0", &clock_p0_current, sizeof(int), 0644, NULL, &p0_procctl, &p0_sysctl, NULL}, > - {CTL_PM_CM, "cm", &clock_cm_current, sizeof(int), 0644, NULL, &cm_procctl, &cm_sysctl, NULL}, > - {0} > + { > + .ctl_name = CTL_PM_SUSPEND, > + .procname = "suspend", > + .data = NULL, > + .maxlen = 0, > + .mode = 0200, > + .proc_handler = &sysctl_pm_do_suspend, > + }, > + { > + .ctl_name = CTL_PM_CMODE, > + .procname = "cmode", > + .data = &clock_cmode_current, > + .maxlen = sizeof(int), > + .mode = 0644, > + .proc_handler = &cmode_procctl, > + .strategy = &cmode_sysctl, > + }, > + { > + .ctl_name = CTL_PM_P0, > + .procname = "p0", > + .data = &clock_p0_current, > + .maxlen = sizeof(int), > + .mode = 0644, > + .proc_handler = &p0_procctl, > + .strategy = &p0_sysctl, > + }, > + { > + .ctl_name = CTL_PM_CM, > + .procname = "cm", > + .data = &clock_cm_current, > + .maxlen = sizeof(int), > + .mode = 0644, > + .proc_handler = &cm_procctl, > + .strategy = &cm_sysctl, > + }, > + { .ctl_name = 0} in next patch (26/59) you write just "{ }". .ctl_name = 0 not required here. > }; > > static struct ctl_table pm_dir_table[] = > { > - {CTL_PM, "pm", NULL, 0, 0555, pm_table}, > - {0} > + { > + .ctl_name = CTL_PM, > + .procname = "pm…
creator: dev
date: 2007-01-17T17:14:17-00:00

Re: [PATCH 33/59] sysctl: s390 move sysctl definitions to sysctl.h
type: item
description: IDs not sorted in enum. see below. > From: Eric W. Biederman <ebiederm@xmission.com> - unquoted > > We need to have the the definition of all top level sysctl > directories registers in sysctl.h so we don't conflict by > accident and cause abi problems. > > Signed-off-by: Eric W. Biederman <ebiederm@xmission.com> > --- > arch/s390/appldata/appldata.h | 3 +-- > arch/s390/kernel/debug.c | 1 - > arch/s390/mm/cmm.c | 4 ---- > include/linux/sysctl.h | 7 +++++++ > 4 files changed, 8 insertions(+), 7 deletions(-) > > diff --git a/arch/s390/appldata/appldata.h b/arch/s390/appldata/appldata.h > index 0429481..4069b81 100644 > --- a/arch/s390/appldata/appldata.h > +++ b/arch/s390/appldata/appldata.h > @@ -21,8 +21,7 @@ > #define APPLDATA_RECORD_NET_SUM_ID 0x03 /* must be < 256 ! */ > #define APPLDATA_RECORD_PROC_ID 0x04 > > -#define CTL_APPLDATA 2120 /* sysctl IDs, must be unique */ > -#define CTL_APPLDATA_TIMER 2121 > +#define CTL_APPLDATA_TIMER 2121 /* sysctl IDs, must be unique */ > #define CTL_APPLDATA_INTERVAL 2122 > #define CTL_APPLDATA_MEM 2123 > #define CTL_APPLDATA_OS 2124 > diff --git a/arch/s390/kernel/debug.c b/arch/s390/kernel/debug.c > index bb57bc0..c81f8e5 100644 > --- a/arch/s390/kernel/debug.c > +++ b/arch/s390/kernel/debug.c > @@ -852,7 +852,6 @@ debug_finish_entry(debug_info_t * id, debug_entry_t* active, int level, > static int debug_stoppable=1; > static int debug_active=1; > > -#define CTL_S390DBF 5677 > #define CTL_S390DBF_STOPPABLE 5678 > #define CTL_S390DBF_ACTIVE 5679 > > diff --git a/arch/s390/mm/cmm.c b/arch/s390/mm/cmm.c > index 607f50e..df733d5 100644 > --- a/arch/s390/mm/cmm.c > +++ b/arch/s390/mm/cmm.c > @@ -256,10 +256,6 @@ cmm_skip_blanks(char *cp, char **endp) > } > > #ifdef CONFIG_CMM_PROC > -/* These will someday get removed. */ > -#define VM_CMM_PAGES 1111 > -#define VM_CMM_TIMED_PAGES 1112 > -#define VM_CMM_TIMEOUT 1113 > > static struct ctl_table cmm_table[]; > > diff --git a/include/linux/sysctl.h b/include/linux/sysctl.h > index 71c1…
creator: dev
date: 2007-01-17T17:23:22-00:00

Re: [PATCH 50/59] sysctl: Move utsname sysctls to their own file
type: item
description: Eric, though I personally don't care much: 1. I ask for not setting your authorship/copyright on the code which you just copied from other places. Just doesn't look polite IMHO. 2. I would propose to not introduce utsname_sysctl.c. both files are too small and minor that I can't see much reasons splitting them. Kirill > From: Eric W. Biederman <ebiederm@xmission.com> - unquoted > > This is just a simple cleanup to keep kernel/sysctl.c > from getting to crowded with special cases, and by > keeping all of the utsname logic to together it makes > the code a little more readable. > > Signed-off-by: Eric W. Biederman <ebiederm@xmission.com> > --- > kernel/Makefile | 1 + > kernel/sysctl.c | 115 ------------------------------------- > kernel/utsname_sysctl.c | 146 +++++++++++++++++++++++++++++++++++++++++++++++ > 3 files changed, 147 insertions(+), 115 deletions(-) > > diff --git a/kernel/Makefile b/kernel/Makefile > index 14f4d45..d286c44 100644 > --- a/kernel/Makefile > +++ b/kernel/Makefile > @@ -48,6 +48,7 @@ obj-$(CONFIG_SECCOMP) += seccomp.o > obj-$(CONFIG_RCU_TORTURE_TEST) += rcutorture.o > obj-$(CONFIG_RELAY) += relay.o > obj-$(CONFIG_UTS_NS) += utsname.o > +obj-$(CONFIG_SYSCTL) += utsname_sysctl.o > obj-$(CONFIG_TASK_DELAY_ACCT) += delayacct.o > obj-$(CONFIG_TASKSTATS) += taskstats.o tsacct.o > > diff --git a/kernel/sysctl.c b/kernel/sysctl.c > index 7420761..a8c0a03 100644 > --- a/kernel/sysctl.c > +++ b/kernel/sysctl.c > @@ -135,13 +135,6 @@ static int parse_table(int __user *, int, void __user *, size_t __user *, > void __user *, size_t, ctl_table *); > #endif > > -static int proc_do_uts_string(ctl_table *table, int write, struct file *filp, > - void __user *buffer, size_t *lenp, loff_t *ppos); > - > -static int sysctl_uts_string(ctl_table *table, int __user *name, int nlen, > - void __user *oldval, size_t __user *oldlenp, > - void __user *newval, size_t newlen); > - > #ifdef CONFIG_SYSVIPC > static int sysctl_ipc_data(ctl_table *table, int __user *name, int nl…
creator: dev
date: 2007-01-17T17:41:48-00:00

Re: [PATCH 51/59] sysctl: Move SYSV IPC sysctls to their own file
type: item
description: 1. I ask for not setting your authorship/copyright on the code which you just copied from other places. Just doesn't look polite IMHO. 2. please don't name files like ipc/ipc_sysctl.c ipc/sysctl.c sounds better IMHO. 3. any reason to introduce CONFIG_SYSVIPC_SYSCTL? why not simply do > +obj-$(CONFIG_SYSCTL) += sysctl.o instead? Kirill > From: Eric W. Biederman <ebiederm@xmission.com> - unquoted > > This is just a simple cleanup to keep kernel/sysctl.c > from getting to crowded with special cases, and by > keeping all of the ipc logic to together it makes > the code a little more readable. > > Signed-off-by: Eric W. Biederman <ebiederm@xmission.com> > --- > init/Kconfig | 6 ++ > ipc/Makefile | 1 + > ipc/ipc_sysctl.c | 182 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ > kernel/sysctl.c | 174 --------------------------------------------------- > 4 files changed, 189 insertions(+), 174 deletions(-) > > diff --git a/init/Kconfig b/init/Kconfig > index a3f83e2..33bc38d 100644 > --- a/init/Kconfig > +++ b/init/Kconfig > @@ -116,6 +116,12 @@ config SYSVIPC > section 6.4 of the Linux Programmer's Guide, available from > <http://www.tldp.org/guides.html>. > > +config SYSVIPC_SYSCTL > + bool > + depends on SYSVIPC > + depends on SYSCTL > + default y > + > config IPC_NS > bool "IPC Namespaces" > depends on SYSVIPC > diff --git a/ipc/Makefile b/ipc/Makefile > index 0a6d626..b93bba6 100644 > --- a/ipc/Makefile > +++ b/ipc/Makefile > @@ -4,6 +4,7 @@ > > obj-$(CONFIG_SYSVIPC_COMPAT) += compat.o > obj-$(CONFIG_SYSVIPC) += util.o msgutil.o msg.o sem.o shm.o > +obj-$(CONFIG_SYSVIPC_SYSCTL) += ipc_sysctl.o > obj_mq-$(CONFIG_COMPAT) += compat_mq.o > obj-$(CONFIG_POSIX_MQUEUE) += mqueue.o msgutil.o $(obj_mq-y) > > diff --git a/ipc/ipc_sysctl.c b/ipc/ipc_sysctl.c > new file mode 100644 > index 0000000..9018009 > --- /dev/null > +++ b/ipc/ipc_sysctl.c > @@ -0,0 +1,182 @@ > +/* > + * Copyright (C) 2007 > + * > + * Author: Eric Biederman <ebiederm@xmision.com> > + * > + * This progr…
creator: dev
date: 2007-01-17T17:44:34-00:00

Re: [PATCH 0/59] Cleanup sysctl
type: item
description: Eric, really good job! Patches: 1-13, 15-24, 26-32, 34-44, 46-49, 52-55, 57 (all except below) Acked-By: Kirill Korotaev <dev@openvz.org> 14/59 - minor (extra space) 25/59 - minor note 33/59 - not sorted sysctl IDs 45/59 - typo 50/59 - copyright/file note 51/59 - copyright/file name/kconfig option notes 56,58,59/59 - will review tomorrow another issue I have to think over is removal of de->owner. Alexey Dobriyan has sent recently patching fixing /proc <-> modules refcounting. I guess w/o these patches your changes are not safe if proc_handler or strategy are functions from the module. Thanks, Kirill > There has not been much maintenance on sysctl in years, and as a result is > there is a lot to do to allow future interesting work to happen, and being > ambitious I'm trying to do it all at once :) > > The patches in this series fall into several general categories. > > - Removal of useless attempts to override the standard sysctls > > - Registers of sysctl numbers in sysctl.h so someone else does not use > the magic number and conflict. > > - C99 conversions so it becomes possible to change the layout of > struct ctl_table without breaking everything. > > - Removal of useless claims of module ownership, in the proc dir entries > > - Removal of sys_sysctl support where people had used conflicting sysctl > numbers. Trying to break glibc or other applications by changing the > ABI is not cool. 9 instances of this in the kernel seems a little > extreme. > > - General enhancements when I got the junk I could see out. > > Odds are I missed something, most of the cleanups are simply a result of > me working on the sysctl core and glancing at the users and going: What? > > Eric > _______________________________________________ > Containers mailing list > Containers@lists.osdl.org > https://lists.osdl.org/mailman/listinfo/containers > > _______________________________________________ Containers mailing list Containers@lists.osdl.org https://lists.osdl.org/mailman/listinfo/con…
creator: dev
date: 2007-01-17T18:10:50-00:00

Re: [PATCH 0/59] Cleanup sysctl
type: item
description: Kirill Korotaev <dev@sw.ru> writes: > Eric, really good job! > > Patches: 1-13, 15-24, 26-32, 34-44, 46-49, 52-55, 57 (all except below) > Acked-By: Kirill Korotaev <dev@openvz.org> > > 14/59 - minor (extra space) > 25/59 - minor note > 33/59 - not sorted sysctl IDs > 45/59 - typo > 50/59 - copyright/file note > 51/59 - copyright/file name/kconfig option notes > > 56,58,59/59 - will review tomorrow > > another issue I have to think over is removal of de->owner. > Alexey Dobriyan has sent recently patching fixing /proc <-> modules refcounting. > I guess w/o these patches your changes are not safe if proc_handler or strategy > are functions from the module. sysctl uses the logic in use_table/unuse_table to keep it safe from module remove while it is in use. And it does the logic in the generic code in either do_rw_proc or do_sysctl. This definitely works on the sys_sysctl path and it appears to work in the do_rw_proc case, things are a little trickier there so someone may have missed a race somewhere. In my rewrite of proc it works exactly like the binary case so we are good there. It is certainly the intention of the sysctl implementation that users should not have to set de->owner. So if there is a problem with removing de->owner it is a bug in the sysctl implementation not in the code where it was removed. Normal proc users definitely have to set de->owner to be safe, but sysctl has always been it's own thing, with different rules. Eric _______________________________________________ Containers mailing list Containers@lists.osdl.org https://lists.osdl.org/mailman/listinfo/containers
creator: ebiederm
date: 2007-01-17T19:02:27-00:00

Re: [PATCH 50/59] sysctl: Move utsname sysctls to their own file
type: item
description: Kirill Korotaev <dev@sw.ru> writes: > Eric, though I personally don't care much: > 1. I ask for not setting your authorship/copyright on the code which you just > copied > from other places. Just doesn't look polite IMHO. I can't claim complete ownership of the code, there was plenty of feed back and contributions from others but the final form without a big switch statement is mine. I certainly can't claim the table, it has been in that form for years. If you notice I actually didn't say whose copyright it was :) just that I wrote the file. If there are copyright claims I should include I will be happy to do that. Mostly I was just trying to find some stupid boiler plate that would work. > 2. I would propose to not introduce utsname_sysctl.c. > both files are too small and minor that I can't see much reasons splitting > them. The impact of moving this code out of sysctl.c is a major simplification, to sysctl.c. Putting them in their own file means we can cleanly restrict the code to only be compiled CONFIG_SYSCTL is set. It is a necessary first step to implementing a per process /proc/sys. It reorganizes the ipc and utsname sysctl from a terribly fragile structure to something that is robust and easy to follow. Code scattered all throughout sysctl.c was just a disaster. We had several instances of having to fix bugs with odd combinations of CONFIG options, simply because the other spot that needed to be touched wasn't obvious. So from my perspective this is an extremely worthwhile change that will make maintenance easier and is a small first step towards some nice future functionality. Eric _______________________________________________ Containers mailing list Containers@lists.osdl.org https://lists.osdl.org/mailman/listinfo/containers
creator: ebiederm
date: 2007-01-17T19:31:22-00:00

Re: [PATCH 25/59] sysctl: C99 convert arch/frv/kernel/pm.c
type: item
description: On Wed, Jan 17, 2007 at 08:14:17PM +0300, Kirill Korotaev wrote: > another small minor note. > > > From: Eric W. Biederman <ebiederm@xmission.com> - unquoted > > > > Signed-off-by: Eric W. Biederman <ebiederm@xmission.com> > > --- > > arch/frv/kernel/pm.c | 50 +++++++++++++++++++++++++++++++++++++++++++------- > > 1 files changed, 43 insertions(+), 7 deletions(-) > > > > diff --git a/arch/frv/kernel/pm.c b/arch/frv/kernel/pm.c > > index c1840d6..aa50333 100644 > > --- a/arch/frv/kernel/pm.c > > +++ b/arch/frv/kernel/pm.c > > @@ -401,17 +401,53 @@ static int cm_sysctl(ctl_table *table, int __user *name, int nlen, > > > > static struct ctl_table pm_table[] = > > { > > - {CTL_PM_SUSPEND, "suspend", NULL, 0, 0200, NULL, &sysctl_pm_do_suspend}, > > - {CTL_PM_CMODE, "cmode", &clock_cmode_current, sizeof(int), 0644, NULL, &cmode_procctl, &cmode_sysctl, NULL}, > > - {CTL_PM_P0, "p0", &clock_p0_current, sizeof(int), 0644, NULL, &p0_procctl, &p0_sysctl, NULL}, > > - {CTL_PM_CM, "cm", &clock_cm_current, sizeof(int), 0644, NULL, &cm_procctl, &cm_sysctl, NULL}, > > - {0} > > + { > > + .ctl_name = CTL_PM_SUSPEND, > > + .procname = "suspend", > > + .data = NULL, > > + .maxlen = 0, > > + .mode = 0200, > > + .proc_handler = &sysctl_pm_do_suspend, > > + }, > > + { > > + .ctl_name = CTL_PM_CMODE, > > + .procname = "cmode", > > + .data = &clock_cmode_current, > > + .maxlen = sizeof(int), > > + .mode = 0644, > > + .proc_handler = &cmode_procctl, > > + .strategy = &cmode_sysctl, > > + }, > > + { > > + .ctl_name = CTL_PM_P0, > > + .procname = "p0", > > + .data = &clock_p0_current, > > + .maxlen = sizeof(int), > > + .mode = 0644, > > + .proc_handler = &p0_procctl, > > + .strategy = &p0_sysctl, > > + }, > > + { > > + .ctl_name = CTL_PM_CM, > > + .procname = "cm", > > + .data = &clock_cm_current, > > + .maxlen = sizeof(int), > > + .mode = 0644, > > + .proc_handler = &cm_procctl, > > + .strategy = &cm_sysctl, > > + }, > > + { .ctl_name = 0} > in next patch (26/59) you write just "{ }". .ctl_n…
creator: Herbert Poetzl
date: 2007-01-22T22:21:15-00:00

Re: [PATCH 50/59] sysctl: Move utsname sysctls to their own file
type: item
description: On Wed, Jan 17, 2007 at 12:31:22PM -0700, Eric W. Biederman wrote: > Kirill Korotaev <dev@sw.ru> writes: > > > Eric, though I personally don't care much: > > 1. I ask for not setting your authorship/copyright on the code which you just > > copied > > from other places. Just doesn't look polite IMHO. > > I can't claim complete ownership of the code, there was plenty of feed back > and contributions from others but the final form without a big switch > statement is mine. I certainly can't claim the table, it has been in > that form for years. > > If you notice I actually didn't say whose copyright it was :) just > that I wrote the file. > > If there are copyright claims I should include I will be happy to do that. > Mostly I was just trying to find some stupid boiler plate that would work. IMHO that is fine ... > > 2. I would propose to not introduce utsname_sysctl.c. > > both files are too small and minor that I can't see much reasons splitting > > them. > > The impact of moving this code out of sysctl.c is a major > simplification, to sysctl.c. Putting them in their own file means we > can cleanly restrict the code to only be compiled CONFIG_SYSCTL is set. > > It is a necessary first step to implementing a per process /proc/sys. > > It reorganizes the ipc and utsname sysctl from a terribly fragile > structure to something that is robust and easy to follow. Code > scattered all throughout sysctl.c was just a disaster. We had > several instances of having to fix bugs with odd combinations of > CONFIG options, simply because the other spot that needed to be touched > wasn't obvious. > > So from my perspective this is an extremely worthwhile change that > will make maintenance easier and is a small first step towards > some nice future functionality. yep, agreed ... best, Herbert > Eric > _______________________________________________ > Containers mailing list > Containers@lists.osdl.org > https://lists.osdl.org/mailman/listinfo/containers _____________________________…
creator: Herbert Poetzl
date: 2007-01-22T22:24:42-00:00

Re: [PATCH 25/59] sysctl: C99 convert arch/frv/kernel/pm.c
type: item
description: Fine by me. Acked-By: David Howells <dhowells@redhat.com> _______________________________________________ Containers mailing list Containers@lists.osdl.org https://lists.osdl.org/mailman/listinfo/containers
creator: David Howells
date: 2007-01-24T09:00:16-00:00

Re: [PATCH 49/59] sysctl: Move init_irq_proc into init/main where it belongs
type: item
description: On Tue, 16 Jan 2007 09:39:54 -0700 "Eric W. Biederman" <ebiederm@xmission.com> wrote: > From: Eric W. Biederman <ebiederm@xmission.com> - unquoted > > Signed-off-by: Eric W. Biederman <ebiederm@xmission.com> > --- > init/main.c | 3 +++ > kernel/sysctl.c | 3 --- > 2 files changed, 3 insertions(+), 3 deletions(-) > > diff --git a/init/main.c b/init/main.c > index 8b4a7d7..8af5c6e 100644 > --- a/init/main.c > +++ b/init/main.c > @@ -691,6 +691,9 @@ static void __init do_basic_setup(void) > #ifdef CONFIG_SYSCTL > sysctl_init(); > #endif > +#ifdef CONFIG_PROC_FS > + init_irq_proc(); > +#endif > > do_initcalls(); > } > diff --git a/kernel/sysctl.c b/kernel/sysctl.c > index 600b333..7420761 100644 > --- a/kernel/sysctl.c > +++ b/kernel/sysctl.c > @@ -1172,8 +1172,6 @@ static ctl_table dev_table[] = { > { .ctl_name = 0 } > }; > > -extern void init_irq_proc (void); > - > static DEFINE_SPINLOCK(sysctl_lock); > > /* called under sysctl_lock */ > @@ -1219,7 +1217,6 @@ void __init sysctl_init(void) > { > #ifdef CONFIG_PROC_SYSCTL > register_proc_table(root_table, proc_sys_root, &root_table_header); > - init_irq_proc(); > #endif > } sparc64: init/main.c: In function `do_basic_setup': init/main.c:707: warning: implicit declaration of function `init_irq_proc' I couldn't be bothered working out how init/main.c is supposed to get at its declaration of init_irq_proc(). It's not allowed to include linux/irq.h. _______________________________________________ Containers mailing list Containers@lists.osdl.org https://lists.osdl.org/mailman/listinfo/containers
creator: Andrew Morton
date: 2007-01-27T10:51:37-00:00