From 04e57def2bf195903842a05f23db6010eeab6aff Mon Sep 17 00:00:00 2001 From: Paul Menzel Date: Thu, 8 Jun 2017 15:22:34 +0200 Subject: [PATCH 1/3] linux: Add stable version 4.9.31 Do as Greg says [1]: > All users of the 4.9 kernel series must upgrade. Changes [1][2]: > Makefile | 2 > arch/arm64/net/bpf_jit_comp.c | 5 > arch/powerpc/platforms/cell/spu_base.c | 4 > arch/sparc/include/asm/pgtable_32.h | 4 > arch/sparc/include/asm/setup.h | 2 > arch/sparc/kernel/ftrace.c | 13 +- > arch/sparc/mm/init_32.c | 2 > arch/x86/boot/compressed/Makefile | 2 > arch/x86/include/asm/mce.h | 1 > arch/x86/kernel/cpu/mcheck/mce.c | 11 - > crypto/skcipher.c | 40 ++++++- > drivers/acpi/button.c | 2 > drivers/acpi/nfit/mce.c | 2 > drivers/char/pcmcia/cm4040_cs.c | 6 - > drivers/gpu/drm/gma500/psb_intel_lvds.c | 18 +-- > drivers/gpu/drm/radeon/ci_dpm.c | 6 + > drivers/gpu/drm/radeon/cik.c | 4 > drivers/gpu/drm/radeon/evergreen.c | 4 > drivers/gpu/drm/radeon/r600.c | 2 > drivers/gpu/drm/radeon/radeon_drv.c | 3 > drivers/gpu/drm/radeon/radeon_gem.c | 4 > drivers/gpu/drm/radeon/si.c | 4 > drivers/hid/wacom_wac.c | 45 ++++---- > drivers/i2c/busses/i2c-tiny-usb.c | 25 +++- > drivers/infiniband/hw/hfi1/rc.c | 5 > drivers/infiniband/hw/qib/qib_rc.c | 4 > drivers/mmc/host/sdhci-iproc.c | 3 > drivers/net/bonding/bond_3ad.c | 2 > drivers/net/ethernet/emulex/benet/be_main.c | 4 > drivers/net/ethernet/mellanox/mlx5/core/cmd.c | 41 ++++++- > drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c | 9 + > drivers/net/ethernet/mellanox/mlx5/core/eq.c | 2 > drivers/net/ethernet/mellanox/mlx5/core/health.c | 2 > drivers/net/phy/marvell.c | 66 ++++++----- > drivers/net/usb/qmi_wwan.c | 2 > drivers/net/virtio_net.c | 1 > drivers/net/vrf.c | 3 > drivers/nvme/host/core.c | 13 +- > drivers/nvme/host/rdma.c | 18 ++- > drivers/s390/net/qeth_core.h | 4 > drivers/s390/net/qeth_core_main.c | 21 ++- > drivers/s390/net/qeth_core_sys.c | 24 ++-- > drivers/s390/net/qeth_l2.h | 2 > drivers/s390/net/qeth_l2_main.c | 26 +++- > drivers/s390/net/qeth_l2_sys.c | 8 + > drivers/s390/net/qeth_l3_main.c | 8 + > drivers/scsi/ibmvscsi_tgt/ibmvscsi_tgt.c | 27 ++++ > drivers/scsi/mpt3sas/mpt3sas_scsih.c | 15 ++ > drivers/target/iscsi/iscsi_target.c | 30 ++++- > drivers/target/iscsi/iscsi_target_erl0.c | 6 - > drivers/target/iscsi/iscsi_target_erl0.h | 2 > drivers/target/iscsi/iscsi_target_login.c | 4 > drivers/tty/serial/8250/8250_port.c | 2 > fs/ufs/super.c | 5 > fs/xfs/libxfs/xfs_bmap.c | 9 - > fs/xfs/libxfs/xfs_btree.c | 2 > fs/xfs/libxfs/xfs_dir2_priv.h | 1 > fs/xfs/libxfs/xfs_dir2_sf.c | 106 +++++++++++++++++++ > fs/xfs/libxfs/xfs_inode_fork.c | 13 ++ > fs/xfs/libxfs/xfs_refcount.c | 43 +++++-- > fs/xfs/libxfs/xfs_trans_space.h | 23 +++- > fs/xfs/xfs_aops.c | 4 > fs/xfs/xfs_bmap_item.c | 5 > fs/xfs/xfs_bmap_util.c | 18 +-- > fs/xfs/xfs_buf.c | 62 ++++++++--- > fs/xfs/xfs_buf.h | 6 - > fs/xfs/xfs_dir2_readdir.c | 26 +--- > fs/xfs/xfs_file.c | 33 +---- > fs/xfs/xfs_icache.c | 58 ++++++++-- > fs/xfs/xfs_icache.h | 8 + > fs/xfs/xfs_inode.c | 16 ++ > fs/xfs/xfs_inode.h | 4 > fs/xfs/xfs_ioctl.c | 5 > fs/xfs/xfs_iomap.c | 4 > fs/xfs/xfs_itable.c | 2 > fs/xfs/xfs_log.c | 2 > fs/xfs/xfs_mount.h | 1 > fs/xfs/xfs_qm.c | 7 - > fs/xfs/xfs_qm_syscalls.c | 3 > fs/xfs/xfs_reflink.c | 18 ++- > fs/xfs/xfs_super.c | 8 + > fs/xfs/xfs_trans.c | 22 +++ > fs/xfs/xfs_trans.h | 2 > include/linux/if_vlan.h | 18 +-- > include/linux/memblock.h | 8 + > include/linux/mlx5/driver.h | 7 + > include/linux/mmzone.h | 1 > include/net/dst.h | 8 + > include/net/ip_fib.h | 10 - > mm/ksm.c | 3 > mm/memblock.c | 23 ++++ > mm/memory-failure.c | 8 - > mm/mlock.c | 5 > mm/page_alloc.c | 33 +++-- > mm/slub.c | 29 +++-- > net/bridge/br_netlink.c | 7 + > net/bridge/br_stp_if.c | 1 > net/bridge/br_stp_timer.c | 2 > net/core/dst.c | 23 ++-- > net/core/filter.c | 1 > net/core/rtnetlink.c | 36 ++++-- > net/core/sock.c | 23 +--- > net/dccp/ipv6.c | 6 + > net/ipv4/fib_frontend.c | 15 +- > net/ipv4/fib_semantics.c | 17 +-- > net/ipv4/fib_trie.c | 26 ++-- > net/ipv4/inet_connection_sock.c | 2 > net/ipv4/route.c | 10 + > net/ipv4/tcp.c | 7 - > net/ipv4/tcp_input.c | 11 + > net/ipv6/ip6_offload.c | 7 - > net/ipv6/ip6_output.c | 20 ++- > net/ipv6/output_core.c | 14 +- > net/ipv6/tcp_ipv6.c | 2 > net/ipv6/udp_offload.c | 6 - > net/packet/af_packet.c | 14 +- > net/sctp/input.c | 16 +- > net/sctp/ipv6.c | 49 +++++--- > sound/pci/hda/patch_sigmatel.c | 2 > 119 files changed, 1107 insertions(+), 444 deletions(-) There are quite a few XFS changes: > xfs: use ->b_state to fix buffer I/O accounting release race > xfs: use dedicated log worker wq to avoid deadlock with cil wq > xfs: drop iolock from reclaim context to appease lockdep > xfs: prevent multi-fsb dir readahead from reading random blocks > xfs: fix up quotacheck buffer list error handling > xfs: support ability to wait on new inodes > xfs: update ag iterator to support wait on new inodes > xfs: wait on new inodes during quotaoff dquot release > xfs: fix indlen accounting error on partial delalloc conversion > xfs: fix integer truncation in xfs_bmap_remap_alloc > xfs: xfs_trans_alloc_empty > xfs: verify inline directory data forks > xfs: rework the inline directory verifiers > xfs: fix kernel memory exposure problems > xfs: fix over-copying of getbmap parameters from userspace > xfs: actually report xattr extents via iomap > xfs: reserve enough blocks to handle btree splits when remapping > xfs: BMAPX shouldn't barf on inline-format directories > xfs: avoid mount-time deadlock in CoW extent recovery > xfs: handle array index overrun in xfs_dir2_leaf_readbuf() > xfs: fix unaligned access in xfs_btree_visit_blocks > xfs: fix off-by-one on max nr_pages in xfs_find_get_desired_pgoff() > xfs: fix use-after-free in xfs_finish_page_writeback > xfs: Fix missed holes in SEEK_HOLE implementation > xfs: Fix off-by-in in loop termination in xfs_find_get_desired_pgoff() > xfs: bad assertion for delalloc an extent that start at i_size [1] http://lkml.iu.edu/hypermail/linux/kernel/1706.0/05454.html --- linux-4.9.31-157.bee | 79 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 79 insertions(+) create mode 100755 linux-4.9.31-157.bee diff --git a/linux-4.9.31-157.bee b/linux-4.9.31-157.bee new file mode 100755 index 000000000..fc68c0aaa --- /dev/null +++ b/linux-4.9.31-157.bee @@ -0,0 +1,79 @@ +#!/bin/env beesh + +# note: CONFIG=/boot/config-WHATEVER BEE_MAKEFLAGS='-j 40' ./linux-xxx.bee + +KERNELVERSION=${PKGVERSION} +if [ -z "${PKGVERSION[3]}" ] ; then + KERNELVERSION=${KERNELVERSION}.0 +fi + +# append extra version to get for example 4.8.0-rc4 +KERNELVERSION=${KERNELVERSION}${PKGEXTRAVERSION_DASH} + +echo $KERNELVERSION + +SRCURL[0]="https://cdn.kernel.org/pub/linux/kernel/v${PKGVERSION[1]}.x/linux-${PKGVERSION}${PKGEXTRAVERSION_DASH}.tar.xz" + +# EXCLUDE="" + +#CONFIG= + +KERNELLOCAL=".mx64.${PKGREVISION}" +FULLKERNELVERSION="${KERNELVERSION}${KERNELLOCAL}" + +B=${S} + +mee_patch() { + echo "PATCH $@" + bee_patch $@ +} + +mee_configure() { + echo "configure $@" + if [ -e /proc/config.gz ] ; then + zcat /proc/config.gz >config-current + RUNNING=config-current + else + RUNNING=/boot/config-$(uname -r) + fi + + : ${CONFIG:=${RUNNING}} + + if [ ! -e ${CONFIG} ] ; then + echo "can't find config '${CONFIG}'" + exit 1 + fi + + cp -v ${CONFIG} .config + + LOCALVERSION="\"${KERNELLOCAL}\"" + sed -i -e "s@CONFIG_LOCALVERSION=.*@CONFIG_LOCALVERSION=${LOCALVERSION}@" .config + + echo "doing make -C ${S} olddefconfig in ${PWD} .." + + make olddefconfig + + echo "doing make -C ${S} menuconfig in ${PWD} .." + + make menuconfig +} + +mee_build() { + echo "build $@" + make ${BEE_MAKEFLAGS} +} + +mee_install() { + echo "install $@" + + make modules_install INSTALL_MOD_PATH=${D} + make install INSTALL_PATH=${D}/boot +# make firmware_install INSTALL_MOD_PATH=${D} + + rm -v ${D}/lib/modules/${FULLKERNELVERSION}/{source,build} + + ln -sv /usr/src/linux/${PKGALLPKG}/source ${D}/lib/modules/${FULLKERNELVERSION}/source + ln -sv /usr/src/linux/${PKGALLPKG}/build ${D}/lib/modules/${FULLKERNELVERSION}/build + + ln -sv bzImage-${FULLKERNELVERSION} ${D}/boot/mariux.${PKGREVISION} +} From c65d6090d8562383721d32cea06aca801f0b14cf Mon Sep 17 00:00:00 2001 From: Paul Menzel Date: Thu, 8 Jun 2017 15:45:22 +0200 Subject: [PATCH 2/3] nvidia_linux: Add 340.102 for Linux 4.9.31 --- nvidia_linux-4.9.31-157-340.102-0.bee | 90 +++++++++++++++++++++++++++ 1 file changed, 90 insertions(+) create mode 100755 nvidia_linux-4.9.31-157-340.102-0.bee diff --git a/nvidia_linux-4.9.31-157-340.102-0.bee b/nvidia_linux-4.9.31-157-340.102-0.bee new file mode 100755 index 000000000..bad3ecf51 --- /dev/null +++ b/nvidia_linux-4.9.31-157-340.102-0.bee @@ -0,0 +1,90 @@ +#!/bin/env beesh + +# calculate package extra versions and legacy level +# - use extraversions to define nvidia extraversion and/or legacy level +# - legacy level should be the last part of extraversion +# - legacy level 2 to 5 will be calculated from version number.. + +mxnvversion=${PKGEXTRAVERSION##*_} +: ${mxnvversion=current} + +nvextraversion="${PKGEXTRAVERSION_DASH}" + +if [ "${mxnvversion:0:6}" = "legacy" -o "${mxnvversion}" = "current" ] ; then + nvextraversion="${nvextraversion%_*}" + nvextraversion="${nvextraversion#-${mxnvversion}}" +else + if [ "${PKGVERSION:0:4}" = "340." ] ; then + mxnvversion="legacy5" + elif [ "${PKGVERSION:0:4}" = "304." ] ; then + mxnvversion="legacy4" + elif [ "${PKGVERSION:0:7}" = "173.14." ] ; then + mxnvversion="legacy3" + elif [ "${PKGVERSION:0:6}" = "96.43." ] ; then + mxnvversion="legacy2" + else + mxnvversion="current" + fi +fi + +print_info "calculated mxnvversion = '${mxnvversion}'" +print_info "calculated nvextraversion = '${nvextraversion}'" + +NVIDIA_ARCHIVE="NVIDIA-Linux-x86_64-${PKGVERSION}${nvextraversion}.run" + +SRCURL[0]="https://download.nvidia.com/XFree86/Linux-x86_64/${PKGVERSION}/${NVIDIA_ARCHIVE}" +PATCHURL+=('/src/mariux/patches/nvidia_340_runtimefix_for_kernel_4.9.patch') + +LINUXPKG=${PKGEXTRANAME}.${ARCH} + +LINUXKLOCALVER=$(beeversion --format "%v%-e.mx64.%r" "${LINUXPKG}") + +# '4.4.mx64.75' to '4.4.0.mx64.75' +# '4.8.6.mx64.115' to '4.8.6.mx64.115' +# '4.8-rc2.mx64.95' to '4.8.0-rc2.mx64.95' +if [[ $LINUXKLOCALVER =~ ^([0-9]+\.[0-9]+)(-rc[0-9]{1,2})?(\.mx64.*) ]]; then + LINUXKLOCALVER="${BASH_REMATCH[1]}.0${BASH_REMATCH[2]}${BASH_REMATCH[3]}" +fi + + +build_in_sourcedir +sourcesubdir_append kernel + +: ${BEE_TMP_TMPDIR:=/tmp} + +mee_extract() { + LINUXBUILDARCHIVE="${BEE_BUILDARCHIVEDIR}/${LINUXPKG}.beebuild.tar.bz2" + + print_info "extracting nvidia archive .." + + start_cmd rmdir ${S} + start_cmd sh ${F}/${NVIDIA_ARCHIVE} -x --target ${S} + + if [ -d "/usr/src/linux/${LINUXPKG}/source" ] ; then + LINUXSRCDIR="/usr/src/linux/${LINUXPKG}/source" + elif [ -d "${BEE_TMP_TMPDIR}/${LINUXPKG}/source" ] ; then + LINUXSRCDIR="${BEE_TMP_TMPDIR}/${LINUXPKG}/source" + else + print_info "extracting linux build ${LINUXPKG} .." + start_cmd gtar -xf "${LINUXBUILDARCHIVE}" -C ${BEE_TMP_TMPDIR} + LINUXSRCDIR="${BEE_TMP_TMPDIR}/${LINUXPKG}/source" + fi + + print_info "using kernel sources from ${LINUXSRCDIR} .." +} + +mee_build_pre() { + ln -s ${LINUXSRCDIR}/include ${S}/include +} + +mee_build() { + start_cmd make SYSSRC=${LINUXSRCDIR} module +} + +mee_install() { + mkdir -pv ${D}${DATAROOTDIR}/nvidia/kernel/${LINUXKLOCALVER}/${PKGVERSION} + + cp -v *.ko ${D}${DATAROOTDIR}/nvidia/kernel/${LINUXKLOCALVER}/${PKGVERSION}/ + + ln -s ${PKGVERSION} ${D}${DATAROOTDIR}/nvidia/kernel/${LINUXKLOCALVER}/${mxnvversion} +} From c82f155d999b37aa197fb8cfb09dbe302aacb3e7 Mon Sep 17 00:00:00 2001 From: Paul Menzel Date: Thu, 8 Jun 2017 15:46:15 +0200 Subject: [PATCH 3/3] nvidia_linux: Build 375.39 for Linux 4.9.31 --- nvidia_linux-4.9.31-157-375.39-0.bee | 87 ++++++++++++++++++++++++++++ 1 file changed, 87 insertions(+) create mode 100755 nvidia_linux-4.9.31-157-375.39-0.bee diff --git a/nvidia_linux-4.9.31-157-375.39-0.bee b/nvidia_linux-4.9.31-157-375.39-0.bee new file mode 100755 index 000000000..7657b8ef1 --- /dev/null +++ b/nvidia_linux-4.9.31-157-375.39-0.bee @@ -0,0 +1,87 @@ +#!/bin/env beesh + +# calculate package extra versions and legacy level +# - use extraversions to define nvidia extraversion and/or legacy level +# - legacy level should be the last part of extraversion +# - legacy level 2 to 5 will be calculated from version number.. + +mxnvversion=${PKGEXTRAVERSION##*_} +: ${mxnvversion=current} + +nvextraversion="${PKGEXTRAVERSION_DASH}" + +if [ "${mxnvversion:0:6}" = "legacy" -o "${mxnvversion}" = "current" ] ; then + nvextraversion="${nvextraversion%_*}" + nvextraversion="${nvextraversion#-${mxnvversion}}" +else + if [ "${PKGVERSION:0:4}" = "340." ] ; then + mxnvversion="legacy5" + elif [ "${PKGVERSION:0:4}" = "304." ] ; then + mxnvversion="legacy4" + elif [ "${PKGVERSION:0:7}" = "173.14." ] ; then + mxnvversion="legacy3" + elif [ "${PKGVERSION:0:6}" = "96.43." ] ; then + mxnvversion="legacy2" + else + mxnvversion="current" + fi +fi + +print_info "calculated mxnvversion = '${mxnvversion}'" +print_info "calculated nvextraversion = '${nvextraversion}'" + +NVIDIA_ARCHIVE="NVIDIA-Linux-x86_64-${PKGVERSION}${nvextraversion}.run" + +SRCURL[0]="https://download.nvidia.com/XFree86/Linux-x86_64/${PKGVERSION}/${NVIDIA_ARCHIVE}" + +LINUXPKG=${PKGEXTRANAME}.${ARCH} + +LINUXKLOCALVER=$(beeversion --format "%v.mx64.%r" "${LINUXPKG}") + +# '4.4.mx64.75' to '4.4.0.mx64.75' +if [[ $LINUXKLOCALVER =~ ^([0-9]+\.[0-9]+)(\.mx64.*) ]]; then + LINUXKLOCALVER="${BASH_REMATCH[1]}.0${BASH_REMATCH[2]}" +fi + + +build_in_sourcedir +sourcesubdir_append kernel + +: ${BEE_TMP_TMPDIR:=/tmp} + +mee_extract() { + LINUXBUILDARCHIVE="${BEE_BUILDARCHIVEDIR}/${LINUXPKG}.beebuild.tar.bz2" + + print_info "extracting nvidia archive .." + + start_cmd rmdir ${S} + start_cmd sh ${F}/${NVIDIA_ARCHIVE} -x --target ${S} + + if [ -d "/usr/src/linux/${LINUXPKG}/source" ] ; then + LINUXSRCDIR="/usr/src/linux/${LINUXPKG}/source" + elif [ -d "${BEE_TMP_TMPDIR}/${LINUXPKG}/source" ] ; then + LINUXSRCDIR="${BEE_TMP_TMPDIR}/${LINUXPKG}/source" + else + print_info "extracting linux build ${LINUXPKG} .." + start_cmd gtar -xf "${LINUXBUILDARCHIVE}" -C ${BEE_TMP_TMPDIR} + LINUXSRCDIR="${BEE_TMP_TMPDIR}/${LINUXPKG}/source" + fi + + print_info "using kernel sources from ${LINUXSRCDIR} .." +} + +mee_build_pre() { + ln -s ${LINUXSRCDIR}/include ${S}/include +} + +mee_build() { + start_cmd make SYSSRC=${LINUXSRCDIR} module +} + +mee_install() { + mkdir -pv ${D}${DATAROOTDIR}/nvidia/kernel/${LINUXKLOCALVER}/${PKGVERSION} + + cp -v *.ko ${D}${DATAROOTDIR}/nvidia/kernel/${LINUXKLOCALVER}/${PKGVERSION}/ + + ln -s ${PKGVERSION} ${D}${DATAROOTDIR}/nvidia/kernel/${LINUXKLOCALVER}/${mxnvversion} +}