Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753223AbbGQQ51 (ORCPT ); Fri, 17 Jul 2015 12:57:27 -0400 Received: from mx1.redhat.com ([209.132.183.28]:58985 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752050AbbGQQ5Z (ORCPT ); Fri, 17 Jul 2015 12:57:25 -0400 From: Josh Poimboeuf To: Thomas Gleixner , Ingo Molnar , "H. Peter Anvin" Cc: Michal Marek , Peter Zijlstra , Andy Lutomirski , Borislav Petkov , Linus Torvalds , Andi Kleen , Pedro Alves , x86@kernel.org, live-patching@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [RFC PATCH 00/21] x86: Proposed fixes for stackvalidate warnings Date: Fri, 17 Jul 2015 11:47:16 -0500 Message-Id: In-Reply-To: <20150715101627.GA21770@gmail.com> References: <20150715101627.GA21770@gmail.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 3069 Lines: 63 These patches fix many of the warnings reported by stackvalidate. They're based on top of the "Compile-time stack validation" v7 patch set [1]. They've been compile-tested and boot tested in a VM, but I haven't attempted any meaningful testing for most of them. This should give an idea of what kinds of changes I think are needed. [1] https://lkml.kernel.org/r/cover.1436893563.git.jpoimboe@redhat.com Josh Poimboeuf (21): stackvalidate: Process ignores earlier and add more ignore checks stackvalidate: Add C version of STACKVALIDATE_IGNORE_INSN x86/asm: Add C versions of FRAME and ENDFRAME macros x86/hweight: Add stack frame dependency for __arch_hweight*() x86/xen: Add stack frame dependency to hypercall inline asm calls x86/paravirt: Add stack frame dependency to PVOP inline asm calls x86/paravirt: Fix frame pointer usage in PV_CALLEE_SAVE_REGS_THUNK x86/paravirt: Align paravirt thunk functions at 16-byte boundaries x86/amd: Set ELF function type for vide() x86/reboot: Add ljmp instructions to stackvalidate whitelist x86/xen: Add xen_cpuid() and xen_setup_gdt() to stackvalidate whitelists sched: Add __schedule() to stackvalidate whitelist x86/asm/crypto: Fix frame pointer usage in aesni-intel_asm.S x86/asm/crypto: Move .Lbswap_mask data to .rodata section x86/asm/crypto: Move jump_table to .rodata section x86/asm/crypto: Fix frame pointer usage in clmul_ghash_mul/update() x86/asm/entry: Fix frame pointer usage in thunk functions x86/asm/acpi: Fix frame pointer usage in do_suspend_lowlevel() x86/asm: Fix frame pointer usage in rwsem functions x86/asm/efi: Fix frame pointer usage in efi_call() x86/asm/power: Fix frame pointer usage in hibernate_asm_64.S arch/x86/crypto/aesni-intel_asm.S | 21 +++++++++ arch/x86/crypto/crc32c-pcl-intel-asm_64.S | 8 ++-- arch/x86/crypto/ghash-clmulni-intel_asm.S | 5 ++ arch/x86/entry/thunk_64.S | 4 ++ arch/x86/include/asm/arch_hweight.h | 6 ++- arch/x86/include/asm/frame.h | 20 +++++++- arch/x86/include/asm/paravirt.h | 10 +++- arch/x86/include/asm/paravirt_types.h | 18 ++++---- arch/x86/include/asm/stackvalidate.h | 9 ++++ arch/x86/include/asm/xen/hypercall.h | 5 +- arch/x86/kernel/acpi/wakeup_64.S | 3 ++ arch/x86/kernel/cpu/amd.c | 5 +- arch/x86/kernel/reboot.c | 7 ++- arch/x86/lib/rwsem.S | 11 ++++- arch/x86/platform/efi/efi_stub_64.S | 3 ++ arch/x86/power/hibernate_asm_64.S | 7 +++ arch/x86/xen/enlighten.c | 4 +- kernel/sched/core.c | 2 + scripts/stackvalidate/stackvalidate.c | 77 ++++++++++++++++++++++--------- 19 files changed, 179 insertions(+), 46 deletions(-) -- 2.1.0 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/