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]
Date:   Tue, 21 Mar 2017 16:41:22 +0100
From:   Peter Zijlstra <peterz@...radead.org>
To:     Josh Poimboeuf <jpoimboe@...hat.com>
Cc:     mingo@...nel.org, tglx@...utronix.de, hpa@...or.com,
        linux-kernel@...r.kernel.org, torvalds@...ux-foundation.org,
        arjan@...ux.intel.com, bp@...en8.de, richard.weinberger@...il.com
Subject: Re: [PATCH 1/5] x86: Implement __WARN using UD0

On Tue, Mar 21, 2017 at 10:32:52AM -0500, Josh Poimboeuf wrote:
> On Tue, Mar 21, 2017 at 04:14:46PM +0100, Peter Zijlstra wrote:
> > > > +static int fixup_bug(struct pt_regs *regs, int trapnr)
> > > > +{
> > > > +	if (trapnr != X86_TRAP_UD)
> > > > +		return 0;
> > > > +
> > > > +	switch (report_bug(regs->ip, regs)) {
> > > > +	case BUG_TRAP_TYPE_NONE:
> > > > +	case BUG_TRAP_TYPE_BUG:
> > > > +		break;
> > > > +
> > > > +	case BUG_TRAP_TYPE_WARN:
> > > > +		regs->ip += 2;
> > > > +		return 1;
> > > 
> > > For self-documentation purposes, maybe use a define for the length of
> > > the ud0 instruction?
> > 
> > Well, UD0 and UD2 really. LENGTH_UD0_OR_UD2 is a bit of a fail, name
> > wise.
> 
> Why UD2?  Warnings are UD0-only, no?  What about UD0_LEN?  Or at least a
> comment would be helpful I think.

Oh, right, we only resume on WARN,.. Doh.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ