[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20180727184023.Horde.KRXPzZpG18uxt_B9sy_FBg5@messagerie.si.c-s.fr>
Date: Fri, 27 Jul 2018 18:40:23 +0200
From: LEROY Christophe <christophe.leroy@....fr>
To: Murilo Opsfelder Araujo <muriloo@...ux.ibm.com>
Cc: linuxppc-dev@...ts.ozlabs.org, "Tobin C . Harding" <me@...in.cc>,
Sukadev Bhattiprolu <sukadev@...ux.vnet.ibm.com>,
Simon Guo <wei.guo.simon@...il.com>,
Paul Mackerras <paulus@...ba.org>,
Nicholas Piggin <npiggin@...il.com>,
Michael Neuling <mikey@...ling.org>,
Michael Ellerman <mpe@...erman.id.au>,
"Eric W . Biederman" <ebiederm@...ssion.com>,
Cyril Bur <cyrilbur@...il.com>,
Benjamin Herrenschmidt <benh@...nel.crashing.org>,
Balbir Singh <bsingharora@...il.com>,
Andrew Donnellan <andrew.donnellan@....ibm.com>,
Alastair D'Silva <alastair@...ilva.org>,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2 04/10] powerpc/traps: Use REG_FMT in
show_signal_msg()
Murilo Opsfelder Araujo <muriloo@...ux.ibm.com> a écrit :
> Simplify the message format by using REG_FMT as the register format. This
> avoids having two different formats and avoids checking for MSR_64BIT.
Are you sure it is what we want ?
Won't it change the behaviour for a 32 bits app running on a 64bits kernel ?
Christophe
>
> Signed-off-by: Murilo Opsfelder Araujo <muriloo@...ux.ibm.com>
> ---
> arch/powerpc/kernel/traps.c | 12 ++++--------
> 1 file changed, 4 insertions(+), 8 deletions(-)
>
> diff --git a/arch/powerpc/kernel/traps.c b/arch/powerpc/kernel/traps.c
> index 4faab4705774..047d980ac776 100644
> --- a/arch/powerpc/kernel/traps.c
> +++ b/arch/powerpc/kernel/traps.c
> @@ -311,17 +311,13 @@ static bool show_unhandled_signals_ratelimited(void)
> static void show_signal_msg(int signr, struct pt_regs *regs, int code,
> unsigned long addr)
> {
> - const char fmt32[] = KERN_INFO "%s[%d]: unhandled signal %d " \
> - "at %08lx nip %08lx lr %08lx code %x\n";
> - const char fmt64[] = KERN_INFO "%s[%d]: unhandled signal %d " \
> - "at %016lx nip %016lx lr %016lx code %x\n";
> -
> if (!unhandled_signal(current, signr))
> return;
>
> - printk(regs->msr & MSR_64BIT ? fmt64 : fmt32,
> - current->comm, current->pid, signr,
> - addr, regs->nip, regs->link, code);
> + pr_info("%s[%d]: unhandled signal %d at "REG_FMT \
> + " nip "REG_FMT" lr "REG_FMT" code %x\n",
> + current->comm, current->pid, signr, addr,
> + regs->nip, regs->link, code);
> }
>
> void _exception_pkey(int signr, struct pt_regs *regs, int code,
> --
> 2.17.1
Powered by blists - more mailing lists