Hello community, here is the log from the commit of package kernel-source for openSUSE:Factory checked in at 2016-04-28 16:52:30 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/kernel-source (Old) and /work/SRC/openSUSE:Factory/.kernel-source.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "kernel-source" Changes: -------- --- /work/SRC/openSUSE:Factory/kernel-source/kernel-debug.changes 2016-04-06 11:48:22.000000000 +0200 +++ /work/SRC/openSUSE:Factory/.kernel-source.new/kernel-debug.changes 2016-04-28 16:52:46.000000000 +0200 @@ -1,0 +2,229 @@ +Thu Apr 21 11:07:52 CEST 2016 - [email protected] + +- Update patches.kernel.org/patch-4.5.1-2 (fate#318900 bsc#963490 + bnc#972330). + One more bnc. +- commit 0454a6e + +------------------------------------------------------------------- +Wed Apr 20 09:06:29 CEST 2016 - [email protected] + +- Linux 4.5.2 (fate#318900 bsc#963490). +- Delete patches.suse/fs_add_file_dentry.patch. +- Delete patches.suse/nfs-use-file-dentry.patch. +- commit 8a6791e + +------------------------------------------------------------------- +Tue Apr 19 14:04:21 CEST 2016 - [email protected] + +- netfilter: x_tables: fix unconditional helper (CVE-2016-3134 + bsc#971126). +- netfilter: x_tables: make sure e->next_offset covers remaining + blob size (CVE-2016-3134 bsc#971126). +- netfilter: x_tables: validate e->target_offset early + (CVE-2016-3134 bsc#971126). +- netfilter: x_tables: check for size overflow (CVE-2016-3135 + bsc#970904). +- commit 99697f1 + +------------------------------------------------------------------- +Tue Apr 19 14:02:14 CEST 2016 - [email protected] + +- series.conf: move netfilter section right after core networking +- commit 9105886 + +------------------------------------------------------------------- +Mon Apr 18 11:17:41 CEST 2016 - [email protected] + +- Update patches.kernel.org/patch-4.5.1 (CVE-2016-2184 + CVE-2016-2185 CVE-2016-2186 CVE-2016-3140 CVE-2016-3689 + bnc#967903 bnc#970892 bnc#970958 bnc#971124 bnc#971628 + boo#969098 boo#970968 boo#971737 boo#971853 bsc#969383 + bsc#969870 bsc#971125 bnc#970955 CVE-2016-3136). + One more reference. +- commit da73f3b + +------------------------------------------------------------------- +Thu Apr 14 10:40:34 CEST 2016 - [email protected] + +- Update config files: arm64: Enable Xilinx ZynqMP +- commit fd7ad3d + +------------------------------------------------------------------- +Wed Apr 13 16:17:39 CEST 2016 - [email protected] + +- rpm/kernel-binary.spec.in: No -kgraft subpackage for openSUSE (fate#320268) +- commit 269d6bf + +------------------------------------------------------------------- +Wed Apr 13 08:19:22 CEST 2016 - [email protected] + +- Linux 4.5.1 (CVE-2016-2184 CVE-2016-2185 CVE-2016-2186 + CVE-2016-3140 CVE-2016-3689 bnc#967903 bnc#970892 bnc#970958 + bnc#971124 bnc#971628 boo#969098 boo#970968 boo#971737 + boo#971853 bsc#969383 bsc#969870 bsc#971125). +- Delete + patches.arch/intel_idle-prevent-SKL-H-boot-failure-when-C8-C9-C10. +- Delete + patches.drivers/0001-Input-ims-pcu-sanity-check-against-missing-interface.patch. +- Delete + patches.drivers/0001-Input-powermate-fix-oops-with-malicious-USB-descript.patch. +- Delete + patches.drivers/0001-USB-digi_acceleport-do-sanity-checking-for-the-numbe.patch. +- Delete + patches.drivers/0001-USB-usb_driver_claim_interface-add-sanity-checking.patch. +- Delete + patches.drivers/ALSA-hda-Don-t-handle-ELD-notify-from-invalid-port. +- Delete + patches.drivers/ALSA-hda-Fix-forgotten-HDMI-monitor_present-update. +- Delete + patches.drivers/ALSA-hda-Fix-spurious-kernel-WARNING-on-Baytrail-HDM. +- Delete + patches.drivers/ALSA-hda-Fix-unexpected-resume-through-regmap-code-p. +- Delete + patches.drivers/ALSA-hda-Limit-i915-HDMI-binding-only-for-HSW-and-la. +- Delete + patches.drivers/ALSA-hda-Really-restrict-i915-notifier-to-HSW. +- Delete + patches.drivers/ALSA-usb-audio-Add-sanity-checks-for-endpoint-access. +- Delete + patches.drivers/ALSA-usb-audio-Fix-NULL-dereference-in-create_fixed. +- Delete + patches.drivers/drm-radeon-rework-fbdev-handling-on-chips-with-no-co. +- Delete + patches.fixes/net-irda-Fix-use-after-free-in-irtty_open.patch. +- commit cf9b28d + +------------------------------------------------------------------- +Sat Apr 9 22:36:02 CEST 2016 - [email protected] + +- config: armv7hl: Enable R8169 + Enable RTL8169 PCI NIC, found on Jetson TK1 board. +- commit b98c3d3 + +------------------------------------------------------------------- +Thu Apr 7 11:44:00 CEST 2016 - [email protected] + +- USB: digi_acceleport: do sanity checking for the number of ports + (bnc#970892, CVE-2016-3140). +- commit c3d2a95 + +------------------------------------------------------------------- +Wed Apr 6 14:04:49 CEST 2016 - [email protected] + +- KVM: arm/arm64: Handle forward time correction gracefully (bnc#974266). +- commit 76b2c0d + +------------------------------------------------------------------- +Tue Apr 5 16:56:41 CEST 2016 - [email protected] + +- Input: powermate - fix oops with malicious USB descriptors + (bnc#970958, CVE-2016-2186). +- commit 9c51535 + +------------------------------------------------------------------- +Tue Apr 5 12:11:05 CEST 2016 - [email protected] + +- USB: usb_driver_claim_interface: add sanity checking + (bnc#971124, CVE-2016-2185). +- commit babf987 + +------------------------------------------------------------------- +Tue Apr 5 11:27:25 CEST 2016 - [email protected] + +- Input: ims-pcu - sanity check against missing interfaces + (bnc#971628, CVE-2016-3689). +- commit f5cb5e8 + +------------------------------------------------------------------- +Mon Apr 4 17:24:17 CEST 2016 - [email protected] + +- rpm/find-requires: Generate dependencies for KMPs defined in supported.conf (fate#319339) +- commit 007a83c + +------------------------------------------------------------------- +Mon Apr 4 10:35:39 CEST 2016 - [email protected] + +- rpm/kernel-source.rpmlintrc: Disable rpmlint check for KMP subpackages + The check is there to ensure that KMPs are built using the + %kernel_module_package macro, but we are deliberately not doing this for + KMPs built from the kernel specfile (fate#319339). +- commit 7c48b60 + +------------------------------------------------------------------- +Sun Apr 3 12:33:45 CEST 2016 - [email protected] + +- Update config files. + Set SERIAL_8250_SHARE_IRQ (bnc#973748). +- commit 606f94a + +------------------------------------------------------------------- +Sat Apr 2 10:18:27 CEST 2016 - [email protected] + +- ACPI / processor: Request native thermal interrupt handling + via _OSC (bsc#969870). +- commit f6eec7e + +------------------------------------------------------------------- +Fri Apr 1 15:41:27 CEST 2016 - [email protected] + +- rpm/kernel-binary.spec.in: Only build the -kgraft package for modular kernels (fate#320268) +- commit 9bab96f + +------------------------------------------------------------------- +Fri Apr 1 15:39:13 CEST 2016 - [email protected] + +- rpm/kernel-binary.spec.in: Only build KMPs if CONFIG_SPLIT_PACKAGE=y (fate#319339) +- commit def905b + +------------------------------------------------------------------- +Fri Apr 1 13:34:49 CEST 2016 - [email protected] + +- rpm/kernel-binary.spec.in: Tag KMPs so that weak-modules2 ignores them + Also require a suse-module-tools version that can handle this (fate#319339). +- commit 58d21f9 + +------------------------------------------------------------------- +Fri Apr 1 12:49:52 CEST 2016 - [email protected] + +- rpm/kernel-binary.spec.in: Add rpm scriptlets for KMPs (fate#319339) + Use the --{add,remove}-kernel-modules options of weak-modules2 instead + of --{add,remove}-kmp, because we do not want any symlinks to be created + for these KMPs. +- commit 95f8b94 + +------------------------------------------------------------------- +Thu Mar 31 13:23:55 CEST 2016 - [email protected] + ++++ 74 more lines (skipped) ++++ between /work/SRC/openSUSE:Factory/kernel-source/kernel-debug.changes ++++ and /work/SRC/openSUSE:Factory/.kernel-source.new/kernel-debug.changes kernel-default.changes: same change kernel-docs.changes: same change kernel-lpae.changes: same change kernel-obs-build.changes: same change kernel-obs-qa.changes: same change kernel-pae.changes: same change kernel-source.changes: same change kernel-syms.changes: same change kernel-vanilla.changes: same change New: ---- find-requires ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ kernel-debug.spec ++++++ --- /var/tmp/diff_new_pack.e0T37a/_old 2016-04-28 16:52:52.000000000 +0200 +++ /var/tmp/diff_new_pack.e0T37a/_new 2016-04-28 16:52:52.000000000 +0200 @@ -20,7 +20,7 @@ # needssslcertforbuild %define srcversion 4.5 -%define patchversion 4.5.0 +%define patchversion 4.5.2 %define variant %{nil} %define vanilla_only 0 @@ -39,7 +39,7 @@ %define rpm_install_dir %buildroot%obj_install_dir %define kernel_build_dir %my_builddir/linux-%srcversion/linux-obj -%(chmod +x %_sourcedir/{guards,apply-patches,check-for-config-changes,group-source-files.pl,find-provides,split-modules,modversions,kabi.pl,mkspec,compute-PATCHVERSION.sh,arch-symbols,log.sh,try-disable-staging-driver,compress-vmlinux.sh}) +%(chmod +x %_sourcedir/{guards,apply-patches,check-for-config-changes,group-source-files.pl,find-provides,find-requires,split-modules,modversions,kabi.pl,mkspec,compute-PATCHVERSION.sh,arch-symbols,log.sh,try-disable-staging-driver,compress-vmlinux.sh}) %global cpu_arch %(%_sourcedir/arch-symbols %_target_cpu) %define cpu_arch_flavor %cpu_arch/%build_flavor @@ -61,9 +61,9 @@ Summary: A Debug Version of the Kernel License: GPL-2.0 Group: System/Kernel -Version: 4.5.0 +Version: 4.5.2 %if 0%{?is_kotd} -Release: <RELEASE>.g8cf0ce6 +Release: <RELEASE>.g0454a6e %else Release: 0 %endif @@ -79,6 +79,8 @@ # Used to sign the kernel in the buildservice BuildRequires: openssl BuildRequires: pesign-obs-integration +# for objtool +BuildRequires: libelf-devel Provides: %name = %version-%source_rel # bnc#901925 Provides: %name-%version-%source_rel @@ -185,8 +187,9 @@ Source39: config-options.changes.txt Source40: source-timestamp Source44: find-provides -Source45: split-modules -Source46: modversions +Source45: find-requires +Source46: split-modules +Source47: modversions Source48: macros.kernel-source Source49: kernel-module-subpackage Source50: kabi.pl @@ -265,6 +268,7 @@ NoSource: 44 NoSource: 45 NoSource: 46 +NoSource: 47 NoSource: 48 NoSource: 49 NoSource: 50 @@ -357,8 +361,12 @@ %obsolete_kmp xen 4.6.1 # Provide the exported symbols as "ksym(symbol) = hash" +%define _use_internal_dependency_generator 0 %define __find_provides %_sourcedir/find-provides %name +# Generate dependencies for KMPs defined in supported.conf +%define __find_requires %_sourcedir/find-requires %name %version-%release %my_builddir + # Will modules not listed in supported.conf abort the kernel build (0/1)? %define supported_modules_check 0 @@ -389,15 +397,11 @@ # Generate a list of modules with their support status marking %_sourcedir/guards --list --with-guards <%_sourcedir/supported.conf | \ awk ' - /^\+(base|yes) / { - print $(NF); - next; - } - /^\+external / { + /\+external / { print $(NF) " external"; next; } - /^[-+]/ { + /^-/ { print $(NF) " no"; next; } @@ -405,8 +409,11 @@ print $(NF); } ' >%kernel_build_dir/Module.supported -%_sourcedir/guards --default=0 base < %_sourcedir/supported.conf | \ - sed 's,.*/,,; s,\.ko$,,' | sort -u >%kernel_build_dir/Module.base +for package in base ; do + %_sourcedir/guards --default=0 "$package" \ + <%_sourcedir/supported.conf | sed 's,.*/,,; s,\.ko$,,' | \ + sort -u >%kernel_build_dir/Module."$package" +done cd linux-%srcversion @@ -771,7 +778,7 @@ %if %split_base %_sourcedir/split-modules -d %buildroot \ -o %my_builddir \ - -b %kernel_build_dir/Module.base \ + -b %kernel_build_dir \ %if %CONFIG_SUSE_KERNEL_SUPPORTED == "y" -e \ %endif @@ -916,6 +923,11 @@ %if %split_extra add_dirs_to_filelist %my_builddir/unsupported-modules > %my_builddir/kernel-extra.files %endif +for f in %my_builddir/*-kmp-modules; do + f2=${f%%-modules}.files + add_dirs_to_filelist "$f" >"$f2" +done + # Hardlink duplicate files automatically (from package fdupes): It doesn't save # much, but it keeps rpmlint from breaking the package build. Note that we skip @@ -1107,4 +1119,26 @@ %endif %endif +%if %CONFIG_MODULES == "y" && %CONFIG_SUSE_KERNEL_SUPPORTED == "y" +%package kgraft +Summary: Metapackage to pull in matching kgraft-patch package +Group: System/Kernel +Requires: kgraft-patch-%(echo %version-%source_rel | sed 'y/\./_/')-%build_flavor +Provides: multiversion(kernel) + +%description kgraft +This is a metapackage that pulls in the matching kgraft-patch package for a +given kernel version. The advantage of the metapackage is that its name is +static, unlike the kgraft-patch-<kernel-version>-flavor package names. + +%files kgraft +# rpmlint complains about empty packages, so lets own something +%defattr(-, root, root) +%dir /lib/modules/%kernelrelease-%build_flavor +%endif + +%if %split_base + +%endif + %changelog kernel-default.spec: same change ++++++ kernel-docs.spec ++++++ --- /var/tmp/diff_new_pack.e0T37a/_old 2016-04-28 16:52:52.000000000 +0200 +++ /var/tmp/diff_new_pack.e0T37a/_new 2016-04-28 16:52:52.000000000 +0200 @@ -16,7 +16,7 @@ # -%define patchversion 4.5.0 +%define patchversion 4.5.2 %define variant %{nil} %include %_sourcedir/kernel-spec-macros @@ -27,9 +27,9 @@ Summary: Kernel Documentation (man pages) License: GPL-2.0 Group: Documentation/Man -Version: 4.5.0 +Version: 4.5.2 %if 0%{?is_kotd} -Release: <RELEASE>.g8cf0ce6 +Release: <RELEASE>.g0454a6e %else Release: 0 %endif ++++++ kernel-lpae.spec ++++++ --- /var/tmp/diff_new_pack.e0T37a/_old 2016-04-28 16:52:52.000000000 +0200 +++ /var/tmp/diff_new_pack.e0T37a/_new 2016-04-28 16:52:52.000000000 +0200 @@ -20,7 +20,7 @@ # needssslcertforbuild %define srcversion 4.5 -%define patchversion 4.5.0 +%define patchversion 4.5.2 %define variant %{nil} %define vanilla_only 0 @@ -39,7 +39,7 @@ %define rpm_install_dir %buildroot%obj_install_dir %define kernel_build_dir %my_builddir/linux-%srcversion/linux-obj -%(chmod +x %_sourcedir/{guards,apply-patches,check-for-config-changes,group-source-files.pl,find-provides,split-modules,modversions,kabi.pl,mkspec,compute-PATCHVERSION.sh,arch-symbols,log.sh,try-disable-staging-driver,compress-vmlinux.sh}) +%(chmod +x %_sourcedir/{guards,apply-patches,check-for-config-changes,group-source-files.pl,find-provides,find-requires,split-modules,modversions,kabi.pl,mkspec,compute-PATCHVERSION.sh,arch-symbols,log.sh,try-disable-staging-driver,compress-vmlinux.sh}) %global cpu_arch %(%_sourcedir/arch-symbols %_target_cpu) %define cpu_arch_flavor %cpu_arch/%build_flavor @@ -61,9 +61,9 @@ Summary: Kernel for LPAE enabled systems License: GPL-2.0 Group: System/Kernel -Version: 4.5.0 +Version: 4.5.2 %if 0%{?is_kotd} -Release: <RELEASE>.g8cf0ce6 +Release: <RELEASE>.g0454a6e %else Release: 0 %endif @@ -79,6 +79,8 @@ # Used to sign the kernel in the buildservice BuildRequires: openssl BuildRequires: pesign-obs-integration +# for objtool +BuildRequires: libelf-devel Provides: %name = %version-%source_rel # bnc#901925 Provides: %name-%version-%source_rel @@ -179,8 +181,9 @@ Source39: config-options.changes.txt Source40: source-timestamp Source44: find-provides -Source45: split-modules -Source46: modversions +Source45: find-requires +Source46: split-modules +Source47: modversions Source48: macros.kernel-source Source49: kernel-module-subpackage Source50: kabi.pl @@ -259,6 +262,7 @@ NoSource: 44 NoSource: 45 NoSource: 46 +NoSource: 47 NoSource: 48 NoSource: 49 NoSource: 50 @@ -351,8 +355,12 @@ %obsolete_kmp xen 4.6.1 # Provide the exported symbols as "ksym(symbol) = hash" +%define _use_internal_dependency_generator 0 %define __find_provides %_sourcedir/find-provides %name +# Generate dependencies for KMPs defined in supported.conf +%define __find_requires %_sourcedir/find-requires %name %version-%release %my_builddir + # Will modules not listed in supported.conf abort the kernel build (0/1)? %define supported_modules_check 0 @@ -383,15 +391,11 @@ # Generate a list of modules with their support status marking %_sourcedir/guards --list --with-guards <%_sourcedir/supported.conf | \ awk ' - /^\+(base|yes) / { - print $(NF); - next; - } - /^\+external / { + /\+external / { print $(NF) " external"; next; } - /^[-+]/ { + /^-/ { print $(NF) " no"; next; } @@ -399,8 +403,11 @@ print $(NF); } ' >%kernel_build_dir/Module.supported -%_sourcedir/guards --default=0 base < %_sourcedir/supported.conf | \ - sed 's,.*/,,; s,\.ko$,,' | sort -u >%kernel_build_dir/Module.base +for package in base ; do + %_sourcedir/guards --default=0 "$package" \ + <%_sourcedir/supported.conf | sed 's,.*/,,; s,\.ko$,,' | \ + sort -u >%kernel_build_dir/Module."$package" +done cd linux-%srcversion @@ -765,7 +772,7 @@ %if %split_base %_sourcedir/split-modules -d %buildroot \ -o %my_builddir \ - -b %kernel_build_dir/Module.base \ + -b %kernel_build_dir \ %if %CONFIG_SUSE_KERNEL_SUPPORTED == "y" -e \ %endif @@ -910,6 +917,11 @@ %if %split_extra add_dirs_to_filelist %my_builddir/unsupported-modules > %my_builddir/kernel-extra.files %endif +for f in %my_builddir/*-kmp-modules; do + f2=${f%%-modules}.files + add_dirs_to_filelist "$f" >"$f2" +done + # Hardlink duplicate files automatically (from package fdupes): It doesn't save # much, but it keeps rpmlint from breaking the package build. Note that we skip @@ -1092,4 +1104,26 @@ %endif %endif +%if %CONFIG_MODULES == "y" && %CONFIG_SUSE_KERNEL_SUPPORTED == "y" +%package kgraft +Summary: Metapackage to pull in matching kgraft-patch package +Group: System/Kernel +Requires: kgraft-patch-%(echo %version-%source_rel | sed 'y/\./_/')-%build_flavor +Provides: multiversion(kernel) + +%description kgraft +This is a metapackage that pulls in the matching kgraft-patch package for a +given kernel version. The advantage of the metapackage is that its name is +static, unlike the kgraft-patch-<kernel-version>-flavor package names. + +%files kgraft +# rpmlint complains about empty packages, so lets own something +%defattr(-, root, root) +%dir /lib/modules/%kernelrelease-%build_flavor +%endif + +%if %split_base + +%endif + %changelog ++++++ kernel-obs-build.spec ++++++ --- /var/tmp/diff_new_pack.e0T37a/_old 2016-04-28 16:52:52.000000000 +0200 +++ /var/tmp/diff_new_pack.e0T37a/_new 2016-04-28 16:52:52.000000000 +0200 @@ -19,7 +19,7 @@ #!BuildIgnore: post-build-checks -%define patchversion 4.5.0 +%define patchversion 4.5.2 %define variant %{nil} %include %_sourcedir/kernel-spec-macros @@ -51,9 +51,9 @@ Summary: package kernel and initrd for OBS VM builds License: GPL-2.0 Group: SLES -Version: 4.5.0 +Version: 4.5.2 %if 0%{?is_kotd} -Release: <RELEASE>.g8cf0ce6 +Release: <RELEASE>.g0454a6e %else Release: 0 %endif @@ -103,7 +103,7 @@ # a longer list to have them also available for qemu cross builds where x86_64 kernel runs in eg. arm env. # this list of modules where available on build workers of build.opensuse.org, so we stay compatible. -export KERNEL_MODULES="loop dm-mod dm-snapshot binfmt-misc fuse kqemu squashfs ext2 ext3 ext4 reiserfs btrfs nf_conntrack_ipv6 binfmt_misc virtio_pci virtio_mmio virtio_blk virtio_rng fat vfat nls_cp437 nls_iso8859-1 ibmvscsi sd_mod" +export KERNEL_MODULES="loop dm-mod dm-snapshot binfmt-misc fuse kqemu squashfs ext2 ext3 ext4 reiserfs btrfs nf_conntrack_ipv6 binfmt_misc virtio_pci virtio_mmio virtio_blk virtio_rng fat vfat nls_cp437 nls_iso8859-1 ibmvscsi sd_mod e1000 ibmveth" # manually load all modules to make sure they're available for i in $KERNEL_MODULES; do ++++++ kernel-obs-qa.spec ++++++ --- /var/tmp/diff_new_pack.e0T37a/_old 2016-04-28 16:52:52.000000000 +0200 +++ /var/tmp/diff_new_pack.e0T37a/_new 2016-04-28 16:52:52.000000000 +0200 @@ -17,7 +17,7 @@ # needsrootforbuild -%define patchversion 4.5.0 +%define patchversion 4.5.2 %define variant %{nil} %include %_sourcedir/kernel-spec-macros @@ -36,9 +36,9 @@ Summary: Basic QA tests for the kernel License: GPL-2.0 Group: SLES -Version: 4.5.0 +Version: 4.5.2 %if 0%{?is_kotd} -Release: <RELEASE>.g8cf0ce6 +Release: <RELEASE>.g0454a6e %else Release: 0 %endif ++++++ kernel-pae.spec ++++++ --- /var/tmp/diff_new_pack.e0T37a/_old 2016-04-28 16:52:52.000000000 +0200 +++ /var/tmp/diff_new_pack.e0T37a/_new 2016-04-28 16:52:52.000000000 +0200 @@ -20,7 +20,7 @@ # needssslcertforbuild %define srcversion 4.5 -%define patchversion 4.5.0 +%define patchversion 4.5.2 %define variant %{nil} %define vanilla_only 0 @@ -39,7 +39,7 @@ %define rpm_install_dir %buildroot%obj_install_dir %define kernel_build_dir %my_builddir/linux-%srcversion/linux-obj -%(chmod +x %_sourcedir/{guards,apply-patches,check-for-config-changes,group-source-files.pl,find-provides,split-modules,modversions,kabi.pl,mkspec,compute-PATCHVERSION.sh,arch-symbols,log.sh,try-disable-staging-driver,compress-vmlinux.sh}) +%(chmod +x %_sourcedir/{guards,apply-patches,check-for-config-changes,group-source-files.pl,find-provides,find-requires,split-modules,modversions,kabi.pl,mkspec,compute-PATCHVERSION.sh,arch-symbols,log.sh,try-disable-staging-driver,compress-vmlinux.sh}) %global cpu_arch %(%_sourcedir/arch-symbols %_target_cpu) %define cpu_arch_flavor %cpu_arch/%build_flavor @@ -61,9 +61,9 @@ Summary: Kernel with PAE Support License: GPL-2.0 Group: System/Kernel -Version: 4.5.0 +Version: 4.5.2 %if 0%{?is_kotd} -Release: <RELEASE>.g8cf0ce6 +Release: <RELEASE>.g0454a6e %else Release: 0 %endif @@ -79,6 +79,8 @@ # Used to sign the kernel in the buildservice BuildRequires: openssl BuildRequires: pesign-obs-integration +# for objtool +BuildRequires: libelf-devel Provides: %name = %version-%source_rel # bnc#901925 Provides: %name-%version-%source_rel @@ -199,8 +201,9 @@ Source39: config-options.changes.txt Source40: source-timestamp Source44: find-provides -Source45: split-modules -Source46: modversions +Source45: find-requires +Source46: split-modules +Source47: modversions Source48: macros.kernel-source Source49: kernel-module-subpackage Source50: kabi.pl @@ -279,6 +282,7 @@ NoSource: 44 NoSource: 45 NoSource: 46 +NoSource: 47 NoSource: 48 NoSource: 49 NoSource: 50 @@ -371,8 +375,12 @@ %obsolete_kmp xen 4.6.1 # Provide the exported symbols as "ksym(symbol) = hash" +%define _use_internal_dependency_generator 0 %define __find_provides %_sourcedir/find-provides %name +# Generate dependencies for KMPs defined in supported.conf +%define __find_requires %_sourcedir/find-requires %name %version-%release %my_builddir + # Will modules not listed in supported.conf abort the kernel build (0/1)? %define supported_modules_check 0 @@ -409,15 +417,11 @@ # Generate a list of modules with their support status marking %_sourcedir/guards --list --with-guards <%_sourcedir/supported.conf | \ awk ' - /^\+(base|yes) / { - print $(NF); - next; - } - /^\+external / { + /\+external / { print $(NF) " external"; next; } - /^[-+]/ { + /^-/ { print $(NF) " no"; next; } @@ -425,8 +429,11 @@ print $(NF); } ' >%kernel_build_dir/Module.supported -%_sourcedir/guards --default=0 base < %_sourcedir/supported.conf | \ - sed 's,.*/,,; s,\.ko$,,' | sort -u >%kernel_build_dir/Module.base +for package in base ; do + %_sourcedir/guards --default=0 "$package" \ + <%_sourcedir/supported.conf | sed 's,.*/,,; s,\.ko$,,' | \ + sort -u >%kernel_build_dir/Module."$package" +done cd linux-%srcversion @@ -791,7 +798,7 @@ %if %split_base %_sourcedir/split-modules -d %buildroot \ -o %my_builddir \ - -b %kernel_build_dir/Module.base \ + -b %kernel_build_dir \ %if %CONFIG_SUSE_KERNEL_SUPPORTED == "y" -e \ %endif @@ -936,6 +943,11 @@ %if %split_extra add_dirs_to_filelist %my_builddir/unsupported-modules > %my_builddir/kernel-extra.files %endif +for f in %my_builddir/*-kmp-modules; do + f2=${f%%-modules}.files + add_dirs_to_filelist "$f" >"$f2" +done + # Hardlink duplicate files automatically (from package fdupes): It doesn't save # much, but it keeps rpmlint from breaking the package build. Note that we skip @@ -1157,4 +1169,26 @@ %endif %endif +%if %CONFIG_MODULES == "y" && %CONFIG_SUSE_KERNEL_SUPPORTED == "y" +%package kgraft +Summary: Metapackage to pull in matching kgraft-patch package +Group: System/Kernel +Requires: kgraft-patch-%(echo %version-%source_rel | sed 'y/\./_/')-%build_flavor +Provides: multiversion(kernel) + +%description kgraft +This is a metapackage that pulls in the matching kgraft-patch package for a +given kernel version. The advantage of the metapackage is that its name is +static, unlike the kgraft-patch-<kernel-version>-flavor package names. + +%files kgraft +# rpmlint complains about empty packages, so lets own something +%defattr(-, root, root) +%dir /lib/modules/%kernelrelease-%build_flavor +%endif + +%if %split_base + +%endif + %changelog ++++++ kernel-source.spec ++++++ --- /var/tmp/diff_new_pack.e0T37a/_old 2016-04-28 16:52:52.000000000 +0200 +++ /var/tmp/diff_new_pack.e0T37a/_new 2016-04-28 16:52:52.000000000 +0200 @@ -18,7 +18,7 @@ %define srcversion 4.5 -%define patchversion 4.5.0 +%define patchversion 4.5.2 %define variant %{nil} %define vanilla_only 0 @@ -30,9 +30,9 @@ Summary: The Linux Kernel Sources License: GPL-2.0 Group: Development/Sources -Version: 4.5.0 +Version: 4.5.2 %if 0%{?is_kotd} -Release: <RELEASE>.g8cf0ce6 +Release: <RELEASE>.g0454a6e %else Release: 0 %endif @@ -67,8 +67,9 @@ Source39: config-options.changes.txt Source40: source-timestamp Source44: find-provides -Source45: split-modules -Source46: modversions +Source45: find-requires +Source46: split-modules +Source47: modversions Source48: macros.kernel-source Source49: kernel-module-subpackage Source50: kabi.pl @@ -114,7 +115,7 @@ # Source is only complete with devel files. Requires: kernel-devel%variant = %version-%release -%(chmod +x %_sourcedir/{guards,apply-patches,check-for-config-changes,group-source-files.pl,find-provides,split-modules,modversions,kabi.pl,mkspec,compute-PATCHVERSION.sh,arch-symbols,log.sh,try-disable-staging-driver,compress-vmlinux.sh}) +%(chmod +x %_sourcedir/{guards,apply-patches,check-for-config-changes,group-source-files.pl,find-provides,find-requires,split-modules,modversions,kabi.pl,mkspec,compute-PATCHVERSION.sh,arch-symbols,log.sh,try-disable-staging-driver,compress-vmlinux.sh}) %define symbols %(set -- $([ -e %_sourcedir/extra-symbols ] && cat %_sourcedir/extra-symbols) ; echo $*) %define variant_symbols %(case %name in (*-rt) echo "RT" ;; esac) ++++++ kernel-syms.spec ++++++ --- /var/tmp/diff_new_pack.e0T37a/_old 2016-04-28 16:52:52.000000000 +0200 +++ /var/tmp/diff_new_pack.e0T37a/_new 2016-04-28 16:52:52.000000000 +0200 @@ -24,10 +24,10 @@ Summary: Kernel Symbol Versions (modversions) License: GPL-2.0 Group: Development/Sources -Version: 4.5.0 +Version: 4.5.2 %if %using_buildservice %if 0%{?is_kotd} -Release: <RELEASE>.g8cf0ce6 +Release: <RELEASE>.g0454a6e %else Release: 0 %endif ++++++ kernel-vanilla.spec ++++++ --- /var/tmp/diff_new_pack.e0T37a/_old 2016-04-28 16:52:52.000000000 +0200 +++ /var/tmp/diff_new_pack.e0T37a/_new 2016-04-28 16:52:52.000000000 +0200 @@ -20,7 +20,7 @@ # needssslcertforbuild %define srcversion 4.5 -%define patchversion 4.5.0 +%define patchversion 4.5.2 %define variant %{nil} %define vanilla_only 0 @@ -39,7 +39,7 @@ %define rpm_install_dir %buildroot%obj_install_dir %define kernel_build_dir %my_builddir/linux-%srcversion/linux-obj -%(chmod +x %_sourcedir/{guards,apply-patches,check-for-config-changes,group-source-files.pl,find-provides,split-modules,modversions,kabi.pl,mkspec,compute-PATCHVERSION.sh,arch-symbols,log.sh,try-disable-staging-driver,compress-vmlinux.sh}) +%(chmod +x %_sourcedir/{guards,apply-patches,check-for-config-changes,group-source-files.pl,find-provides,find-requires,split-modules,modversions,kabi.pl,mkspec,compute-PATCHVERSION.sh,arch-symbols,log.sh,try-disable-staging-driver,compress-vmlinux.sh}) %global cpu_arch %(%_sourcedir/arch-symbols %_target_cpu) %define cpu_arch_flavor %cpu_arch/%build_flavor @@ -61,9 +61,9 @@ Summary: The Standard Kernel - without any SUSE patches License: GPL-2.0 Group: System/Kernel -Version: 4.5.0 +Version: 4.5.2 %if 0%{?is_kotd} -Release: <RELEASE>.g8cf0ce6 +Release: <RELEASE>.g0454a6e %else Release: 0 %endif @@ -79,6 +79,8 @@ # Used to sign the kernel in the buildservice BuildRequires: openssl BuildRequires: pesign-obs-integration +# for objtool +BuildRequires: libelf-devel Provides: %name = %version-%source_rel # bnc#901925 Provides: %name-%version-%source_rel @@ -179,8 +181,9 @@ Source39: config-options.changes.txt Source40: source-timestamp Source44: find-provides -Source45: split-modules -Source46: modversions +Source45: find-requires +Source46: split-modules +Source47: modversions Source48: macros.kernel-source Source49: kernel-module-subpackage Source50: kabi.pl @@ -259,6 +262,7 @@ NoSource: 44 NoSource: 45 NoSource: 46 +NoSource: 47 NoSource: 48 NoSource: 49 NoSource: 50 @@ -351,8 +355,12 @@ %obsolete_kmp xen 4.6.1 # Provide the exported symbols as "ksym(symbol) = hash" +%define _use_internal_dependency_generator 0 %define __find_provides %_sourcedir/find-provides %name +# Generate dependencies for KMPs defined in supported.conf +%define __find_requires %_sourcedir/find-requires %name %version-%release %my_builddir + # Will modules not listed in supported.conf abort the kernel build (0/1)? %define supported_modules_check 0 @@ -382,15 +390,11 @@ # Generate a list of modules with their support status marking %_sourcedir/guards --list --with-guards <%_sourcedir/supported.conf | \ awk ' - /^\+(base|yes) / { - print $(NF); - next; - } - /^\+external / { + /\+external / { print $(NF) " external"; next; } - /^[-+]/ { + /^-/ { print $(NF) " no"; next; } @@ -398,8 +402,11 @@ print $(NF); } ' >%kernel_build_dir/Module.supported -%_sourcedir/guards --default=0 base < %_sourcedir/supported.conf | \ - sed 's,.*/,,; s,\.ko$,,' | sort -u >%kernel_build_dir/Module.base +for package in base ; do + %_sourcedir/guards --default=0 "$package" \ + <%_sourcedir/supported.conf | sed 's,.*/,,; s,\.ko$,,' | \ + sort -u >%kernel_build_dir/Module."$package" +done cd linux-%srcversion @@ -764,7 +771,7 @@ %if %split_base %_sourcedir/split-modules -d %buildroot \ -o %my_builddir \ - -b %kernel_build_dir/Module.base \ + -b %kernel_build_dir \ %if %CONFIG_SUSE_KERNEL_SUPPORTED == "y" -e \ %endif @@ -909,6 +916,11 @@ %if %split_extra add_dirs_to_filelist %my_builddir/unsupported-modules > %my_builddir/kernel-extra.files %endif +for f in %my_builddir/*-kmp-modules; do + f2=${f%%-modules}.files + add_dirs_to_filelist "$f" >"$f2" +done + # Hardlink duplicate files automatically (from package fdupes): It doesn't save # much, but it keeps rpmlint from breaking the package build. Note that we skip @@ -1089,4 +1101,26 @@ %endif %endif +%if %CONFIG_MODULES == "y" && %CONFIG_SUSE_KERNEL_SUPPORTED == "y" +%package kgraft +Summary: Metapackage to pull in matching kgraft-patch package +Group: System/Kernel +Requires: kgraft-patch-%(echo %version-%source_rel | sed 'y/\./_/')-%build_flavor +Provides: multiversion(kernel) + +%description kgraft +This is a metapackage that pulls in the matching kgraft-patch package for a +given kernel version. The advantage of the metapackage is that its name is +static, unlike the kgraft-patch-<kernel-version>-flavor package names. + +%files kgraft +# rpmlint complains about empty packages, so lets own something +%defattr(-, root, root) +%dir /lib/modules/%kernelrelease-%build_flavor +%endif + +%if %split_base + +%endif + %changelog ++++++ config.tar.bz2 ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/config/arm64/default new/config/arm64/default --- old/config/arm64/default 2016-03-18 16:23:56.000000000 +0100 +++ new/config/arm64/default 2016-04-14 10:44:07.000000000 +0200 @@ -1,6 +1,6 @@ # # Automatically generated file; DO NOT EDIT. -# Linux/arm64 4.5.0 Kernel Configuration +# Linux/arm64 4.5.1 Kernel Configuration # CONFIG_ARM64=y CONFIG_64BIT=y @@ -3267,7 +3267,11 @@ CONFIG_SERIAL_8250_PCI=y CONFIG_SERIAL_8250_NR_UARTS=4 CONFIG_SERIAL_8250_RUNTIME_UARTS=4 -# CONFIG_SERIAL_8250_EXTENDED is not set +CONFIG_SERIAL_8250_EXTENDED=y +# CONFIG_SERIAL_8250_MANY_PORTS is not set +CONFIG_SERIAL_8250_SHARE_IRQ=y +# CONFIG_SERIAL_8250_DETECT_IRQ is not set +# CONFIG_SERIAL_8250_RSA is not set CONFIG_SERIAL_8250_FSL=y CONFIG_SERIAL_8250_DW=y # CONFIG_SERIAL_8250_RT288X is not set @@ -3307,7 +3311,8 @@ # CONFIG_SERIAL_ALTERA_JTAGUART is not set # CONFIG_SERIAL_ALTERA_UART is not set # CONFIG_SERIAL_IFX6X60 is not set -# CONFIG_SERIAL_XILINX_PS_UART is not set +CONFIG_SERIAL_XILINX_PS_UART=y +CONFIG_SERIAL_XILINX_PS_UART_CONSOLE=y # CONFIG_SERIAL_ARC is not set CONFIG_SERIAL_RP2=m CONFIG_SERIAL_RP2_NR_UARTS=32 @@ -3615,7 +3620,7 @@ CONFIG_GPIO_XGENE=y CONFIG_GPIO_XGENE_SB=m CONFIG_GPIO_XILINX=m -# CONFIG_GPIO_ZYNQ is not set +CONFIG_GPIO_ZYNQ=m # CONFIG_GPIO_ZX is not set # @@ -3920,10 +3925,10 @@ CONFIG_SOFT_WATCHDOG=m # CONFIG_GPIO_WATCHDOG is not set # CONFIG_MENF21BMC_WATCHDOG is not set -# CONFIG_XILINX_WATCHDOG is not set +CONFIG_XILINX_WATCHDOG=m CONFIG_ZIIRAVE_WATCHDOG=m # CONFIG_ARM_SP805_WATCHDOG is not set -# CONFIG_CADENCE_WATCHDOG is not set +CONFIG_CADENCE_WATCHDOG=m CONFIG_HAVE_S3C2410_WATCHDOG=y CONFIG_S3C2410_WATCHDOG=m # CONFIG_DW_WATCHDOG is not set @@ -5636,7 +5641,7 @@ CONFIG_MMC_RICOH_MMC=y # CONFIG_MMC_SDHCI_ACPI is not set CONFIG_MMC_SDHCI_PLTFM=m -# CONFIG_MMC_SDHCI_OF_ARASAN is not set +CONFIG_MMC_SDHCI_OF_ARASAN=m # CONFIG_MMC_SDHCI_OF_AT91 is not set CONFIG_MMC_SDHCI_OF_ESDHC=m CONFIG_MMC_SDHCI_TEGRA=m diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/config/arm64/vanilla new/config/arm64/vanilla --- old/config/arm64/vanilla 2016-03-18 16:23:56.000000000 +0100 +++ new/config/arm64/vanilla 2016-04-14 10:44:07.000000000 +0200 @@ -3249,7 +3249,11 @@ CONFIG_SERIAL_8250_PCI=y CONFIG_SERIAL_8250_NR_UARTS=4 CONFIG_SERIAL_8250_RUNTIME_UARTS=4 -# CONFIG_SERIAL_8250_EXTENDED is not set +CONFIG_SERIAL_8250_EXTENDED=y +# CONFIG_SERIAL_8250_MANY_PORTS is not set +CONFIG_SERIAL_8250_SHARE_IRQ=y +# CONFIG_SERIAL_8250_DETECT_IRQ is not set +# CONFIG_SERIAL_8250_RSA is not set CONFIG_SERIAL_8250_FSL=y CONFIG_SERIAL_8250_DW=y # CONFIG_SERIAL_8250_RT288X is not set diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/config/armv7hl/default new/config/armv7hl/default --- old/config/armv7hl/default 2016-03-18 16:23:56.000000000 +0100 +++ new/config/armv7hl/default 2016-04-14 10:44:07.000000000 +0200 @@ -2720,7 +2720,7 @@ CONFIG_NET_VENDOR_REALTEK=y # CONFIG_8139CP is not set # CONFIG_8139TOO is not set -# CONFIG_R8169 is not set +CONFIG_R8169=m CONFIG_NET_VENDOR_RENESAS=y CONFIG_NET_VENDOR_RDC=y # CONFIG_R6040 is not set @@ -3533,7 +3533,11 @@ CONFIG_SERIAL_8250_PCI=y CONFIG_SERIAL_8250_NR_UARTS=32 CONFIG_SERIAL_8250_RUNTIME_UARTS=32 -# CONFIG_SERIAL_8250_EXTENDED is not set +CONFIG_SERIAL_8250_EXTENDED=y +# CONFIG_SERIAL_8250_MANY_PORTS is not set +CONFIG_SERIAL_8250_SHARE_IRQ=y +# CONFIG_SERIAL_8250_DETECT_IRQ is not set +# CONFIG_SERIAL_8250_RSA is not set CONFIG_SERIAL_8250_FSL=y CONFIG_SERIAL_8250_DW=y CONFIG_SERIAL_8250_EM=y diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/config/armv7hl/lpae new/config/armv7hl/lpae --- old/config/armv7hl/lpae 2016-03-18 16:23:56.000000000 +0100 +++ new/config/armv7hl/lpae 2016-04-14 10:44:07.000000000 +0200 @@ -2615,7 +2615,7 @@ CONFIG_NET_VENDOR_REALTEK=y # CONFIG_8139CP is not set # CONFIG_8139TOO is not set -# CONFIG_R8169 is not set +CONFIG_R8169=m CONFIG_NET_VENDOR_RENESAS=y CONFIG_NET_VENDOR_RDC=y # CONFIG_R6040 is not set @@ -3413,7 +3413,11 @@ CONFIG_SERIAL_8250_PCI=y CONFIG_SERIAL_8250_NR_UARTS=32 CONFIG_SERIAL_8250_RUNTIME_UARTS=32 -# CONFIG_SERIAL_8250_EXTENDED is not set +CONFIG_SERIAL_8250_EXTENDED=y +# CONFIG_SERIAL_8250_MANY_PORTS is not set +CONFIG_SERIAL_8250_SHARE_IRQ=y +# CONFIG_SERIAL_8250_DETECT_IRQ is not set +# CONFIG_SERIAL_8250_RSA is not set CONFIG_SERIAL_8250_FSL=y CONFIG_SERIAL_8250_DW=y # CONFIG_SERIAL_8250_EM is not set diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/config/armv7hl/vanilla new/config/armv7hl/vanilla --- old/config/armv7hl/vanilla 2016-03-18 16:23:56.000000000 +0100 +++ new/config/armv7hl/vanilla 2016-04-14 10:44:07.000000000 +0200 @@ -2712,7 +2712,7 @@ CONFIG_NET_VENDOR_REALTEK=y # CONFIG_8139CP is not set # CONFIG_8139TOO is not set -# CONFIG_R8169 is not set +CONFIG_R8169=m CONFIG_NET_VENDOR_RENESAS=y CONFIG_NET_VENDOR_RDC=y # CONFIG_R6040 is not set @@ -3525,7 +3525,11 @@ CONFIG_SERIAL_8250_PCI=y CONFIG_SERIAL_8250_NR_UARTS=32 CONFIG_SERIAL_8250_RUNTIME_UARTS=32 -# CONFIG_SERIAL_8250_EXTENDED is not set +CONFIG_SERIAL_8250_EXTENDED=y +# CONFIG_SERIAL_8250_MANY_PORTS is not set +CONFIG_SERIAL_8250_SHARE_IRQ=y +# CONFIG_SERIAL_8250_DETECT_IRQ is not set +# CONFIG_SERIAL_8250_RSA is not set CONFIG_SERIAL_8250_FSL=y CONFIG_SERIAL_8250_DW=y CONFIG_SERIAL_8250_EM=y diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/config/i386/debug new/config/i386/debug --- old/config/i386/debug 2016-03-18 16:23:56.000000000 +0100 +++ new/config/i386/debug 2016-04-14 10:44:07.000000000 +0200 @@ -3675,7 +3675,11 @@ CONFIG_SERIAL_8250_CS=m CONFIG_SERIAL_8250_NR_UARTS=16 CONFIG_SERIAL_8250_RUNTIME_UARTS=8 -# CONFIG_SERIAL_8250_EXTENDED is not set +CONFIG_SERIAL_8250_EXTENDED=y +# CONFIG_SERIAL_8250_MANY_PORTS is not set +CONFIG_SERIAL_8250_SHARE_IRQ=y +# CONFIG_SERIAL_8250_DETECT_IRQ is not set +# CONFIG_SERIAL_8250_RSA is not set # CONFIG_SERIAL_8250_FSL is not set CONFIG_SERIAL_8250_DW=m # CONFIG_SERIAL_8250_RT288X is not set diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/config/i386/default new/config/i386/default --- old/config/i386/default 2016-03-18 16:23:56.000000000 +0100 +++ new/config/i386/default 2016-04-14 10:44:07.000000000 +0200 @@ -3674,7 +3674,11 @@ CONFIG_SERIAL_8250_CS=m CONFIG_SERIAL_8250_NR_UARTS=32 CONFIG_SERIAL_8250_RUNTIME_UARTS=32 -# CONFIG_SERIAL_8250_EXTENDED is not set +CONFIG_SERIAL_8250_EXTENDED=y +# CONFIG_SERIAL_8250_MANY_PORTS is not set +CONFIG_SERIAL_8250_SHARE_IRQ=y +# CONFIG_SERIAL_8250_DETECT_IRQ is not set +# CONFIG_SERIAL_8250_RSA is not set # CONFIG_SERIAL_8250_FSL is not set CONFIG_SERIAL_8250_DW=m # CONFIG_SERIAL_8250_RT288X is not set diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/config/i386/pae new/config/i386/pae --- old/config/i386/pae 2016-03-18 16:23:56.000000000 +0100 +++ new/config/i386/pae 2016-04-14 10:44:07.000000000 +0200 @@ -3590,7 +3590,11 @@ CONFIG_SERIAL_8250_CS=m CONFIG_SERIAL_8250_NR_UARTS=16 CONFIG_SERIAL_8250_RUNTIME_UARTS=8 -# CONFIG_SERIAL_8250_EXTENDED is not set +CONFIG_SERIAL_8250_EXTENDED=y +# CONFIG_SERIAL_8250_MANY_PORTS is not set +CONFIG_SERIAL_8250_SHARE_IRQ=y +# CONFIG_SERIAL_8250_DETECT_IRQ is not set +# CONFIG_SERIAL_8250_RSA is not set # CONFIG_SERIAL_8250_FSL is not set CONFIG_SERIAL_8250_DW=m # CONFIG_SERIAL_8250_RT288X is not set diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/config/i386/vanilla new/config/i386/vanilla --- old/config/i386/vanilla 2016-03-18 16:23:56.000000000 +0100 +++ new/config/i386/vanilla 2016-04-14 10:44:07.000000000 +0200 @@ -3587,7 +3587,11 @@ CONFIG_SERIAL_8250_CS=m CONFIG_SERIAL_8250_NR_UARTS=16 CONFIG_SERIAL_8250_RUNTIME_UARTS=8 -# CONFIG_SERIAL_8250_EXTENDED is not set +CONFIG_SERIAL_8250_EXTENDED=y +# CONFIG_SERIAL_8250_MANY_PORTS is not set +CONFIG_SERIAL_8250_SHARE_IRQ=y +# CONFIG_SERIAL_8250_DETECT_IRQ is not set +# CONFIG_SERIAL_8250_RSA is not set # CONFIG_SERIAL_8250_FSL is not set CONFIG_SERIAL_8250_DW=m # CONFIG_SERIAL_8250_RT288X is not set diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/config/ppc64/debug new/config/ppc64/debug --- old/config/ppc64/debug 2016-03-18 16:23:56.000000000 +0100 +++ new/config/ppc64/debug 2016-04-14 10:44:07.000000000 +0200 @@ -3146,7 +3146,11 @@ CONFIG_SERIAL_8250_PCI=y CONFIG_SERIAL_8250_NR_UARTS=4 CONFIG_SERIAL_8250_RUNTIME_UARTS=4 -# CONFIG_SERIAL_8250_EXTENDED is not set +CONFIG_SERIAL_8250_EXTENDED=y +# CONFIG_SERIAL_8250_MANY_PORTS is not set +CONFIG_SERIAL_8250_SHARE_IRQ=y +# CONFIG_SERIAL_8250_DETECT_IRQ is not set +# CONFIG_SERIAL_8250_RSA is not set CONFIG_SERIAL_8250_FSL=y CONFIG_SERIAL_8250_DW=m # CONFIG_SERIAL_8250_RT288X is not set diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/config/ppc64/default new/config/ppc64/default --- old/config/ppc64/default 2016-03-18 16:23:56.000000000 +0100 +++ new/config/ppc64/default 2016-04-14 10:44:07.000000000 +0200 @@ -3135,7 +3135,11 @@ CONFIG_SERIAL_8250_PCI=y CONFIG_SERIAL_8250_NR_UARTS=4 CONFIG_SERIAL_8250_RUNTIME_UARTS=4 -# CONFIG_SERIAL_8250_EXTENDED is not set +CONFIG_SERIAL_8250_EXTENDED=y +# CONFIG_SERIAL_8250_MANY_PORTS is not set +CONFIG_SERIAL_8250_SHARE_IRQ=y +# CONFIG_SERIAL_8250_DETECT_IRQ is not set +# CONFIG_SERIAL_8250_RSA is not set CONFIG_SERIAL_8250_FSL=y CONFIG_SERIAL_8250_DW=m # CONFIG_SERIAL_8250_RT288X is not set diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/config/ppc64/vanilla new/config/ppc64/vanilla --- old/config/ppc64/vanilla 2016-03-18 16:23:56.000000000 +0100 +++ new/config/ppc64/vanilla 2016-04-14 10:44:07.000000000 +0200 @@ -3130,7 +3130,11 @@ CONFIG_SERIAL_8250_PCI=y CONFIG_SERIAL_8250_NR_UARTS=4 CONFIG_SERIAL_8250_RUNTIME_UARTS=4 -# CONFIG_SERIAL_8250_EXTENDED is not set +CONFIG_SERIAL_8250_EXTENDED=y +# CONFIG_SERIAL_8250_MANY_PORTS is not set +CONFIG_SERIAL_8250_SHARE_IRQ=y +# CONFIG_SERIAL_8250_DETECT_IRQ is not set +# CONFIG_SERIAL_8250_RSA is not set CONFIG_SERIAL_8250_FSL=y CONFIG_SERIAL_8250_DW=m # CONFIG_SERIAL_8250_RT288X is not set diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/config/ppc64le/debug new/config/ppc64le/debug --- old/config/ppc64le/debug 2016-03-18 16:23:56.000000000 +0100 +++ new/config/ppc64le/debug 2016-04-14 10:44:07.000000000 +0200 @@ -3025,7 +3025,11 @@ CONFIG_SERIAL_8250_PCI=y CONFIG_SERIAL_8250_NR_UARTS=4 CONFIG_SERIAL_8250_RUNTIME_UARTS=4 -# CONFIG_SERIAL_8250_EXTENDED is not set +CONFIG_SERIAL_8250_EXTENDED=y +# CONFIG_SERIAL_8250_MANY_PORTS is not set +CONFIG_SERIAL_8250_SHARE_IRQ=y +# CONFIG_SERIAL_8250_DETECT_IRQ is not set +# CONFIG_SERIAL_8250_RSA is not set CONFIG_SERIAL_8250_FSL=y CONFIG_SERIAL_8250_DW=m # CONFIG_SERIAL_8250_RT288X is not set diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/config/ppc64le/default new/config/ppc64le/default --- old/config/ppc64le/default 2016-03-18 16:23:56.000000000 +0100 +++ new/config/ppc64le/default 2016-04-14 10:44:07.000000000 +0200 @@ -3014,7 +3014,11 @@ CONFIG_SERIAL_8250_PCI=y CONFIG_SERIAL_8250_NR_UARTS=4 CONFIG_SERIAL_8250_RUNTIME_UARTS=4 -# CONFIG_SERIAL_8250_EXTENDED is not set +CONFIG_SERIAL_8250_EXTENDED=y +# CONFIG_SERIAL_8250_MANY_PORTS is not set +CONFIG_SERIAL_8250_SHARE_IRQ=y +# CONFIG_SERIAL_8250_DETECT_IRQ is not set +# CONFIG_SERIAL_8250_RSA is not set CONFIG_SERIAL_8250_FSL=y CONFIG_SERIAL_8250_DW=m # CONFIG_SERIAL_8250_RT288X is not set diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/config/ppc64le/vanilla new/config/ppc64le/vanilla --- old/config/ppc64le/vanilla 2016-03-18 16:23:56.000000000 +0100 +++ new/config/ppc64le/vanilla 2016-04-14 10:44:07.000000000 +0200 @@ -3011,7 +3011,11 @@ CONFIG_SERIAL_8250_PCI=y CONFIG_SERIAL_8250_NR_UARTS=4 CONFIG_SERIAL_8250_RUNTIME_UARTS=4 -# CONFIG_SERIAL_8250_EXTENDED is not set +CONFIG_SERIAL_8250_EXTENDED=y +# CONFIG_SERIAL_8250_MANY_PORTS is not set +CONFIG_SERIAL_8250_SHARE_IRQ=y +# CONFIG_SERIAL_8250_DETECT_IRQ is not set +# CONFIG_SERIAL_8250_RSA is not set CONFIG_SERIAL_8250_FSL=y CONFIG_SERIAL_8250_DW=m # CONFIG_SERIAL_8250_RT288X is not set diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/config/x86_64/debug new/config/x86_64/debug --- old/config/x86_64/debug 2016-03-18 16:23:56.000000000 +0100 +++ new/config/x86_64/debug 2016-04-14 10:44:07.000000000 +0200 @@ -3586,7 +3586,11 @@ CONFIG_SERIAL_8250_CS=m CONFIG_SERIAL_8250_NR_UARTS=32 CONFIG_SERIAL_8250_RUNTIME_UARTS=32 -# CONFIG_SERIAL_8250_EXTENDED is not set +CONFIG_SERIAL_8250_EXTENDED=y +# CONFIG_SERIAL_8250_MANY_PORTS is not set +CONFIG_SERIAL_8250_SHARE_IRQ=y +# CONFIG_SERIAL_8250_DETECT_IRQ is not set +# CONFIG_SERIAL_8250_RSA is not set # CONFIG_SERIAL_8250_FSL is not set CONFIG_SERIAL_8250_DW=m # CONFIG_SERIAL_8250_RT288X is not set diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/config/x86_64/default new/config/x86_64/default --- old/config/x86_64/default 2016-03-18 16:23:56.000000000 +0100 +++ new/config/x86_64/default 2016-04-14 10:44:07.000000000 +0200 @@ -3572,7 +3572,11 @@ CONFIG_SERIAL_8250_CS=m CONFIG_SERIAL_8250_NR_UARTS=32 CONFIG_SERIAL_8250_RUNTIME_UARTS=32 -# CONFIG_SERIAL_8250_EXTENDED is not set +CONFIG_SERIAL_8250_EXTENDED=y +# CONFIG_SERIAL_8250_MANY_PORTS is not set +CONFIG_SERIAL_8250_SHARE_IRQ=y +# CONFIG_SERIAL_8250_DETECT_IRQ is not set +# CONFIG_SERIAL_8250_RSA is not set # CONFIG_SERIAL_8250_FSL is not set CONFIG_SERIAL_8250_DW=m # CONFIG_SERIAL_8250_RT288X is not set diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/config/x86_64/vanilla new/config/x86_64/vanilla --- old/config/x86_64/vanilla 2016-03-18 16:23:56.000000000 +0100 +++ new/config/x86_64/vanilla 2016-04-14 10:44:07.000000000 +0200 @@ -3569,7 +3569,11 @@ CONFIG_SERIAL_8250_CS=m CONFIG_SERIAL_8250_NR_UARTS=32 CONFIG_SERIAL_8250_RUNTIME_UARTS=32 -# CONFIG_SERIAL_8250_EXTENDED is not set +CONFIG_SERIAL_8250_EXTENDED=y +# CONFIG_SERIAL_8250_MANY_PORTS is not set +CONFIG_SERIAL_8250_SHARE_IRQ=y +# CONFIG_SERIAL_8250_DETECT_IRQ is not set +# CONFIG_SERIAL_8250_RSA is not set # CONFIG_SERIAL_8250_FSL is not set CONFIG_SERIAL_8250_DW=m # CONFIG_SERIAL_8250_RT288X is not set ++++++ find-requires ++++++ #!/bin/bash # # Generate dependencies for KMPs defined in supported.conf. We look at each # modules 'depends' field in modinfo and use the $name-kmp-modules lists # in builddir to map dependencies to package names. We do it this way instead # of relying on the ksym() dependencies, because KMPs built from the kernel # spec file are not shared among kernel versions. package_name=$1 version_release=$2 builddir=$3 trap 'rm -f "$filelist"' EXIT filelist=$(mktemp -t ${0##*/}.XXXXXXXXXX) cat >"$filelist" # is this module part of any KMP? in_kmp() { local mod=${1//[-_]/[-_]} res for f in "$builddir"/*-kmp-modules; do if grep -q "/$mod\$" "$f"; then res=${f##*/} echo "${res%-modules}" fi done } grep '\.ko$' "$filelist" | while read f; do mod=${f##*/} kmp=$(in_kmp "$mod") if test -z "$kmp"; then continue fi for dep in $(IFS=,; set -- $(/sbin/modinfo -F depends "$f"); echo $*); do kmp2=$(in_kmp "$dep.ko") if test -n "$kmp2" -a "$kmp2" != "$kmp"; then # Needs another KMP echo "$kmp2-${package_name#kernel-} = $version_release" fi done done /usr/lib/rpm/find-requires "$package_name" <"$filelist" ++++++ kernel-binary.spec.in ++++++ --- /var/tmp/diff_new_pack.e0T37a/_old 2016-04-28 16:52:52.000000000 +0200 +++ /var/tmp/diff_new_pack.e0T37a/_new 2016-04-28 16:52:52.000000000 +0200 @@ -79,6 +79,8 @@ # Used to sign the kernel in the buildservice BuildRequires: openssl BuildRequires: pesign-obs-integration +# for objtool +BuildRequires: libelf-devel Provides: %name = %version-%source_rel # bnc#901925 Provides: %name-%version-%source_rel @@ -227,8 +229,12 @@ %obsolete_kmp xen 4.6.1 # Provide the exported symbols as "ksym(symbol) = hash" +%define _use_internal_dependency_generator 0 %define __find_provides %_sourcedir/find-provides %name +# Generate dependencies for KMPs defined in supported.conf +%define __find_requires %_sourcedir/find-requires %name %version-%release %my_builddir + # Will modules not listed in supported.conf abort the kernel build (0/1)? %define supported_modules_check 0 @@ -258,15 +264,11 @@ # Generate a list of modules with their support status marking %_sourcedir/guards --list --with-guards <%_sourcedir/supported.conf | \ awk ' - /^\+(base|yes) / { - print $(NF); - next; - } - /^\+external / { + /\+external / { print $(NF) " external"; next; } - /^[-+]/ { + /^-/ { print $(NF) " no"; next; } @@ -274,8 +276,11 @@ print $(NF); } ' >%kernel_build_dir/Module.supported -%_sourcedir/guards --default=0 base < %_sourcedir/supported.conf | \ - sed 's,.*/,,; s,\.ko$,,' | sort -u >%kernel_build_dir/Module.base +for package in base @KMPS@; do + %_sourcedir/guards --default=0 "$package" \ + <%_sourcedir/supported.conf | sed 's,.*/,,; s,\.ko$,,' | \ + sort -u >%kernel_build_dir/Module."$package" +done cd linux-%srcversion @@ -640,7 +645,7 @@ %if %split_base %_sourcedir/split-modules -d %buildroot \ -o %my_builddir \ - -b %kernel_build_dir/Module.base \ + -b %kernel_build_dir \ %if %CONFIG_SUSE_KERNEL_SUPPORTED == "y" -e \ %endif @@ -785,6 +790,11 @@ %if %split_extra add_dirs_to_filelist %my_builddir/unsupported-modules > %my_builddir/kernel-extra.files %endif +for f in %my_builddir/*-kmp-modules; do + f2=${f%%-modules}.files + add_dirs_to_filelist "$f" >"$f2" +done + # Hardlink duplicate files automatically (from package fdupes): It doesn't save # much, but it keeps rpmlint from breaking the package build. Note that we skip @@ -943,4 +953,66 @@ %endif %endif +%if %CONFIG_MODULES == "y" && %CONFIG_SUSE_KERNEL_SUPPORTED == "y" +%package kgraft +Summary: Metapackage to pull in matching kgraft-patch package +Group: System/Kernel +Requires: kgraft-patch-%(echo %version-%source_rel | sed 'y/\./_/')-%build_flavor +Provides: multiversion(kernel) + +%description kgraft +This is a metapackage that pulls in the matching kgraft-patch package for a +given kernel version. The advantage of the metapackage is that its name is +static, unlike the kgraft-patch-<kernel-version>-flavor package names. + +%files kgraft +# rpmlint complains about empty packages, so lets own something +%defattr(-, root, root) +%dir /lib/modules/%kernelrelease-%build_flavor +%endif + +%if %split_base +# BEGIN KMP +%package -n @KMP_NAME@-%build_flavor +Summary: @KMP_SUMMARY@ +Group: System/Kernel +Requires: %name = %version-%release +Provides: multiversion(kernel) +# tell weak-modules2 to ignore this package +Provides: kmp_in_kernel +Requires(post): suse-module-tools >= 12.4 + +%description -n @KMP_NAME@-%build_flavor +@KMP_DESCRIPTION@ + +%post -n @KMP_NAME@-%build_flavor +wm2=/usr/lib/module-init-tools/weak-modules2 +nvr=@KMP_NAME@-%build_flavor-%version-%release +if test -x "$wm2"; then + rpm -ql "$nvr" | INITRD_IN_POSTTRANS=1 /bin/bash -${-/e/} "$wm2" \ + --add-kernel-modules %kernelrelease-%build_flavor +fi + +%posttrans -n @KMP_NAME@-%build_flavor +%{?regenerate_initrd_posttrans} + +%preun -n @KMP_NAME@-%build_flavor +nvr=@KMP_NAME@-%build_flavor-%version-%release +rpm -ql "$nvr" | grep '\.ko$' > "/var/run/rpm-$nvr-modules" + +%postun -n @KMP_NAME@-%build_flavor +wm2=/usr/lib/module-init-tools/weak-modules2 +nvr=@KMP_NAME@-%build_flavor-%version-%release +if test -x "$wm2"; then + /bin/bash -${-/e/} "$wm2" < "/var/run/rpm-$nvr-modules" \ + --remove-kernel-modules %kernelrelease-%build_flavor +fi +rm -f "/var/run/rpm-$nvr-modules" + +%files -n @KMP_NAME@-%build_flavor -f @[email protected] +%defattr(-, root, root) + +# END KMP +%endif + %changelog ++++++ kernel-module-subpackage ++++++ --- /var/tmp/diff_new_pack.e0T37a/_old 2016-04-28 16:52:53.000000000 +0200 +++ /var/tmp/diff_new_pack.e0T37a/_new 2016-04-28 16:52:53.000000000 +0200 @@ -27,19 +27,19 @@ %{-c:Requires: %{-n*}-ueficert} Enhances: kernel-%1 %if %1 == "default" -Obsoletes: %{-n*}-trace +Obsoletes: %{-n*}-kmp-trace %ifarch %ix86 -Obsoletes: %{-n*}-vmi +Obsoletes: %{-n*}-kmp-vmi %endif %ifarch x86_64 -Obsoletes: %{-n*}-desktop +Obsoletes: %{-n*}-kmp-desktop %endif %ifarch %ix86 x86_64 -Obsoletes: %{-n*}-xen +Obsoletes: %{-n*}-kmp-xen %endif %endif %if %1 == "pae" -Obsoletes: %{-n*}-desktop +Obsoletes: %{-n*}-kmp-desktop %endif AutoReqProv: on %{-p:%{expand:%(cd %_sourcedir; cat %{-p*})}} ++++++ kernel-obs-build.spec.in ++++++ --- /var/tmp/diff_new_pack.e0T37a/_old 2016-04-28 16:52:53.000000000 +0200 +++ /var/tmp/diff_new_pack.e0T37a/_new 2016-04-28 16:52:53.000000000 +0200 @@ -103,7 +103,7 @@ # a longer list to have them also available for qemu cross builds where x86_64 kernel runs in eg. arm env. # this list of modules where available on build workers of build.opensuse.org, so we stay compatible. -export KERNEL_MODULES="loop dm-mod dm-snapshot binfmt-misc fuse kqemu squashfs ext2 ext3 ext4 reiserfs btrfs nf_conntrack_ipv6 binfmt_misc virtio_pci virtio_mmio virtio_blk virtio_rng fat vfat nls_cp437 nls_iso8859-1 ibmvscsi sd_mod" +export KERNEL_MODULES="loop dm-mod dm-snapshot binfmt-misc fuse kqemu squashfs ext2 ext3 ext4 reiserfs btrfs nf_conntrack_ipv6 binfmt_misc virtio_pci virtio_mmio virtio_blk virtio_rng fat vfat nls_cp437 nls_iso8859-1 ibmvscsi sd_mod e1000 ibmveth" # manually load all modules to make sure they're available for i in $KERNEL_MODULES; do ++++++ kernel-source.rpmlintrc ++++++ --- /var/tmp/diff_new_pack.e0T37a/_old 2016-04-28 16:52:53.000000000 +0200 +++ /var/tmp/diff_new_pack.e0T37a/_new 2016-04-28 16:52:53.000000000 +0200 @@ -9,3 +9,7 @@ addFilter("hidden-file-or-dir /usr/src/linux-.*-obj/.*/.config") addFilter("hidden-file-or-dir /usr/src/linux-.*-obj/.*/.kernel-binary.spec.buildenv") addFilter("hidden-file-or-dir /boot/\..*\.hmac") +# This check ensures that KMPs are built using the %kernel_module_package +# macro, but we are deliberately not doing this for KMPs built from the +# kernel spec file (fate#319339) +addFilter("suse-policy-kmp-missing-supplements") ++++++ kernel-source.spec.in ++++++ --- /var/tmp/diff_new_pack.e0T37a/_old 2016-04-28 16:52:53.000000000 +0200 +++ /var/tmp/diff_new_pack.e0T37a/_new 2016-04-28 16:52:53.000000000 +0200 @@ -67,8 +67,9 @@ Source39: config-options.changes.txt Source40: source-timestamp Source44: find-provides -Source45: split-modules -Source46: modversions +Source45: find-requires +Source46: split-modules +Source47: modversions Source48: macros.kernel-source Source49: kernel-module-subpackage Source50: kabi.pl ++++++ mkspec ++++++ --- /var/tmp/diff_new_pack.e0T37a/_old 2016-04-28 16:52:53.000000000 +0200 +++ /var/tmp/diff_new_pack.e0T37a/_new 2016-04-28 16:52:53.000000000 +0200 @@ -23,6 +23,8 @@ # template name -> template body my %templates = read_spec_templates(); +my @kmps = read_kmps(); + # config.sh variables my %vars = parse_config_sh(); my ($srcversion, $variant, $vanilla_only) = @@ -88,6 +90,23 @@ ); # binary spec files +my $kmp_definitions = ""; +for my $kmp (@kmps) { + my ($summary, $description); + if (!exists($binary_descriptions{$kmp})) { + print STDERR "warning: no description for $kmp found\n"; + ($summary = $kmp) =~ s/-kmp$//; + $summary .= " kernel modules"; + $description = "$summary."; + } else { + $summary = $binary_descriptions{$kmp}->[0]; + $description = $binary_descriptions{$kmp}->[1]; + } + $kmp_definitions .= expand_template("kmp", + KMP_NAME => $kmp, + KMP_SUMMARY => $summary, + KMP_DESCRIPTION => $description); +} for my $flavor (sort keys(%flavor_archs)) { my ($summary, $description); if (!exists($binary_descriptions{"kernel-$flavor"})) { @@ -112,6 +131,8 @@ DESCRIPTION => $description, ARCHS => join(" ", arch2rpm(@{$flavor_archs{$flavor}})), COMMON_DEPS => $templates{common_deps}, + KMPS => join(" ", @kmps), + KMP_DEFINITIONS => $kmp_definitions, %obsolete_macros ); } @@ -216,6 +237,12 @@ print STDERR "warning: Expected # BEGIN COMMON DEPS in kernel-binary.spec.in\n"; $res{common_deps} = ""; } + if ($res{$template} =~ s/^# BEGIN KMP\n?(.*)^# END KMP/\@KMP_DEFINITIONS\@/ms) { + $res{kmp} = $1; + } else { + print STDERR "warning: Expected # BEGIN KMP in kernel-binary.spec.in\n"; + $res{kmp} = ""; + } } { xopen(my $fh, '<', "$dir/constraints.in"); @@ -290,6 +317,24 @@ return %res; } +sub read_kmps { + my %res; + + open(my $fh, '-|', "$dir/guards", "--list", "--with-guards", + "-c", "$dir/supported.conf") or die "Error running guards: $!\n"; + while (<$fh>) { + my @guards = split(' '); + pop(@guards); + for my $g (@guards) { + if ($g =~ /^\+(.*-kmp)$/) { + $res{$1} = 1; + } + } + } + close($fh) or die "Error running guards: $!\n"; + return sort(keys(%res)); +} + sub parse_old_flavors{ my %res; @@ -394,9 +439,8 @@ return $commit; } -sub do_spec { +sub expand_template { my $template = shift; - my $specfile = shift; my %macros = @_; my $text = $templates{$template}; @@ -407,6 +451,15 @@ $text =~ s/\@$m\@/$macros{$m}/g; } } while ($prev_text ne $text); + return $text; +} + +sub do_spec { + my $template = shift; + my $specfile = shift; + my %macros = @_; + + my $text = expand_template($template, %macros); print "$specfile\n"; xopen(my $fh, '>', "$dir/$specfile"); print $fh $text; ++++++ patches.arch.tar.bz2 ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/patches.arch/ACPI-processor-Request-native-thermal-interrupt-hand new/patches.arch/ACPI-processor-Request-native-thermal-interrupt-hand --- old/patches.arch/ACPI-processor-Request-native-thermal-interrupt-hand 1970-01-01 01:00:00.000000000 +0100 +++ new/patches.arch/ACPI-processor-Request-native-thermal-interrupt-hand 2016-04-15 12:59:32.000000000 +0200 @@ -0,0 +1,163 @@ +From a21211672c9a1d730a39aa65d4a5b3414700adfb Mon Sep 17 00:00:00 2001 +From: Srinivas Pandruvada <[email protected]> +Date: Wed, 23 Mar 2016 21:07:39 -0700 +Subject: [PATCH] ACPI / processor: Request native thermal interrupt handling via _OSC +Patch-mainline: 4.6-rc2 +Git-commit: a21211672c9a1d730a39aa65d4a5b3414700adfb +References: bsc#969870 + +There are several reports of freeze on enabling HWP (Hardware PStates) +feature on Skylake-based systems by the Intel P-states driver. The root +cause is identified as the HWP interrupts causing BIOS code to freeze. + +HWP interrupts use the thermal LVT which can be handled by Linux +natively, but on the affected Skylake-based systems SMM will respond +to it by default. This is a problem for several reasons: + - On the affected systems the SMM thermal LVT handler is broken (it + will crash when invoked) and a BIOS update is necessary to fix it. + - With thermal interrupt handled in SMM we lose all of the reporting + features of the arch/x86/kernel/cpu/mcheck/therm_throt driver. + - Some thermal drivers like x86-package-temp depend on the thermal + threshold interrupts signaled via the thermal LVT. + - The HWP interrupts are useful for debugging and tuning + performance (if the kernel can handle them). +The native handling of thermal interrupts needs to be enabled +because of that. + +This requires some way to tell SMM that the OS can handle thermal +interrupts. That can be done by using _OSC/_PDC in processor +scope very early during ACPI initialization. + +The meaning of _OSC/_PDC bit 12 in processor scope is whether or +not the OS supports native handling of interrupts for Collaborative +Processor Performance Control (CPPC) notifications. Since on +HWP-capable systems CPPC is a firmware interface to HWP, setting +this bit effectively tells the firmware that the OS will handle +thermal interrupts natively going forward. + +For details on _OSC/_PDC refer to: +http://www.intel.com/content/www/us/en/standards/processor-vendor-specific-acpi-specification.html + +To implement the _OSC/_PDC handshake as described, introduce a new +function, acpi_early_processor_osc(), that walks the ACPI +namespace looking for ACPI processor objects and invokes _OSC for +them with bit 12 in the capabilities buffer set and terminates the +namespace walk on the first success. + +Also modify intel_thermal_interrupt() to clear HWP status bits in +the HWP_STATUS MSR to acknowledge HWP interrupts (which prevents +them from firing continuously). + +Signed-off-by: Srinivas Pandruvada <[email protected]> +[ rjw: Subject & changelog, function rename ] + +Signed-off-by: Rafael J. Wysocki <[email protected]> +Acked-by: Takashi Iwai <[email protected]> + +--- + arch/x86/kernel/cpu/mcheck/therm_throt.c | 3 + + drivers/acpi/acpi_processor.c | 52 +++++++++++++++++++++++++++++++ + drivers/acpi/bus.c | 3 + + drivers/acpi/internal.h | 6 +++ + 4 files changed, 64 insertions(+) + +--- a/arch/x86/kernel/cpu/mcheck/therm_throt.c ++++ b/arch/x86/kernel/cpu/mcheck/therm_throt.c +@@ -385,6 +385,9 @@ static void intel_thermal_interrupt(void + { + __u64 msr_val; + ++ if (static_cpu_has(X86_FEATURE_HWP)) ++ wrmsrl_safe(MSR_HWP_STATUS, 0); ++ + rdmsrl(MSR_IA32_THERM_STATUS, msr_val); + + /* Check for violation of core thermal thresholds*/ +--- a/drivers/acpi/acpi_processor.c ++++ b/drivers/acpi/acpi_processor.c +@@ -491,6 +491,58 @@ static void acpi_processor_remove(struct + } + #endif /* CONFIG_ACPI_HOTPLUG_CPU */ + ++#ifdef CONFIG_X86 ++static bool acpi_hwp_native_thermal_lvt_set; ++static acpi_status __init acpi_hwp_native_thermal_lvt_osc(acpi_handle handle, ++ u32 lvl, ++ void *context, ++ void **rv) ++{ ++ u8 sb_uuid_str[] = "4077A616-290C-47BE-9EBD-D87058713953"; ++ u32 capbuf[2]; ++ struct acpi_osc_context osc_context = { ++ .uuid_str = sb_uuid_str, ++ .rev = 1, ++ .cap.length = 8, ++ .cap.pointer = capbuf, ++ }; ++ ++ if (acpi_hwp_native_thermal_lvt_set) ++ return AE_CTRL_TERMINATE; ++ ++ capbuf[0] = 0x0000; ++ capbuf[1] = 0x1000; /* set bit 12 */ ++ ++ if (ACPI_SUCCESS(acpi_run_osc(handle, &osc_context))) { ++ if (osc_context.ret.pointer && osc_context.ret.length > 1) { ++ u32 *capbuf_ret = osc_context.ret.pointer; ++ ++ if (capbuf_ret[1] & 0x1000) { ++ acpi_handle_info(handle, ++ "_OSC native thermal LVT Acked\n"); ++ acpi_hwp_native_thermal_lvt_set = true; ++ } ++ } ++ kfree(osc_context.ret.pointer); ++ } ++ ++ return AE_OK; ++} ++ ++void __init acpi_early_processor_osc(void) ++{ ++ if (boot_cpu_has(X86_FEATURE_HWP)) { ++ acpi_walk_namespace(ACPI_TYPE_PROCESSOR, ACPI_ROOT_OBJECT, ++ ACPI_UINT32_MAX, ++ acpi_hwp_native_thermal_lvt_osc, ++ NULL, NULL, NULL); ++ acpi_get_devices(ACPI_PROCESSOR_DEVICE_HID, ++ acpi_hwp_native_thermal_lvt_osc, ++ NULL, NULL); ++ } ++} ++#endif ++ + /* + * The following ACPI IDs are known to be suitable for representing as + * processor devices. +--- a/drivers/acpi/bus.c ++++ b/drivers/acpi/bus.c +@@ -1005,6 +1005,9 @@ static int __init acpi_bus_init(void) + goto error1; + } + ++ /* Set capability bits for _OSC under processor scope */ ++ acpi_early_processor_osc(); ++ + /* + * _OSC method may exist in module level code, + * so it must be run after ACPI_FULL_INITIALIZATION +--- a/drivers/acpi/internal.h ++++ b/drivers/acpi/internal.h +@@ -138,6 +138,12 @@ void acpi_early_processor_set_pdc(void); + static inline void acpi_early_processor_set_pdc(void) {} + #endif + ++#ifdef CONFIG_X86 ++void acpi_early_processor_osc(void); ++#else ++static inline void acpi_early_processor_osc(void) {} ++#endif ++ + /* -------------------------------------------------------------------------- + Embedded Controller + -------------------------------------------------------------------------- */ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/patches.arch/arm64-kvm-fix-hrtimer.patch new/patches.arch/arm64-kvm-fix-hrtimer.patch --- old/patches.arch/arm64-kvm-fix-hrtimer.patch 1970-01-01 01:00:00.000000000 +0100 +++ new/patches.arch/arm64-kvm-fix-hrtimer.patch 2016-04-15 12:59:32.000000000 +0200 @@ -0,0 +1,116 @@ +From: Marc Zyngier <[email protected]> +Subject: [PATCH] KVM: arm/arm64: Handle forward time correction gracefully +Date: Wed, 6 Apr 2016 09:37:22 +0100 +Message-Id: <[email protected]> +Patch-mainline: 4.6-rc2 +Git-commit: 1c5631c73fc2261a5df64a72c155cb53dcdc0c45 +Reference: bnc#974266 + +On a host that runs NTP, corrections can have a direct impact on +the background timer that we program on the behalf of a vcpu. + +In particular, NTP performing a forward correction will result in +a timer expiring sooner than expected from a guest point of view. +Not a big deal, we kick the vcpu anyway. + +But on wake-up, the vcpu thread is going to perform a check to +find out whether or not it should block. And at that point, the +timer check is going to say "timer has not expired yet, go back +to sleep". This results in the timer event being lost forever. + +There are multiple ways to handle this. One would be record that +the timer has expired and let kvm_cpu_has_pending_timer return +true in that case, but that would be fairly invasive. Another is +to check for the "short sleep" condition in the hrtimer callback, +and restart the timer for the remaining time when the condition +is detected. + +This patch implements the latter, with a bit of refactoring in +order to avoid too much code duplication. + +Reported-by: Alexander Graf <[email protected]> +Signed-off-by: Marc Zyngier <[email protected]> +Signed-off-by: Alexander Graf <[email protected]> +--- + virt/kvm/arm/arch_timer.c | 47 +++++++++++++++++++++++++++++++++++++---------- + 1 file changed, 37 insertions(+), 10 deletions(-) + +diff --git a/virt/kvm/arm/arch_timer.c b/virt/kvm/arm/arch_timer.c +index a9ad4fe..4d0e77a 100644 +--- a/virt/kvm/arm/arch_timer.c ++++ b/virt/kvm/arm/arch_timer.c +@@ -98,10 +98,46 @@ static void kvm_timer_inject_irq_work(struct work_struct *work) + kvm_vcpu_kick(vcpu); + } + ++static u64 kvm_timer_compute_delta(struct kvm_vcpu *vcpu) ++{ ++ cycle_t cval, now; ++ ++ cval = vcpu->arch.timer_cpu.cntv_cval; ++ now = kvm_phys_timer_read() - vcpu->kvm->arch.timer.cntvoff; ++ ++ if (now < cval) { ++ u64 ns; ++ ++ ns = cyclecounter_cyc2ns(timecounter->cc, ++ cval - now, ++ timecounter->mask, ++ &timecounter->frac); ++ return ns; ++ } ++ ++ return 0; ++} ++ + static enum hrtimer_restart kvm_timer_expire(struct hrtimer *hrt) + { + struct arch_timer_cpu *timer; ++ struct kvm_vcpu *vcpu; ++ u64 ns; ++ + timer = container_of(hrt, struct arch_timer_cpu, timer); ++ vcpu = container_of(timer, struct kvm_vcpu, arch.timer_cpu); ++ ++ /* ++ * Check that the timer has really expired from the guest's ++ * PoV (NTP on the host may have forced it to expire ++ * early). If we should have slept longer, restart it. ++ */ ++ ns = kvm_timer_compute_delta(vcpu); ++ if (unlikely(ns)) { ++ hrtimer_forward_now(hrt, ns_to_ktime(ns)); ++ return HRTIMER_RESTART; ++ } ++ + queue_work(wqueue, &timer->expired); + return HRTIMER_NORESTART; + } +@@ -176,8 +212,6 @@ static int kvm_timer_update_state(struct kvm_vcpu *vcpu) + void kvm_timer_schedule(struct kvm_vcpu *vcpu) + { + struct arch_timer_cpu *timer = &vcpu->arch.timer_cpu; +- u64 ns; +- cycle_t cval, now; + + BUG_ON(timer_is_armed(timer)); + +@@ -197,14 +231,7 @@ void kvm_timer_schedule(struct kvm_vcpu *vcpu) + return; + + /* The timer has not yet expired, schedule a background timer */ +- cval = timer->cntv_cval; +- now = kvm_phys_timer_read() - vcpu->kvm->arch.timer.cntvoff; +- +- ns = cyclecounter_cyc2ns(timecounter->cc, +- cval - now, +- timecounter->mask, +- &timecounter->frac); +- timer_arm(timer, ns); ++ timer_arm(timer, kvm_timer_compute_delta(vcpu)); + } + + void kvm_timer_unschedule(struct kvm_vcpu *vcpu) +-- +2.1.4 + diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/patches.arch/intel_idle-prevent-SKL-H-boot-failure-when-C8-C9-C10 new/patches.arch/intel_idle-prevent-SKL-H-boot-failure-when-C8-C9-C10 --- old/patches.arch/intel_idle-prevent-SKL-H-boot-failure-when-C8-C9-C10 2016-03-28 09:27:57.000000000 +0200 +++ new/patches.arch/intel_idle-prevent-SKL-H-boot-failure-when-C8-C9-C10 1970-01-01 01:00:00.000000000 +0100 @@ -1,167 +0,0 @@ -From d70e28f57e14a481977436695b0c9ba165472431 Mon Sep 17 00:00:00 2001 -From: Len Brown <[email protected]> -Date: Sun, 13 Mar 2016 00:33:48 -0500 -Subject: [PATCH] intel_idle: prevent SKL-H boot failure when C8+C9+C10 enabled -Git-commit: d70e28f57e14a481977436695b0c9ba165472431 -Patch-mainline: 4.6-rc1 -References: bsc#969870,boo#970968,boo#969098 - -Some SKL-H configurations require "intel_idle.max_cstate=7" to boot. -While that is an effective workaround, it disables C10. - -This patch detects the problematic configuration, -and disables C8 and C9, keeping C10 enabled. - -Note that enabling SGX in BIOS SETUP can also prevent this issue, -if the system BIOS provides that option. - -https://bugzilla.kernel.org/show_bug.cgi?id=109081 -"Freezes with Intel i7 6700HQ (Skylake), unless intel_idle.max_cstate=7" - -Signed-off-by: Len Brown <[email protected]> -Cc: [email protected] -Acked-by: Takashi Iwai <[email protected]> - ---- - drivers/idle/intel_idle.c | 106 ++++++++++++++++++++++++++++++++++++---------- - 1 file changed, 85 insertions(+), 21 deletions(-) - ---- a/drivers/idle/intel_idle.c -+++ b/drivers/idle/intel_idle.c -@@ -65,7 +65,7 @@ - #include <asm/mwait.h> - #include <asm/msr.h> - --#define INTEL_IDLE_VERSION "0.4" -+#define INTEL_IDLE_VERSION "0.4.1" - #define PREFIX "intel_idle: " - - static struct cpuidle_driver intel_idle_driver = { -@@ -994,36 +994,92 @@ static void intel_idle_cpuidle_devices_u - } - - /* -- * intel_idle_state_table_update() -- * -- * Update the default state_table for this CPU-id -+ * ivt_idle_state_table_update(void) - * -- * Currently used to access tuned IVT multi-socket targets -+ * Tune IVT multi-socket targets - * Assumption: num_sockets == (max_package_num + 1) - */ --void intel_idle_state_table_update(void) -+static void ivt_idle_state_table_update(void) - { - /* IVT uses a different table for 1-2, 3-4, and > 4 sockets */ -- if (boot_cpu_data.x86_model == 0x3e) { /* IVT */ -- int cpu, package_num, num_sockets = 1; -+ int cpu, package_num, num_sockets = 1; - -- for_each_online_cpu(cpu) { -- package_num = topology_physical_package_id(cpu); -- if (package_num + 1 > num_sockets) { -- num_sockets = package_num + 1; -- -- if (num_sockets > 4) { -- cpuidle_state_table = ivt_cstates_8s; -- return; -- } -+ for_each_online_cpu(cpu) { -+ package_num = topology_physical_package_id(cpu); -+ if (package_num + 1 > num_sockets) { -+ num_sockets = package_num + 1; -+ -+ if (num_sockets > 4) { -+ cpuidle_state_table = ivt_cstates_8s; -+ return; - } - } -+ } -+ -+ if (num_sockets > 2) -+ cpuidle_state_table = ivt_cstates_4s; -+ -+ /* else, 1 and 2 socket systems use default ivt_cstates */ -+} -+/* -+ * sklh_idle_state_table_update(void) -+ * -+ * On SKL-H (model 0x5e) disable C8 and C9 if: -+ * C10 is enabled and SGX disabled -+ */ -+static void sklh_idle_state_table_update(void) -+{ -+ unsigned long long msr; -+ unsigned int eax, ebx, ecx, edx; -+ -+ -+ /* if PC10 disabled via cmdline intel_idle.max_cstate=7 or shallower */ -+ if (max_cstate <= 7) -+ return; -+ -+ /* if PC10 not present in CPUID.MWAIT.EDX */ -+ if ((mwait_substates & (0xF << 28)) == 0) -+ return; -+ -+ rdmsrl(MSR_NHM_SNB_PKG_CST_CFG_CTL, msr); -+ -+ /* PC10 is not enabled in PKG C-state limit */ -+ if ((msr & 0xF) != 8) -+ return; -+ -+ ecx = 0; -+ cpuid(7, &eax, &ebx, &ecx, &edx); -+ -+ /* if SGX is present */ -+ if (ebx & (1 << 2)) { -+ -+ rdmsrl(MSR_IA32_FEATURE_CONTROL, msr); - -- if (num_sockets > 2) -- cpuidle_state_table = ivt_cstates_4s; -- /* else, 1 and 2 socket systems use default ivt_cstates */ -+ /* if SGX is enabled */ -+ if (msr & (1 << 18)) -+ return; -+ } -+ -+ skl_cstates[5].disabled = 1; /* C8-SKL */ -+ skl_cstates[6].disabled = 1; /* C9-SKL */ -+} -+/* -+ * intel_idle_state_table_update() -+ * -+ * Update the default state_table for this CPU-id -+ */ -+ -+static void intel_idle_state_table_update(void) -+{ -+ switch (boot_cpu_data.x86_model) { -+ -+ case 0x3e: /* IVT */ -+ ivt_idle_state_table_update(); -+ break; -+ case 0x5e: /* SKL-H */ -+ sklh_idle_state_table_update(); -+ break; - } -- return; - } - - /* -@@ -1063,6 +1119,14 @@ static int __init intel_idle_cpuidle_dri - if (num_substates == 0) - continue; - -+ /* if state marked as disabled, skip it */ -+ if (cpuidle_state_table[cstate].disabled != 0) { -+ pr_debug(PREFIX "state %s is disabled", -+ cpuidle_state_table[cstate].name); -+ continue; -+ } -+ -+ - if (((mwait_cstate + 1) > 2) && - !boot_cpu_has(X86_FEATURE_NONSTOP_TSC)) - mark_tsc_unstable("TSC halts in idle" ++++++ patches.drivers.tar.bz2 ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/patches.drivers/ALSA-hda-Don-t-handle-ELD-notify-from-invalid-port new/patches.drivers/ALSA-hda-Don-t-handle-ELD-notify-from-invalid-port --- old/patches.drivers/ALSA-hda-Don-t-handle-ELD-notify-from-invalid-port 2016-03-18 21:35:29.000000000 +0100 +++ new/patches.drivers/ALSA-hda-Don-t-handle-ELD-notify-from-invalid-port 1970-01-01 01:00:00.000000000 +0100 @@ -1,39 +0,0 @@ -From 4f8e4f3537cafc4de128e6bfdf83baa78bc60eb1 Mon Sep 17 00:00:00 2001 -From: Takashi Iwai <[email protected]> -Date: Thu, 10 Mar 2016 12:02:49 +0100 -Subject: [PATCH] ALSA: hda - Don't handle ELD notify from invalid port -Patch-mainline: Queued in subsystem maintainer repository -Git-commit: 4f8e4f3537cafc4de128e6bfdf83baa78bc60eb1 -Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound.git -References: boo#971737 - -The current Intel HDMI codec driver supports only three fixed ports -from port B to port D. However, i915 driver may assign a DP on other -ports, e.g. port A, when no eDP is used. This incompatibility is -caught later at pin_nid_to_pin_index() and results in a warning -message like "HDMI: pin nid 4 not registered" at each time. - -This patch filters out such invalid events beforehand, so that the -kernel won't be too grumbling. - -Reported-by: Stefan Assmann <[email protected]> -Cc: <[email protected]> -Signed-off-by: Takashi Iwai <[email protected]> - ---- - sound/pci/hda/patch_hdmi.c | 4 ++++ - 1 file changed, 4 insertions(+) - ---- a/sound/pci/hda/patch_hdmi.c -+++ b/sound/pci/hda/patch_hdmi.c -@@ -2432,6 +2432,10 @@ static void intel_pin_eld_notify(void *a - struct hda_codec *codec = audio_ptr; - int pin_nid = port + 0x04; - -+ /* we assume only from port-B to port-D */ -+ if (port < 1 || port > 3) -+ return; -+ - /* skip notification during system suspend (but not in runtime PM); - * the state will be updated at resume - */ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/patches.drivers/ALSA-hda-Fix-forgotten-HDMI-monitor_present-update new/patches.drivers/ALSA-hda-Fix-forgotten-HDMI-monitor_present-update --- old/patches.drivers/ALSA-hda-Fix-forgotten-HDMI-monitor_present-update 2016-03-18 21:35:29.000000000 +0100 +++ new/patches.drivers/ALSA-hda-Fix-forgotten-HDMI-monitor_present-update 1970-01-01 01:00:00.000000000 +0100 @@ -1,31 +0,0 @@ -From bd48128539ab89986b24ad08ecd3e027dd1993a1 Mon Sep 17 00:00:00 2001 -From: Takashi Iwai <[email protected]> -Date: Fri, 18 Mar 2016 18:01:53 +0100 -Subject: [PATCH] ALSA: hda - Fix forgotten HDMI monitor_present update -Patch-mainline: Queued in subsystem maintainer repository -Git-commit: bd48128539ab89986b24ad08ecd3e027dd1993a1 -Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound.git -References: boo#971737 - -We forgot to copy monitor_present value when updating the ELD -information. This won't change the ELD retrieval and the jack -notification behavior, but appears only in the proc output. In that -sense, it's no fatal error, but a bug is a bug is a bug. - -Cc: <[email protected]> -Signed-off-by: Takashi Iwai <[email protected]> - ---- - sound/pci/hda/patch_hdmi.c | 1 + - 1 file changed, 1 insertion(+) - ---- a/sound/pci/hda/patch_hdmi.c -+++ b/sound/pci/hda/patch_hdmi.c -@@ -1566,6 +1566,7 @@ static void update_eld(struct hda_codec - eld->eld_size) != 0) - eld_changed = true; - -+ pin_eld->monitor_present = eld->monitor_present; - pin_eld->eld_valid = eld->eld_valid; - pin_eld->eld_size = eld->eld_size; - if (eld->eld_valid) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/patches.drivers/ALSA-hda-Fix-spurious-kernel-WARNING-on-Baytrail-HDM new/patches.drivers/ALSA-hda-Fix-spurious-kernel-WARNING-on-Baytrail-HDM --- old/patches.drivers/ALSA-hda-Fix-spurious-kernel-WARNING-on-Baytrail-HDM 2016-03-18 21:35:29.000000000 +0100 +++ new/patches.drivers/ALSA-hda-Fix-spurious-kernel-WARNING-on-Baytrail-HDM 1970-01-01 01:00:00.000000000 +0100 @@ -1,44 +0,0 @@ -From 93a9ff151754fbdf951b1b993bcf96453f6e36b3 Mon Sep 17 00:00:00 2001 -From: Takashi Iwai <[email protected]> -Date: Fri, 18 Mar 2016 19:45:13 +0100 -Subject: [PATCH] ALSA: hda - Fix spurious kernel WARNING on Baytrail HDMI -Patch-mainline: Queued in subsystem maintainer repository -Git-commit: 93a9ff151754fbdf951b1b993bcf96453f6e36b3 -Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound.git -References: boo#971737 -Mime-version: 1.0 -Content-type: text/plain; charset=UTF-8 -Content-transfer-encoding: 8bit - -snd_hdac_sync_audio_rate() call is mandatory only for HSW and later -models, but we call the function unconditionally blindly assuming that -the function doesn't do anything harmful. But since recently, the -function checks the validity of the passed pin NID, and eventually -spews the warning if an unexpected pin is passed. This is seen on old -chips like Baytrail. - -The fix is to limit the call of this function again only for the chips -with the proper binding. This can be identified by the same flag as -the eld notifier. - -Reported-by: Ville Syrjälä <[email protected]> -Tested-by: Ville Syrjälä <[email protected]> -Cc: <[email protected]> # v4.5 -Signed-off-by: Takashi Iwai <[email protected]> - ---- - sound/pci/hda/patch_hdmi.c | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - ---- a/sound/pci/hda/patch_hdmi.c -+++ b/sound/pci/hda/patch_hdmi.c -@@ -1878,7 +1878,8 @@ static int generic_hdmi_playback_pcm_pre - - /* Call sync_audio_rate to set the N/CTS/M manually if necessary */ - /* Todo: add DP1.2 MST audio support later */ -- snd_hdac_sync_audio_rate(&codec->bus->core, pin_nid, runtime->rate); -+ if (codec_has_acomp(codec)) -+ snd_hdac_sync_audio_rate(&codec->bus->core, pin_nid, runtime->rate); - - non_pcm = check_non_pcm_per_cvt(codec, cvt_nid); - mutex_lock(&per_pin->lock); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/patches.drivers/ALSA-hda-Fix-unexpected-resume-through-regmap-code-p new/patches.drivers/ALSA-hda-Fix-unexpected-resume-through-regmap-code-p --- old/patches.drivers/ALSA-hda-Fix-unexpected-resume-through-regmap-code-p 2016-03-18 21:35:29.000000000 +0100 +++ new/patches.drivers/ALSA-hda-Fix-unexpected-resume-through-regmap-code-p 1970-01-01 01:00:00.000000000 +0100 @@ -1,205 +0,0 @@ -From fc4f000bf8c0cbf38f44de6bd5e225574e572ed4 Mon Sep 17 00:00:00 2001 -From: Takashi Iwai <[email protected]> -Date: Fri, 4 Mar 2016 11:34:18 +0100 -Subject: [PATCH] ALSA: hda - Fix unexpected resume through regmap code path -Git-commit: fc4f000bf8c0cbf38f44de6bd5e225574e572ed4 -Patch-mainline: Queued in subsystem maintainer repository -Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound.git -References: bsc#969383 - -HD-audio driver has a mechanism to trigger the runtime resume -automatically at accessing the verbs. This auto-resume, however, -causes the mutex deadlock when invoked from the regmap handler since -the regmap keeps the mutex while auto-resuming. For avoiding that, -there is some tricky check in the HDA regmap handler to return -EAGAIN -error to back-off when the codec is powered down. Then the caller of -regmap r/w will retry after properly turning on the codec power. - -This works in most cases, but there seems a slight race between the -codec power check and the actual on-demand auto-resume trigger. This -resulted in the lockdep splat, eventually leading to a real deadlock. - -This patch tries to address the race window by getting the runtime PM -refcount at the check time using pm_runtime_get_if_in_use(). With -this call, we can keep the power on only when the codec has been -already turned on, and back off if not. - -For keeping the code consistency, the code touching the runtime PM is -stored in hdac_device.c although it's used only locally in -hdac_regmap.c. - -Reported-by: Jiri Slaby <[email protected]> -Cc: <[email protected]> -Signed-off-by: Takashi Iwai <[email protected]> - ---- - include/sound/hdaudio.h | 2 + - sound/hda/hdac_device.c | 16 +++++++++++ - sound/hda/hdac_regmap.c | 69 ++++++++++++++++++++++++++++++++---------------- - 3 files changed, 64 insertions(+), 23 deletions(-) - ---- a/include/sound/hdaudio.h -+++ b/include/sound/hdaudio.h -@@ -168,11 +168,13 @@ int snd_hdac_power_up(struct hdac_device - int snd_hdac_power_down(struct hdac_device *codec); - int snd_hdac_power_up_pm(struct hdac_device *codec); - int snd_hdac_power_down_pm(struct hdac_device *codec); -+int snd_hdac_keep_power_up(struct hdac_device *codec); - #else - static inline int snd_hdac_power_up(struct hdac_device *codec) { return 0; } - static inline int snd_hdac_power_down(struct hdac_device *codec) { return 0; } - static inline int snd_hdac_power_up_pm(struct hdac_device *codec) { return 0; } - static inline int snd_hdac_power_down_pm(struct hdac_device *codec) { return 0; } -+static inline int snd_hdac_keep_power_up(struct hdac_device *codec) { return 0; } - #endif - - /* ---- a/sound/hda/hdac_device.c -+++ b/sound/hda/hdac_device.c -@@ -611,6 +611,22 @@ int snd_hdac_power_up_pm(struct hdac_dev - } - EXPORT_SYMBOL_GPL(snd_hdac_power_up_pm); - -+/* like snd_hdac_power_up_pm(), but only increment the pm count when -+ * already powered up. Returns -1 if not powered up, 1 if incremented -+ * or 0 if unchanged. Only used in hdac_regmap.c -+ */ -+int snd_hdac_keep_power_up(struct hdac_device *codec) -+{ -+ if (!atomic_inc_not_zero(&codec->in_pm)) { -+ int ret = pm_runtime_get_if_in_use(&codec->dev); -+ if (!ret) -+ return -1; -+ if (ret < 0) -+ return 0; -+ } -+ return 1; -+} -+ - /** - * snd_hdac_power_down_pm - power down the codec - * @codec: the codec object ---- a/sound/hda/hdac_regmap.c -+++ b/sound/hda/hdac_regmap.c -@@ -21,13 +21,16 @@ - #include <sound/hdaudio.h> - #include <sound/hda_regmap.h> - --#ifdef CONFIG_PM --#define codec_is_running(codec) \ -- (atomic_read(&(codec)->in_pm) || \ -- !pm_runtime_suspended(&(codec)->dev)) --#else --#define codec_is_running(codec) true --#endif -+static int codec_pm_lock(struct hdac_device *codec) -+{ -+ return snd_hdac_keep_power_up(codec); -+} -+ -+static void codec_pm_unlock(struct hdac_device *codec, int lock) -+{ -+ if (lock == 1) -+ snd_hdac_power_down_pm(codec); -+} - - #define get_verb(reg) (((reg) >> 8) & 0xfff) - -@@ -238,20 +241,28 @@ static int hda_reg_read(void *context, u - struct hdac_device *codec = context; - int verb = get_verb(reg); - int err; -+ int pm_lock = 0; - -- if (!codec_is_running(codec) && verb != AC_VERB_GET_POWER_STATE) -- return -EAGAIN; -+ if (verb != AC_VERB_GET_POWER_STATE) { -+ pm_lock = codec_pm_lock(codec); -+ if (pm_lock < 0) -+ return -EAGAIN; -+ } - reg |= (codec->addr << 28); -- if (is_stereo_amp_verb(reg)) -- return hda_reg_read_stereo_amp(codec, reg, val); -- if (verb == AC_VERB_GET_PROC_COEF) -- return hda_reg_read_coef(codec, reg, val); -+ if (is_stereo_amp_verb(reg)) { -+ err = hda_reg_read_stereo_amp(codec, reg, val); -+ goto out; -+ } -+ if (verb == AC_VERB_GET_PROC_COEF) { -+ err = hda_reg_read_coef(codec, reg, val); -+ goto out; -+ } - if ((verb & 0x700) == AC_VERB_SET_AMP_GAIN_MUTE) - reg &= ~AC_AMP_FAKE_MUTE; - - err = snd_hdac_exec_verb(codec, reg, 0, val); - if (err < 0) -- return err; -+ goto out; - /* special handling for asymmetric reads */ - if (verb == AC_VERB_GET_POWER_STATE) { - if (*val & AC_PWRST_ERROR) -@@ -259,7 +270,9 @@ static int hda_reg_read(void *context, u - else /* take only the actual state */ - *val = (*val >> 4) & 0x0f; - } -- return 0; -+ out: -+ codec_pm_unlock(codec, pm_lock); -+ return err; - } - - static int hda_reg_write(void *context, unsigned int reg, unsigned int val) -@@ -267,6 +280,7 @@ static int hda_reg_write(void *context, - struct hdac_device *codec = context; - unsigned int verb; - int i, bytes, err; -+ int pm_lock = 0; - - if (codec->caps_overwriting) - return 0; -@@ -275,14 +289,21 @@ static int hda_reg_write(void *context, - reg |= (codec->addr << 28); - verb = get_verb(reg); - -- if (!codec_is_running(codec) && verb != AC_VERB_SET_POWER_STATE) -- return codec->lazy_cache ? 0 : -EAGAIN; -+ if (verb != AC_VERB_SET_POWER_STATE) { -+ pm_lock = codec_pm_lock(codec); -+ if (pm_lock < 0) -+ return codec->lazy_cache ? 0 : -EAGAIN; -+ } - -- if (is_stereo_amp_verb(reg)) -- return hda_reg_write_stereo_amp(codec, reg, val); -+ if (is_stereo_amp_verb(reg)) { -+ err = hda_reg_write_stereo_amp(codec, reg, val); -+ goto out; -+ } - -- if (verb == AC_VERB_SET_PROC_COEF) -- return hda_reg_write_coef(codec, reg, val); -+ if (verb == AC_VERB_SET_PROC_COEF) { -+ err = hda_reg_write_coef(codec, reg, val); -+ goto out; -+ } - - switch (verb & 0xf00) { - case AC_VERB_SET_AMP_GAIN_MUTE: -@@ -319,10 +340,12 @@ static int hda_reg_write(void *context, - reg |= (verb + i) << 8 | ((val >> (8 * i)) & 0xff); - err = snd_hdac_exec_verb(codec, reg, 0, NULL); - if (err < 0) -- return err; -+ goto out; - } - -- return 0; -+ out: -+ codec_pm_unlock(codec, pm_lock); -+ return err; - } - - static const struct regmap_config hda_regmap_cfg = { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/patches.drivers/ALSA-hda-Limit-i915-HDMI-binding-only-for-HSW-and-la new/patches.drivers/ALSA-hda-Limit-i915-HDMI-binding-only-for-HSW-and-la --- old/patches.drivers/ALSA-hda-Limit-i915-HDMI-binding-only-for-HSW-and-la 2016-03-18 21:35:29.000000000 +0100 +++ new/patches.drivers/ALSA-hda-Limit-i915-HDMI-binding-only-for-HSW-and-la 1970-01-01 01:00:00.000000000 +0100 @@ -1,43 +0,0 @@ -From b62232d429fa8b1dcf5d8503aa5a5397a03e646a Mon Sep 17 00:00:00 2001 -From: Takashi Iwai <[email protected]> -Date: Tue, 15 Mar 2016 18:15:26 +0100 -Subject: [PATCH] ALSA: hda - Limit i915 HDMI binding only for HSW and later -Patch-mainline: Queued in subsystem maintainer repository -Git-commit: b62232d429fa8b1dcf5d8503aa5a5397a03e646a -Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound.git -References: boo#971737 -Mime-version: 1.0 -Content-type: text/plain; charset=UTF-8 -Content-transfer-encoding: 8bit - -It turned out that the pre-HSW Intel chips are incompatible with the -naive assumption we had -- the fixed mapping between the port and the -HD-audio widget. This may result in the bad access, as captured by -the recent patch to add a WARN_ON() for the port mapping check. - -As a quick workaround, disable the i915 audio component binding for -all pre-Haswell models. - -Reported-by: Ville Syrjälä <[email protected]> -Cc: <[email protected]> # v4.5 -Signed-off-by: Takashi Iwai <[email protected]> - ---- - sound/pci/hda/patch_hdmi.c | 5 +++-- - 1 file changed, 3 insertions(+), 2 deletions(-) - ---- a/sound/pci/hda/patch_hdmi.c -+++ b/sound/pci/hda/patch_hdmi.c -@@ -2460,9 +2460,10 @@ static int patch_generic_hdmi(struct hda - codec->spec = spec; - hdmi_array_init(spec, 4); - -- /* Try to bind with i915 for any Intel codecs (if not done yet) */ -+ /* Try to bind with i915 for Intel HSW+ codecs (if not done yet) */ - if (!codec_has_acomp(codec) && -- (codec->core.vendor_id >> 16) == 0x8086) -+ (codec->core.vendor_id >> 16) == 0x8086 && -+ is_haswell_plus(codec)) - if (!snd_hdac_i915_init(&codec->bus->core)) - spec->i915_bound = true; - diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/patches.drivers/ALSA-hda-Really-restrict-i915-notifier-to-HSW new/patches.drivers/ALSA-hda-Really-restrict-i915-notifier-to-HSW --- old/patches.drivers/ALSA-hda-Really-restrict-i915-notifier-to-HSW 2016-03-18 21:35:29.000000000 +0100 +++ new/patches.drivers/ALSA-hda-Really-restrict-i915-notifier-to-HSW 1970-01-01 01:00:00.000000000 +0100 @@ -1,78 +0,0 @@ -From 691be973c0621255abb31572a98e35c57be70212 Mon Sep 17 00:00:00 2001 -From: Takashi Iwai <[email protected]> -Date: Fri, 18 Mar 2016 15:10:08 +0100 -Subject: [PATCH] ALSA: hda - Really restrict i915 notifier to HSW+ -Patch-mainline: Queued in subsystem maintainer repository -Git-commit: 691be973c0621255abb31572a98e35c57be70212 -Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound.git -References: boo#971737 -Mime-version: 1.0 -Content-type: text/plain; charset=UTF-8 -Content-transfer-encoding: 8bit - -The commit [b62232d429fa: ALSA: hda - Limit i915 HDMI binding only for -HSW and later] tried to limit the usage of i915 audio notifier to the -recent Intel models and switch to the old method on pre-Haswell -models. However, it assumed that the i915 component binding hasn't -been done on such models, and the assumption was wrong: namely, -Baytrail had already the i915 component binding due to powerwell -control. Thus, the workaround wasn't applied to Baytrail. - -For fixing this properly, this patch introduces a new flag indicating -the usage of audio notifier and codec_has_acomp() refers to this flag -instead of checking the existence of audio component. - -Reported-by: Ville Syrjälä <[email protected]> -Cc: <[email protected]> # v4.5 -Signed-off-by: Takashi Iwai <[email protected]> - ---- - sound/pci/hda/patch_hdmi.c | 24 +++++++++++++++++------- - 1 file changed, 17 insertions(+), 7 deletions(-) - ---- a/sound/pci/hda/patch_hdmi.c -+++ b/sound/pci/hda/patch_hdmi.c -@@ -152,13 +152,17 @@ struct hdmi_spec { - struct hda_pcm_stream pcm_playback; - - /* i915/powerwell (Haswell+/Valleyview+) specific */ -+ bool use_acomp_notifier; /* use i915 eld_notify callback for hotplug */ - struct i915_audio_component_audio_ops i915_audio_ops; - bool i915_bound; /* was i915 bound in this driver? */ - }; - - #ifdef CONFIG_SND_HDA_I915 --#define codec_has_acomp(codec) \ -- ((codec)->bus->core.audio_component != NULL) -+static inline bool codec_has_acomp(struct hda_codec *codec) -+{ -+ struct hdmi_spec *spec = codec->spec; -+ return spec->use_acomp_notifier; -+} - #else - #define codec_has_acomp(codec) false - #endif -@@ -2460,12 +2464,18 @@ static int patch_generic_hdmi(struct hda - codec->spec = spec; - hdmi_array_init(spec, 4); - -+#ifdef CONFIG_SND_HDA_I915 - /* Try to bind with i915 for Intel HSW+ codecs (if not done yet) */ -- if (!codec_has_acomp(codec) && -- (codec->core.vendor_id >> 16) == 0x8086 && -- is_haswell_plus(codec)) -- if (!snd_hdac_i915_init(&codec->bus->core)) -- spec->i915_bound = true; -+ if ((codec->core.vendor_id >> 16) == 0x8086 && -+ is_haswell_plus(codec)) { -+ if (!codec->bus->core.audio_component) -+ if (!snd_hdac_i915_init(&codec->bus->core)) -+ spec->i915_bound = true; -+ /* use i915 audio component notifier for hotplug */ -+ if (codec->bus->core.audio_component) -+ spec->use_acomp_notifier = true; -+ } -+#endif - - if (is_haswell_plus(codec)) { - intel_haswell_enable_all_pins(codec, true); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/patches.drivers/ALSA-usb-audio-Add-sanity-checks-for-endpoint-access new/patches.drivers/ALSA-usb-audio-Add-sanity-checks-for-endpoint-access --- old/patches.drivers/ALSA-usb-audio-Add-sanity-checks-for-endpoint-access 2016-03-18 21:35:29.000000000 +0100 +++ new/patches.drivers/ALSA-usb-audio-Add-sanity-checks-for-endpoint-access 1970-01-01 01:00:00.000000000 +0100 @@ -1,74 +0,0 @@ -From 447d6275f0c21f6cc97a88b3a0c601436a4cdf2a Mon Sep 17 00:00:00 2001 -From: Takashi Iwai <[email protected]> -Date: Tue, 15 Mar 2016 15:20:58 +0100 -Subject: [PATCH] ALSA: usb-audio: Add sanity checks for endpoint accesses -Patch-mainline: Queued in subsystem maintainer repository -Git-commit: 447d6275f0c21f6cc97a88b3a0c601436a4cdf2a -Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound.git -References: CVE-2016-2184,bsc#971125 - -Add some sanity check codes before actually accessing the endpoint via -get_endpoint() in order to avoid the invalid access through a -malformed USB descriptor. Mostly just checking bNumEndpoints, but in -one place (snd_microii_spdif_default_get()), the validity of iface and -altsetting index is checked as well. - -Bugzilla: https://bugzilla.suse.com/show_bug.cgi?id=971125 -Cc: <[email protected]> -Signed-off-by: Takashi Iwai <[email protected]> - ---- - sound/usb/clock.c | 2 ++ - sound/usb/endpoint.c | 3 +++ - sound/usb/mixer_quirks.c | 4 ++++ - sound/usb/pcm.c | 2 ++ - 4 files changed, 11 insertions(+) - ---- a/sound/usb/clock.c -+++ b/sound/usb/clock.c -@@ -285,6 +285,8 @@ static int set_sample_rate_v1(struct snd - unsigned char data[3]; - int err, crate; - -+ if (get_iface_desc(alts)->bNumEndpoints < 1) -+ return -EINVAL; - ep = get_endpoint(alts, 0)->bEndpointAddress; - - /* if endpoint doesn't have sampling rate control, bail out */ ---- a/sound/usb/endpoint.c -+++ b/sound/usb/endpoint.c -@@ -438,6 +438,9 @@ exit_clear: - * - * New endpoints will be added to chip->ep_list and must be freed by - * calling snd_usb_endpoint_free(). -+ * -+ * For SND_USB_ENDPOINT_TYPE_SYNC, the caller needs to guarantee that -+ * bNumEndpoints > 1 beforehand. - */ - struct snd_usb_endpoint *snd_usb_add_endpoint(struct snd_usb_audio *chip, - struct usb_host_interface *alts, ---- a/sound/usb/mixer_quirks.c -+++ b/sound/usb/mixer_quirks.c -@@ -1519,7 +1519,11 @@ static int snd_microii_spdif_default_get - - /* use known values for that card: interface#1 altsetting#1 */ - iface = usb_ifnum_to_if(chip->dev, 1); -+ if (!iface || iface->num_altsetting < 2) -+ return -EINVAL; - alts = &iface->altsetting[1]; -+ if (get_iface_desc(alts)->bNumEndpoints < 1) -+ return -EINVAL; - ep = get_endpoint(alts, 0)->bEndpointAddress; - - err = snd_usb_ctl_msg(chip->dev, ---- a/sound/usb/pcm.c -+++ b/sound/usb/pcm.c -@@ -159,6 +159,8 @@ static int init_pitch_v1(struct snd_usb_ - unsigned char data[1]; - int err; - -+ if (get_iface_desc(alts)->bNumEndpoints < 1) -+ return -EINVAL; - ep = get_endpoint(alts, 0)->bEndpointAddress; - - data[0] = 1; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/patches.drivers/ALSA-usb-audio-Fix-NULL-dereference-in-create_fixed new/patches.drivers/ALSA-usb-audio-Fix-NULL-dereference-in-create_fixed --- old/patches.drivers/ALSA-usb-audio-Fix-NULL-dereference-in-create_fixed 2016-03-18 21:35:29.000000000 +0100 +++ new/patches.drivers/ALSA-usb-audio-Fix-NULL-dereference-in-create_fixed 1970-01-01 01:00:00.000000000 +0100 @@ -1,39 +0,0 @@ -From 0f886ca12765d20124bd06291c82951fd49a33be Mon Sep 17 00:00:00 2001 -From: Takashi Iwai <[email protected]> -Date: Tue, 15 Mar 2016 12:09:10 +0100 -Subject: [PATCH] ALSA: usb-audio: Fix NULL dereference in create_fixed_stream_quirk() -Patch-mainline: Queued in subsystem maintainer repository -Git-commit: 0f886ca12765d20124bd06291c82951fd49a33be -Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound.git -References: CVE-2016-2184,bsc#971125 - -create_fixed_stream_quirk() may cause a NULL-pointer dereference by -accessing the non-existing endpoint when a USB device with a malformed -USB descriptor is used. - -This patch avoids it simply by adding a sanity check of bNumEndpoints -before the accesses. - -Bugzilla: https://bugzilla.suse.com/show_bug.cgi?id=971125 -Cc: <[email protected]> -Signed-off-by: Takashi Iwai <[email protected]> - ---- - sound/usb/quirks.c | 6 ++++++ - 1 file changed, 6 insertions(+) - ---- a/sound/usb/quirks.c -+++ b/sound/usb/quirks.c -@@ -180,6 +180,12 @@ static int create_fixed_stream_quirk(str - } - alts = &iface->altsetting[fp->altset_idx]; - altsd = get_iface_desc(alts); -+ if (altsd->bNumEndpoints < 1) { -+ kfree(fp); -+ kfree(rate_table); -+ return -EINVAL; -+ } -+ - fp->protocol = altsd->bInterfaceProtocol; - - if (fp->datainterval == 0) ++++++ patches.fixes.tar.bz2 ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/patches.fixes/net-irda-Fix-use-after-free-in-irtty_open.patch new/patches.fixes/net-irda-Fix-use-after-free-in-irtty_open.patch --- old/patches.fixes/net-irda-Fix-use-after-free-in-irtty_open.patch 2016-03-18 13:33:44.000000000 +0100 +++ new/patches.fixes/net-irda-Fix-use-after-free-in-irtty_open.patch 1970-01-01 01:00:00.000000000 +0100 @@ -1,69 +0,0 @@ -From: Peter Hurley <[email protected]> -Date: Sat, 9 Jan 2016 17:48:45 -0800 -Subject: net: irda: Fix use-after-free in irtty_open() -Patch-mainline: v4.6-rc1 -Git-commit: 401879c57f01cbf2da204ad2e8db910525c6dbea -References: bnc#967903 - -The N_IRDA line discipline may access the previous line discipline's closed -and already-fre private data on open [1]. - -The tty->disc_data field _never_ refers to valid data on entry to the -line discipline's open() method. Rather, the ldisc is expected to -initialize that field for its own use for the lifetime of the instance -(ie. from open() to close() only). - -[1] - ================================================================== - BUG: KASAN: use-after-free in irtty_open+0x422/0x550 at addr ffff8800331dd068 - Read of size 4 by task a.out/13960 - ============================================================================= - BUG kmalloc-512 (Tainted: G B ): kasan: bad access detected - ----------------------------------------------------------------------------- - ... - Call Trace: - [<ffffffff815fa2ae>] __asan_report_load4_noabort+0x3e/0x40 mm/kasan/report.c:279 - [<ffffffff836938a2>] irtty_open+0x422/0x550 drivers/net/irda/irtty-sir.c:436 - [<ffffffff829f1b80>] tty_ldisc_open.isra.2+0x60/0xa0 drivers/tty/tty_ldisc.c:447 - [<ffffffff829f21c0>] tty_set_ldisc+0x1a0/0x940 drivers/tty/tty_ldisc.c:567 - [< inline >] tiocsetd drivers/tty/tty_io.c:2650 - [<ffffffff829da49e>] tty_ioctl+0xace/0x1fd0 drivers/tty/tty_io.c:2883 - [< inline >] vfs_ioctl fs/ioctl.c:43 - [<ffffffff816708ac>] do_vfs_ioctl+0x57c/0xe60 fs/ioctl.c:607 - [< inline >] SYSC_ioctl fs/ioctl.c:622 - [<ffffffff81671204>] SyS_ioctl+0x74/0x80 fs/ioctl.c:613 - [<ffffffff852a7876>] entry_SYSCALL_64_fastpath+0x16/0x7a - -Reported-and-tested-by: Dmitry Vyukov <[email protected]> -Cc: <[email protected]> -Signed-off-by: Peter Hurley <[email protected]> -Signed-off-by: Greg Kroah-Hartman <[email protected]> -Signed-off-by: Jiri Slaby <[email protected]> ---- - drivers/net/irda/irtty-sir.c | 10 ---------- - 1 file changed, 10 deletions(-) - -diff --git a/drivers/net/irda/irtty-sir.c b/drivers/net/irda/irtty-sir.c -index 696852eb23c3..7a3f990c1935 100644 ---- a/drivers/net/irda/irtty-sir.c -+++ b/drivers/net/irda/irtty-sir.c -@@ -430,16 +430,6 @@ static int irtty_open(struct tty_struct *tty) - - /* Module stuff handled via irda_ldisc.owner - Jean II */ - -- /* First make sure we're not already connected. */ -- if (tty->disc_data != NULL) { -- priv = tty->disc_data; -- if (priv && priv->magic == IRTTY_MAGIC) { -- ret = -EEXIST; -- goto out; -- } -- tty->disc_data = NULL; /* ### */ -- } -- - /* stop the underlying driver */ - irtty_stop_receiver(tty, TRUE); - if (tty->ops->stop) --- -2.7.4 - diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/patches.fixes/netfilter-x_tables-check-for-size-overflow.patch new/patches.fixes/netfilter-x_tables-check-for-size-overflow.patch --- old/patches.fixes/netfilter-x_tables-check-for-size-overflow.patch 1970-01-01 01:00:00.000000000 +0100 +++ new/patches.fixes/netfilter-x_tables-check-for-size-overflow.patch 2016-04-19 14:04:23.000000000 +0200 @@ -0,0 +1,38 @@ +From: Florian Westphal <[email protected]> +Date: Thu, 10 Mar 2016 01:56:23 +0100 +Subject: netfilter: x_tables: check for size overflow +Patch-mainline: v4.6-rc1 +Git-commit: d157bd761585605b7882935ffb86286919f62ea1 +References: CVE-2016-3135 bsc#970904 + +Ben Hawkes says: + integer overflow in xt_alloc_table_info, which on 32-bit systems can + lead to small structure allocation and a copy_from_user based heap + corruption. + +Reported-by: Ben Hawkes <[email protected]> +Signed-off-by: Florian Westphal <[email protected]> +Signed-off-by: Pablo Neira Ayuso <[email protected]> +Acked-by: Michal Kubecek <[email protected]> + +--- + net/netfilter/x_tables.c | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/net/netfilter/x_tables.c b/net/netfilter/x_tables.c +index c8a0b7da5ff4..f6950b8003e8 100644 +--- a/net/netfilter/x_tables.c ++++ b/net/netfilter/x_tables.c +@@ -659,6 +659,9 @@ struct xt_table_info *xt_alloc_table_info(unsigned int size) + struct xt_table_info *info = NULL; + size_t sz = sizeof(*info) + size; + ++ if (sz < sizeof(*info)) ++ return NULL; ++ + /* Pedantry: prevent them from hitting BUG() in vmalloc.c --RR */ + if ((SMP_ALIGN(size) >> PAGE_SHIFT) + 2 > totalram_pages) + return NULL; +-- +2.8.1 + diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/patches.fixes/netfilter-x_tables-fix-unconditional-helper.patch new/patches.fixes/netfilter-x_tables-fix-unconditional-helper.patch --- old/patches.fixes/netfilter-x_tables-fix-unconditional-helper.patch 1970-01-01 01:00:00.000000000 +0100 +++ new/patches.fixes/netfilter-x_tables-fix-unconditional-helper.patch 2016-04-19 14:04:23.000000000 +0200 @@ -0,0 +1,238 @@ +From: Florian Westphal <[email protected]> +Date: Tue, 22 Mar 2016 18:02:52 +0100 +Subject: netfilter: x_tables: fix unconditional helper +Patch-mainline: v4.6-rc2 +Git-commit: 54d83fc74aa9ec72794373cb47432c5f7fb1a309 +References: CVE-2016-3134 bsc#971126 + +Ben Hawkes says: + + In the mark_source_chains function (net/ipv4/netfilter/ip_tables.c) it + is possible for a user-supplied ipt_entry structure to have a large + next_offset field. This field is not bounds checked prior to writing a + counter value at the supplied offset. + +Problem is that mark_source_chains should not have been called -- +the rule doesn't have a next entry, so its supposed to return +an absolute verdict of either ACCEPT or DROP. + +However, the function conditional() doesn't work as the name implies. +It only checks that the rule is using wildcard address matching. + +However, an unconditional rule must also not be using any matches +(no -m args). + +The underflow validator only checked the addresses, therefore +passing the 'unconditional absolute verdict' test, while +mark_source_chains also tested for presence of matches, and thus +proceeeded to the next (not-existent) rule. + +Unify this so that all the callers have same idea of 'unconditional rule'. + +Reported-by: Ben Hawkes <[email protected]> +Signed-off-by: Florian Westphal <[email protected]> +Signed-off-by: Pablo Neira Ayuso <[email protected]> +Acked-by: Michal Kubecek <[email protected]> + +--- + net/ipv4/netfilter/arp_tables.c | 18 +++++++++--------- + net/ipv4/netfilter/ip_tables.c | 23 +++++++++++------------ + net/ipv6/netfilter/ip6_tables.c | 23 +++++++++++------------ + 3 files changed, 31 insertions(+), 33 deletions(-) + +diff --git a/net/ipv4/netfilter/arp_tables.c b/net/ipv4/netfilter/arp_tables.c +index 815868e08b0b..08b315a3ce87 100644 +--- a/net/ipv4/netfilter/arp_tables.c ++++ b/net/ipv4/netfilter/arp_tables.c +@@ -359,11 +359,12 @@ unsigned int arpt_do_table(struct sk_buff *skb, + } + + /* All zeroes == unconditional rule. */ +-static inline bool unconditional(const struct arpt_arp *arp) ++static inline bool unconditional(const struct arpt_entry *e) + { + static const struct arpt_arp uncond; + +- return memcmp(arp, &uncond, sizeof(uncond)) == 0; ++ return e->target_offset == sizeof(struct arpt_entry) && ++ memcmp(&e->arp, &uncond, sizeof(uncond)) == 0; + } + + /* Figures out from what hook each rule can be called: returns 0 if +@@ -402,11 +403,10 @@ static int mark_source_chains(const struct xt_table_info *newinfo, + |= ((1 << hook) | (1 << NF_ARP_NUMHOOKS)); + + /* Unconditional return/END. */ +- if ((e->target_offset == sizeof(struct arpt_entry) && ++ if ((unconditional(e) && + (strcmp(t->target.u.user.name, + XT_STANDARD_TARGET) == 0) && +- t->verdict < 0 && unconditional(&e->arp)) || +- visited) { ++ t->verdict < 0) || visited) { + unsigned int oldpos, size; + + if ((strcmp(t->target.u.user.name, +@@ -551,7 +551,7 @@ static bool check_underflow(const struct arpt_entry *e) + const struct xt_entry_target *t; + unsigned int verdict; + +- if (!unconditional(&e->arp)) ++ if (!unconditional(e)) + return false; + t = arpt_get_target_c(e); + if (strcmp(t->u.user.name, XT_STANDARD_TARGET) != 0) +@@ -598,9 +598,9 @@ static inline int check_entry_size_and_hooks(struct arpt_entry *e, + newinfo->hook_entry[h] = hook_entries[h]; + if ((unsigned char *)e - base == underflows[h]) { + if (!check_underflow(e)) { +- pr_err("Underflows must be unconditional and " +- "use the STANDARD target with " +- "ACCEPT/DROP\n"); ++ pr_debug("Underflows must be unconditional and " ++ "use the STANDARD target with " ++ "ACCEPT/DROP\n"); + return -EINVAL; + } + newinfo->underflow[h] = underflows[h]; +diff --git a/net/ipv4/netfilter/ip_tables.c b/net/ipv4/netfilter/ip_tables.c +index 0a81558c932e..99d46b0a4ead 100644 +--- a/net/ipv4/netfilter/ip_tables.c ++++ b/net/ipv4/netfilter/ip_tables.c +@@ -168,11 +168,12 @@ get_entry(const void *base, unsigned int offset) + + /* All zeroes == unconditional rule. */ + /* Mildly perf critical (only if packet tracing is on) */ +-static inline bool unconditional(const struct ipt_ip *ip) ++static inline bool unconditional(const struct ipt_entry *e) + { + static const struct ipt_ip uncond; + +- return memcmp(ip, &uncond, sizeof(uncond)) == 0; ++ return e->target_offset == sizeof(struct ipt_entry) && ++ memcmp(&e->ip, &uncond, sizeof(uncond)) == 0; + #undef FWINV + } + +@@ -229,11 +230,10 @@ get_chainname_rulenum(const struct ipt_entry *s, const struct ipt_entry *e, + } else if (s == e) { + (*rulenum)++; + +- if (s->target_offset == sizeof(struct ipt_entry) && ++ if (unconditional(s) && + strcmp(t->target.u.kernel.target->name, + XT_STANDARD_TARGET) == 0 && +- t->verdict < 0 && +- unconditional(&s->ip)) { ++ t->verdict < 0) { + /* Tail of chains: STANDARD target (return/policy) */ + *comment = *chainname == hookname + ? comments[NF_IP_TRACE_COMMENT_POLICY] +@@ -476,11 +476,10 @@ mark_source_chains(const struct xt_table_info *newinfo, + e->comefrom |= ((1 << hook) | (1 << NF_INET_NUMHOOKS)); + + /* Unconditional return/END. */ +- if ((e->target_offset == sizeof(struct ipt_entry) && ++ if ((unconditional(e) && + (strcmp(t->target.u.user.name, + XT_STANDARD_TARGET) == 0) && +- t->verdict < 0 && unconditional(&e->ip)) || +- visited) { ++ t->verdict < 0) || visited) { + unsigned int oldpos, size; + + if ((strcmp(t->target.u.user.name, +@@ -715,7 +714,7 @@ static bool check_underflow(const struct ipt_entry *e) + const struct xt_entry_target *t; + unsigned int verdict; + +- if (!unconditional(&e->ip)) ++ if (!unconditional(e)) + return false; + t = ipt_get_target_c(e); + if (strcmp(t->u.user.name, XT_STANDARD_TARGET) != 0) +@@ -763,9 +762,9 @@ check_entry_size_and_hooks(struct ipt_entry *e, + newinfo->hook_entry[h] = hook_entries[h]; + if ((unsigned char *)e - base == underflows[h]) { + if (!check_underflow(e)) { +- pr_err("Underflows must be unconditional and " +- "use the STANDARD target with " +- "ACCEPT/DROP\n"); ++ pr_debug("Underflows must be unconditional and " ++ "use the STANDARD target with " ++ "ACCEPT/DROP\n"); + return -EINVAL; + } + newinfo->underflow[h] = underflows[h]; +diff --git a/net/ipv6/netfilter/ip6_tables.c b/net/ipv6/netfilter/ip6_tables.c +index 69a4ebec2012..6198807e06f4 100644 +--- a/net/ipv6/netfilter/ip6_tables.c ++++ b/net/ipv6/netfilter/ip6_tables.c +@@ -198,11 +198,12 @@ get_entry(const void *base, unsigned int offset) + + /* All zeroes == unconditional rule. */ + /* Mildly perf critical (only if packet tracing is on) */ +-static inline bool unconditional(const struct ip6t_ip6 *ipv6) ++static inline bool unconditional(const struct ip6t_entry *e) + { + static const struct ip6t_ip6 uncond; + +- return memcmp(ipv6, &uncond, sizeof(uncond)) == 0; ++ return e->target_offset == sizeof(struct ip6t_entry) && ++ memcmp(&e->ipv6, &uncond, sizeof(uncond)) == 0; + } + + static inline const struct xt_entry_target * +@@ -258,11 +259,10 @@ get_chainname_rulenum(const struct ip6t_entry *s, const struct ip6t_entry *e, + } else if (s == e) { + (*rulenum)++; + +- if (s->target_offset == sizeof(struct ip6t_entry) && ++ if (unconditional(s) && + strcmp(t->target.u.kernel.target->name, + XT_STANDARD_TARGET) == 0 && +- t->verdict < 0 && +- unconditional(&s->ipv6)) { ++ t->verdict < 0) { + /* Tail of chains: STANDARD target (return/policy) */ + *comment = *chainname == hookname + ? comments[NF_IP6_TRACE_COMMENT_POLICY] +@@ -488,11 +488,10 @@ mark_source_chains(const struct xt_table_info *newinfo, + e->comefrom |= ((1 << hook) | (1 << NF_INET_NUMHOOKS)); + + /* Unconditional return/END. */ +- if ((e->target_offset == sizeof(struct ip6t_entry) && ++ if ((unconditional(e) && + (strcmp(t->target.u.user.name, + XT_STANDARD_TARGET) == 0) && +- t->verdict < 0 && +- unconditional(&e->ipv6)) || visited) { ++ t->verdict < 0) || visited) { + unsigned int oldpos, size; + + if ((strcmp(t->target.u.user.name, +@@ -727,7 +726,7 @@ static bool check_underflow(const struct ip6t_entry *e) + const struct xt_entry_target *t; + unsigned int verdict; + +- if (!unconditional(&e->ipv6)) ++ if (!unconditional(e)) + return false; + t = ip6t_get_target_c(e); + if (strcmp(t->u.user.name, XT_STANDARD_TARGET) != 0) +@@ -775,9 +774,9 @@ check_entry_size_and_hooks(struct ip6t_entry *e, + newinfo->hook_entry[h] = hook_entries[h]; + if ((unsigned char *)e - base == underflows[h]) { + if (!check_underflow(e)) { +- pr_err("Underflows must be unconditional and " +- "use the STANDARD target with " +- "ACCEPT/DROP\n"); ++ pr_debug("Underflows must be unconditional and " ++ "use the STANDARD target with " ++ "ACCEPT/DROP\n"); + return -EINVAL; + } + newinfo->underflow[h] = underflows[h]; +-- +2.8.1 + diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/patches.fixes/netfilter-x_tables-make-sure-e-next_offset-covers-re.patch new/patches.fixes/netfilter-x_tables-make-sure-e-next_offset-covers-re.patch --- old/patches.fixes/netfilter-x_tables-make-sure-e-next_offset-covers-re.patch 1970-01-01 01:00:00.000000000 +0100 +++ new/patches.fixes/netfilter-x_tables-make-sure-e-next_offset-covers-re.patch 2016-04-19 14:04:23.000000000 +0200 @@ -0,0 +1,95 @@ +From: Florian Westphal <[email protected]> +Date: Tue, 22 Mar 2016 18:02:50 +0100 +Subject: netfilter: x_tables: make sure e->next_offset covers + remaining blob size +Patch-mainline: v4.6-rc2 +Git-commit: 6e94e0cfb0887e4013b3b930fa6ab1fe6bb6ba91 +References: CVE-2016-3134 bsc#971126 + +Otherwise this function may read data beyond the ruleset blob. + +Signed-off-by: Florian Westphal <[email protected]> +Signed-off-by: Pablo Neira Ayuso <[email protected]> +Acked-by: Michal Kubecek <[email protected]> + +--- + net/ipv4/netfilter/arp_tables.c | 6 ++++-- + net/ipv4/netfilter/ip_tables.c | 6 ++++-- + net/ipv6/netfilter/ip6_tables.c | 6 ++++-- + 3 files changed, 12 insertions(+), 6 deletions(-) + +diff --git a/net/ipv4/netfilter/arp_tables.c b/net/ipv4/netfilter/arp_tables.c +index ef4d1a573dbb..815868e08b0b 100644 +--- a/net/ipv4/netfilter/arp_tables.c ++++ b/net/ipv4/netfilter/arp_tables.c +@@ -573,7 +573,8 @@ static inline int check_entry_size_and_hooks(struct arpt_entry *e, + int err; + + if ((unsigned long)e % __alignof__(struct arpt_entry) != 0 || +- (unsigned char *)e + sizeof(struct arpt_entry) >= limit) { ++ (unsigned char *)e + sizeof(struct arpt_entry) >= limit || ++ (unsigned char *)e + e->next_offset > limit) { + duprintf("Bad offset %p\n", e); + return -EINVAL; + } +@@ -1232,7 +1233,8 @@ check_compat_entry_size_and_hooks(struct compat_arpt_entry *e, + + duprintf("check_compat_entry_size_and_hooks %p\n", e); + if ((unsigned long)e % __alignof__(struct compat_arpt_entry) != 0 || +- (unsigned char *)e + sizeof(struct compat_arpt_entry) >= limit) { ++ (unsigned char *)e + sizeof(struct compat_arpt_entry) >= limit || ++ (unsigned char *)e + e->next_offset > limit) { + duprintf("Bad offset %p, limit = %p\n", e, limit); + return -EINVAL; + } +diff --git a/net/ipv4/netfilter/ip_tables.c b/net/ipv4/netfilter/ip_tables.c +index ae55f23a851c..0a81558c932e 100644 +--- a/net/ipv4/netfilter/ip_tables.c ++++ b/net/ipv4/netfilter/ip_tables.c +@@ -738,7 +738,8 @@ check_entry_size_and_hooks(struct ipt_entry *e, + int err; + + if ((unsigned long)e % __alignof__(struct ipt_entry) != 0 || +- (unsigned char *)e + sizeof(struct ipt_entry) >= limit) { ++ (unsigned char *)e + sizeof(struct ipt_entry) >= limit || ++ (unsigned char *)e + e->next_offset > limit) { + duprintf("Bad offset %p\n", e); + return -EINVAL; + } +@@ -1492,7 +1493,8 @@ check_compat_entry_size_and_hooks(struct compat_ipt_entry *e, + + duprintf("check_compat_entry_size_and_hooks %p\n", e); + if ((unsigned long)e % __alignof__(struct compat_ipt_entry) != 0 || +- (unsigned char *)e + sizeof(struct compat_ipt_entry) >= limit) { ++ (unsigned char *)e + sizeof(struct compat_ipt_entry) >= limit || ++ (unsigned char *)e + e->next_offset > limit) { + duprintf("Bad offset %p, limit = %p\n", e, limit); + return -EINVAL; + } +diff --git a/net/ipv6/netfilter/ip6_tables.c b/net/ipv6/netfilter/ip6_tables.c +index 88221aba4639..69a4ebec2012 100644 +--- a/net/ipv6/netfilter/ip6_tables.c ++++ b/net/ipv6/netfilter/ip6_tables.c +@@ -750,7 +750,8 @@ check_entry_size_and_hooks(struct ip6t_entry *e, + int err; + + if ((unsigned long)e % __alignof__(struct ip6t_entry) != 0 || +- (unsigned char *)e + sizeof(struct ip6t_entry) >= limit) { ++ (unsigned char *)e + sizeof(struct ip6t_entry) >= limit || ++ (unsigned char *)e + e->next_offset > limit) { + duprintf("Bad offset %p\n", e); + return -EINVAL; + } +@@ -1504,7 +1505,8 @@ check_compat_entry_size_and_hooks(struct compat_ip6t_entry *e, + + duprintf("check_compat_entry_size_and_hooks %p\n", e); + if ((unsigned long)e % __alignof__(struct compat_ip6t_entry) != 0 || +- (unsigned char *)e + sizeof(struct compat_ip6t_entry) >= limit) { ++ (unsigned char *)e + sizeof(struct compat_ip6t_entry) >= limit || ++ (unsigned char *)e + e->next_offset > limit) { + duprintf("Bad offset %p, limit = %p\n", e, limit); + return -EINVAL; + } +-- +2.8.1 + diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/patches.fixes/netfilter-x_tables-validate-e-target_offset-early.patch new/patches.fixes/netfilter-x_tables-validate-e-target_offset-early.patch --- old/patches.fixes/netfilter-x_tables-validate-e-target_offset-early.patch 1970-01-01 01:00:00.000000000 +0100 +++ new/patches.fixes/netfilter-x_tables-validate-e-target_offset-early.patch 2016-04-19 14:04:23.000000000 +0200 @@ -0,0 +1,204 @@ +From: Florian Westphal <[email protected]> +Date: Tue, 22 Mar 2016 18:02:49 +0100 +Subject: netfilter: x_tables: validate e->target_offset early +Patch-mainline: v4.6-rc2 +Git-commit: bdf533de6968e9686df777dc178486f600c6e617 +References: CVE-2016-3134 bsc#971126 + +We should check that e->target_offset is sane before +mark_source_chains gets called since it will fetch the target entry +for loop detection. + +Signed-off-by: Florian Westphal <[email protected]> +Signed-off-by: Pablo Neira Ayuso <[email protected]> +Acked-by: Michal Kubecek <[email protected]> + +--- + net/ipv4/netfilter/arp_tables.c | 17 ++++++++--------- + net/ipv4/netfilter/ip_tables.c | 17 ++++++++--------- + net/ipv6/netfilter/ip6_tables.c | 17 ++++++++--------- + 3 files changed, 24 insertions(+), 27 deletions(-) + +diff --git a/net/ipv4/netfilter/arp_tables.c b/net/ipv4/netfilter/arp_tables.c +index b488cac9c5ca..ef4d1a573dbb 100644 +--- a/net/ipv4/netfilter/arp_tables.c ++++ b/net/ipv4/netfilter/arp_tables.c +@@ -474,14 +474,12 @@ next: + return 1; + } + +-static inline int check_entry(const struct arpt_entry *e, const char *name) ++static inline int check_entry(const struct arpt_entry *e) + { + const struct xt_entry_target *t; + +- if (!arp_checkentry(&e->arp)) { +- duprintf("arp_tables: arp check failed %p %s.\n", e, name); ++ if (!arp_checkentry(&e->arp)) + return -EINVAL; +- } + + if (e->target_offset + sizeof(struct xt_entry_target) > e->next_offset) + return -EINVAL; +@@ -522,10 +520,6 @@ find_check_entry(struct arpt_entry *e, const char *name, unsigned int size) + struct xt_target *target; + int ret; + +- ret = check_entry(e, name); +- if (ret) +- return ret; +- + e->counters.pcnt = xt_percpu_counter_alloc(); + if (IS_ERR_VALUE(e->counters.pcnt)) + return -ENOMEM; +@@ -576,6 +570,7 @@ static inline int check_entry_size_and_hooks(struct arpt_entry *e, + unsigned int valid_hooks) + { + unsigned int h; ++ int err; + + if ((unsigned long)e % __alignof__(struct arpt_entry) != 0 || + (unsigned char *)e + sizeof(struct arpt_entry) >= limit) { +@@ -590,6 +585,10 @@ static inline int check_entry_size_and_hooks(struct arpt_entry *e, + return -EINVAL; + } + ++ err = check_entry(e); ++ if (err) ++ return err; ++ + /* Check hooks & underflows */ + for (h = 0; h < NF_ARP_NUMHOOKS; h++) { + if (!(valid_hooks & (1 << h))) +@@ -1246,7 +1245,7 @@ check_compat_entry_size_and_hooks(struct compat_arpt_entry *e, + } + + /* For purposes of check_entry casting the compat entry is fine */ +- ret = check_entry((struct arpt_entry *)e, name); ++ ret = check_entry((struct arpt_entry *)e); + if (ret) + return ret; + +diff --git a/net/ipv4/netfilter/ip_tables.c b/net/ipv4/netfilter/ip_tables.c +index b99affad6ba1..ae55f23a851c 100644 +--- a/net/ipv4/netfilter/ip_tables.c ++++ b/net/ipv4/netfilter/ip_tables.c +@@ -569,14 +569,12 @@ static void cleanup_match(struct xt_entry_match *m, struct net *net) + } + + static int +-check_entry(const struct ipt_entry *e, const char *name) ++check_entry(const struct ipt_entry *e) + { + const struct xt_entry_target *t; + +- if (!ip_checkentry(&e->ip)) { +- duprintf("ip check failed %p %s.\n", e, name); ++ if (!ip_checkentry(&e->ip)) + return -EINVAL; +- } + + if (e->target_offset + sizeof(struct xt_entry_target) > + e->next_offset) +@@ -666,10 +664,6 @@ find_check_entry(struct ipt_entry *e, struct net *net, const char *name, + struct xt_mtchk_param mtpar; + struct xt_entry_match *ematch; + +- ret = check_entry(e, name); +- if (ret) +- return ret; +- + e->counters.pcnt = xt_percpu_counter_alloc(); + if (IS_ERR_VALUE(e->counters.pcnt)) + return -ENOMEM; +@@ -741,6 +735,7 @@ check_entry_size_and_hooks(struct ipt_entry *e, + unsigned int valid_hooks) + { + unsigned int h; ++ int err; + + if ((unsigned long)e % __alignof__(struct ipt_entry) != 0 || + (unsigned char *)e + sizeof(struct ipt_entry) >= limit) { +@@ -755,6 +750,10 @@ check_entry_size_and_hooks(struct ipt_entry *e, + return -EINVAL; + } + ++ err = check_entry(e); ++ if (err) ++ return err; ++ + /* Check hooks & underflows */ + for (h = 0; h < NF_INET_NUMHOOKS; h++) { + if (!(valid_hooks & (1 << h))) +@@ -1506,7 +1505,7 @@ check_compat_entry_size_and_hooks(struct compat_ipt_entry *e, + } + + /* For purposes of check_entry casting the compat entry is fine */ +- ret = check_entry((struct ipt_entry *)e, name); ++ ret = check_entry((struct ipt_entry *)e); + if (ret) + return ret; + +diff --git a/net/ipv6/netfilter/ip6_tables.c b/net/ipv6/netfilter/ip6_tables.c +index 99425cf2819b..88221aba4639 100644 +--- a/net/ipv6/netfilter/ip6_tables.c ++++ b/net/ipv6/netfilter/ip6_tables.c +@@ -581,14 +581,12 @@ static void cleanup_match(struct xt_entry_match *m, struct net *net) + } + + static int +-check_entry(const struct ip6t_entry *e, const char *name) ++check_entry(const struct ip6t_entry *e) + { + const struct xt_entry_target *t; + +- if (!ip6_checkentry(&e->ipv6)) { +- duprintf("ip_tables: ip check failed %p %s.\n", e, name); ++ if (!ip6_checkentry(&e->ipv6)) + return -EINVAL; +- } + + if (e->target_offset + sizeof(struct xt_entry_target) > + e->next_offset) +@@ -679,10 +677,6 @@ find_check_entry(struct ip6t_entry *e, struct net *net, const char *name, + struct xt_mtchk_param mtpar; + struct xt_entry_match *ematch; + +- ret = check_entry(e, name); +- if (ret) +- return ret; +- + e->counters.pcnt = xt_percpu_counter_alloc(); + if (IS_ERR_VALUE(e->counters.pcnt)) + return -ENOMEM; +@@ -753,6 +747,7 @@ check_entry_size_and_hooks(struct ip6t_entry *e, + unsigned int valid_hooks) + { + unsigned int h; ++ int err; + + if ((unsigned long)e % __alignof__(struct ip6t_entry) != 0 || + (unsigned char *)e + sizeof(struct ip6t_entry) >= limit) { +@@ -767,6 +762,10 @@ check_entry_size_and_hooks(struct ip6t_entry *e, + return -EINVAL; + } + ++ err = check_entry(e); ++ if (err) ++ return err; ++ + /* Check hooks & underflows */ + for (h = 0; h < NF_INET_NUMHOOKS; h++) { + if (!(valid_hooks & (1 << h))) +@@ -1518,7 +1517,7 @@ check_compat_entry_size_and_hooks(struct compat_ip6t_entry *e, + } + + /* For purposes of check_entry casting the compat entry is fine */ +- ret = check_entry((struct ip6t_entry *)e, name); ++ ret = check_entry((struct ip6t_entry *)e); + if (ret) + return ret; + +-- +2.8.1 + ++++++ patches.kernel.org.tar.bz2 ++++++ ++++ 14767 lines of diff (skipped) ++++++ patches.suse.tar.bz2 ++++++ ++++++ series.conf ++++++ --- /var/tmp/diff_new_pack.e0T37a/_old 2016-04-28 16:52:53.000000000 +0200 +++ /var/tmp/diff_new_pack.e0T37a/_new 2016-04-28 16:52:53.000000000 +0200 @@ -27,6 +27,8 @@ # DO NOT MODIFY THEM! # Send separate patches upstream if you find a problem... ######################################################## + patches.kernel.org/patch-4.5.1 + patches.kernel.org/patch-4.5.1-2 ######################################################## # Build fixes that apply to the vanilla kernel too. @@ -159,6 +161,7 @@ +needs_update patches.arch/arm64-0004-net-xgbe-Add-A0-silicon-support.patch patches.arch/arm64-0006-arm64-Select-reboot-driver-for-X-Gene-platform.patch patches.arch/arm64-0010-KVM-ARM-Hack-to-enable-VGIC-mapping-on-64k-PAGE_SIZE.patch + patches.arch/arm64-kvm-fix-hrtimer.patch ######################################################## # S/390 @@ -200,6 +203,8 @@ patches.arch/acpi_thermal_passive_blacklist.patch + patches.arch/ACPI-processor-Request-native-thermal-interrupt-hand + ######################################################## # CPUFREQ ######################################################## @@ -207,7 +212,6 @@ ## cpuidle perf events cleanups and related patches.arch/perf_timechart_fix_zero_timestamps.patch - patches.arch/intel_idle-prevent-SKL-H-boot-failure-when-C8-C9-C10 ######################################################## # AGP, graphics related stuff @@ -222,7 +226,15 @@ ######################################################## # Networking, IPv6 ######################################################## - patches.fixes/net-irda-Fix-use-after-free-in-irtty_open.patch + + ######################################################## + # Netfilter + ######################################################## + patches.suse/netfilter-ip_conntrack_slp.patch + patches.fixes/netfilter-x_tables-check-for-size-overflow.patch + patches.fixes/netfilter-x_tables-validate-e-target_offset-early.patch + patches.fixes/netfilter-x_tables-make-sure-e-next_offset-covers-re.patch + patches.fixes/netfilter-x_tables-fix-unconditional-helper.patch ######################################################## # NFS @@ -288,12 +300,6 @@ ######################################################## ######################################################## - # Netfilter - ######################################################## - - patches.suse/netfilter-ip_conntrack_slp.patch - - ######################################################## # # Device drivers # @@ -361,6 +367,7 @@ # USB ######################################################## + ######################################################## # I2C ######################################################## @@ -374,14 +381,6 @@ ########################################################## # Sound ########################################################## - patches.drivers/ALSA-usb-audio-Fix-NULL-dereference-in-create_fixed - patches.drivers/ALSA-usb-audio-Add-sanity-checks-for-endpoint-access - patches.drivers/ALSA-hda-Fix-unexpected-resume-through-regmap-code-p - patches.drivers/ALSA-hda-Don-t-handle-ELD-notify-from-invalid-port - patches.drivers/ALSA-hda-Limit-i915-HDMI-binding-only-for-HSW-and-la - patches.drivers/ALSA-hda-Really-restrict-i915-notifier-to-HSW - patches.drivers/ALSA-hda-Fix-forgotten-HDMI-monitor_present-update - patches.drivers/ALSA-hda-Fix-spurious-kernel-WARNING-on-Baytrail-HDM ######################################################## # Char / serial ++++++ source-timestamp ++++++ --- /var/tmp/diff_new_pack.e0T37a/_old 2016-04-28 16:52:53.000000000 +0200 +++ /var/tmp/diff_new_pack.e0T37a/_new 2016-04-28 16:52:53.000000000 +0200 @@ -1,3 +1,3 @@ -2016-03-28 09:27:57 +0200 -GIT Revision: 8cf0ce6b84d58647e9ee955bc81db84023542f5f +2016-04-21 11:07:52 +0200 +GIT Revision: 0454a6e065527b6fcfa81eaf5c22e5cf02755002 GIT Branch: stable ++++++ split-modules ++++++ --- /var/tmp/diff_new_pack.e0T37a/_old 2016-04-28 16:52:53.000000000 +0200 +++ /var/tmp/diff_new_pack.e0T37a/_new 2016-04-28 16:52:53.000000000 +0200 @@ -19,7 +19,7 @@ exit 1 fi eval set -- "$options" -opt_base= +opt_builddir= opt_out=. opt_dir=. opt_ignore_errors=false @@ -34,7 +34,7 @@ esac case "$opt" in -b) - opt_base=$arg ;; + opt_builddir=$arg ;; -d) opt_dir=$arg ;; -o) @@ -50,7 +50,7 @@ exit 1 esac done -if test -z "$opt_base"; then +if test -z "$opt_builddir"; then usage >&2 exit 1 fi @@ -110,15 +110,26 @@ } # base -sed 'y/-/_/' <"$opt_base" | add_dependent_modules >"$tmp/base" +sed 'y/-/_/' <"$opt_builddir/Module.base" | add_dependent_modules >"$tmp/base" join -j 1 -o 2.2 "$tmp/base" "$tmp/all" >"$opt_out/base-modules" +# kmps +for f in "$opt_builddir"/Module.*-kmp; do + kmp=${f##*/Module.} + sed 'y/-/_/' <"$f" >"$tmp/$kmp" + join -j 1 -o 2.2 "$tmp/$kmp" "$tmp/all" >"$opt_out/$kmp-modules" + cat "$tmp/$kmp" +done | sort -u >"$tmp/kmp-all" +join -v1 "$tmp/supp" "$tmp/kmp-all" >"$tmp/supp-main" + # main -add_dependent_modules "$tmp/supp-explain" <"$tmp/supp" >"$tmp/supp-all" -if ! cmp -s "$tmp/supp" "$tmp/supp-all"; then +add_dependent_modules "$tmp/supp-explain" <"$tmp/supp-main" >"$tmp/supp-all" +if ! cmp -s "$tmp/supp-main" "$tmp/supp-all"; then + # FIXME: Error message not accurate if a supported KMP module is + # needed by a module in the main package echo "The following unsupported modules are used by supported modules:" >&2 join -j1 -a2 <(sort "$tmp/supp-explain") \ - <(join -v2 "$tmp/supp" "$tmp/supp-all") >&2 + <(join -v2 "$tmp/supp-main" "$tmp/supp-all") >&2 echo "Please fix supported.conf." >&2 if ! $opt_ignore_errors; then exit 1 @@ -127,7 +138,7 @@ join -j 1 -o 2.2 "$tmp/supp-all" "$tmp/all" >"$opt_out/main-modules" # unsupported -join -j 1 -v 2 -o 2.2 "$tmp/supp-all" "$tmp/all" >"$opt_out/unsupported-modules" +join -j 1 -v 2 -o 2.2 <(sort -u "$tmp/supp-all" "$tmp/kmp-all") "$tmp/all" >"$opt_out/unsupported-modules" exit 0
