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: <20190502195049.brysexbyyq7khtr4@earth.universe>
Date:   Thu, 2 May 2019 21:50:49 +0200
From:   Sebastian Reichel <sebastian.reichel@...labora.com>
To:     Matti Vaittinen <matti.vaittinen@...rohmeurope.com>
Cc:     mazziesaccount@...il.com, Lee Jones <lee.jones@...aro.org>,
        Rob Herring <robh+dt@...nel.org>,
        Mark Rutland <mark.rutland@....com>,
        Michael Turquette <mturquette@...libre.com>,
        Stephen Boyd <sboyd@...nel.org>,
        Linus Walleij <linus.walleij@...aro.org>,
        Bartosz Golaszewski <bgolaszewski@...libre.com>,
        Liam Girdwood <lgirdwood@...il.com>,
        Mark Brown <broonie@...nel.org>,
        Alessandro Zummo <a.zummo@...ertech.it>,
        Alexandre Belloni <alexandre.belloni@...tlin.com>,
        Wim Van Sebroeck <wim@...ux-watchdog.org>,
        Guenter Roeck <linux@...ck-us.net>, devicetree@...r.kernel.org,
        linux-kernel@...r.kernel.org, linux-clk@...r.kernel.org,
        linux-gpio@...r.kernel.org, linux-pm@...r.kernel.org,
        linux-rtc@...r.kernel.org, linux-watchdog@...r.kernel.org,
        heikki.haikola@...rohmeurope.com, mikko.mutanen@...rohmeurope.com
Subject: Re: [PATCH v14 7/8] power: supply: Initial support for ROHM BD70528
 PMIC charger block

Hi,

On Thu, May 02, 2019 at 12:17:12PM +0300, Matti Vaittinen wrote:
> ROHM BD70528 PMIC includes battery charger block. Support charger
> staus queries and doing few basic settings like input current limit
> and charging current.
> 
> Signed-off-by: Matti Vaittinen <matti.vaittinen@...rohmeurope.com>
> Acked-by: Sebastian Reichel <sebastian.reichel@...labora.com>

Please only add Acked-by when you receive one, especially when you
do not implement all requested changes :)

[...]

> +static int bd70528_get_irqs(struct platform_device *pdev,
> +			    struct bd70528_psy *bdpsy)
> +{
> +	int irq, i, ret;
> +	unsigned int mask;
> +	const struct irq_name_pair bd70528_chg_irqs[] = {
> +		{ .n = "bd70528-bat-ov-res", .h = BD_IRQ_HND(BAT_OV_RES) },
> +		{ .n = "bd70528-bat-ov-det", .h = BD_IRQ_HND(BAT_OV_DET) },
> +		{ .n = "bd70528-bat-dead", .h = BD_IRQ_HND(DBAT_DET) },
> +		{ .n = "bd70528-bat-warmed", .h = BD_IRQ_HND(COLD_RES) },
> +		{ .n = "bd70528-bat-cold", .h = BD_IRQ_HND(COLD_DET) },
> +		{ .n = "bd70528-bat-cooled", .h = BD_IRQ_HND(HOT_RES) },
> +		{ .n = "bd70528-bat-hot", .h = BD_IRQ_HND(HOT_DET) },
> +		{ .n = "bd70528-chg-tshd", .h = BD_IRQ_HND(CHG_TSD) },
> +		{ .n = "bd70528-bat-removed", .h = BD_IRQ_HND(BAT_RMV) },
> +		{ .n = "bd70528-bat-detected", .h = BD_IRQ_HND(BAT_DET) },
> +		{ .n = "bd70528-dcin2-ov-res", .h = BD_IRQ_HND(DCIN2_OV_RES) },
> +		{ .n = "bd70528-dcin2-ov-det", .h = BD_IRQ_HND(DCIN2_OV_DET) },
> +		{ .n = "bd70528-dcin2-removed", .h = BD_IRQ_HND(DCIN2_RMV) },
> +		{ .n = "bd70528-dcin2-detected", .h = BD_IRQ_HND(DCIN2_DET) },
> +		{ .n = "bd70528-dcin1-removed", .h = BD_IRQ_HND(DCIN1_RMV) },
> +		{ .n = "bd70528-dcin1-detected", .h = BD_IRQ_HND(DCIN1_DET) },
> +	};

Please also make it static. That will move the whole thing to
read-only (because of const) data section. This improves the
security and the required cpu time at the same time (no need
to copy values to the stack).

But this can be changed later, so no need to block the whole
patchset just because of this. If Lee wants to merge this for
5.2, that would be fine with me. But please add it directly in
a new patch revision if the patch does not make it into 5.2.

-- Sebastian

Download attachment "signature.asc" of type "application/pgp-signature" (834 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ