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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <87h8zhpyaj.fsf@concordia.ellerman.id.au>
Date:   Thu, 15 Jun 2017 16:20:20 +1000
From:   Michael Ellerman <mpe@...erman.id.au>
To:     Alexey Kardashevskiy <aik@...abs.ru>, linuxppc-dev@...ts.ozlabs.org
Cc:     Benjamin Herrenschmidt <benh@...nel.crashing.org>,
        Paul Mackerras <paulus@...ba.org>,
        Peter Zijlstra <peterz@...radead.org>,
        linux-kernel@...r.kernel.org,
        "dan.carpenter\@oracle.com" <dan.carpenter@...cle.com>
Subject: Re: [PATCH kernel] powerpc/debug: Add missing warn flag to WARN_ON's non-builtin path

Alexey Kardashevskiy <aik@...abs.ru> writes:

> On 14/06/17 21:04, Michael Ellerman wrote:
>> Alexey Kardashevskiy <aik@...abs.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@...abs.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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ