[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-ppc] [PATCH v2] Added uapi directory into linux-header
From: |
Bhushan Bharat-R65777 |
Subject: |
Re: [Qemu-ppc] [PATCH v2] Added uapi directory into linux-header |
Date: |
Tue, 18 Dec 2012 01:14:34 +0000 |
> > +++ b/scripts/update-linux-headers.sh
> > @@ -46,14 +46,26 @@ for arch in $ARCHLIST; do
> >
> > make -C "$linux" INSTALL_HDR_PATH="$tmpdir" SRCARCH=$arch
> > headers_install
> >
> > + if [ -e "$linux/arch/$arch/include/uapi" ] &&
> > + ! [ -e "$output/linux-headers/uapi" ] ; then
> > + mkdir "$output/linux-headers/uapi"
>
> mkdir -p
>
> But looking through this whole thing, it seems like the root cause is actually
> different. We don't want any uapi directories exposed to user space. So let's
> go
> back a step:
>
> Why do we need the uapi include dir? Because some header is using it.
>
> linux-headers/asm-powerpc/kvm_para.h:
The kvm_para.h (also kvm.h) are now defined in include/uapi/asm/
Is not this the correct thing that any header file in include/uapi/asm/ (in
this case kvm_para.h) includes another header file (epapr_hcalls.h) in same
directory?
Also I think now only the uapi/asm/*.h files should be exposed to userspace
(QEMU here).
Waiting for David's comment for better clarity ...
-Bharat
>
> #include <uapi/asm/epapr_hcalls.h>
>
> This is the root cause of the problem. We must never manually include any uapi
> header paths. We only ever include their normal asm-counterparts which then
> may
> include uapi (in kernel) or actually are uapi (in user space). David, please
> correct me if I'm wrong.
>
> Could you please try and see if this kernel side patch makes things work for
> you
> too?
>
>
> Alex
>
>
> diff --git a/arch/powerpc/include/uapi/asm/kvm_para.h
> b/arch/powerpc/include/uapi/asm/kvm_para.h
> index ed0e025..e3af328 100644
> --- a/arch/powerpc/include/uapi/asm/kvm_para.h
> +++ b/arch/powerpc/include/uapi/asm/kvm_para.h
> @@ -78,7 +78,7 @@ struct kvm_vcpu_arch_shared {
>
> #define KVM_HCALL_TOKEN(num) _EV_HCALL_TOKEN(EV_KVM_VENDOR_ID, num)
>
> -#include <uapi/asm/epapr_hcalls.h>
> +#include <asm/epapr_hcalls.h>
>
> #define KVM_FEATURE_MAGIC_PAGE 1
>
- [Qemu-ppc] [PATCH v2] Added uapi directory into linux-header, Bharat Bhushan, 2012/12/17
- Re: [Qemu-ppc] [PATCH v2] Added uapi directory into linux-header, Alexander Graf, 2012/12/17
- Re: [Qemu-ppc] [PATCH v2] Added uapi directory into linux-header,
Bhushan Bharat-R65777 <=
- Re: [Qemu-ppc] [PATCH v2] Added uapi directory into linux-header, Alexander Graf, 2012/12/17
- Re: [Qemu-ppc] [PATCH v2] Added uapi directory into linux-header, Bhushan Bharat-R65777, 2012/12/17
- Re: [Qemu-ppc] [PATCH v2] Added uapi directory into linux-header, Alexander Graf, 2012/12/17
- Re: [Qemu-ppc] [PATCH v2] Added uapi directory into linux-header, Bhushan Bharat-R65777, 2012/12/17
- Re: [Qemu-ppc] [PATCH v2] Added uapi directory into linux-header, Alexander Graf, 2012/12/18
- Re: [Qemu-ppc] [PATCH v2] Added uapi directory into linux-header, Bhushan Bharat-R65777, 2012/12/18
- Re: [Qemu-ppc] [PATCH v2] Added uapi directory into linux-header, Alexander Graf, 2012/12/18
Re: [Qemu-ppc] [PATCH v2] Added uapi directory into linux-header, David Howells, 2012/12/18
Re: [Qemu-ppc] [PATCH v2] Added uapi directory into linux-header, David Howells, 2012/12/18