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] [day] [month] [year] [list]
Message-ID: <20100110032225.GD15195@nowhere>
Date:	Sun, 10 Jan 2010 04:22:26 +0100
From:	Frederic Weisbecker <fweisbec@...il.com>
To:	"K.Prasad" <prasad@...ux.vnet.ibm.com>
Cc:	LKML <linux-kernel@...r.kernel.org>, Ingo Molnar <mingo@...e.hu>,
	Roland McGrath <roland@...hat.com>,
	Alan Stern <stern@...land.harvard.edu>,
	Ananth N Mavinakayanahalli <ananth@...ibm.com>,
	Pekka Enberg <penberg@...helsinki.fi>,
	Vegard Nossum <vegardno@....uio.no>,
	Oleg Nesterov <oleg@...hat.com>
Subject: Re: [RFC Patch 1/2][Bugfix][x86][hw-breakpoint] Clear reserved
	bits of DR6 in do_debug()

On Fri, Jan 01, 2010 at 12:19:49AM +0530, K.Prasad wrote:
> On Thu, Dec 31, 2009 at 12:45:00AM +0100, Frederic Weisbecker wrote:
> > On Sat, Dec 26, 2009 at 11:57:25PM +0530, K.Prasad wrote:
> > > Clear the reserved bits from the stored copy of debug status register (DR6).
> > > This will help easy bitwise operations.
> > > 
> > > Signed-off-by: K.Prasad <prasad@...ux.vnet.ibm.com>
> > > ---
> > >  arch/x86/include/asm/debugreg.h |    3 +++
> > >  arch/x86/kernel/traps.c         |    3 +++
> > >  2 files changed, 6 insertions(+)
> > > 
> > > Index: linux-2.6-tip/arch/x86/include/asm/debugreg.h
> > > ===================================================================
> > > --- linux-2.6-tip.orig/arch/x86/include/asm/debugreg.h
> > > +++ linux-2.6-tip/arch/x86/include/asm/debugreg.h
> > > @@ -14,6 +14,9 @@
> > >     which debugging register was responsible for the trap.  The other bits
> > >     are either reserved or not of interest to us. */
> > >  
> > > +/* Define reserved bits in DR6 which are always set to 1 */
> > > +#define DR6_RESERVED	(0xFFFF0FF0)
> > > +
> > 
> > 
> > The 12th bit seems to be also reserved.
> > Shouldn't it be 0xffff1ff0 ?
> > 
> 
> The 12th bit is reserved to be 0 always.


Ah, ok.

 
> > What kind of bitwise operations do you think it could help?
> > 
> > All of the operations I can find on dr6 are simple masks
> > test/set/clear.
> > 
> 
> As you found out later, this bitmask helps us in
> hw_breakpoint_handler().


Yeah, ok. Just waiting for Jan's answer to be sure it has
not side effects :)

Thanks.

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ