X-Git-Url: https://git.pld-linux.org/?a=blobdiff_plain;f=kernel-small_fixes.patch;h=64935489a8c0559402b12f5e15feaf35c15ba0cd;hb=refs%2Fheads%2FLINUX_4_9;hp=9e8d667af8fd1ac135a5de5e8b54c341aedc6212;hpb=483f80a312eef19f5ee2f3eb435151a545c8b7ee;p=packages%2Fkernel.git diff --git a/kernel-small_fixes.patch b/kernel-small_fixes.patch index 9e8d667a..64935489 100644 --- a/kernel-small_fixes.patch +++ b/kernel-small_fixes.patch @@ -1,19 +1,32 @@ ---- linux-2.6.33/scripts/mod/modpost.c~ 2010-02-24 19:52:17.000000000 +0100 -+++ linux-2.6.33/scripts/mod/modpost.c 2010-03-07 14:26:47.242168558 +0100 -@@ -15,7 +15,8 @@ - #include - #include - #include "modpost.h" --#include "../../include/generated/autoconf.h" -+// PLD architectures don't use CONFIG_SYMBOL_PREFIX -+//#include "../../include/generated/autoconf.h" - #include "../../include/linux/license.h" +diff -urNp -x '*.orig' linux-4.9/fs/xfs/xfs_aops.c linux-4.9/fs/xfs/xfs_aops.c +--- linux-4.9/fs/xfs/xfs_aops.c 2021-02-24 16:28:24.013817047 +0100 ++++ linux-4.9/fs/xfs/xfs_aops.c 2021-02-24 16:28:36.820893504 +0100 +@@ -634,8 +634,10 @@ xfs_add_to_ioend( + if (wpc->ioend) + list_add(&wpc->ioend->io_list, iolist); + wpc->ioend = xfs_alloc_ioend(inode, wpc->io_type, offset, bh); ++ wbc_init_bio(wbc, wpc->ioend->io_bio); + } + ++ wbc_account_io(wbc, bh->b_page, bh->b_size); + /* + * If the buffer doesn't fit into the bio we need to allocate a new + * one. This shouldn't happen more than once for a given buffer. +diff -urNp -x '*.orig' linux-4.9/fs/xfs/xfs_super.c linux-4.9/fs/xfs/xfs_super.c +--- linux-4.9/fs/xfs/xfs_super.c 2021-02-24 16:28:24.027150807 +0100 ++++ linux-4.9/fs/xfs/xfs_super.c 2021-02-24 16:28:36.824226943 +0100 +@@ -1609,6 +1609,7 @@ xfs_fs_fill_super( + sb->s_max_links = XFS_MAXLINK; + sb->s_time_gran = 1; + set_posix_acl_flag(sb); ++ sb->s_iflags |= SB_I_CGROUPWB; - /* Some toolchains use a `_' prefix for all user symbols. */ - ---- linux-3.0/scripts/kconfig/lxdialog/check-lxdialog.sh~ 2011-07-22 04:17:23.000000000 +0200 -+++ linux-3.0/scripts/kconfig/lxdialog/check-lxdialog.sh 2011-08-25 21:26:04.799150642 +0200 -@@ -9,6 +9,12 @@ + /* version 5 superblocks support inode version counters. */ + if (XFS_SB_VERSION_NUM(&mp->m_sb) == XFS_SB_VERSION_5) +diff -urNp -x '*.orig' linux-4.9/scripts/kconfig/lxdialog/check-lxdialog.sh linux-4.9/scripts/kconfig/lxdialog/check-lxdialog.sh +--- linux-4.9/scripts/kconfig/lxdialog/check-lxdialog.sh 2016-12-11 20:17:54.000000000 +0100 ++++ linux-4.9/scripts/kconfig/lxdialog/check-lxdialog.sh 2021-02-24 16:28:36.820893504 +0100 +@@ -11,6 +11,12 @@ ldflags() $cc -print-file-name=lib${lib}.${ext} | grep -q / if [ $? -eq 0 ]; then echo "-l${lib}" @@ -26,71 +39,16 @@ exit fi done -From 29183a70b0b828500816bd794b3fe192fce89f73 Mon Sep 17 00:00:00 2001 -From: John Stultz -Date: Mon, 9 Feb 2015 23:30:36 -0800 -Subject: ntp: Fixup adjtimex freq validation on 32-bit systems - -Additional validation of adjtimex freq values to avoid -potential multiplication overflows were added in commit -5e5aeb4367b (time: adjtimex: Validate the ADJ_FREQUENCY values) - -Unfortunately the patch used LONG_MAX/MIN instead of -LLONG_MAX/MIN, which was fine on 64-bit systems, but being -much smaller on 32-bit systems caused false positives -resulting in most direct frequency adjustments to fail w/ -EINVAL. - -ntpd only does direct frequency adjustments at startup, so -the issue was not as easily observed there, but other time -sync applications like ptpd and chrony were more effected by -the bug. - -See bugs: - - https://bugzilla.kernel.org/show_bug.cgi?id=92481 - https://bugzilla.redhat.com/show_bug.cgi?id=1188074 - -This patch changes the checks to use LLONG_MAX for -clarity, and additionally the checks are disabled -on 32-bit systems since LLONG_MAX/PPM_SCALE is always -larger then the 32-bit long freq value, so multiplication -overflows aren't possible there. - -Reported-by: Josh Boyer -Reported-by: George Joseph -Tested-by: George Joseph -Signed-off-by: John Stultz -Signed-off-by: Peter Zijlstra (Intel) -Cc: # v3.19+ -Cc: Linus Torvalds -Cc: Sasha Levin -Link: http://lkml.kernel.org/r/1423553436-29747-1-git-send-email-john.stultz@linaro.org -[ Prettified the changelog and the comments a bit. ] -Signed-off-by: Ingo Molnar - -diff --git a/kernel/time/ntp.c b/kernel/time/ntp.c -index 4b585e0..0f60b08 100644 ---- a/kernel/time/ntp.c -+++ b/kernel/time/ntp.c -@@ -633,10 +633,14 @@ int ntp_validate_timex(struct timex *txc) - if ((txc->modes & ADJ_SETOFFSET) && (!capable(CAP_SYS_TIME))) - return -EPERM; - -- if (txc->modes & ADJ_FREQUENCY) { -- if (LONG_MIN / PPM_SCALE > txc->freq) -+ /* -+ * Check for potential multiplication overflows that can -+ * only happen on 64-bit systems: -+ */ -+ if ((txc->modes & ADJ_FREQUENCY) && (BITS_PER_LONG == 64)) { -+ if (LLONG_MIN / PPM_SCALE > txc->freq) - return -EINVAL; -- if (LONG_MAX / PPM_SCALE < txc->freq) -+ if (LLONG_MAX / PPM_SCALE < txc->freq) - return -EINVAL; - } +diff -urNp -x '*.orig' linux-4.9/scripts/mod/modpost.c linux-4.9/scripts/mod/modpost.c +--- linux-4.9/scripts/mod/modpost.c 2021-02-24 16:28:24.380495447 +0100 ++++ linux-4.9/scripts/mod/modpost.c 2021-02-24 16:28:36.820893504 +0100 +@@ -19,7 +19,8 @@ + #include + #include + #include "modpost.h" +-#include "../../include/generated/autoconf.h" ++// PLD architectures don't use CONFIG_SYMBOL_PREFIX ++//#include "../../include/generated/autoconf.h" + #include "../../include/linux/license.h" + #include "../../include/linux/export.h" --- -cgit v0.10.2 -