[patch 7/7] Enable Xen support again
Now that i686 PAE and x86_64 Xen DomU support is fully upstream, re-enable it in the stock kernel. The only not-upstream patches we require are to support execshield Also note the Obsoletes/Provides to make upgrades go smoothely. Index: devel/config-x86-generic === --- devel.orig/config-x86-generic 2008-07-23 14:06:22.0 +0100 +++ devel.orig/config-x86-generic 2008-07-23 14:06:22.0 +0100 @@ -340,10 +340,20 @@ CONFIG_PARAVIRT=y # CONFIG_PARAVIRT_DEBUG is not set CONFIG_KVM_CLOCK=y CONFIG_KVM_GUEST=y -# CONFIG_XEN is not set CONFIG_LGUEST_GUEST=y CONFIG_VMI=y +CONFIG_XEN=y +CONFIG_XEN_MAX_DOMAIN_MEMORY=8 +CONFIG_XEN_BALLOON=y +CONFIG_XEN_SCRUB_PAGES=y +CONFIG_XEN_SAVE_RESTORE=y +CONFIG_HVC_XEN=y +CONFIG_XEN_FBDEV_FRONTEND=y +CONFIG_XEN_KBDDEV_FRONTEND=y +CONFIG_XEN_BLKDEV_FRONTEND=m +CONFIG_XEN_NETDEV_FRONTEND=m + CONFIG_MTD_ESB2ROM=m CONFIG_MTD_CK804XROM=m CONFIG_MTD_NAND_CAFE=m Index: devel/config-x86_64-generic === --- devel.orig/config-x86_64-generic2008-07-23 14:06:22.0 +0100 +++ devel.orig/config-x86_64-generic2008-07-23 14:06:22.0 +0100 @@ -258,7 +258,17 @@ CONFIG_PARAVIRT=y # CONFIG_PARAVIRT_DEBUG is not set CONFIG_KVM_CLOCK=y CONFIG_KVM_GUEST=y -# CONFIG_XEN is not set + +CONFIG_XEN=y +CONFIG_XEN_MAX_DOMAIN_MEMORY=32 +CONFIG_XEN_BALLOON=y +CONFIG_XEN_SCRUB_PAGES=y +CONFIG_XEN_SAVE_RESTORE=y +CONFIG_HVC_XEN=y +CONFIG_XEN_FBDEV_FRONTEND=y +CONFIG_XEN_KBDDEV_FRONTEND=y +CONFIG_XEN_BLKDEV_FRONTEND=m +CONFIG_XEN_NETDEV_FRONTEND=m CONFIG_DMADEVICES=y CONFIG_INTEL_IOATDMA=m Index: devel/kernel.spec === --- devel.orig/kernel.spec 2008-07-23 14:06:22.0 +0100 +++ devel.orig/kernel.spec 2008-07-23 14:06:22.0 +0100 @@ -372,7 +372,13 @@ Summary: The Linux kernel # upto and including kernel 2.4.9 rpms, the 4Gb+ kernel was called kernel-enterprise # now that the smp kernel offers this capability, obsolete the old kernel %define kernel_smp_obsoletes kernel-enterprise 2.4.10 -%define kernel_PAE_obsoletes kernel-smp 2.6.17 +%define kernel_PAE_obsoletes kernel-smp 2.6.17, kernel-xen = 2.6.27-0.2.rc0.git6.fc10 +%define kernel_PAE_provides kernel-xen = %{rpmversion}-%{pkg_release} + +%ifarch x86_64 +%define kernel_obsoletes kernel-xen = 2.6.27-0.2.rc0.git6.fc10 +%define kernel_provides kernel-xen = %{rpmversion}-%{pkg_release} +%endif # We moved the drm include files into kernel-headers, make sure there's # a recent enough libdrm-devel on the system that doesn't have those. @@ -548,6 +554,9 @@ Patch147: linux-2.6-imac-transparent-bri Patch149: linux-2.6-efika-not-chrp.patch Patch160: linux-2.6-execshield.patch +Patch161: linux-2.6-xen-execshield-add-xen-specific-load_user_cs_desc.patch +Patch162: linux-2.6-xen-execshield-fix-endless-gpf-fault-loop.patch +Patch163: linux-2.6-xen-execshield-only-define-load_user_cs_desc-on-32-bit.patch Patch250: linux-2.6-debug-sizeof-structs.patch Patch260: linux-2.6-debug-nmi-timeout.patch Patch270: linux-2.6-debug-taint-vm.patch @@ -987,6 +996,9 @@ ApplyPatch linux-2.6-imac-transparent-br # Exec shield # ApplyPatch linux-2.6-execshield.patch +ApplyPatch linux-2.6-xen-execshield-add-xen-specific-load_user_cs_desc.patch +ApplyPatch linux-2.6-xen-execshield-fix-endless-gpf-fault-loop.patch +ApplyPatch linux-2.6-xen-execshield-only-define-load_user_cs_desc-on-32-bit.patch # # bugfixes to drivers and filesystems Index: devel/linux-2.6-xen-execshield-add-xen-specific-load_user_cs_desc.patch === --- /dev/null 1970-01-01 00:00:00.0 + +++ /dev/null 1970-01-01 00:00:00.0 + @@ -0,0 +1,126 @@ +From cdff48f3077459f1dfaf243db8e402c8202a2693 Mon Sep 17 00:00:00 2001 +From: Stephen Tweedie [EMAIL PROTECTED] +Date: Tue, 11 Mar 2008 18:05:30 + +Subject: [PATCH] xen execshield: Add xen-specific load_user_cs_desc() + +x86 32-bit execshield uses load_user_cs_desc() to setup the user CS +descriptor, but the Xen version needs to do this via a hypercall. + +Add this via a new pv_cpu_ops-load_user_cs_desc pv_ops indirection +so that it can be selected appropriately at run-time. + +Signed-off-by: Stephen Tweedie [EMAIL PROTECTED] +--- + arch/x86/kernel/paravirt.c |1 + + arch/x86/xen/enlighten.c | 17 + + include/asm-x86/desc.h |8 ++-- + include/asm-x86/paravirt.h |6 ++ + 4 files changed, 30 insertions(+), 2 deletions(-) + +diff --git a/arch/x86/kernel/paravirt.c b/arch/x86/kernel/paravirt.c +index 94da4d5..f2a678c 100644 +--- a/arch/x86/kernel/paravirt.c b/arch/x86/kernel/paravirt.c +@@ -336,6 +336,7 @@ struct pv_cpu_ops pv_cpu_ops = { + .read_tscp = native_read_tscp, + .load_tr_desc = native_load_tr_desc, + .set_ldt = native_set_ldt, ++
[patch 3/7] Kill old xen cruft
Kill off most of the remnants of the separate xen package Gone is the kernel-xen variant and xen.gz Index: devel/kernel.spec === --- devel.orig/kernel.spec 2008-07-23 14:13:25.0 +0100 +++ devel.orig/kernel.spec 2008-07-23 14:13:25.0 +0100 @@ -66,8 +66,6 @@ Summary: The Linux kernel %define with_smp %{?_without_smp: 0} %{?!_without_smp: 1} # kernel-PAE (only valid for i686) %define with_pae %{?_without_pae: 0} %{?!_without_pae: 1} -# kernel-xen -%define with_xen %{?_without_xen: 0} %{?!_without_xen: 1} # kernel-kdump %define with_kdump %{?_without_kdump: 0} %{?!_without_kdump: 1} # kernel-debug @@ -94,17 +92,10 @@ Summary: The Linux kernel %define with_smponly %{?_with_smponly: 1} %{?!_with_smponly: 0} # Only build the pae kernel (--with paeonly): %define with_paeonly %{?_with_paeonly: 1} %{?!_with_paeonly: 0} -# Only build the xen kernel (--with xenonly): -%define with_xenonly %{?_with_xenonly: 1} %{?!_with_xenonly: 0} # should we do C=1 builds with sparse %define with_sparse%{?_with_sparse: 1} %{?!_with_sparse: 0} -# Whether or not to apply the Xen patches -- leave this enabled -%define includexen 0 -# Xen doesn't work with current upstream kernel, shut it off -%define with_xen 0 - # Set debugbuildsenabled to 1 for production (build separate debug kernels) # and 0 for rawhide (all kernels are debug kernels). # See also 'make debug' and 'make release'. @@ -135,11 +126,6 @@ Summary: The Linux kernel %define make_target bzImage -%define xen_hv_cset 11633 -%define xen_flags verbose=y crash_debug=y -%define xen_target vmlinuz -%define xen_image vmlinuz - %define KVERREL %{PACKAGE_VERSION}-%{PACKAGE_RELEASE}.%{_target_cpu} %define hdrarch %_target_cpu @@ -152,8 +138,6 @@ Summary: The Linux kernel %endif %if %{nopatches} -%define includexen 0 -%define with_xen 0 %define with_bootwrapper 0 %define variant -vanilla %else @@ -181,7 +165,6 @@ Summary: The Linux kernel %if %{with_baseonly} %define with_smp 0 %define with_pae 0 -%define with_xen 0 %define with_kdump 0 %define with_debug 0 %endif @@ -190,7 +173,6 @@ Summary: The Linux kernel %if %{with_smponly} %define with_up 0 %define with_pae 0 -%define with_xen 0 %define with_kdump 0 %define with_debug 0 %endif @@ -199,16 +181,6 @@ Summary: The Linux kernel %if %{with_paeonly} %define with_up 0 %define with_smp 0 -%define with_xen 0 -%define with_kdump 0 -%define with_debug 0 -%endif - -# if requested, only build xen kernel -%if %{with_xenonly} -%define with_up 0 -%define with_smp 0 -%define with_pae 0 %define with_kdump 0 %define with_debug 0 %endif @@ -230,11 +202,6 @@ Summary: The Linux kernel %define with_pae 0 %endif -# xen only builds on i686, x86_64 and ia64 -%ifnarch i686 x86_64 ia64 -%define with_xen 0 -%endif - # only build kernel-kdump on ppc64 # (no relocatable kernel support upstream yet) %ifnarch ppc64 @@ -281,8 +248,6 @@ Summary: The Linux kernel %define all_arch_configs kernel-%{version}-i?86*.config %define image_install_path boot %define hdrarch i386 -# we build always xen i686 HV with pae -%define xen_flags verbose=y crash_debug=y pae=y %define kernel_image arch/x86/boot/bzImage %endif @@ -334,10 +299,6 @@ Summary: The Linux kernel %define image_install_path boot/efi/EFI/redhat %define make_target compressed %define kernel_image vmlinux.gz -# ia64 xen HV doesn't building with debug=y at the moment -%define xen_flags verbose=y crash_debug=y -%define xen_target compressed -%define xen_image vmlinux.gz %endif %ifarch alpha alphaev56 @@ -374,7 +335,6 @@ Summary: The Linux kernel %define with_up 0 %define with_smp 0 %define with_pae 0 -%define with_xen 0 %define with_kdump 0 %define with_debuginfo 0 %define _enable_debug_packages 0 @@ -497,8 +457,6 @@ BuildRequires: rpm-build = 4.4.2.1-4 %endif Source0: ftp://ftp.kernel.org/pub/linux/kernel/v2.6/linux-%{kversion}.tar.bz2 -#Source1: xen-%{xen_hv_cset}.tar.bz2 -Source2: Config.mk Source10: COPYING.modules Source11: genkey @@ -509,18 +467,15 @@ Source20: Makefile.config Source21: config-debug Source22: config-nodebug Source23: config-generic -Source24: config-xen-generic -Source25: config-rhel-generic -Source26: config-rhel-x86-generic +Source24: config-rhel-generic +Source25: config-rhel-x86-generic Source30: config-x86-generic Source31: config-i586 Source32: config-i686 Source33: config-i686-PAE -Source34: config-xen-x86 Source40: config-x86_64-generic -Source41: config-xen-x86_64 Source50: config-powerpc-generic Source51: config-powerpc32-generic @@ -530,7 +485,6 @@ Source54: config-powerpc64-kdump Source60: config-ia64-generic Source61: config-ia64 -Source62: config-xen-ia64 Source70: config-s390x @@ -823,13 +777,6 @@ It should only be installed when trying on kernel bugs, as some
[patch 2/7] Change how we do nosegneg
We should really only install ld.so.conf files from packages that actually have CONFIG_XEN enabled, but it would be slightly messy to have only kernel-PAE.i686 and kernel.x86_64 include it. Since it won't actually be used unless it's enabled by the xen kernel at runtime, let's be lazy and have all variants install them. Index: devel/kernel.spec === --- devel.orig/kernel.spec 2008-07-23 14:05:27.0 +0100 +++ devel.orig/kernel.spec 2008-07-23 14:05:27.0 +0100 @@ -407,7 +407,7 @@ Summary: The Linux kernel # # The ld.so.conf.d file we install uses syntax older ldconfig's don't grok. # -%define kernel_xen_conflicts glibc 2.3.5-1, xen 3.0.1 +%define nosegneg_conflicts glibc 2.3.5-1, xen 3.0.1 # upto and including kernel 2.4.9 rpms, the 4Gb+ kernel was called kernel-enterprise # now that the smp kernel offers this capability, obsolete the old kernel @@ -440,6 +440,7 @@ Provides: kernel-uname-r = %{KVERREL}%{? Requires(pre): %{kernel_prereq}\ Conflicts: %{kernel_dot_org_conflicts}\ Conflicts: %{package_conflicts}\ +Conflicts: %{nosegneg_conflicts}\ %{?1:%{expand:%%{?kernel%{?1:_%{1}}_conflicts:Conflicts: %%{kernel%{?1:_%{1}}_conflicts\ %{?1:%{expand:%%{?kernel%{?1:_%{1}}_obsoletes:Obsoletes: %%{kernel%{?1:_%{1}}_obsoletes\ %{?1:%{expand:%%{?kernel%{?1:_%{1}}_provides:Provides: %%{kernel%{?1:_%{1}}_provides\ @@ -1440,6 +1441,18 @@ BuildKernel() { mkdir -p $RPM_BUILD_ROOT/usr/src/kernels mv $RPM_BUILD_ROOT/lib/modules/$KernelVer/build $RPM_BUILD_ROOT/$DevelDir ln -sf ../../..$DevelDir $RPM_BUILD_ROOT/lib/modules/$KernelVer/build + +mkdir -p $RPM_BUILD_ROOT/etc/ld.so.conf.d +rm -f $RPM_BUILD_ROOT/etc/ld.so.conf.d/kernelcap-$KernelVer.nosegneg.conf +cat $RPM_BUILD_ROOT/etc/ld.so.conf.d/kernelcap-$KernelVer.nosegneg.conf EOF +# This directive teaches ldconfig to search in nosegneg subdirectories +# and cache the DSOs there with extra bit 0 set in their hwcap match +# fields. In Xen guest kernels, the vDSO tells the dynamic linker to +# search in nosegneg subdirectories and to match this extra hwcap bit +# in the ld.so.cache file. +hwcap 0 nosegneg +EOF +chmod 444 $RPM_BUILD_ROOT/etc/ld.so.conf.d/kernelcap-$KernelVer.nosegneg.conf } ### @@ -1521,22 +1534,6 @@ BuildKernel vmlinux vmlinux kdump vmlinu cd linux-%{kversion}.%{_target_cpu} -%if %{includexen} -%if %{with_xen} -mkdir -p $RPM_BUILD_ROOT/etc/ld.so.conf.d -rm -f $RPM_BUILD_ROOT/etc/ld.so.conf.d/kernelcap-%{KVERREL}.xen.conf -cat $RPM_BUILD_ROOT/etc/ld.so.conf.d/kernelcap-%{KVERREL}.xen.conf \EOF -# This directive teaches ldconfig to search in nosegneg subdirectories -# and cache the DSOs there with extra bit 0 set in their hwcap match -# fields. In Xen guest kernels, the vDSO tells the dynamic linker to -# search in nosegneg subdirectories and to match this extra hwcap bit -# in the ld.so.cache file. -hwcap 0 nosegneg -EOF -chmod 444 $RPM_BUILD_ROOT/etc/ld.so.conf.d/kernelcap-%{KVERREL}.xen.conf -%endif -%endif - %if %{with_doc} mkdir -p $RPM_BUILD_ROOT/usr/share/doc/kernel-doc-%{kversion}/Documentation @@ -1745,6 +1742,7 @@ fi /lib/modules/%{KVERREL}%{?2:.%{2}}/modules.networking\ /lib/modules/%{KVERREL}%{?2:.%{2}}/modules.order\ %ghost /boot/initrd-%{KVERREL}%{?2:.%{2}}.img\ +/etc/ld.so.conf.d/kernelcap-%{KVERREL}%{?2:.%{2}}.nosegneg.conf\ %{?-e:%{-e*}}\ %{expand:%%files %{?2:%{2}-}devel}\ %defattr(-,root,root)\ @@ -1777,7 +1775,7 @@ fi %kernel_variant_files %{with_pae} PAE %kernel_variant_files %{with_pae_debug} PAEdebug %kernel_variant_files -k vmlinux %{with_kdump} kdump -%kernel_variant_files -a /%{image_install_path}/xen*-%{KVERREL}.xen -e /etc/ld.so.conf.d/kernelcap-%{KVERREL}.xen.conf %{with_xen} xen +%kernel_variant_files -a /%{image_install_path}/xen*-%{KVERREL}.xen %{with_xen} xen %changelog * Tue Jul 22 2008 Dave Jones [EMAIL PROTECTED] -- ___ Fedora-kernel-list mailing list Fedora-kernel-list@redhat.com https://www.redhat.com/mailman/listinfo/fedora-kernel-list
[patch 6/7] Slightly re-org virt related configs
Get all OCD on virt related configs - bring them together, separate the host stuff from the guest stuff and make the x86_64 config look much more like the x86 config. Index: devel/config-x86-generic === --- devel.orig/config-x86-generic 2008-07-23 09:49:15.0 +0100 +++ devel.orig/config-x86-generic 2008-07-23 09:49:15.0 +0100 @@ -318,9 +318,6 @@ CONFIG_SONY_LAPTOP=m # CONFIG_SMSC37B787_WDT is not set CONFIG_W83697HF_WDT=m -CONFIG_PARAVIRT=y -# CONFIG_PARAVIRT_DEBUG is not set - CONFIG_RELOCATABLE=y CONFIG_PHYSICAL_ALIGN=0x40 CONFIG_PHYSICAL_START=0x40 @@ -331,12 +328,21 @@ CONFIG_CRYPTO_DEV_GEODE=m CONFIG_VIDEO_CAFE_CCIC=m +CONFIG_VIRTUALIZATION=y CONFIG_KVM=m CONFIG_KVM_INTEL=m CONFIG_KVM_AMD=m +CONFIG_KVM_TRACE=y +CONFIG_LGUEST=m + +CONFIG_PARAVIRT_GUEST=y +CONFIG_PARAVIRT=y +# CONFIG_PARAVIRT_DEBUG is not set CONFIG_KVM_CLOCK=y CONFIG_KVM_GUEST=y -CONFIG_KVM_TRACE=y +# CONFIG_XEN is not set +CONFIG_LGUEST_GUEST=y +CONFIG_VMI=y CONFIG_MTD_ESB2ROM=m CONFIG_MTD_CK804XROM=m @@ -360,14 +366,6 @@ CONFIG_DMIID=y CONFIG_ISCSI_IBFT_FIND=y CONFIG_ISCSI_IBFT=m -CONFIG_VIRTUALIZATION=y -CONFIG_PARAVIRT_GUEST=y -CONFIG_VMI=y -CONFIG_LGUEST=m -CONFIG_LGUEST_GUEST=y -# CONFIG_XEN is not set -# CONFIG_HVC_XEN is not set - CONFIG_DMADEVICES=y CONFIG_INTEL_IOATDMA=m Index: devel/config-x86_64-generic === --- devel.orig/config-x86_64-generic2008-07-23 09:49:15.0 +0100 +++ devel.orig/config-x86_64-generic2008-07-23 09:49:15.0 +0100 @@ -1,6 +1,5 @@ CONFIG_64BIT=y CONFIG_UID16=y -# CONFIG_XEN is not set # CONFIG_MK8 is not set # CONFIG_MPSC is not set CONFIG_GENERIC_CPU=y @@ -227,11 +226,6 @@ CONFIG_W83697HF_WDT=m # CONFIG_VIDEO_CAFE_CCIC is not set -CONFIG_KVM=m -CONFIG_KVM_INTEL=m -CONFIG_KVM_AMD=m -CONFIG_KVM_TRACE=y - CONFIG_MTD_ESB2ROM=m CONFIG_MTD_CK804XROM=m @@ -254,18 +248,23 @@ CONFIG_CPU_IDLE=y CONFIG_CPU_IDLE_GOV_MENU=y CONFIG_VIRTUALIZATION=y +CONFIG_KVM=m +CONFIG_KVM_INTEL=m +CONFIG_KVM_AMD=m +CONFIG_KVM_TRACE=y + +CONFIG_PARAVIRT_GUEST=y +CONFIG_PARAVIRT=y +# CONFIG_PARAVIRT_DEBUG is not set +CONFIG_KVM_CLOCK=y +CONFIG_KVM_GUEST=y +# CONFIG_XEN is not set CONFIG_DMADEVICES=y CONFIG_INTEL_IOATDMA=m CONFIG_SENSORS_I5K_AMB=m -CONFIG_PARAVIRT_GUEST=y -CONFIG_KVM_CLOCK=y -CONFIG_KVM_GUEST=y -CONFIG_PARAVIRT=y -# CONFIG_PARAVIRT_DEBUG is not set - # CONFIG_COMPAT_VDSO is not set CONFIG_PROVIDE_OHCI1394_DMA_INIT=y # CONFIG_DEBUG_PER_CPU_MAPS is not set -- ___ Fedora-kernel-list mailing list Fedora-kernel-list@redhat.com https://www.redhat.com/mailman/listinfo/fedora-kernel-list
Re: [patch 0/7] Enable pv_ops Xen; kill the kernel-xen RPM
On Wed, 2008-07-23 at 14:20 +0100, Mark McLoughlin wrote: I'm still doing a last bit of testing making sure that it all works fine, so don't apply yet ... but comments are very welcome. Okay, it seems to be in pretty good shape now. The only outstanding TODO item is to make kernel-PAE.i686 %post do: s/DEFAULTKERNEL=kernel-xen/DEFAULTKERNEL=kernel-PAE/ and kernel.x86_64 %post do: s/DEFAULTKERNEL=kernel-xen/DEFAULTKERNEL=kernel/ But I've had enough spec file pain for one day ... we can add this later :-) Cheers, Mark. ___ Fedora-kernel-list mailing list Fedora-kernel-list@redhat.com https://www.redhat.com/mailman/listinfo/fedora-kernel-list
Re: [patch 4/7] Remove unneeded %kernel_variant_post args
Why bother? If it comes up in the future, the macro will be handy. ___ Fedora-kernel-list mailing list Fedora-kernel-list@redhat.com https://www.redhat.com/mailman/listinfo/fedora-kernel-list
Re: [patch 1/7] Fix kernel_{conflicts,obsoletes,provides}
If you try and use e.g. kernel_obsoletes, you'll soon find that it's actually kernel__obsoletes you currently need :-) So you want kernel to have an Obsoletes: that kernel-foo do not get? ___ Fedora-kernel-list mailing list Fedora-kernel-list@redhat.com https://www.redhat.com/mailman/listinfo/fedora-kernel-list
Re: [patch 4/7] Remove unneeded %kernel_variant_post args
On Wed, 2008-07-23 at 12:42 -0700, Roland McGrath wrote: Why bother? If it comes up in the future, the macro will be handy. The spec file is complex enough that I thought it better to remove anything that was only added for Xen. Needless to say, though, I don't care much either way ... Cheers, Mark. ___ Fedora-kernel-list mailing list Fedora-kernel-list@redhat.com https://www.redhat.com/mailman/listinfo/fedora-kernel-list
Re: [patch 1/7] Fix kernel_{conflicts,obsoletes,provides}
On Wed, 2008-07-23 at 12:44 -0700, Roland McGrath wrote: If you try and use e.g. kernel_obsoletes, you'll soon find that it's actually kernel__obsoletes you currently need :-) So you want kernel to have an Obsoletes: that kernel-foo do not get? Yes; kernel-PAE.i686 obsoletes kernel-xen.i686 and kernel.x86_64 obsoletes kernel-xen.x86_64. But you don't want all kernel* to obsolete kernel-xen? Any special reason? ___ Fedora-kernel-list mailing list Fedora-kernel-list@redhat.com https://www.redhat.com/mailman/listinfo/fedora-kernel-list
Re: [patch 2/7] Change how we do nosegneg
We should really only install ld.so.conf files from packages that actually have CONFIG_XEN enabled, but it would be slightly messy to have only kernel-PAE.i686 and kernel.x86_64 include it. It wouldn't really be so hard to conditionalize it at least for the arch's that ever need it. (The kernelcap trick might well be used for other things in the future.) I think the right direction to head is that upstream kernels supply a .conf file to match the vDSO they build in. This will probably always be just a constant file in the source, but in general can be said to be generated by the kernel build. The contents have to match the magic bits in the vDSO images built into the kernel, so it really should not be a distro/packaging responsibility to populate the file. So let's structure things around that: the kernel build for an arch that uses vdso might include a kernelcap.conf file (or might not). For simplicity and consistency in the .spec file, we'll install a file for all variants even when it's an empty placeholder. For the magic, the diff below probably covers it (wholly untested). Then it's up to BuildKernel just to add/remove ldconfig-kernelcap.conf as part of the build (perhaps eventually done by the upstream makefiles). The .conf files have to not conflict (reuse same bit with different name) across all installed kernels (or else ldconfig will complain). So a single kernel-%{KVERREL}.conf file would be fine. But instead I made it kernel-%{KVERREL}.variant.conf just to stay consistent with all existing names like /lib/module/FOO and the fact that no two kernel rpms conflict on the same file name (even if identical). Thanks, Roland --- kernel.spec 23 Jul 2008 19:51:09 - 1.791 +++ kernel.spec 24 Jul 2008 00:21:24 - @@ -1509,21 +1513,13 @@ BuildKernel vmlinux vmlinux kdump vmlinu cd linux-%{kversion}.%{_target_cpu} -%if %{includexen} -%if %{with_xen} -mkdir -p $RPM_BUILD_ROOT/etc/ld.so.conf.d -rm -f $RPM_BUILD_ROOT/etc/ld.so.conf.d/kernelcap-%{KVERREL}.xen.conf -cat $RPM_BUILD_ROOT/etc/ld.so.conf.d/kernelcap-%{KVERREL}.xen.conf \EOF -# This directive teaches ldconfig to search in nosegneg subdirectories -# and cache the DSOs there with extra bit 0 set in their hwcap match -# fields. In Xen guest kernels, the vDSO tells the dynamic linker to -# search in nosegneg subdirectories and to match this extra hwcap bit -# in the ld.so.cache file. -hwcap 0 nosegneg -EOF -chmod 444 $RPM_BUILD_ROOT/etc/ld.so.conf.d/kernelcap-%{KVERREL}.xen.conf -%endif -%endif +if [ ! -s ldconfig-kernelcap.conf ]; then + echo ldconfig-kernelcap.conf \ +# Placeholder file, no vDSO hwcap entries used in this kernel. +fi + +%{__install} -D -m 444 ldconfig-kernelcap.conf \ +$RPM_BUILD_ROOT/etc/ld.so.conf.d/kernel-%{KVERREL}.conf %if %{with_doc} mkdir -p $RPM_BUILD_ROOT/usr/share/doc/kernel-doc-%{kversion}/Documentation @@ -1728,6 +1724,7 @@ fi /lib/modules/%{KVERREL}%{?2:.%{2}}/weak-updates\ %ifarch %{vdso_arches}\ /lib/modules/%{KVERREL}%{?2:.%{2}}/vdso\ +/etc/ld.so.conf.d/kernelcap-%{KVERREL}%{?2:.%{2}}.conf\ %endif\ /lib/modules/%{KVERREL}%{?2:.%{2}}/modules.block\ /lib/modules/%{KVERREL}%{?2:.%{2}}/modules.networking\ ___ Fedora-kernel-list mailing list Fedora-kernel-list@redhat.com https://www.redhat.com/mailman/listinfo/fedora-kernel-list