- 31 8月, 2020 23 次提交
-
-
由 Andrew Pinski 提交于
hulk inclusion category: feature bugzilla: NA CVE: NA --------------------------- This patch adds the config option for ILP32. Signed-off-by: NAndrew Pinski <Andrew.Pinski@caviumnetworks.com> Signed-off-by: NPhilipp Tomsich <philipp.tomsich@theobroma-systems.com> Signed-off-by: NChristoph Muellner <christoph.muellner@theobroma-systems.com> Signed-off-by: NYury Norov <ynorov@caviumnetworks.com> Reviewed-by: NDavid Daney <ddaney@caviumnetworks.com> Signed-off-by: NXiongfeng Wang <wangxiongfeng2@huawei.com> Reviewed-by: NHanjun Guo <guohanjun@huawei.com <mailto:guohanjun@huawei.com>> Signed-off-by: NYang Yingliang <yangyingliang@huawei.com>
-
由 Philipp Tomsich 提交于
hulk inclusion category: feature bugzilla: NA CVE: NA --------------------------- ILP32 VDSO exports following symbols: __kernel_rt_sigreturn; __kernel_gettimeofday; __kernel_clock_gettime; __kernel_clock_getres. What shared object to use, kernel selects depending on result of is_ilp32_compat_task() in arch/arm64/kernel/vdso.c, so it substitutes correct pages and spec. Adjusted to move the data page before code pages in sync with commit 601255ae ("arm64: vdso: move data page before code pages") Signed-off-by: NPhilipp Tomsich <philipp.tomsich@theobroma-systems.com> Signed-off-by: NChristoph Muellner <christoph.muellner@theobroma-systems.com> Signed-off-by: NYury Norov <ynorov@caviumnetworks.com> Signed-off-by: NBamvor Jian Zhang <bamv2005@gmail.com> Conflicts: arch/arm64/Makefile arch/arm64/kernel/vdso.c arch/arm64/kernel/vdso/gettimeofday.S [wangxiongfeng: 6d68752e7 arm64: makefile fix build of .i file in external module case Above commit introduce 'ifdef KBUILD_EXTMOD' in arch/arm64/Makefile. We add the mofication inside the 'ifdef'. 1126b81b arm64/vdso: don't leak kernel addresses Above commit remote the 'pr_info()' in vdso.c. We also remove it to be consistent. 7d5d601 arm64:vdso: Rewrite gettimeofday into C Above commit convert gettimeofday.S to gettimeofday.c, which cause a lot of conflicts. We fix the conflicts according to the following link. https://patchwork.kernel.org/patch/9757163/ ] Signed-off-by: NXiongfeng Wang <wangxiongfeng2@huawei.com> Reviewed-by: NHanjun Guo <guohanjun@huawei.com <mailto:guohanjun@huawei.com>> Signed-off-by: NYang Yingliang <yangyingliang@huawei.com>
-
由 Yury Norov 提交于
hulk inclusion category: feature bugzilla: NA CVE: NA --------------------------- ILP32 has context-related structures different from both aarch32 and aarch64/lp64. In this patch compat_arch_ptrace() renamed to compat_a32_ptrace(), and compat_arch_ptrace() only makes choice between compat_a32_ptrace() and new compat_ilp32_ptrace() handler. compat_ilp32_ptrace() calls generic compat_ptrace_request() for all requests except PTRACE_GETSIGMASK and PTRACE_SETSIGMASK, which need special handling. Signed-off-by: NYury Norov <ynorov@caviumnetworks.com> Signed-off-by: NBamvor Jian Zhang <bamv2005@gmail.com> Signed-off-by: NXiongfeng Wang <wangxiongfeng2@huawei.com> Reviewed-by: NHanjun Guo <guohanjun@huawei.com <mailto:guohanjun@huawei.com>> Signed-off-by: NYang Yingliang <yangyingliang@huawei.com>
-
由 Yury Norov 提交于
hulk inclusion category: feature bugzilla: NA CVE: NA --------------------------- ILP32 uses AARCH32 compat structures and syscall handlers for signals. But ILP32 rt_sigframe and ucontext structures differ from both LP64 and AARCH32. >From software point of view ILP32 is typical 32-bit compat ABI, and from hardware point of view, it's just like LP64. struct rt_sigframe defined in this patch in arch/arm64/kernel/signal_ilp32.c redefines one in arch/arm64/kernel/signal.c. And functions located in arch/arm64/include/signal_common.h pick up new structure to generate the code suitable for ILP32. Signed-off-by: NYury Norov <ynorov@caviumnetworks.com> Conflicts: arch/arm64/kernel/signal.c [wangxiongfeng: fix small conflict because of we include 'asm/ras.h' in arch/arm64/kernel/signal.c ] Signed-off-by: NXiongfeng Wang <wangxiongfeng2@huawei.com> Reviewed-by: NHanjun Guo <guohanjun@huawei.com <mailto:guohanjun@huawei.com>> Signed-off-by: NYang Yingliang <yangyingliang@huawei.com>
-
由 Yury Norov 提交于
hulk inclusion category: feature bugzilla: NA CVE: NA --------------------------- ILP32 needs to mix 32bit struct siginfo and 64bit sigframe for its signal handlers. Move the existing compat code for copying siginfo to user space and manipulating signal masks into signal32_common.c so it can be used to deliver aarch32 and ilp32 signals. Signed-off-by: NYury Norov <ynorov@caviumnetworks.com> Signed-off-by: NXiongfeng Wang <wangxiongfeng2@huawei.com> Reviewed-by: NHanjun Guo <guohanjun@huawei.com <mailto:guohanjun@huawei.com>> Signed-off-by: NYang Yingliang <yangyingliang@huawei.com>
-
由 Yury Norov 提交于
hulk inclusion category: feature bugzilla: NA CVE: NA --------------------------- Following patches of the series introduce ILP32-specific structures and handlers for signal subsystem. In this patch, functions and structures that common for LP64 and ILP32 are moved to arch/arm64/include/asm/signal_common.h to let ILP32 code reuse them. Some functions work with struct rt_sigframe which differs for ILP32. Therefore, to let ILP32 generate correct code, body of that functions are moved to arch/arm64/include/asm/signal_common.h. Others just declared in new header. Signed-off-by: NYury Norov <ynorov@caviumnetworks.com> Conflicts: arch/arm64/kernel/signal.c [wangxiongfeng: The following commit remove the first parameter of 'access_ok()', which cause the conflict. 736e917ed Remove 'type' argument from access_ok() function. So we add the modification for the extracted functions in arch/arm64/include/asm/signal_common.h] Signed-off-by: NXiongfeng Wang <wangxiongfeng2@huawei.com> Reviewed-by: NHanjun Guo <guohanjun@huawei.com <mailto:guohanjun@huawei.com>> Signed-off-by: NYang Yingliang <yangyingliang@huawei.com>
-
由 Yury Norov 提交于
hulk inclusion category: feature bugzilla: NA CVE: NA --------------------------- Depending on the personality of the task, syscalls has to be dispatched to either aarch64, aarch32 or aarch64/ilp32 syscall handlers. We add the support of ILP32 mode in this series, therefore introduce corresponding syscall table. Some system calls are wired to aarch32 syscall handlers, as listed in arch/arm64/kernel/sys_ilp32.c. For aarch64/ilp32, top halves of syscall arguments are meaningless anthough not zeroed by hardware. Do that in the delouse_pt_regs() routine to avoid passing garbage by userspace. Signed-off-by: NYury Norov <ynorov@caviumnetworks.com> Signed-off-by: NXiongfeng Wang <wangxiongfeng2@huawei.com> Reviewed-by: NHanjun Guo <guohanjun@huawei.com <mailto:guohanjun@huawei.com>> Signed-off-by: NYang Yingliang <yangyingliang@huawei.com>
-
由 Yury Norov 提交于
hulk inclusion category: feature bugzilla: NA CVE: NA --------------------------- According to userspace/kernel ABI, userspace off_t is passed in register pair just like in aarch32. In this patch corresponding aarch32 handlers are shared to ilp32 code. Signed-off-by: NYury Norov <ynorov@caviumnetworks.com> Conflicts: arch/arm64/kernel/sys32.c Signed-off-by: NXiongfeng Wang <wangxiongfeng2@huawei.com> Reviewed-by: NHanjun Guo <guohanjun@huawei.com <mailto:guohanjun@huawei.com>> Signed-off-by: NYang Yingliang <yangyingliang@huawei.com>
-
由 Yury Norov 提交于
hulk inclusion category: feature bugzilla: NA CVE: NA --------------------------- Like binfmt_elf32.c for AARCH32, binfmt_ilp32.c is needed to handle ILP32 binaries. Signed-off-by: NYury Norov <ynorov@caviumnetworks.com> Signed-off-by: NBamvor Jian Zhang <bamv2005@gmail.com> Signed-off-by: NXiongfeng Wang <wangxiongfeng2@huawei.com> Reviewed-by: NHanjun Guo <guohanjun@huawei.com <mailto:guohanjun@huawei.com>> Signed-off-by: NYang Yingliang <yangyingliang@huawei.com>
-
由 Yury Norov 提交于
hulk inclusion category: feature bugzilla: NA CVE: NA --------------------------- ILP32 patch series introduces new type of binaries which is also compat. So rename existung aarch32 compat_elf_hwcap's helps to avoid confusing. Signed-off-by: NYury Norov <ynorov@caviumnetworks.com> Signed-off-by: NXiongfeng Wang <wangxiongfeng2@huawei.com> Reviewed-by: NHanjun Guo <guohanjun@huawei.com <mailto:guohanjun@huawei.com>> Signed-off-by: NYang Yingliang <yangyingliang@huawei.com>
-
由 Yury Norov 提交于
hulk inclusion category: feature bugzilla: NA CVE: NA --------------------------- As we support more than one compat formats, it looks more reasonable to not use fs/compat_binfmt.c. Custom binfmt_elf32.c allows to move aarch32 specific definitions there and make code more maintainable and readable. Signed-off-by: NYury Norov <ynorov@caviumnetworks.com> Signed-off-by: NXiongfeng Wang <wangxiongfeng2@huawei.com> Reviewed-by: NHanjun Guo <guohanjun@huawei.com <mailto:guohanjun@huawei.com>> Signed-off-by: NYang Yingliang <yangyingliang@huawei.com>
-
由 Yury Norov 提交于
hulk inclusion category: feature bugzilla: NA CVE: NA --------------------------- ILP32 tasks are needed to be distinguished from LP64 and AARCH32. This patch adds helper functions is_ilp32_compat_{task,thread} and thread flag TIF_32BIT_AARCH64 to address it. This is a preparation for following patches in ILP32 patchset. For consistency, SET_PERSONALITY is changed here accordingly. Signed-off-by: NAndrew Pinski <Andrew.Pinski@caviumnetworks.com> Signed-off-by: NPhilipp Tomsich <philipp.tomsich@theobroma-systems.com> Signed-off-by: NChristoph Muellner <christoph.muellner@theobroma-systems.com> Signed-off-by: NYury Norov <ynorov@caviumnetworks.com> Reviewed-by: NDavid Daney <ddaney@caviumnetworks.com> Signed-off-by: NXiongfeng Wang <wangxiongfeng2@huawei.com> Reviewed-by: NHanjun Guo <guohanjun@huawei.com <mailto:guohanjun@huawei.com>> Signed-off-by: NYang Yingliang <yangyingliang@huawei.com>
-
由 Yury Norov 提交于
hulk inclusion category: feature bugzilla: NA CVE: NA --------------------------- Based on patch of Andrew Pinski. This patch introduces is_a32_compat_task and is_a32_thread so it is easier to say this is a a32 specific thread or a generic compat thread/task. Corresponding functions are located in <asm/is_compat.h> to avoid mess in headers. Some files include both <linux/compat.h> and <asm/compat.h>, and this is wrong because <linux/compat.h> has <asm/compat.h> already included. It was fixed too. Signed-off-by: NYury Norov <ynorov@caviumnetworks.com> Signed-off-by: NAndrew Pinski <Andrew.Pinski@caviumnetworks.com> Signed-off-by: NBamvor Jian Zhang <bamv2005@gmail.com> Conflicts: arch/arm64/include/asm/processor.h arch/arm64/kernel/process.c arch/arm64/kernel/syscall.c [wangxiongfeng: fix conflicts in arch/arm64/include/asm/processor.h because of the following commits: 2f26fc4e0 arm64: compat: Reduce address limit 2a1d3f8a9 arm64: ptrace: Override SPSR.SS when single-stepping is enabled] Signed-off-by: NXiongfeng Wang <wangxiongfeng2@huawei.com> Reviewed-by: NHanjun Guo <guohanjun@huawei.com <mailto:guohanjun@huawei.com>> Signed-off-by: NYang Yingliang <yangyingliang@huawei.com>
-
由 Andrew Pinski 提交于
hulk inclusion category: feature bugzilla: NA CVE: NA --------------------------- Define __BITS_PER_LONG depending on the ABI used (i.e. check whether __ILP32__ or __LP64__ is defined). This is necessary for glibc to determine the appropriate type definitions for the system call interface. Signed-off-by: NAndrew Pinski <apinski@cavium.com> Signed-off-by: NPhilipp Tomsich <philipp.tomsich@theobroma-systems.com> Signed-off-by: NChristoph Muellner <christoph.muellner@theobroma-systems.com> Signed-off-by: NYury Norov <ynorov@caviumnetworks.com> Reviewed-by: NDavid Daney <ddaney@caviumnetworks.com> Signed-off-by: NXiongfeng Wang <wangxiongfeng2@huawei.com> Reviewed-by: NHanjun Guo <guohanjun@huawei.com <mailto:guohanjun@huawei.com>> Signed-off-by: NYang Yingliang <yangyingliang@huawei.com>
-
由 Yury Norov 提交于
hulk inclusion category: feature bugzilla: NA CVE: NA --------------------------- The ILP32 for ARM64 patch series introduces another 'compat' mode additionally to aarch32_el0. So to avoid confusing, aarch32-only functions renamed in according to it. Signed-off-by: NYury Norov <ynorov@caviumnetworks.com> Conflicts: arch/arm64/kernel/cpufeature.c arch/arm64/kernel/sys32.c arch/arm64/kernel/sys_compat.c arch/arm64/kernel/syscall.c arch/arm64/kernel/traps.c [wangxiongfeng: conflicts because of the following commit. acf2a6efa arm64: use the correct function type for __arm64_sys_ni_syscall f5b984c22 arm64: compat: Don't pull syscall number from regs in arm_compat_syscall 119703e85 arm64: cpufeature: Set the FP/SIMD compat HWCAP So we only change 'compat_*' to 'a32_*'. 6a605e36 arm64: Force SSBS on context switch Above commit add 'compat_user_mode()' in 'ssbs_thread_switch()'. We also need to change it. ] Signed-off-by: NXiongfeng Wang <wangxiongfeng2@huawei.com> Reviewed-by: NHanjun Guo <guohanjun@huawei.com <mailto:guohanjun@huawei.com>> Signed-off-by: NYang Yingliang <yangyingliang@huawei.com>
-
由 Andrew Pinski 提交于
hulk inclusion category: feature bugzilla: NA CVE: NA --------------------------- In this patchset ILP32 ABI support is added. Additionally to AARCH32, which is binary-compatible with ARM, ILP32 is (mostly) ABI-compatible. From now, AARCH32_EL0 (former COMPAT) config option means the support of AARCH32 userspace, and ARM64_ILP32 - support of ILP32 ABI (see following patches). COMPAT indicates that one of them or both is enabled. Where needed, CONFIG_COMPAT is changed over to use CONFIG_AARCH32_EL0 instead. Reviewed-by: NDavid Daney <ddaney@caviumnetworks.com> Signed-off-by: NAndrew Pinski <Andrew.Pinski@caviumnetworks.com> Signed-off-by: NYury Norov <ynorov@caviumnetworks.com> Signed-off-by: NPhilipp Tomsich <philipp.tomsich@theobroma-systems.com> Signed-off-by: NChristoph Muellner <christoph.muellner@theobroma-systems.com> Signed-off-by: NBamvor Jian Zhang <bamv2005@gmail.com> Conflicts: arch/arm64/kernel/cpufeature.c [wangxiongfeng: conflicts below 'arm64_cpu_capabilities compat_elf_hwcaps' because we have the follow commit. 119703e850 arm64: cpufeature: Set the FP/SIMD compat HWCAP bits properly Fix conflicts by only changing 'CONFIG_COMPAT' to 'CONFIG_AARCH32_EL0'] Signed-off-by: NXiongfeng Wang <wangxiongfeng2@huawei.com> Reviewed-by: NHanjun Guo <guohanjun@huawei.com <mailto:guohanjun@huawei.com>> Signed-off-by: NYang Yingliang <yangyingliang@huawei.com>
-
由 Yury Norov 提交于
hulk inclusion category: feature bugzilla: NA CVE: NA --------------------------- Based on Andrew Pinski's patch-series. Signed-off-by: NYury Norov <ynorov@caviumnetworks.com> Signed-off-by: NXiongfeng Wang <wangxiongfeng2@huawei.com> Reviewed-by: NHanjun Guo <guohanjun@huawei.com <mailto:guohanjun@huawei.com>> Signed-off-by: NYang Yingliang <yangyingliang@huawei.com>
-
由 Yury Norov 提交于
hulk inclusion category: feature bugzilla: NA CVE: NA --------------------------- Thread bits may be accessed from low-level code, so isolating is a measure to avoid circular dependencies in header files. The exact reason for circular dependency is WARN_ON() macro added in patch edd63a27 "set_restore_sigmask() is never called without SIGPENDING (and never should be)" Signed-off-by: NYury Norov <ynorov@caviumnetworks.com> Signed-off-by: NXiongfeng Wang <wangxiongfeng2@huawei.com> Reviewed-by: NHanjun Guo <guohanjun@huawei.com <mailto:guohanjun@huawei.com>> Signed-off-by: NYang Yingliang <yangyingliang@huawei.com>
-
由 Yury Norov 提交于
hulk inclusion category: feature bugzilla: NA CVE: NA --------------------------- The newer prlimit64 syscall provides all the functionality provided by getrlimit and setrlimit syscalls and adds the pid of target process, so future architectures won't need to include getrlimit and setrlimit. Therefore drop getrlimit and setrlimit syscalls from the generic syscall list unless __ARCH_WANT_SET_GET_RLIMIT is defined by the architecture's unistd.h prior to including asm-generic/unistd.h, and adjust all architectures using the generic syscall list to define it so that no in-tree architectures are affected. Cc: Arnd Bergmann <arnd@arndb.de> Cc: James Hogan <james.hogan@imgtec.com> Cc: linux-arch@vger.kernel.org Cc: linux-snps-arc@lists.infradead.org Cc: Catalin Marinas <catalin.marinas@arm.com> Cc: Will Deacon <will.deacon@arm.com> Cc: linux-arm-kernel@lists.infradead.org Cc: Mark Salter <msalter@redhat.com> Cc: Aurelien Jacquiot <a-jacquiot@ti.com> Cc: linux-c6x-dev@linux-c6x.org Cc: Richard Kuo <rkuo@codeaurora.org> Cc: linux-hexagon@vger.kernel.org Cc: linux-metag@vger.kernel.org Cc: Jonas Bonn <jonas@southpole.se> Cc: linux@lists.openrisc.net Cc: Chen Liqin <liqin.linux@gmail.com> Cc: Lennox Wu <lennox.wu@gmail.com> Cc: Chris Metcalf <cmetcalf@mellanox.com> Cc: Guan Xuetao <gxt@mprc.pku.edu.cn> Cc: Ley Foon Tan <lftan@altera.com> Cc: nios2-dev@lists.rocketboards.org Cc: Yoshinori Sato <ysato@users.sourceforge.jp> Cc: uclinux-h8-devel@lists.sourceforge.jp Signed-off-by: NYury Norov <ynorov@caviumnetworks.com> Acked-by: NArnd Bergmann <arnd@arndb.de> Acked-by: Mark Salter <msalter@redhat.com> [c6x] Acked-by: James Hogan <james.hogan@imgtec.com> [metag] Acked-by: Ley Foon Tan <lftan@altera.com> [nios2] Acked-by: Stafford Horne <shorne@gmail.com> [openrisc] Acked-by: Will Deacon <will.deacon@arm.com> [arm64] Acked-by: Vineet Gupta <vgupta@synopsys.com> #arch/arc bits Signed-off-by: NXiongfeng Wang <wangxiongfeng2@huawei.com> Reviewed-by: NHanjun Guo <guohanjun@huawei.com <mailto:guohanjun@huawei.com>> Signed-off-by: NYang Yingliang <yangyingliang@huawei.com>
-
由 Yury Norov 提交于
hulk inclusion category: feature bugzilla: NA CVE: NA --------------------------- All new 32-bit architectures should have 64-bit userspace off_t type, but existing architectures has 32-bit ones. To enforce the rule, new config option is added to arch/Kconfig that defaults ARCH_32BIT_OFF_T to be disabled for new 32-bit architectures. All existing 32-bit architectures enable it explicitly. New option affects force_o_largefile() behaviour. Namely, if userspace off_t is 64-bits long, we have no reason to reject user to open big files. Note that even if architectures has only 64-bit off_t in the kernel (arc, c6x, h8300, hexagon, nios2, openrisc, and unicore32), a libc may use 32-bit off_t, and therefore want to limit the file size to 4GB unless specified differently in the open flags. Signed-off-by: NYury Norov <ynorov@caviumnetworks.com> Acked-by: NArnd Bergmann <arnd@arndb.de> Conflicts: arch/x86/um/Kconfig [wangxiongfeng: conflicts in arch/x86/um/Kconfig. We only need to add 'select ARCH_32BIT_OFF_T' and ignore others. ] Signed-off-by: NXiongfeng Wang <wangxiongfeng2@huawei.com> Reviewed-by: NHanjun Guo <guohanjun@huawei.com <mailto:guohanjun@huawei.com>> Signed-off-by: NYang Yingliang <yangyingliang@huawei.com>
-
由 Yury Norov 提交于
hulk inclusion category: feature bugzilla: NA CVE: NA --------------------------- The only difference between native and compat openat and open_by_handle_at is that non-compat version forces O_LARGEFILE, and it should be the default behaviour for all architectures, as we are going to drop the support of 32-bit userspace off_t. Signed-off-by: NYury Norov <ynorov@caviumnetworks.com> Acked-by: NArnd Bergmann <arnd@arndb.de> Signed-off-by: NXiongfeng Wang <wangxiongfeng2@huawei.com> Reviewed-by: NHanjun Guo <guohanjun@huawei.com <mailto:guohanjun@huawei.com>> Signed-off-by: NYang Yingliang <yangyingliang@huawei.com>
-
由 James Morse 提交于
hulk inclusion category: feature bugzilla: NA CVE: NA --------------------------- compat_ptrace_request() lacks handlers for PTRACE_{G,S}ETSIGMASK, instead using those in ptrace_request(). The compat variant should read a compat_sigset_t from userspace instead of ptrace_request()s sigset_t. While compat_sigset_t is the same size as sigset_t, it is defined as 2xu32, instead of a single u64. On a big-endian CPU this means that compat_sigset_t is passed to user-space using middle-endianness, where the least-significant u32 is written most significant byte first. If ptrace_request()s code is used userspace will read the most significant u32 where it expected the least significant. Instead of duplicating ptrace_request()s code as a special case in the arch code, handle it here. Fixes: 29000cae ("ptrace: add ability to get/set signal-blocked mask") CC: Andrey Vagin <avagin@openvz.org> Signed-off-by: NJames Morse <james.morse@arm.com> Yury: Replace sigset_{to,from}_compat() with new {get,put}_compat_sigset() Signed-off-by: NYury Norov <ynorov@caviumnetworks.com> Conflicts: kernel/ptrace.c [wangxiongfeng: conflicts because of the following patch commit 4afa2bd35 ptrace: take into account saved_sigmask in PTRACE{GET, SET}SIGMASK Fix it by calling 'clear_tsk_restore_sigmask()' after 'ptrace_setsigmask()'] Signed-off-by: NXiongfeng Wang <wangxiongfeng2@huawei.com> Reviewed-by: NHanjun Guo <guohanjun@huawei.com <mailto:guohanjun@huawei.com>> Signed-off-by: NYang Yingliang <yangyingliang@huawei.com>
-
由 Dave Martin 提交于
hulk inclusion category: feature bugzilla: NA CVE: NA --------------------------- ILP32 uses the same struct sigcontext as the native ABI (i.e., LP64), but a different layout for the rest of the signal frame (since siginfo_t and ucontext_t are both ABI-dependent). Since the purpose of parse_user_sigframe() is really to parse sigcontext and not the whole signal frame, the function does not need to depend on the layout of rt_sigframe -- the only purpose of the rt_sigframe pointer is for use as a base to measure the signal frame size. So, this patch renames the function to make it clear that only the sigcontext is really being parsed, and makes the sigframe base pointer generic. A macro is defined to provide a suitable duck-typed interface that can be used with both sigframe definitions. Suggested-by: NYury Norov <ynorov@caviumnetworks.com> Signed-off-by: NDave Martin <Dave.Martin@arm.com> Signed-off-by: NYury Norov <ynorov@caviumnetworks.com> Signed-off-by: NXiongfeng Wang <wangxiongfeng2@huawei.com> Reviewed-by: NHanjun Guo <guohanjun@huawei.com <mailto:guohanjun@huawei.com>> Signed-off-by: NYang Yingliang <yangyingliang@huawei.com>
-
- 20 8月, 2020 2 次提交
-
-
由 Luo Jiaxing 提交于
mainline inclusion from mainline-v5.9-rc1 commit 38653379 category: bugfix bugzilla: NA CVE: NA -------------------------------- libata currently attempts to reset even if the SATA disk is unplugged. To avoid the meaningless reset of a missing disk, libsas should report offline status to libata. libata already provides a .prereset callback for this purpose. This is called by ata_eh_reset() and can be used to influence whether a reset attempt should be made. Add sas_ata_preset callback to check status of phy and disk. If the disk is already offline or phy is disabled, we return -ENOENT to libata to avoid the reset. Link: https://lore.kernel.org/r/1595408643-63011-3-git-send-email-luojiaxing@huawei.comReviewed-by: NJohn Garry <john.garry@huawei.com> Reviewed-by: NJason Yan <yanaijie@huawei.com> Signed-off-by: NLuo Jiaxing <luojiaxing@huawei.com> Signed-off-by: NMartin K. Petersen <martin.petersen@oracle.com> Signed-off-by: NYang Yingliang <yangyingliang@huawei.com>
-
由 Luo Jiaxing 提交于
mainline inclusion from mainline-v5.9-rc1 commit 3a243c2c category: bugfix bugzilla: NA CVE: NA -------------------------------- sas_sata_ops uses ata_std_postreset as .postreset callback. However, ata_std_postreset() calls sata_scr_read()/sata_scr_write() which need to access the ATA SCR register. This register not available in the libsas case and the functions always return -EOPNOTSUPP. Drop the .postreset callback. Link: https://lore.kernel.org/r/1595408643-63011-2-git-send-email-luojiaxing@huawei.comReviewed-by: NJohn Garry <john.garry@huawei.com> Reviewed-by: NJason Yan <yanaijie@huawei.com> Signed-off-by: NLuo Jiaxing <luojiaxing@huawei.com> Signed-off-by: NMartin K. Petersen <martin.petersen@oracle.com> Signed-off-by: NYang Yingliang <yangyingliang@huawei.com>
-
- 19 8月, 2020 3 次提交
-
-
由 Joerg Roedel 提交于
commit 763802b5 upstream. Commit 3f8fd02b ("mm/vmalloc: Sync unmappings in __purge_vmap_area_lazy()") introduced a call to vmalloc_sync_all() in the vunmap() code-path. While this change was necessary to maintain correctness on x86-32-pae kernels, it also adds additional cycles for architectures that don't need it. Specifically on x86-64 with CONFIG_VMAP_STACK=y some people reported severe performance regressions in micro-benchmarks because it now also calls the x86-64 implementation of vmalloc_sync_all() on vunmap(). But the vmalloc_sync_all() implementation on x86-64 is only needed for newly created mappings. To avoid the unnecessary work on x86-64 and to gain the performance back, split up vmalloc_sync_all() into two functions: * vmalloc_sync_mappings(), and * vmalloc_sync_unmappings() Most call-sites to vmalloc_sync_all() only care about new mappings being synchronized. The only exception is the new call-site added in the above mentioned commit. Shile Zhang directed us to a report of an 80% regression in reaim throughput. Fixes: 3f8fd02b ("mm/vmalloc: Sync unmappings in __purge_vmap_area_lazy()") Reported-by: Nkernel test robot <oliver.sang@intel.com> Reported-by: NShile Zhang <shile.zhang@linux.alibaba.com> Signed-off-by: NJoerg Roedel <jroedel@suse.de> Signed-off-by: NAndrew Morton <akpm@linux-foundation.org> Tested-by: NBorislav Petkov <bp@suse.de> Acked-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> [GHES] Cc: Dave Hansen <dave.hansen@linux.intel.com> Cc: Andy Lutomirski <luto@kernel.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Ingo Molnar <mingo@redhat.com> Cc: <stable@vger.kernel.org> Link: http://lkml.kernel.org/r/20191009124418.8286-1-joro@8bytes.org Link: https://lists.01.org/hyperkitty/list/lkp@lists.01.org/thread/4D3JPPHBNOSPFK2KEPC6KGKS6J25AIDB/ Link: http://lkml.kernel.org/r/20191113095530.228959-1-shile.zhang@linux.alibaba.comSigned-off-by: NLinus Torvalds <torvalds@linux-foundation.org> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: NYang Yingliang <yangyingliang@huawei.com>
-
由 Yang Yingliang 提交于
hulk inclusion category: bugfix bugzilla: NA CVE: CVE-2015-7837 --------------------------- Kexec reboot in case secure boot being enabled does not keep the secure boot mode in new kernel, so later one can load unsigned kernel via legacy kexec_load. In this state, the system is missing the protections provided by secure boot. Adding a patch to fix this by retain the secure_boot flag in original kernel. secure_boot flag in boot_params is set in EFI stub, but kexec bypasses the stub. Fixing this issue by copying secure_boot flag across kexec reboot. Signed-off-by: NYang Yingliang <yangyingliang@huawei.com> Reviewed-by: NJason Yan <yanaijie@huawei.com> Signed-off-by: NYang Yingliang <yangyingliang@huawei.com>
-
由 Xie XiuQi 提交于
hulk inclusion cagegory: feature feature: support 1822 on x86 platform After patch "5d57d1e2 net/hinic: Add support for X86 Arch", hinic driver could support x86 platform, so enable this config by default. Link: https://gitee.com/openeuler/kernel/issues/I1DC1FSigned-off-by: NXie XiuQi <xiexiuqi@huawei.com> Signed-off-by: NYang Yingliang <yangyingliang@huawei.com>
-
- 17 8月, 2020 12 次提交
-
-
由 Yang Yingliang 提交于
hulk inclusion category: bugfix bugzilla: CVE: NA --------------------------- Add skcd->no_refcnt check which is missed when backporting ad0f75e5 ("cgroup: fix cgroup_sk_alloc() for sk_clone_lock()"). This patch is needed in stable-4.9, stable-4.14 and stable-4.19. Signed-off-by: NYang Yingliang <yangyingliang@huawei.com> Reviewed-by: NKefeng Wang <wangkefeng.wang@huawei.com> Signed-off-by: NYang Yingliang <yangyingliang@huawei.com>
-
由 Yang Yingliang 提交于
This reverts commit f6b330ac. The patch is used in kernel-4.19, revert this patch and merge the LTS patch. Reported-by: N李义 <yilikernel@qq.com> Signed-off-by: NYang Yingliang <yangyingliang@huawei.com>
-
由 Yang Yingliang 提交于
hulk inclusion category: bugfix bugzilla: CVE: NA --------------------------- Add skcd->no_refcnt check which is missed when backporting ad0f75e5 ("cgroup: fix cgroup_sk_alloc() for sk_clone_lock()"). This patch is needed in stable-4.9, stable-4.14 and stable-4.19. Signed-off-by: NYang Yingliang <yangyingliang@huawei.com> Reviewed-by: NKefeng Wang <wangkefeng.wang@huawei.com> Signed-off-by: NYang Yingliang <yangyingliang@huawei.com>
-
由 Jan Kara 提交于
mainline inclusion from mainline-5.9-rc1 commit 0f9be45c08148d3c9686671acaf08579b49ba2f0 category: bugfix bugzilla: 39268 CVE: NA --------------------------- When remounting filesystem fails late during remount handling and block_validity mount option is also changed during the remount, we fail to restore system zone information to a state matching the mount option. This is mostly harmless, just the block validity checking will not match the situation described by the mount option. Make sure these two are always consistent. Reported-by: NLukas Czerner <lczerner@redhat.com> Reviewed-by: NLukas Czerner <lczerner@redhat.com> Signed-off-by: NJan Kara <jack@suse.cz> Reviewed-by: Nzhangyi (F) <yi.zhang@huawei.com> Signed-off-by: NYang Yingliang <yangyingliang@huawei.com>
-
由 Jan Kara 提交于
mainline inclusion from mainline-5.9-rc1 commit 20c8c96f0113ec4b19d25ec1131971efd9313967 category: bugfix bugzilla: 39268 CVE: NA --------------------------- There's one place that fails to handle error from add_system_zone() call and thus we can fail to protect superblock and group-descriptor blocks properly in case of ENOMEM. Fix it. Reported-by: NLukas Czerner <lczerner@redhat.com> Reviewed-by: NLukas Czerner <lczerner@redhat.com> Signed-off-by: NJan Kara <jack@suse.cz> Signed-off-by: NLuo Meng <luomeng12@huawei.com> Reviewed-by: Nzhangyi (F) <yi.zhang@huawei.com> Signed-off-by: NYang Yingliang <yangyingliang@huawei.com>
-
由 Jan Kara 提交于
mainline inclusion from mainline-5.9-rc1 commit f97ad45a0d856d71bb0c37aa9a862c19f0c161eb category: bugfix bugzilla: 39268 CVE: NA --------------------------- After the previous patch, ext4_data_block_valid_rcu() has a single caller. Fold it into it. Reviewed-by: NLukas Czerner <lczerner@redhat.com> Signed-off-by: NJan Kara <jack@suse.cz> Signed-off-by: NLuo Meng <luomeng12@huawei.com> Reviewed-by: Nzhangyi (F) <yi.zhang@huawei.com> Signed-off-by: NYang Yingliang <yangyingliang@huawei.com>
-
由 Jan Kara 提交于
mainline inclusion from mainline-5.9-rc1 commit 80681a7fa4bf45cf04e082c45055ba490eb49935 category: bugfix bugzilla: 39268 CVE: NA --------------------------- Currently, system zones just track ranges of block, that are "important" fs metadata (bitmaps, group descriptors, journal blocks, etc.). This however complicates how extent tree (or indirect blocks) can be checked for inodes that actually track such metadata - currently the journal inode but arguably we should be treating quota files or resize inode similarly. We cannot run __ext4_ext_check() on such metadata inodes when loading their extents as that would immediately trigger the validity checks and so we just hack around that and special-case the journal inode. This however leads to a situation that a journal inode which has extent tree of depth at least one can have invalid extent tree that gets unnoticed until ext4_cache_extents() crashes. To overcome this limitation, track inode number each system zone belongs to (0 is used for zones not belonging to any inode). We can then verify inode number matches the expected one when verifying extent tree and thus avoid the false errors. With this there's no need to to special-case journal inode during extent tree checking anymore so remove it. Fixes: 0a944e8a ("ext4: don't perform block validity checks on the journal inode") Reported-by: NWolfgang Frisch <wolfgang.frisch@suse.com> Reviewed-by: NLukas Czerner <lczerner@redhat.com> Signed-off-by: NJan Kara <jack@suse.cz> Conflict: fs/ext4/block_validity.c 54d3adbc ("ext4: save all error info in save_error_info() ...") Signed-off-by: NLuo Meng <luomeng12@huawei.com> Reviewed-by: Nzhangyi (F) <yi.zhang@huawei.com> Signed-off-by: NYang Yingliang <yangyingliang@huawei.com>
-
由 Jan Kara 提交于
mainline inclusion from mainline-5.9-rc1 commit adb2de050fd5662242f1988541693add29580e82 category: bugfix bugzilla: 39268 CVE: NA --------------------------- Currently, add_system_zone() just silently merges two added system zones that overlap. However the overlap should not happen and it generally suggests that some unrelated metadata overlap which indicates the fs is corrupted. We should have caught such problems earlier (e.g. in ext4_check_descriptors()) but add this check as another line of defense. In later patch we also use this for stricter checking of journal inode extent tree. Reviewed-by: NLukas Czerner <lczerner@redhat.com> Signed-off-by: NJan Kara <jack@suse.cz> Signed-off-by: NLuo Meng <luomeng12@huawei.com> Reviewed-by: Nzhangyi (F) <yi.zhang@huawei.com> Signed-off-by: NYang Yingliang <yangyingliang@huawei.com>
-
由 Jan Kara 提交于
mainline inclusion from mainline-5.9-rc1 commit 82e9a0c81aac04484e0f44be50e62ccca442084f category: bugfix bugzilla: 39268 CVE: NA --------------------------- ext4_setup_system_zone() can fail. Handle the failure in ext4_remount(). Reviewed-by: NLukas Czerner <lczerner@redhat.com> Signed-off-by: NJan Kara <jack@suse.cz> Signed-off-by: NLuo Meng <luomeng12@huawei.com> Reviewed-by: Nzhangyi (F) <yi.zhang@huawei.com> Signed-off-by: NYang Yingliang <yangyingliang@huawei.com>
-
由 Zheng Bin 提交于
mainline inclusion from mainline-bc5603c314bd commit bc5603c314bd1d2a931ad3088fcea52f20cfbac5 category: bugfix bugzilla: 34591 CVE: NA --------------------------- Use the following command to test nfsv4(size of file1M is 1MB): mount -t nfs -o vers=4.0,actimeo=60 127.0.0.1/dir1 /mnt cp file1M /mnt du -h /mnt/file1M -->0 within 60s, then 1M When write is done(cp file1M /mnt), will call this: nfs_writeback_done nfs4_write_done nfs4_write_done_cb nfs_writeback_update_inode nfs_post_op_update_inode_force_wcc_locked(change, ctime, mtime nfs_post_op_update_inode_force_wcc_locked nfs_set_cache_invalid nfs_refresh_inode_locked nfs_update_inode nfsd write response contains change, ctime, mtime, the flag will be clear after nfs_update_inode. Howerver, write response does not contain space_used, previous open response contains space_used whose value is 0, so inode->i_blocks is still 0. nfs_getattr -->called by "du -h" do_update |= force_sync || nfs_attribute_cache_expired -->false in 60s cache_validity = READ_ONCE(NFS_I(inode)->cache_validity) do_update |= cache_validity & (NFS_INO_INVALID_ATTR -->false if (do_update) { __nfs_revalidate_inode } Within 60s, does not send getattr request to nfsd, thus "du -h /mnt/file1M" is 0. Add a NFS_INO_INVALID_BLOCKS flag, set it when nfsv4 write is done. [zb: although commit 1c341b77 ("NFS: Add deferred cache invalidation for close-to-open consistency violations") not merged, still define NFS_INO_INVALID_BLOCKS BIT(14)] Fixes: 16e14375 ("NFS: More fine grained attribute tracking") Signed-off-by: NZheng Bin <zhengbin13@huawei.com> Signed-off-by: NAnna Schumaker <Anna.Schumaker@Netapp.com> Signed-off-by: NZheng Bin <zhengbin13@huawei.com> Reviewed-by: Nzhangyi (F) <yi.zhang@huawei.com> Signed-off-by: NYang Yingliang <yangyingliang@huawei.com>
-
由 Tycho Andersen 提交于
[ Upstream commit 2e5383d7 ] Older (and maybe current) versions of systemd set release_agent to "" when shutting down, but do not set notify_on_release to 0. Since 64e90a8a ("Introduce STATIC_USERMODEHELPER to mediate call_usermodehelper()"), we filter out such calls when the user mode helper path is "". However, when used in conjunction with an actual (i.e. non "") STATIC_USERMODEHELPER, the path is never "", so the real usermode helper will be called with argv[0] == "". Let's avoid this by not invoking the release_agent when it is "". Signed-off-by: NTycho Andersen <tycho@tycho.ws> Signed-off-by: NTejun Heo <tj@kernel.org> Signed-off-by: NSasha Levin <sashal@kernel.org> Signed-off-by: NYang Yingliang <yangyingliang@huawei.com>
-
由 Vasily Averin 提交于
[ Upstream commit db8dd969 ] if seq_file .next fuction does not change position index, read after some lseek can generate unexpected output. # mount | grep cgroup # dd if=/mnt/cgroup.procs bs=1 # normal output ... 1294 1295 1296 1304 1382 584+0 records in 584+0 records out 584 bytes copied dd: /mnt/cgroup.procs: cannot skip to specified offset 83 <<< generates end of last line 1383 <<< ... and whole last line once again 0+1 records in 0+1 records out 8 bytes copied dd: /mnt/cgroup.procs: cannot skip to specified offset 1386 <<< generates last line anyway 0+1 records in 0+1 records out 5 bytes copied https://bugzilla.kernel.org/show_bug.cgi?id=206283Signed-off-by: NVasily Averin <vvs@virtuozzo.com> Signed-off-by: NTejun Heo <tj@kernel.org> Signed-off-by: NSasha Levin <sashal@kernel.org> Signed-off-by: NYang Yingliang <yangyingliang@huawei.com>
-