* [PATCH] arm64: remove useless condition [not found] <CGME20190619113904epcas1p23e2c335cda62dfa5ea02c4eb5cb0d788@epcas1p2.samsung.com> @ 2019-06-19 11:38 ` jinho lim 2019-06-19 12:18 ` Will Deacon 0 siblings, 1 reply; 2+ messages in thread From: jinho lim @ 2019-06-19 11:38 UTC (permalink / raw) To: will.deacon Cc: mark.rutland, ebiederm, marc.zyngier, anshuman.khandual, andreyknvl, linux-arm-kernel, linux-kernel, seroto7, jinho lim dump_instr function checks user_mode internally. Signed-off-by: jinho lim <jordan.lim@samsung.com> --- arch/arm64/kernel/traps.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/arch/arm64/kernel/traps.c b/arch/arm64/kernel/traps.c index ccc13b45d9b1..694e78b950ca 100644 --- a/arch/arm64/kernel/traps.c +++ b/arch/arm64/kernel/traps.c @@ -182,8 +182,7 @@ static int __die(const char *str, int err, struct pt_regs *regs) print_modules(); show_regs(regs); - if (!user_mode(regs)) - dump_instr(KERN_EMERG, regs); + dump_instr(KERN_EMERG, regs); return ret; } -- 2.13.0 ^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] arm64: remove useless condition 2019-06-19 11:38 ` [PATCH] arm64: remove useless condition jinho lim @ 2019-06-19 12:18 ` Will Deacon 0 siblings, 0 replies; 2+ messages in thread From: Will Deacon @ 2019-06-19 12:18 UTC (permalink / raw) To: jinho lim Cc: mark.rutland, ebiederm, marc.zyngier, anshuman.khandual, andreyknvl, linux-arm-kernel, linux-kernel, seroto7 On Wed, Jun 19, 2019 at 08:38:57PM +0900, jinho lim wrote: > dump_instr function checks user_mode internally. > > Signed-off-by: jinho lim <jordan.lim@samsung.com> > --- > arch/arm64/kernel/traps.c | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) > > diff --git a/arch/arm64/kernel/traps.c b/arch/arm64/kernel/traps.c > index ccc13b45d9b1..694e78b950ca 100644 > --- a/arch/arm64/kernel/traps.c > +++ b/arch/arm64/kernel/traps.c > @@ -182,8 +182,7 @@ static int __die(const char *str, int err, struct pt_regs *regs) > print_modules(); > show_regs(regs); > > - if (!user_mode(regs)) > - dump_instr(KERN_EMERG, regs); > + dump_instr(KERN_EMERG, regs); I don't think this is right, because it means we'll now dump the current user instruction on the die() path. Instead, we should probably rename dump_instr to dump_kernel_instr(), and have it return immediately if user_mode(regs). We can also kill __dump_instr completely. Will ^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-06-19 12:18 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <CGME20190619113904epcas1p23e2c335cda62dfa5ea02c4eb5cb0d788@epcas1p2.samsung.com>
2019-06-19 11:38 ` [PATCH] arm64: remove useless condition jinho lim
2019-06-19 12:18 ` Will Deacon
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®