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] [day] [month] [year] [list]
Message-ID: <ee8a8bf7-e7d1-6f8b-3482-06f6e88a44ce@arista.com>
Date:   Mon, 27 Apr 2020 15:32:13 +0100
From:   Dmitry Safonov <dima@...sta.com>
To:     Tetsuo Handa <penguin-kernel@...ove.sakura.ne.jp>,
        Joe Perches <joe@...ches.com>, linux-kernel@...r.kernel.org
Cc:     Dmitry Safonov <0x7f454c46@...il.com>,
        Andrew Morton <akpm@...ux-foundation.org>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        Ingo Molnar <mingo@...nel.org>, Jiri Slaby <jslaby@...e.com>,
        Petr Mladek <pmladek@...e.com>,
        Sergey Senozhatsky <sergey.senozhatsky@...il.com>,
        Steven Rostedt <rostedt@...dmis.org>,
        Aurelien Jacquiot <jacquiot.aurelien@...il.com>,
        Mark Salter <msalter@...hat.com>, linux-c6x-dev@...ux-c6x.org
Subject: Re: [PATCHv3 11/50] c6x: Add show_stack_loglvl()



On 4/26/20 2:06 AM, Tetsuo Handa wrote:
> On 2020/04/26 3:18, Joe Perches wrote:
>> On Sat, 2020-04-18 at 21:19 +0100, Dmitry Safonov wrote:
>>> Currently, the log-level of show_stack() depends on a platform
>>> realization. It creates situations where the headers are printed with
>>> lower log level or higher than the stacktrace (depending on
>>> a platform or user).
>> []
>>> diff --git a/arch/c6x/kernel/traps.c b/arch/c6x/kernel/traps.c
>> []
>>> @@ -344,12 +344,13 @@ asmlinkage int process_exception(struct pt_regs *regs)
>>>  
>>>  static int kstack_depth_to_print = 48;
>>>  
>>> -static void show_trace(unsigned long *stack, unsigned long *endstack)
>>> +static void show_trace(unsigned long *stack, unsigned long *endstack,
>>> +		       const char *loglvl)
>>>  {
>>>  	unsigned long addr;
>>>  	int i;
>>>
>>> -	pr_debug("Call trace:");
>>> +	printk("%sCall trace:", loglvl);
>>
>> These are not equivalent transforms as pr_debug
>> is compiled to nothing unless DEBUG is defined
>> or CONFIG_DYNAMIC_DEBUG is enabled.
> 
> I guess this user is expecting pr_debug() as unconditional printk(KERN_DEBUG), for
> show_trace() and show_stack() will become waste of code if pr_debug() prints nothing.
> If this user wants pr_debug() to be conditional, #ifdef'ing these functions is the better.

Agree.

>> Perhaps all the conversions should be checked
>> for these "not the same" object code changes.

I've checked other architectures - it seems only c6x was printing
backtraces with pr_debug().

Is there a user for hiding all backtraces?
If there is, I think it's better to ifdef-out show_stack() under a new
config HIDE_BACKTRACES or something.

Thanks,
          Dmitry

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ