aboutsummaryrefslogtreecommitdiffstats
path: root/patches
AgeCommit message (Collapse)Author
2021-03-19BSP: port patches to v5.12Bruce Ashfield
Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
2020-12-28base: v5.11 prepBruce Ashfield
Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
2020-10-305.10: drop -__force_order fixupsBruce Ashfield
Commit aa5cacdc29d76a00 [x86/asm: Replace __force_order with a memory clobber] means that we no longer need to protect this contruct. We drop our patch. Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
2020-09-17arm64/perf: Fix wrong cast that may cause wrong truncationBruce Ashfield
1/1 [ Author: He Zhe Email: zhe.he@windriver.com Subject: arm64/perf: Fix wrong cast that may cause wrong truncation Date: Fri, 21 Aug 2020 00:52:50 +0800 tail is a pointer while buftail.fp is a u32. arch/arm64/kernel/perf_callchain.c:100:6: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast] 100 | if ((u32)tail + 4 >= buftail.fp) | ^ arch/arm64/kernel/perf_callchain.c:103:9: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]{noformat} 103 | return (struct compat_frame_tail __user *)(buftail.fp - 4); | ^ Fixes: 8818670c17d2 ("arm64/perf: fix backtrace for AAPCS with FP enabled") Signed-off-by: He Zhe <zhe.he@windriver.com> Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com> ] Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
2020-08-285.9-rcX preparationBruce Ashfield
Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
2020-08-10defconfigs: drop obselete optionsBruce Ashfield
1/1 [ Author: Bruce Ashfield Email: bruce.ashfield@gmail.com Subject: defconfigs: drop obselete options Date: Mon, 10 Aug 2020 22:40:22 -0400 Remove the following options from the various defconfigs, since they are no longer valid, and will be reported as such by the tools: CONFIG_TYPEC_HD3SS3220 CONFIG_MFD_CROS_EC_CHARDEV CONFIG_MTD_M25P80 Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com> ] Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
2020-07-04dev: prep for v5.8Bruce Ashfield
Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
2020-05-08arm64/perf: fix backtrace for AAPCS with FP enabledYanfei Xu
This change is for arm64 platform compat mode. ------[cut here: not apply patch]-------- Samples: 119K of event 'cycles' Event count (approx.): 114092698680 Children Self Command Shared Object Symbol ........ ........ ......... .................. 99.85% 0.00% perf-test [unknown] [.] 0x00000000ff80f4ec | ---0xff80f4ec | |--37.68%--__aeabi_idivmod | |--25.35%--calculate_meaning_of_life | |--20.06%--____aeabi_idivmod_from_thumb | |--7.25%--0 | | | |--1.76%--0xf543df9c | | __gettimeofday ------[cut here: apply patch]------------ Samples: 114K of event 'cycles' Event count (approx.): 109799966925 Children Self Command Shared Object Symbol ........ ........ ......... .................. 99.91% 0.00% perf-test perf-test [.] main | ---main | |--57.49%--pthread_create@@GLIBC_2.4 | | | --57.44%--0xf7cf2f88 | | | |--20.16%--__aeabi_idivmod | | | |--13.79%--calculate_meaning_of_life | | | |--10.89%--____aeabi_idivmod_from_thumb | | | |--8.99%--current_timestamp | | | | | --8.98%--__gettimeofday 1/1 [ Author: Fang Jia Email: fang.jia@windriver.com Subject: arm64/perf: fix backtrace for AAPCS with FP enabled Date: Fri, 28 Dec 2018 16:28:34 +0800 This change is for arm64 platform compat mode. The change for arm32 platform has been included in this commit "perf: fix backtrace for AAPCS with FP enabled". This change replaces code designed for the obsolete ARM APCS ABI, which causes failures of the perf backtrace logic unless the gcc option -mapcs-frame is used to build all binaries on the platform. This obsolete gcc option forces the compiler to include the stack pointer along with the frame pointer and link register in the stack frame for each funciton call. The current AAPCS ABI document, doesn't explicitly describe the frame structure when the gcc frame pointer option, -fno-omit-frame-pointer, is enabled. However, with this option enabled, examination of the emitted prologue instructions shows that 1) R11 is used as the frame pointer, 2) only the R11 and LR are saved onto the stack, not the stack pointer, 3) after this prologue setup, the frame pointer, R11 points to the saved location of LR on the stack. The use of unsigned int arithmetic in the commit is required since the gcc emitted pointer arithmetic uses 8-byte pointer sizes, which are incorrect addresses for the 4-byte stack address size. Signed-off-by: Fang Jia <fang.jia@windriver.com> Reviewed-by: Jiwei Sun <jiwei.sun@windriver.com> Signed-off-by: De Huo <de.huo@windriver.com> ] Signed-off-by: Yanfei Xu <yanfei.xu@windriver.com> Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
2020-05-02v5.7: patch refreshesBruce Ashfield
Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
2020-04-05nfsroot: set tcp as the defalut transport protocolBruce Ashfield
1/1 [ Author: Liwei Song Email: liwei.song@windriver.com Subject: nfsroot: set tcp as the defalut transport protocol Date: Fri, 3 Apr 2020 15:23:19 +0800 UDP is disabled by default in commit b24ee6c64ca7 ("NFS: allow deprecation of NFS UDP protocol"), but the default mount options is still udp, change it to tcp to avoid the "Unsupported transport protocol udp" error if no protocol is specified when mount nfs. Fixes: b24ee6c64ca7 ("NFS: allow deprecation of NFS UDP protocol") Signed-off-by: Liwei Song <liwei.song@windriver.com> Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com> ] Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
2020-03-09kver: update -dev to v5.6-rc5Bruce Ashfield
Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
2020-01-17linux-yocto: Handle /bin/awk issuesBruce Ashfield
1/1 [ Author: Richard Purdie Email: richard.purdie@linuxfoundation.org Subject: linux-yocto: Handle /bin/awk issues Date: Tue, 22 Aug 2017 09:50:50 +0100 Standardise on /usr/bin/awk, else kernel-devsrc depends on /bin/awk which the system doesn't provide and core-image-sato-sdk (which depends on kernel-devsrc) will fail to build. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com> Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com> ] Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
2020-01-12v5.5: patch prepBruce Ashfield
Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
2019-12-22x86/boot/compressed/64: Define __force_order only when CONFIG_RANDOMIZE_BASE ↵Bruce Ashfield
is unset 1/1 [ Author: Khem Raj Email: raj.khem@gmail.com Subject: x86/boot/compressed/64: Define __force_order only when CONFIG_RANDOMIZE_BASE is unset Date: Fri, 20 Dec 2019 17:42:02 -0800 kaslr_64.c also defines the same variable, however when both files are included into final link, linker complains about multiple definition of `__force_order' which is coming from kaslr_64.o and pgtable_64.o, its possible that kaslr_64.o is disabled via CONFIG_RANDOMIZE_BASE config option, therefore define it conditionally only when CONFIG_RANDOMIZE_BASE is not set Signed-off-by: Khem Raj <raj.khem@gmail.com> Cc: Kirill A. Shutemov <kirill.shutemov@linux.intel.com> Cc: Kees Cook <keescook@chromium.org> Cc: "H. Peter Anvin" <hpa@zytor.com> Cc: Ingo Molnar <mingo@redhat.com> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: x86-ml <x86@kernel.org> Cc: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com> ] Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
2019-10-14meta: prep patches for v5.4 supportBruce Ashfield
Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
2019-10-08signal/ptrace: fix cgroup2/freezer long runtimesBruce Ashfield
1/1 [ Author: Bruce Ashfield Email: bruce.ashfield@gmail.com Subject: signal/ptrace: fix cgroup2/freezer long runtimes Date: Tue, 8 Oct 2019 13:15:46 +0000 As reported in the thread: https://lkml.org/lkml/2019/10/1/789, in kernels with commit 76f969e8948d82 [cgroup: cgroup v2 freezer], we were seeing much longer runtime in strace/ptrace tests (4 minutes versus 4 seconds). The issue only manifests if CONFIG_PREEMPT is enabled, which is in all of the default configurations. As sugggested in the thread, the movement of preempt_enable_no_resched() until after the cgroup is frozen returns the behaviour to pre-5.2 runtimes. Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com> ] Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
2019-10-07meta: add SPDX License Identifier and updates 00-README with License policyYann CARDAILLAC
Signed-off-by: Yann CARDAILLAC <ycnakajsph@gmail.com> Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
2019-07-22patches: refresh for 5.3Bruce Ashfield
Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
2019-07-22awk: refresh patch for v5.2Bruce Ashfield
Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
2019-05-29dev: v5.2 refresh and prepBruce Ashfield
Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
2019-04-23misc: add another awk script to fixup patchBruce Ashfield
Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
2019-02-07check console device file on fs when bootingBruce Ashfield
1/1 [ Author: Bruce Ashfield Email: bruce.ashfield@windriver.com Subject: check console device file on fs when booting Date: Thu, 8 Apr 2010 23:44:21 -0700 If a root filesystem is generated as non-root, one of the tell tale signs is /dev/console not being a character file. To save a whole class of questions, let's just test for the condition and let the user know. Signed-off-by: Richard Laroque <rlarocqu@windriver.com> Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com> ] Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
2019-01-10v5.0: kernel patch prepBruce Ashfield
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
2018-10-29ipv4: net namespace does not inherit network configurationsBruce Ashfield
1/1 [ Author: He Zhe Email: zhe.he@windriver.com Subject: ipv4: net namespace does not inherit network configurations Date: Mon, 29 Oct 2018 10:24:20 +0800 patch from https://lkml.org/lkml/2014/7/29/119 Ipv4 net namespace requires a similar logic change as commit a79ca223e029 [ipv6: fix bad free of addrconf_init_net] introduces for newer kernels. Since a net namespace is independent to another. That is, there is no any relationship between the net namespaces. So a new net namespace should not inherit network configurations from another net namespace including the host. CC: Hong Zhiguo <honkiko@gmail.com> CC: David S. Miller <davem@davemloft.net> Signed-off-by: Zhu Yanjun <zyjzyj2000@gmail.com> Signed-off-by: yzhu1 <yanjun.zhu@windriver.com> The patch was submitted upstream (https://lkml.org/lkml/2014/7/29/119), but did not get any significant discussion and was not rejected, and also was not merged. It still makes sense for Yocto linux kernel. Signed-off-by: He Zhe <zhe.he@windriver.com> Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com> ] Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
2018-10-08dev: update for 4.19+Bruce Ashfield
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
2018-08-14menuconfig,mconf-cfg: Allow specification of ncurses locationBruce Ashfield
1/1 [ Author: Bruce Ashfield Email: bruce.ashfield@windriver.com Subject: menuconfig,mconf-cfg: Allow specification of ncurses location Date: Mon, 2 Jul 2018 23:10:28 -0400 In some cross build environments such as the Yocto Project build environment it provides an ncurses library that is compiled differently than the host's version. This causes display corruption problems when the host's curses includes are used instead of the includes from the provided compiler are overridden. There is a second case where there is no curses libraries at all on the host system and menuconfig will just fail entirely. The solution is simply to allow an override variable in check-lxdialog.sh for environments such as the Yocto Project. Adding a CROSS_CURSES_LIB and CROSS_CURSES_INC solves the issue and allowing compiling and linking against the right headers and libraries. Signed-off-by: Jason Wessel <jason.wessel@windriver.com> cc: Michal Marek <mmarek@suse.cz> cc: linux-kbuild@vger.kernel.org Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com> ] Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
2018-07-02menuconfig,mconf-cfg: Allow specification of ncurses locationBruce Ashfield
1/1 [ Author: Bruce Ashfield Email: bruce.ashfield@windriver.com Subject: menuconfig,mconf-cfg: Allow specification of ncurses location Date: Mon, 2 Jul 2018 23:10:28 -0400 In some cross build environments such as the Yocto Project build environment it provides an ncurses library that is compiled differently than the host's version. This causes display corruption problems when the host's curses includes are used instead of the includes from the provided compiler are overridden. There is a second case where there is no curses libraries at all on the host system and menuconfig will just fail entirely. The solution is simply to allow an override variable in check-lxdialog.sh for environments such as the Yocto Project. Adding a CROSS_CURSES_LIB and CROSS_CURSES_INC solves the issue and allowing compiling and linking against the right headers and libraries. Signed-off-by: Jason Wessel <jason.wessel@windriver.com> cc: Michal Marek <mmarek@suse.cz> cc: linux-kbuild@vger.kernel.org Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com> ] Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
2018-05-09console check: update to v4.17 definitionsBruce Ashfield
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
2018-04-09modpost: srcversion sometimes incorrectBruce Ashfield
1/1 [ Author: Juro Bystricky Email: juro.bystricky@intel.com Subject: modpost: srcversion sometimes incorrect Date: Fri, 30 Mar 2018 10:14:05 -0700 "srcversion" field inserted into module modinfo section contains a sum of the source files which made it. However, this field can be incorrect. Building the same module can end up having inconsistent srcversion field eventhough the sources remain the same. This can be reproduced by building modules in a deeply nested directory, but other factors contribute as well. The reason for incorrect srcversion is that some source files can be simply silently skipped from the checksum calculation due to limited buffer space for line parsing. This patch addresses two issues: 1. Allocates a larger line buffer (32k vs 4k). 2. Issues a warning if a line length exceeds the line buffer. Signed-off-by: Juro Bystricky <juro.bystricky@intel.com> Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com> ] Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
2018-02-20patches: refresh for v4.16Bruce Ashfield
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
2017-12-01patches: 4.15-rc1 refreshesBruce Ashfield
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
2017-09-19patches: refresh for v4.14+Bruce Ashfield
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
2017-08-22linux-yocto: Handle /bin/awk issuesBruce Ashfield
1/1 [ Author: Richard Purdie Email: richard.purdie@linuxfoundation.org Subject: linux-yocto: Handle /bin/awk issues Date: Tue, 22 Aug 2017 09:50:50 +0100 Standardise on /usr/bin/awk, else kernel-devsrc depends on /bin/awk which the system doesn't provide and core-image-sato-sdk (which depends on kernel-devsrc) will fail to build. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com> ] Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
2017-08-21misc: drop ver linux patch (now upstream)Bruce Ashfield
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
2017-07-11kver: update to v4.12+ and patch refreshesBruce Ashfield
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
2017-01-30treegen: autoniminated patch refreshPaul Gortmaker
Take the patches that won't "git am" directly because of small context changes in surrounding code and re-export them with the refreshed/updated context so they will "git am" directly next time w/o needing to use the fall-back mechanism. Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
2017-01-29ver_linux: Use /usr/bin/awk instead of /bin/awkBruce Ashfield
1/1 [ Author: Saul Wold Email: sgw@linux.intel.com Subject: ver_linux: Use /usr/bin/awk instead of /bin/awk Date: Wed, 25 Jan 2017 10:35:42 -0800 Most Linux distributions contain awk in /usr/bin by default, not in /bin. Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com> ] Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
2016-11-17Revert "fs/nfs: Fix used uninitialized warn in nfs4_slot_seqid_in_use()"Bruce Ashfield
dropping already upstream patches. This reverts commit aa9a7eadd9dd31a867521ce24f19d105c74375e2.
2016-11-16fs/nfs: Fix used uninitialized warn in nfs4_slot_seqid_in_use()Bruce Ashfield
1/2 [ Author: Shuah Khan Email: shuahkh@osg.samsung.com Subject: fs/nfs: Fix used uninitialized warn in nfs4_slot_seqid_in_use() Date: Wed, 16 Nov 2016 15:36:39 -0500 commit 0ac84b72c0ed96ace1d8973a06f0120a3b905177 upstream. Fix the following warn: fs/nfs/nfs4session.c: In function ‘nfs4_slot_seqid_in_use’: fs/nfs/nfs4session.c:203:54: warning: ‘cur_seq’ may be used uninitialized in this function [-Wmaybe-uninitialized] if (nfs4_slot_get_seqid(tbl, slotid, &cur_seq) == 0 && ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~ cur_seq == seq_nr && test_bit(slotid, tbl->used_slots)) ~~~~~~~~~~~~~~~~~ Signed-off-by: Shuah Khan <shuahkh@osg.samsung.com> Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com> Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com> Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com> ] 2/2 [ Author: Arnd Bergmann Email: arnd@arndb.de Subject: NFSv4.1: work around -Wmaybe-uninitialized warning Date: Wed, 16 Nov 2016 15:36:40 -0500 commit e84efa32b9d2763fb92e73c8942100d8f55ad4ed upstream. A bugfix introduced a harmless gcc warning in nfs4_slot_seqid_in_use if we enable -Wmaybe-uninitialized again: fs/nfs/nfs4session.c:203:54: error: 'cur_seq' may be used uninitialized in this function [-Werror=maybe-uninitialized] gcc is not smart enough to conclude that the IS_ERR/PTR_ERR pair results in a nonzero return value here. Using PTR_ERR_OR_ZERO() instead makes this clear to the compiler. Fixes: e09c978aae5b ("NFSv4.1: Fix Oopsable condition in server callback races") Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com> Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com> ] Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
2016-11-03treegen: autoniminated patch refreshPaul Gortmaker
Take the patches that won't "git am" directly because of small context changes in surrounding code and re-export them with the refreshed/updated context so they will "git am" directly next time w/o needing to use the fall-back mechanism. Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
2016-10-22mips: remove patch merged upstreamPaul Gortmaker
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
2016-10-22powerpc: drop patch merged upstreamPaul Gortmaker
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
2016-09-07uvesafb: provide option to specify timeout for task completionBruce Ashfield
1/1 [ Author: Jianxun Zhang Email: jianxun.zhang@linux.intel.com Subject: uvesafb: provide option to specify timeout for task completion Date: Thu, 25 Aug 2016 15:30:55 -0700 We try to make this change a generic extension, but it is actually for a corner case. When a VM (qemu) gets a very limited cpu bandwidth from host, which could be under a heavy load, the existing 5000 ms timeout could occur and trigger error messages in the task function's callers. This change adds a new timeout parameter so that we can tweak the value as a workaround or for troubleshooting purposes. In the infinite wait case, A warning message is printed at 5000ms interval. In real world, the current 5 sec is generous enough for a video request in my opinion, so this change could not be very useful. Upstream Status: Inappropriate Signed-off-by: Jianxun Zhang <jianxun.zhang@linux.intel.com> Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com> ] Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
2016-09-074.8: sync missing 4.4 meta-dataBruce Ashfield
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
2016-08-254.8: patch refreshes for 4.8 kernel generationBruce Ashfield
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
2016-07-21lx-dialig: fix merge issuesBruce Ashfield
The patch [menuconfig,check-lxdiaglog.sh: Allow specification of ncurses location] has been carried since the 3.14 kernel. As it has been updated multiple times, the if block checking for CROSS_CURSES_LIB has migrated to an invalid location in the checks. This change moves it back on top where it belongs. Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
2016-07-074.7: patch refresh/updatesBruce Ashfield
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
2016-05-304.7: adjust patches and series for v4.7-rc1Bruce Ashfield
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
2016-05-12powerpc/ptrace: Fix out of bounds array access warningBruce Ashfield
1/2 [ Author: Khem Raj Email: raj.khem@gmail.com Subject: powerpc/ptrace: Fix out of bounds array access warning Date: Mon, 25 Apr 2016 05:47:01 +0000 gcc-6 correctly warns about a out of bounds access arch/powerpc/kernel/ptrace.c:407:24: warning: index 32 denotes an offset greater than size of 'u64[32][1] {aka long long unsigned int[32][1]}' [-Warray-bounds] offsetof(struct thread_fp_state, fpr[32][0])); ^ check the end of array instead of beginning of next element to fix this Signed-off-by: Khem Raj <raj.khem@gmail.com> Cc: Kees Cook <keescook@chromium.org> Cc: Michael Ellerman <mpe@ellerman.id.au> Cc: Segher Boessenkool <segher@kernel.crashing.org> Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com> ] 2/2 [ Author: Paul Burton Email: paul.burton@imgtec.com Subject: MIPS: Prevent "restoration" of MSA context in non-MSA kernels Date: Thu, 21 Apr 2016 18:04:53 +0100 If a kernel doesn't support MSA context (ie. CONFIG_CPU_HAS_MSA=n) then it will only keep 64 bits per FP register in thread context, and the calls to set_fpr64 in restore_msa_extcontext will overrun the end of the FP register context into the FCSR & MSACSR values. GCC 6.x has become smart enough to detect this & complain like so: arch/mips/kernel/signal.c: In function 'protected_restore_fp_context': ./arch/mips/include/asm/processor.h:114:17: error: array subscript is above array bounds [-Werror=array-bounds] fpr->val##width[FPR_IDX(width, idx)] = val; \ ~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~ ./arch/mips/include/asm/processor.h:118:1: note: in expansion of macro 'BUILD_FPR_ACCESS' BUILD_FPR_ACCESS(64) The only way to trigger this code to run would be for a program to set up an artificial extended MSA context structure following a sigframe & execute sigreturn. Whilst this doesn't allow a program to write to any state that it couldn't already, it makes little sense to allow this "restoration" of MSA context in a system that doesn't support MSA. Fix this by killing a program with SIGSYS if it tries something as crazy as "restoring" fake MSA context in this way, also fixing the build error & allowing for most of restore_msa_extcontext to be optimised out of kernels without support for MSA. Signed-off-by: Paul Burton <paul.burton@imgtec.com> Reported-by: Michal Toman <michal.toman@imgtec.com> Fixes: bf82cb30c7e5 ("MIPS: Save MSA extended context around signals") Cc: James Hogan <james.hogan@imgtec.com> Cc: stable <stable@vger.kernel.org> # v4.3+ Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com> ] Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
2016-04-20uvesafb: print error message when task timeout occursBruce Ashfield
1/1 [ Author: Jianxun Zhang Email: jianxun.zhang@linux.intel.com Subject: uvesafb: print error message when task timeout occurs Date: Thu, 14 Apr 2016 15:26:21 -0700 The driver waits for response from user space for a pending task until a timeout (UVESAFB_TIMEOUT) occurs. But the existing error message in later steps is a little obscure. This patch throws out an error message when timeout happens. Signed-off-by: Jianxun Zhang <jianxun.zhang@linux.intel.com> Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com> ] Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>