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]
Message-ID: <924a926814689c22a8c23ac08aaaef0723cca139.camel@intel.com>
Date: Thu, 3 Oct 2024 23:12:10 +0000
From: "Edgecombe, Rick P" <rick.p.edgecombe@...el.com>
To: "broonie@...nel.org" <broonie@...nel.org>, "skhan@...uxfoundation.org"
	<skhan@...uxfoundation.org>
CC: "tglx@...utronix.de" <tglx@...utronix.de>, "linux-arch@...r.kernel.org"
	<linux-arch@...r.kernel.org>, "lorenzo.stoakes@...cle.com"
	<lorenzo.stoakes@...cle.com>, "kito.cheng@...ive.com"
	<kito.cheng@...ive.com>, "charlie@...osinc.com" <charlie@...osinc.com>,
	"linux-fsdevel@...r.kernel.org" <linux-fsdevel@...r.kernel.org>,
	"linux-riscv@...ts.infradead.org" <linux-riscv@...ts.infradead.org>,
	"devicetree@...r.kernel.org" <devicetree@...r.kernel.org>,
	"peterz@...radead.org" <peterz@...radead.org>, "corbet@....net"
	<corbet@....net>, "linux-kernel@...r.kernel.org"
	<linux-kernel@...r.kernel.org>, "alistair.francis@....com"
	<alistair.francis@....com>, "kees@...nel.org" <kees@...nel.org>,
	"andybnac@...il.com" <andybnac@...il.com>, "krzk+dt@...nel.org"
	<krzk+dt@...nel.org>, "debug@...osinc.com" <debug@...osinc.com>,
	"x86@...nel.org" <x86@...nel.org>, "bp@...en8.de" <bp@...en8.de>,
	"aou@...s.berkeley.edu" <aou@...s.berkeley.edu>, "samitolvanen@...gle.com"
	<samitolvanen@...gle.com>, "palmer@...belt.com" <palmer@...belt.com>,
	"arnd@...db.de" <arnd@...db.de>, "Liam.Howlett@...cle.com"
	<Liam.Howlett@...cle.com>, "vbabka@...e.cz" <vbabka@...e.cz>,
	"shuah@...nel.org" <shuah@...nel.org>, "oleg@...hat.com" <oleg@...hat.com>,
	"alexghiti@...osinc.com" <alexghiti@...osinc.com>, "ebiederm@...ssion.com"
	<ebiederm@...ssion.com>, "richard.henderson@...aro.org"
	<richard.henderson@...aro.org>, "brauner@...nel.org" <brauner@...nel.org>,
	"hpa@...or.com" <hpa@...or.com>, "mingo@...hat.com" <mingo@...hat.com>,
	"cleger@...osinc.com" <cleger@...osinc.com>, "atishp@...osinc.com"
	<atishp@...osinc.com>, "robh@...nel.org" <robh@...nel.org>,
	"linux-kselftest@...r.kernel.org" <linux-kselftest@...r.kernel.org>,
	"paul.walmsley@...ive.com" <paul.walmsley@...ive.com>, "jim.shu@...ive.com"
	<jim.shu@...ive.com>, "linux-mm@...ck.org" <linux-mm@...ck.org>,
	"evan@...osinc.com" <evan@...osinc.com>, "conor@...nel.org"
	<conor@...nel.org>, "akpm@...ux-foundation.org" <akpm@...ux-foundation.org>,
	"linux-doc@...r.kernel.org" <linux-doc@...r.kernel.org>,
	"dave.hansen@...ux.intel.com" <dave.hansen@...ux.intel.com>
Subject: Re: [PATCH 33/33] kselftest/riscv: kselftest for user mode cfi

On Thu, 2024-10-03 at 17:04 -0600, Shuah Khan wrote:
> On 10/3/24 05:03, Mark Brown wrote:
> > On Wed, Oct 02, 2024 at 05:18:36PM -0600, Shuah Khan wrote:
> > > On 10/1/24 10:06, Deepak Gupta wrote:
> > 
> > > > +#ifndef __NR_prctl
> > > > +#define __NR_prctl 167
> > > > +#endif
> > 
> > > > +#ifndef __NR_map_shadow_stack
> > > > +#define __NR_map_shadow_stack 453
> > 
> > > Why do we need to define these? Shouldn't including
> > > asm-generic/unistd.h sufficient?
> > 
> > We have this issue on arm64 as well, there's some issue with directly
> > pulling in the asm header interfering with libc in some situation (I
> > can't immediately figure out which situation or which libc to remind
> > myself what it is though...) so we've got local defines like we do for
> > the NT_ defines for ptrace.  I see x86 is doing the same.
> 
> It would be nice to figure. There have been some issues reported due
> to local defines - the test fails if the define happens to not match.
> 
> Does including <asm/unistd.h> fix the problem?

On x86, if you do "make headers", you can adjust the Makefile with
$(KHDR_INCLUDES) to find the syscall defines in the generated headers. But then
you have to remember to run "make headers" before building the selftests. There
was some direction on it from x86 maintainers:
https://lore.kernel.org/lkml/Y%2FduhySUieqUWoGX@zn.tnic/#t

I don't think it's great, but the other options weren't great either.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ