Re: [PATCH v4 3/4] selftests/vDSO: Use KHDR_INCLUDES to locate UAPI headers for vdso_test_getrandom

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, 2024-08-27 at 17:10 +0200, Jason A. Donenfeld wrote:
> On Tue, Aug 27, 2024 at 11:05:14PM +0800, Xi Ruoyao wrote:
> > On Tue, 2024-08-27 at 17:00 +0200, Jason A. Donenfeld wrote:
> > > The effect of this patch is to replace include/uapi with usr/include, so
> > > it will break for you too.
> > > 
> > > What I'm wondering is why yours and mine work like that, while Ruoyao's
> > > breaks. He makes a good argument as to why this patch is the "right
> > > way", even if it breaks our workflow...
> > 
> > Because arch/loongarch/include/uapi/asm/sigcontext.h includes
> > <linux/posix_types.h>, but the files for x86 and ppc do not.
> > 
> > I cannot see how this inclusion is useful anyway, so maybe I can just
> > remove the inclusion and paper over the real issue for now?
> 
> The kselftest people might disagree with papering it over and may prefer
> your patch, but your solution does sound better to me...

Oops the papering over does not really work because the compiler picks
up the sigcontext.h already installed to /usr/include/asm/sigcontext.h.
So, if we want to use the "updated" version of sigcontext.h, we still
have to add KHDR_INCLUDES to pick up
kernel-tree/usr/include/asm/sigcontext.h instead.

Or, I can add $(KHDR_INCLUDES) but also keep
-isystem $(top_srcdir)/include/uapi, so "make -C tools/testing/selftests
TARGETS=vDSO" will still (happens to) work on x86 and ppc (without
headers in kernel-tree/usr).

If you agree I'll use this approach in v5.

-- 
Xi Ruoyao <xry111@xxxxxxxxxxx>
School of Aerospace Science and Technology, Xidian University





[Index of Archives]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux