mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Michael Ellerman <mpe@ellerman.id.au>
To: Alexey Kardashevskiy <aik@ozlabs.ru>, linuxppc-dev@lists.ozlabs.org
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>,
	Paul Mackerras <paulus@samba.org>,
	Peter Zijlstra <peterz@infradead.org>,
	linux-kernel@vger.kernel.org,
	"dan.carpenter\@oracle.com" <dan.carpenter@oracle.com>
Subject: Re: [PATCH kernel] powerpc/debug: Add missing warn flag to WARN_ON's non-builtin path
Date: Thu, 15 Jun 2017 16:20:20 +1000	[thread overview]
Message-ID: <87h8zhpyaj.fsf@concordia.ellerman.id.au> (raw)
In-Reply-To: <bbdd8ae1-7489-db86-3121-58b94c797a28@ozlabs.ru>

Alexey Kardashevskiy <aik@ozlabs.ru> writes:

> On 14/06/17 21:04, Michael Ellerman wrote:
>> Alexey Kardashevskiy <aik@ozlabs.ru> writes:
>> 
>>> When trapped on WARN_ON(), report_bug() is expected to return
>>> BUG_TRAP_TYPE_WARN so the caller could increment NIP by 4 and continue.
>>> The __builtin_constant_p() path of the PPC's WARN_ON() calls (indirectly)
>>> __WARN_FLAGS() which has BUGFLAG_WARNING set, however the other branch
>>> does not which makes report_bug() report a bug rather than a warning.
>>>
>>> Fixes: 19d436268dde95389 ("debug: Add _ONCE() logic to report_bug()")
>>> Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
>>> ---
>>>
>>> Actually 19d436268dde95389 replaced __WARN_TAINT() with __WARN_FLAGS()
>>> and lost BUGFLAG_TAINT() and this is not in the commit log so it is
>>> unclear:
>>> 1) why
>> 
>> I think the rename is because previously the argument was a taint value,
>> whereas now it is a flags value (which is a superset of taint).
>> 
>>> 2) whether this particular patch should be doing
>>>    BUGFLAG_WARNING|BUGFLAG_TAINT(TAINT_WARN)
>>>  or
>>>    BUGFLAG_WARNING|(flags)
>> 
>> There is no flags here so the latter won't work AFAICS.
>> 
>>> Any ideas? Thanks.
>> 
>> Your patch looks correct to me. I assume it works?
>
> Yes, it does.

Thanks.

>> The bug isn't introduced by 19d436268dde ("debug: Add _ONCE() logic to
>> report_bug()") as far as I can see.
>> 
>> If you check out that revision you see that BUGFLAG_TAINT still contains
>> BUGFLAG_WARNING:
>> 
>> #define BUGFLAG_TAINT(taint)	(BUGFLAG_WARNING | ((taint) << 8))
>> 
>> But that was removed in f26dee15103f ("debug: Avoid setting
>> BUGFLAG_WARNING twice"). So I think the Fixes: tag should point at that
>> commit.
>
> Ah, you're right. Should I repost the patch with the updated "fixes:" clause?

No that's fine I can update it.

cheers

  reply	other threads:[~2017-06-15  6:20 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-14  3:01 Alexey Kardashevskiy
     [not found] ` <87mv9a3k59.fsf@concordia.ellerman.id.au>
2017-06-15  0:00   ` Alexey Kardashevskiy
2017-06-15  6:20     ` Michael Ellerman [this message]
2017-06-16  9:49 ` [kernel] " Michael Ellerman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87h8zhpyaj.fsf@concordia.ellerman.id.au \
    --to=mpe@ellerman.id.au \
    --cc=aik@ozlabs.ru \
    --cc=benh@kernel.crashing.org \
    --cc=dan.carpenter@oracle.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=paulus@samba.org \
    --cc=peterz@infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome