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]
Date:   Tue, 6 Jun 2023 11:26:20 +0200
From:   Michal Simek <michal.simek@....com>
To:     Dan Carpenter <dan.carpenter@...aro.org>
Cc:     Daniel Lezcano <daniel.lezcano@...aro.org>,
        Thomas Gleixner <tglx@...utronix.de>,
        linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org,
        kernel-janitors@...r.kernel.org
Subject: Re: [PATCH] clocksource/drivers/timer-cadence-ttc: fix a signedness
 bug in probe()



On 6/6/23 10:15, Dan Carpenter wrote:
> Make the "irq" variable signed so the error handling can work.

urq_of_parse_and_map returns unsigned type.

include/linux/of_irq.h:118:extern unsigned int irq_of_parse_and_map(struct 
device_node *node, int index);

instead of this condition should be fixed to

         irq = irq_of_parse_and_map(timer, 1);
         if (!irq) {
		...

> 
> Fixes: e932900a3279 ("arm: zynq: Use standard timer binding")
> Signed-off-by: Dan Carpenter <dan.carpenter@...cle.com>
> ---
>  From static analysis.  Untested.  Presumably if probe fails the system
> is unbootable so I didn't bother looking at the resource leaks.

In the way how systems with TTC are used today that's correct assumption.

But just to be accurate system can also have different timers which could be 
used instead.

Thanks,
Michal

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ