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, 15 Sep 2015 23:15:29 +0200
From:	Arnd Bergmann <arnd@...db.de>
To:	Peter Zijlstra <peterz@...radead.org>,
	mathieu.desnoyers@...icios.com
Cc:	Palmer Dabbelt <palmer@...belt.com>, dhowells@...hat.com,
	viro@...iv.linux.org.uk, ast@...mgrid.com,
	aishchuk@...ux.vnet.ibm.com, aarcange@...hat.com,
	akpm@...ux-foundation.org, luto@...nel.org, acme@...nel.org,
	bhe@...hat.com, 3chas3@...il.com, chris@...kel.net, dave@...1.net,
	dyoung@...hat.com, drysdale@...gle.com, davem@...emloft.net,
	ebiederm@...ssion.com, geoff@...radead.org,
	gregkh@...uxfoundation.org, hpa@...or.com, mingo@...nel.org,
	iulia.manda21@...il.com, plagnioj@...osoft.com, jikos@...nel.org,
	josh@...htriplett.org, kexec@...ts.infradead.org,
	linux-api@...r.kernel.org, linux-arch@...r.kernel.org,
	linux-fsdevel@...r.kernel.org, linux-kernel@...r.kernel.org,
	jcmvbkbc@...il.com, paulmck@...ux.vnet.ibm.com, tglx@...utronix.de,
	tomi.valkeinen@...com, vgoyal@...hat.com, x86@...nel.org,
	Frederic Weisbecker <fweisbec@...il.com>
Subject: Re: [PATCH 09/13] Move bp_type_idx to kernel/event/hw_breakpoint.c

On Tuesday 15 September 2015 10:06:07 Peter Zijlstra wrote:
> > diff --git a/include/uapi/linux/hw_breakpoint.h b/include/uapi/linux/hw_breakpoint.h
> > index b04000a2296a..7a6a5a7f9511 100644
> > --- a/include/uapi/linux/hw_breakpoint.h
> > +++ b/include/uapi/linux/hw_breakpoint.h
> > @@ -17,14 +17,4 @@ enum {
> >       HW_BREAKPOINT_INVALID   = HW_BREAKPOINT_RW | HW_BREAKPOINT_X,
> >  };
> >  
> > -enum bp_type_idx {
> > -     TYPE_INST       = 0,
> > -#ifdef CONFIG_HAVE_MIXED_BREAKPOINTS_REGS
> > -     TYPE_DATA       = 0,
> > -#else
> > -     TYPE_DATA       = 1,
> > -#endif
> > -     TYPE_MAX
> > -};
> 
> This is rather unfortunate; you are correct that the naming is too
> generic (and I tend to agree), but I think these values are required by
> userspace to fill out:
> 
>   perf_event_attr::bp_type
> 
> So removing them will break things.
> 
> Frederic?

If user space actually relies on the definition from this header file,
then it will use the wrong one on x86 and get 'TYPE_DATA = 1', while the
kernel uses 'TYPE_DATA = 0'.

That seems unlikely to work, so I suspect it gets a different definition.
If it uses this definition and it does work, we can probably use

#if defined(__KERNEL__) && defined(CONFIG_HAVE_MIXED_BREAKPOINTS_REGS)

but that requires a comment explaining exactly why that works.

	Arnd
--
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