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] [day] [month] [year] [list]
Date:   Fri, 5 Oct 2018 00:14:32 +0800
From:   Guo Ren <ren_guo@...ky.com>
To:     Daniel Lezcano <daniel.lezcano@...aro.org>
Cc:     tglx@...utronix.de, jason@...edaemon.net, marc.zyngier@....com,
        robh+dt@...nel.org, mark.rutland@....com, anurup.m@...wei.com,
        Jonathan.Cameron@...wei.com, will.deacon@....com,
        zhangshaokun@...ilicon.com, jhogan@...nel.org,
        paul.burton@...s.com, peterz@...radead.org, f.fainelli@...il.com,
        arnd@...db.de, linux-kernel@...r.kernel.org,
        devicetree@...r.kernel.org
Subject: Re: [PATCH V9 3/8] clocksource: add C-SKY SMP timer

On Tue, Oct 02, 2018 at 09:59:42AM +0200, Daniel Lezcano wrote:
> On 02/10/2018 07:40, Guo Ren wrote:
> [ ... ]
> 
> >>
> >> 	irq = irq_of_parse_and_map(np, 0);
> >> 	if (irq <= 0)
> >> 		return -EINVAL;
> > 		panic();
> > I want a panic here. Return will make debug confused and directly tell
> > the people where is wrong. It's root-timer for us and it must bootup.
> > 
> > If it's a co-timer, I also think return is good.
> 
> We don't need a panic in case of failure. If the board as an alternate
> timer it should be able to boot, that is the general rule of thumb for
> these drivers in this directory.
> 
> The init timer functions will be called via the timer_probe() which
> browse the timer_of_table (the one with all entries for the
> TIMER_OF_DECLARE macros).
> 
> You can see in the code below (from timer_probe.c), there is an error
> message emitted if the driver fails to initialize and another one much
> stronger if no timer was initialize.
> 
> This is enough trace IMO.
> 
> void __init timer_probe(void)
> {
>         struct device_node *np;
>         const struct of_device_id *match;
>         of_init_fn_1_ret init_func_ret;
>         unsigned timers = 0;
>         int ret;
> 
>         for_each_matching_node_and_match(np, __timer_of_table, &match) {
>                 if (!of_device_is_available(np))
>                         continue;
> 
>                 init_func_ret = match->data;
> 
>                 ret = init_func_ret(np);
>                 if (ret) {
>                         pr_err("Failed to initialize '%pOF': %d\n", np,
> ret);
>                         continue;
>                 }
> 
>                 timers++;
Ok, let other timers boot up as possible and no panic for csky timer.

 Guo Ren

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ