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: <936f0451-a4ee-4e14-9ce9-9cd9613fc55c@linux.ibm.com>
Date: Sat, 8 Feb 2025 19:12:21 +0530
From: Shrikanth Hegde <sshegde@...ux.ibm.com>
To: Christophe Leroy <christophe.leroy@...roup.eu>,
        Sebastian Andrzej Siewior <bigeasy@...utronix.de>
Cc: linux-kernel@...r.kernel.org, linux-rt-devel@...ts.linux.dev,
        Ben Segall <bsegall@...gle.com>,
        Catalin Marinas <catalin.marinas@....com>,
        Dietmar Eggemann <dietmar.eggemann@....com>,
        Ingo Molnar <mingo@...hat.com>, Juri Lelli <juri.lelli@...hat.com>,
        Mel Gorman <mgorman@...e.de>, Peter Zijlstra <peterz@...radead.org>,
        Steven Rostedt <rostedt@...dmis.org>,
        Thomas Gleixner <tglx@...utronix.de>,
        Valentin Schneider <vschneid@...hat.com>,
        Vincent Guittot <vincent.guittot@...aro.org>,
        Will Deacon <will@...nel.org>,
        Madhavan Srinivasan <maddy@...ux.ibm.com>,
        Michael Ellerman <mpe@...erman.id.au>,
        Nicholas Piggin <npiggin@...il.com>, Naveen N Rao <naveen@...nel.org>,
        linuxppc-dev@...ts.ozlabs.org
Subject: Re: [PATCH v3 5/9] powerpc: Use preempt_model_str().



On 2/8/25 18:25, Christophe Leroy wrote:
> 
> 
> Le 08/02/2025 à 08:35, Shrikanth Hegde a écrit :
>>
>>
>> On 2/4/25 13:52, Sebastian Andrzej Siewior wrote:
>>> Use preempt_model_str() instead of manually conducting the preemption
>>> model. Use pr_emerg() instead of printk() to pass a loglevel.
>>
>> even on powerpc, i see __die ends up calling show_regs_print_info().
>> Why print it twice?
> 
> I don't understand what you mean, what is printed twice ?
> 
> I can't see show_regs_print_info() printing the preemption model, am I 
> missing something ?
> 

Patch 2/9 add preemption string in dump_stack_print_info.

__die -> show_regs() _> show_regs_print_info() -> 
dump_stack_print_info() -> init_utsname()->version, preempt_model_str(), 
BUILD_ID_VAL);

Wont we end up in this path?

> Christophe
> 
>>
>>>
>>> Cc: Madhavan Srinivasan <maddy@...ux.ibm.com>
>>> Cc: Michael Ellerman <mpe@...erman.id.au>
>>> Cc: Nicholas Piggin <npiggin@...il.com>
>>> Cc: Christophe Leroy <christophe.leroy@...roup.eu>
>>> Cc: Naveen N Rao <naveen@...nel.org>
>>> Cc: linuxppc-dev@...ts.ozlabs.org
>>> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@...utronix.de>
>>> ---
>>> v2…v3:
>>>    - Use printk() instead of pr_emerg() to remain consistent with the
>>>      other invocations in terms of printing context.
>>>
>>>   arch/powerpc/kernel/traps.c | 4 ++--
>>>   1 file changed, 2 insertions(+), 2 deletions(-)
>>>
>>> diff --git a/arch/powerpc/kernel/traps.c b/arch/powerpc/kernel/traps.c
>>> index edf5cabe5dfdb..d6d77d92b3358 100644
>>> --- a/arch/powerpc/kernel/traps.c
>>> +++ b/arch/powerpc/kernel/traps.c
>>> @@ -263,10 +263,10 @@ static int __die(const char *str, struct 
>>> pt_regs *regs, long err)
>>>   {
>>>       printk("Oops: %s, sig: %ld [#%d]\n", str, err, ++die_counter);
>>> -    printk("%s PAGE_SIZE=%luK%s%s%s%s%s%s %s\n",
>>> +    printk("%s PAGE_SIZE=%luK%s %s %s%s%s%s %s\n",
>>>              IS_ENABLED(CONFIG_CPU_LITTLE_ENDIAN) ? "LE" : "BE",
>>>              PAGE_SIZE / 1024, get_mmu_str(),
>>> -           IS_ENABLED(CONFIG_PREEMPT) ? " PREEMPT" : "",
>>> +           preempt_model_str(),
>>>              IS_ENABLED(CONFIG_SMP) ? " SMP" : "",
>>>              IS_ENABLED(CONFIG_SMP) ? (" NR_CPUS=" 
>>> __stringify(NR_CPUS)) : "",
>>>              debug_pagealloc_enabled() ? " DEBUG_PAGEALLOC" : "",
>>
> 


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ