lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Mon, 16 Mar 2015 15:53:36 +0100
From:	Maxime Bizon <mbizon@...ebox.fr>
To:	Nicolas Schichan <nschichan@...ebox.fr>
Cc:	Ralf Baechle <ralf@...ux-mips.org>, linux-mips@...ux-mips.org,
	linux-kernel@...r.kernel.org,
	Alexandre Courbot <acourbot@...dia.com>
Subject: Re: [PATCH] MIPS: bcm63xx: move bcm63xx_gpio_init() to
 bcm63xx_register_devices().


On Thu, 2015-03-12 at 17:00 +0100, Nicolas Schichan wrote:

> When called from prom init code, bcm63xx_gpio_init() will fail as it
> will call gpiochip_add() which relies on a working kmalloc() to alloc
> the gpio_desc array and kmalloc is not useable yet at prom init time.
> 
> Move bcm63xx_gpio_init() to bcm63xx_register_devices() (an
> arch_initcall) where kmalloc works.

no that patch is completely bogus:

1) bcm63xx_gpio_init() does more than registering the gpio_chip: look at
bcm63xx_gpio_out_low_reg_init().

We want at least the low lever helpers bcm_gpio_readl()/writel() to work
early.

2) look at board_register_devices() in board_bcm963xx.c, it uses the
gpio API, but is called during arch_initcall() (there was an attempt to
move it later, but it has been reverted)

so you cannot move that gpiochip registration later as-is, more
refactoring and *testing* is required.

-- 
Maxime


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