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: <20190508082431.GA21654@jagdpanzerIV>
Date:   Wed, 8 May 2019 17:24:31 +0900
From:   Sergey Senozhatsky <sergey.senozhatsky.work@...il.com>
To:     Daniel Vetter <daniel.vetter@...ll.ch>
Cc:     Sergey Senozhatsky <sergey.senozhatsky.work@...il.com>,
        Intel Graphics Development <intel-gfx@...ts.freedesktop.org>,
        Daniel Vetter <daniel.vetter@...el.com>,
        Peter Zijlstra <peterz@...radead.org>,
        Ingo Molnar <mingo@...hat.com>,
        Will Deacon <will.deacon@....com>,
        Petr Mladek <pmladek@...e.com>,
        Sergey Senozhatsky <sergey.senozhatsky@...il.com>,
        Steven Rostedt <rostedt@...dmis.org>,
        John Ogness <john.ogness@...utronix.de>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        Nicolai Stange <nstange@...e.de>,
        Thomas Gleixner <tglx@...utronix.de>
Subject: Re: [PATCH] RFC: x86/smp: use printk_deferred in
 native_smp_send_reschedule

On (05/08/19 10:06), Daniel Vetter wrote:
[..]
> > Any printk-related patch in this area will make PeterZ really-really
> > angry :)
> 
> Hm any more context for someone with no clue about this? Just that the
> dependencies are already terribly complex and it's not going to get
> better, or something more specific?

The main problem is that it's a deferred error-reporting, so such
a report has chances to never be reported. It's not like 'normal'
printk() is always guaranteed to immediately start printing; sometimes
it will, sometimes it won't, and sometimes it never will, for instance
when console_sem was locked by offline-ed CPU.

An example of PeterZ's opinion on printk_deferred()
/* message ID: 20181122101606.GP2131@...ez.programming.kicks-ass.net */

  | No, printk_deferred() is a disease, it needs to be eradicated, not
  | spread around.

> > printk_deferred(), just like prinkt_safe(), depends on IRQ work;
> > printk_safe(), however, can redirect multiple lines, unlike
> > printk_deferred(). So if you want to keep the backtrace, you may
> > do something like
> >
> >         if (unlikely(cpu_is_offline(cpu))) {
> >                 printk_safe_enter(...);
> >                 WARN(1, "sched: Unexpected reschedule of offline CPU#%d!\n",
> >                          cpu);
> >                 printk_safe_exit(...);
> >                 return;
> >         }
> >
> > I think, in this case John's reworked-printk can do better than
> > printk_safe/printk_deferred.
> 
> Hm I think this is what Petr was suggesting, but somehow I didn't find
> the printk_safe_* functions and didn't connect the dots.

These are in kernel/printk/printk_safe.c as of now.

> Needs the _irqsave variants I guess, I'll respin a v2 of this.

Let's wait a bit before respin.

	-ss

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ