lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20091108123422.GA9145@flint.arm.linux.org.uk>
Date:	Sun, 8 Nov 2009 12:34:22 +0000
From:	Russell King <rmk+lkml@....linux.org.uk>
To:	"Eric W. Biederman" <ebiederm@...ssion.com>
Cc:	linux-kernel@...r.kernel.org, Leo Chen <leochen@...adcom.com>
Subject: Re: [PATCH 22/23] sysctl arm: Remove binary sysctl support

On Sun, Nov 08, 2009 at 04:22:09AM -0800, Eric W. Biederman wrote:
> diff --git a/arch/arm/kernel/isa.c b/arch/arm/kernel/isa.c
> index 8ac9b84..738dfcc 100644
> --- a/arch/arm/kernel/isa.c
> +++ b/arch/arm/kernel/isa.c
> @@ -22,47 +22,42 @@ static unsigned int isa_membase, isa_portbase, isa_portshift;
>  
>  static ctl_table ctl_isa_vars[4] = {
>  	{
> -		.ctl_name	= BUS_ISA_MEM_BASE,
>  		.procname	= "membase",
>  		.data		= &isa_membase, 
>  		.maxlen		= sizeof(isa_membase),
>  		.mode		= 0444,
>  		.proc_handler	= &proc_dointvec,
>  	}, {
> -		.ctl_name	= BUS_ISA_PORT_BASE,
>  		.procname	= "portbase",
>  		.data		= &isa_portbase, 
>  		.maxlen		= sizeof(isa_portbase),
>  		.mode		= 0444,
>  		.proc_handler	= &proc_dointvec,
>  	}, {
> -		.ctl_name	= BUS_ISA_PORT_SHIFT,
>  		.procname	= "portshift",
>  		.data		= &isa_portshift, 
>  		.maxlen		= sizeof(isa_portshift),
>  		.mode		= 0444,
>  		.proc_handler	= &proc_dointvec,
> -	}, {0}
> +	}, {}
>  };
>  
>  static struct ctl_table_header *isa_sysctl_header;
>  
>  static ctl_table ctl_isa[2] = {
>  	{
> -		.ctl_name	= CTL_BUS_ISA,
>  		.procname	= "isa",
>  		.mode		= 0555,
>  		.child		= ctl_isa_vars,
> -	}, {0}
> +	}, {}
>  };
>  
>  static ctl_table ctl_bus[2] = {
>  	{
> -		.ctl_name	= CTL_BUS,
>  		.procname	= "bus",
>  		.mode		= 0555,
>  		.child		= ctl_isa,
> -	}, {0}
> +	}, {}
>  };
>  
>  void __init

NAK.  Glibc uses these numeric sysctls to support ioperm emulation on ARM.
Therefore, removal of these numeric sysctls breaks that user interface:

  static int iobase_name[] = { CTL_BUS, BUS_ISA, BUS_ISA_PORT_BASE };
  static int ioshift_name[] = { CTL_BUS, BUS_ISA, BUS_ISA_PORT_SHIFT };
  if (! sysctl (iobase_name, 3, &io.io_base, &len, NULL, 0)
      && ! sysctl (ioshift_name, 3, &io.shift, &len, NULL, 0))
    {
      io.initdone = 1;
      return 0;
    }
...

> diff --git a/arch/arm/mach-bcmring/arch.c b/arch/arm/mach-bcmring/arch.c
> index 0da693b..f3c1119 100644
> --- a/arch/arm/mach-bcmring/arch.c
> +++ b/arch/arm/mach-bcmring/arch.c
> @@ -47,10 +47,6 @@ HW_DECLARE_SPINLOCK(gpio)
>      EXPORT_SYMBOL(bcmring_gpio_reg_lock);
>  #endif
>  
> -/* FIXME: temporary solution */
> -#define BCM_SYSCTL_REBOOT_WARM               1
> -#define CTL_BCM_REBOOT                 112
> -
>  /* sysctl */
>  int bcmring_arch_warm_reboot;	/* do a warm reboot on hard reset */
>  
> @@ -58,7 +54,6 @@ static struct ctl_table_header *bcmring_sysctl_header;
>  
>  static struct ctl_table bcmring_sysctl_warm_reboot[] = {
>  	{
> -	 .ctl_name = BCM_SYSCTL_REBOOT_WARM,
>  	 .procname = "warm",
>  	 .data = &bcmring_arch_warm_reboot,
>  	 .maxlen = sizeof(int),
> @@ -69,7 +64,6 @@ static struct ctl_table bcmring_sysctl_warm_reboot[] = {
>  
>  static struct ctl_table bcmring_sysctl_reboot[] = {
>  	{
> -	 .ctl_name = CTL_BCM_REBOOT,
>  	 .procname = "reboot",
>  	 .mode = 0555,
>  	 .child = bcmring_sysctl_warm_reboot},

Ack for this part.

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ