From patchwork Fri Feb 2 14:56:17 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 126720 Delivered-To: patch@linaro.org Received: by 10.46.124.24 with SMTP id x24csp715642ljc; Fri, 2 Feb 2018 06:58:10 -0800 (PST) X-Google-Smtp-Source: AH8x224adyqpmrDRPV+J3M1pV0bJG1LF0+NBN8pkDZCVyE/9Jej+U6vfMFYGIjNcfCseFBKrqP+4 X-Received: by 10.99.113.15 with SMTP id m15mr33259238pgc.236.1517583490432; Fri, 02 Feb 2018 06:58:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1517583490; cv=none; d=google.com; s=arc-20160816; b=wjyT61Gbo/MVBRmZQ31pTeIO6v2hI/xa/XzULqXlPv2meuA+JCFcP0qjNLhTNJRQwv GrZwF/rxC/w3oWt7ynLpNSyYwrW3c1+3O802EX8LsrMe6dXh24H166DDMEv5OWRb7w0D obxSgqwmNRA0YKKXl8ZfrMScFABkvwjOUk8xfkCDHPoyb2JfUI9tLKJXDz0UH6f5wsNU RvRbumSvYVejc2RESZn9PAFVS1Y23DwzBYNrI3/RCwWIlle+3GZNZOmVTHYYzqqx4fy8 GVd6+VgGccLzEHsOVGm7i5mmXF27IZdfDsjdoYqaPxYZP+KuFQ0qJG0tmTP6wclTaZNr ed9g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:arc-authentication-results; bh=+6pSR7EKD7KM6wuOv5IVZW14S3nO5HMZtS+OW68GFu0=; b=i5NvUl0D17xPWm8uf3RAyBEeRxiIlqIORGJIY0wuxK9Ih4f8Mxan5TchN5Bt2r+5js S+LRIVMpPAWbPoZoXJDSulJBFQ5U3mVf2TpDv/ww5ksnqfSZ+GbLTCSaP7d9vmDXSlMX 6eEbbdyTbIebYA3IpXNol1XRnUBQP2oyLCiMW439yJ7QxfFRD2t8f9z/oSAlUiPEDp+o 0uEh9TuW6+5ScZZsQ06GZwrXMB5BH31h3YshFfyTflESTafWzNdGcigl5zIedE3Cc/oL KAuAlt8SrfL6LRELbulDTtJpHS6KW/dl0nbXD4r+WAQq8qjD+gg29wTy6tlpk+ATx0o0 uNcA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c16si1551865pgv.741.2018.02.02.06.58.10; Fri, 02 Feb 2018 06:58:10 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752325AbeBBO6G (ORCPT + 27 others); Fri, 2 Feb 2018 09:58:06 -0500 Received: from mout.kundenserver.de ([212.227.126.130]:33899 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751646AbeBBO57 (ORCPT ); Fri, 2 Feb 2018 09:57:59 -0500 Received: from wuerfel.lan ([95.208.111.237]) by mrelayeu.kundenserver.de (mreue007 [212.227.15.129]) with ESMTPA (Nemesis) id 0LkEpj-1fJyn60fj1-00cUaN; Fri, 02 Feb 2018 15:56:39 +0100 From: Arnd Bergmann To: x86@kernel.org, Thomas Gleixner , Ingo Molnar , "H. Peter Anvin" , Josh Poimboeuf Cc: Nicolas Pitre , Andi Kleen , linux-kernel@vger.kernel.org, Arnd Bergmann , Borislav Petkov , Andy Lutomirski , Vlastimil Babka , Dave Hansen , Peter Zijlstra Subject: [PATCH 1/3] x86: dumpstack: avoid uninitlized variable Date: Fri, 2 Feb 2018 15:56:17 +0100 Message-Id: <20180202145634.200291-1-arnd@arndb.de> X-Mailer: git-send-email 2.9.0 In-Reply-To: <20180202145434.100626-1-arnd@arndb.de> References: <20180202145434.100626-1-arnd@arndb.de> X-Provags-ID: V03:K0:OBwUf4QSOATtDVAGSb/zLNEa0IAeFLQ6QyLjeOZWxEQEmnUTJIX N5sxta6kI6QU1jjgMBvoyb+IvCpmRcwlsFBmY0QKZB2WQIiqg9Ia1WFohBTSIwZiOFq0T5r xqyeI0NVPBxRxu4hLR7VoX5UPB1Ju5UEO/71ke/Enbif8jc27uv9r/AIG2FRpgKLoloCh98 vMLjqRDotZ0nBwO8/8AFQ== X-UI-Out-Filterresults: notjunk:1; V01:K0:7KtvD9bgc0Q=:7g0m8CZGeOjztxVRnaTyuw +mPk/Yj9f6fAFQW75bqySsUQfSi5mjKPiuoUo+ORW0czozxVRYpoiX9VwRZVpq8sliesngvvl TiAgUiTTyV8G9VcJgu0h0u72+lz/sBuAVl2tmP5d2m0ltGYnVHMz6ANPNLHD+xllfobBCXci7 9wA8ghjJzfGHHQ9IvZJkDupZLukXzQ9XpqPDtcMHmGgSEmhDKdfxIaaf5WWOQmbKqdItQihAd Gxtl1p1lKKFEaHQ4S+4vRr+L/8LU47DuRPnUVBvy7x2QUYGBdcmp01H9dzu1z7PxE6tWqufoW eRft7Vk6KtcjIZu64esWh1YZwWDoT3pMDLe2A9oL64yhdhMOPsFsONEbTL1+5mnwUpLsOnchQ g6CcMz08yLccvY+IPigNCc/D8XvHetpcizjL/CnFgq8orW6nM2Li8FVC6BpbVxVbtofz8HTX3 /J0k6fgLLy2vWnqbdz3qdIyNzm0xMCX3CEyeNP3v1SVZiDL4tnFU83ahcM9E/RdSiAnaNiWqN qWBdVuhXVFGlUjynkyuv0qqdFKydYRQy+Vk0LHNhkOKQqRWCOMH/gfqfeY11ekKb9nwh/vZNn kHWMhjY8XpGVuPG8m5sChVJQdsVsCcpRiPbV2DiRNU+1FWwIFgVYVXZeDlrhLyEQBkuPigWkO f0s4TBz5xRPXZ/9lXJTgaMMGIVV5SGtp29/NKy1DQu/7lNH7KRl0hxZoAyfYPdomO1uYI0qIu dqg3+xQ25HMcoBRdbTZ3exJR88BLJYXiHMCThQ== Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org In some configurations, 'partial' does not get initialized, as shown by this gcc-8 warning: arch/x86/kernel/dumpstack.c: In function 'show_trace_log_lvl': arch/x86/kernel/dumpstack.c:156:4: error: 'partial' may be used uninitialized in this function [-Werror=maybe-uninitialized] show_regs_if_on_stack(&stack_info, regs, partial); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ This initializes it to false, to get the previous behavior in this case. a9cdbe72c4e8 ("x86/dumpstack: Fix partial register dumps") Signed-off-by: Arnd Bergmann --- arch/x86/kernel/dumpstack.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.9.0 diff --git a/arch/x86/kernel/dumpstack.c b/arch/x86/kernel/dumpstack.c index afbecff161d1..a2d8a3908670 100644 --- a/arch/x86/kernel/dumpstack.c +++ b/arch/x86/kernel/dumpstack.c @@ -109,7 +109,7 @@ void show_trace_log_lvl(struct task_struct *task, struct pt_regs *regs, struct stack_info stack_info = {0}; unsigned long visit_mask = 0; int graph_idx = 0; - bool partial; + bool partial = false; printk("%sCall Trace:\n", log_lvl); From patchwork Fri Feb 2 14:56:19 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 126722 Delivered-To: patch@linaro.org Received: by 10.46.124.24 with SMTP id x24csp716606ljc; Fri, 2 Feb 2018 06:59:28 -0800 (PST) X-Google-Smtp-Source: AH8x227gY+POjOvtszsAKA0QAW9PPEgvHvPtfDeN31QbkpPDb5UjcF36slgHzzselWU1WgSgM4Bj X-Received: by 10.99.6.201 with SMTP id 192mr4697393pgg.50.1517583567866; Fri, 02 Feb 2018 06:59:27 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1517583567; cv=none; d=google.com; s=arc-20160816; b=kB+C94MOYSndTFLg2zdtc3KgDgs7ev7Pq8ZE58blJb3rgpMxbXILo+pB8EocKMG9aK Fq31hHALzbJHQ9fYY2YLdm4lovGEcT10UziIQnAdfd0ICWGPNW4Vm05APADQL2ujWx3s d0NPh2YeejXa3wQ+2U3y4j/VYmmStLxfhc4RE+FhS/BU/0UGYb7DkS7vfWf5etGrc+Dj E/BG5AuJtmEzF/3X8AIq+qK2TsbjYpG7NY3cUhgkrZL1AKHdUIdbE4AkXjn65n++34WO tIMFUMKh48k5hWmG/ObHbRxSXMvfYMzn5mnPGTFHogX9zLq9mkXOCVYAVpExKM/Yxt/7 Ai+A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:arc-authentication-results; bh=UlEBAv0pZaknwrfoT00L/qMeRiISaalY1OWCIV5q/Bc=; b=nZnfHxe0BNwsug0qt7YFnlQoZCCv44dD36smvjA+t+1Cilj64gHpZjDfhnejBE04AA LGwes/nRPTMA1j5CGOa4cm4gyvTmlPrw2s0YMEqRbsATDL/znE3s6ZUBDaO1+xh04u8Q bPoPvpVlxT20j0tCnltY0NlDYR9NeCJ2eLrDgTkXIA3quEkemzPWnXtuqjWB3DUXA+Kk RztqggDZN6Uoa51nw3ozSEmYxltDfKav2BJUHDNhRCd0RGrHnhL/CjAF5ykexNxe0/cD dvABcoE8KvkUdnp5bElxfUfq89b0UqcYB63EFBiDstcNtK7tElkD+zhsZmXlilfno3vw qpzA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j75si926071pfk.372.2018.02.02.06.59.27; Fri, 02 Feb 2018 06:59:27 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752429AbeBBO7Y (ORCPT + 28 others); Fri, 2 Feb 2018 09:59:24 -0500 Received: from mout.kundenserver.de ([212.227.126.131]:49262 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752029AbeBBO7P (ORCPT ); Fri, 2 Feb 2018 09:59:15 -0500 Received: from wuerfel.lan ([95.208.111.237]) by mrelayeu.kundenserver.de (mreue007 [212.227.15.129]) with ESMTPA (Nemesis) id 0Ls2t1-1esNEf3iM3-013sqB; Fri, 02 Feb 2018 15:57:59 +0100 From: Arnd Bergmann To: x86@kernel.org, Thomas Gleixner , Ingo Molnar , "H. Peter Anvin" Cc: Nicolas Pitre , Andi Kleen , linux-kernel@vger.kernel.org, Arnd Bergmann , Masami Hiramatsu , Josef Bacik , Alexei Starovoitov Subject: [PATCH 3/3] x86: error_inject: make just_return_func globally visible Date: Fri, 2 Feb 2018 15:56:19 +0100 Message-Id: <20180202145634.200291-3-arnd@arndb.de> X-Mailer: git-send-email 2.9.0 In-Reply-To: <20180202145634.200291-1-arnd@arndb.de> References: <20180202145434.100626-1-arnd@arndb.de> <20180202145634.200291-1-arnd@arndb.de> X-Provags-ID: V03:K0:hiXWzmx7Z9S3IwGnYbP8u+Xj80EIya28N0XC+8ESANwln5WzUYU lm+5wplDOhe9YiEnaR4ui/BtiD+D1x0uNzQdfSugyGSWDWF+gh/4u/iNuqRQZYoSFTOEr/C NoziMIy1mh7RNl37ct2/xR2mkI728P9aTCVtEh5YaMxtqXVjYuQhieqzjI6yliKma8GVjnK TNoY0OY8dcU2B7NmL+FSA== X-UI-Out-Filterresults: notjunk:1; V01:K0:AMXJisyEtF0=:EE2SMXpObJdFU1Q1XeqD9r N/SCsXmJ7Ur9inHz8/OcqIofDxCShKXo5BjhFMGgtkucaPgvqUrQ+9qr0xJ17GxUpdGz2nbKt 9cNRHEXIxd7ZBP8iaZxXyyjtI5rqE/+6+PGn3bstBxrSrGS+aBkVvhvAnlJGr6J8uUmCtHdEM hkSLzMXKvRyy7J289EeWtNERMLEnVraa2WgETeUiyIAwzLIZyN+LkLo2IiYYuxsAVeqiVjx+T O0j72LwezIFMPdh5wFnl4e6Aq+1wn3M87O3Pc11y1wsye/KRFpSxBwhLIjTz7/jNTdm0YgnVq a8D1CTTqaiR4N8bg0AtUZQzW0RIZm4118PG7OujzEiNV6MrVyiHHrAcEmxIdl4tAR1jr0Eqp5 AgCrpo9kRFZm3HEoitHoUHRXsAK5or1qlI884VLrGWuAkE1MbuzQsS763MOe4rl/uK2ytS6PN bZw8XByA1ComF6OmevxfJ8nzUb8FPEbmUhQNm7XqXJotjfkzVzoqZiia1kd5YAa2NwxwxE7+S wA6qsXBW3ASTvJVbXZSAFqO8tbenWMua72b7cktbB4nDapfIuCxy9sUS1oktANclra0jt1BeA MLhZMCcczkTueKOGnR6UidCiA7cHBYjW/+KQ3Oy80p1PLRY6YpBIINP+RpHL4uhcEtGrql3mg bmmoAJzqaKuRPRuz62lO024e5YddcuVOts6lNKEdDhGVEO2zxkEVNaw1xNxMzWN6SEKoLu2zS EpyCJkI4Bj66rX/wsi+IoU+hxOHDZwu53MdIIw== Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org With link time optimizations enabled, I get a link failure: ./ccLbOEHX.ltrans19.ltrans.o: In function `override_function_with_return': :(.text+0x7f3): undefined reference to `just_return_func' Marking the symbol .globl makes it work as expected. Fixes: 540adea3809f ("error-injection: Separate error-injection from kprobe") Signed-off-by: Arnd Bergmann --- arch/x86/lib/error-inject.c | 1 + 1 file changed, 1 insertion(+) -- 2.9.0 Acked-by: Masami Hiramatsu diff --git a/arch/x86/lib/error-inject.c b/arch/x86/lib/error-inject.c index 7b881d03d0dd..3cdf06128d13 100644 --- a/arch/x86/lib/error-inject.c +++ b/arch/x86/lib/error-inject.c @@ -7,6 +7,7 @@ asmlinkage void just_return_func(void); asm( ".type just_return_func, @function\n" + ".globl just_return_func\n" "just_return_func:\n" " ret\n" ".size just_return_func, .-just_return_func\n"