From patchwork Mon Dec 11 12:50:16 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sergey Senozhatsky X-Patchwork-Id: 846956 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.infradead.org (client-ip=65.50.211.133; helo=bombadil.infradead.org; envelope-from=linux-snps-arc-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=) Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="Y1ZRL1BD"; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=infradead.org header.i=@infradead.org header.b="0SEvqQLw"; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="BuJsLJHI"; dkim-atps=neutral Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3ywNDk2ZZqz9s1h for ; Mon, 11 Dec 2017 23:53:42 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=W6ISbVMNb8zX80Utr8JNygLfiA16nPEgSUI7RTQxpfw=; b=Y1ZRL1BDz84l6O9IAJh2KgyYrb q3RzdCckrKD4Ai1UL/38Ab51vRRP4xe7GHxZWPTe3Ojj0uFj8r2hfe1Av5nlL7Nz45YESmHNyAgCY 6nm8ex8auS69kKIB8BnH8IhrpQ3yVjrHAr/ewwV781aIS5kZ9C8sfV1fpnjAKvAPOrGzfN6zIRkhI B1eoWXGWtDmZb6Vqka5UJjU8p3PQPXg+H9RYX9EQh8Iqto1cjqea1L6K4Emq0GDhUbxgEDgc5ihaC S85nhDt7Z3TNPZEOAt6Ek0HPAKRQBIn9UQ5lyq1WcEGjsrkN405A6U2fL3qnf6CVqTeVO3Q316Y3P d6QMMYhg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1eONaW-0000wg-AE; Mon, 11 Dec 2017 12:53:40 +0000 Received: from merlin.infradead.org ([2001:8b0:10b:1231::1]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1eONYu-0008C8-KG; Mon, 11 Dec 2017 12:52:00 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=merlin.20170209; h=References:In-Reply-To:Message-Id:Date: Subject:Cc:To:From:Sender:Reply-To:MIME-Version:Content-Type: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=tGwX8z91QSwwkSQBUA9U7aM8223sfdzPuJhMLjL97Tg=; b=0SEvqQLwCPTWpTWXFZBt6zktU LWvoNLA7EVx4EUbgRhJqv3SfYi0QsTv5CJdf0FME93G8UkSKMxQokgch+cCa8x2FO700n+j6ZHZqr xIdgIDjtCvF8ixb5FulMRHB9CNCEkbXYc4Vew8Vz61cz1PWXfS6xoqZZ956BLgQj1m3krq86NEM7g ED7jaYhgoZ1VPl4gXuaGscl4USFukqgumISiAAygsxNKHmfGzjCZaduE40H1C0W9CUNGXzYO9kAuJ +y3NiGD3S8MHXeXwcrZSC2riO3OFPThJMhQRir+Zlh3inTleaDoJ0UvoUQI1AJkrF46r/UAgZ+jD5 nhEVBMXAg==; Received: from mail-pf0-x243.google.com ([2607:f8b0:400e:c00::243]) by merlin.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1eONYq-0007xO-5w; Mon, 11 Dec 2017 12:51:58 +0000 Received: by mail-pf0-x243.google.com with SMTP id a90so11474005pfk.1; Mon, 11 Dec 2017 04:51:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=tGwX8z91QSwwkSQBUA9U7aM8223sfdzPuJhMLjL97Tg=; b=BuJsLJHINypmi5UJYd7iU5s9duFa1M85AJJM6MFpEIA/Ku+f2Ked4ymbmLe6rBdKaO TpRbLmd7V61Bq0wfhYnz4l8HtHJcHzHHTylY2mrxg++V9cSQMRYcKitBVpAFPH5b4qiO nmQxEiTS6xwK8jDenbB/hdavnvQEHUYSNhConpDSsITzC6AmG3mpz0NPDcRGPchnv2rD 3wglt+NYclFEqbCyz12qnUczSvxdUkvzt3fluiW4fbG9esyGuEapGCDenQmy91aETtCl Xh/S9jYQzbWK68sqbJKDKHVExoDPTKqgncBJmsM70psXxIew207uLOZMZ2FL8K4jpyjX yFfA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=tGwX8z91QSwwkSQBUA9U7aM8223sfdzPuJhMLjL97Tg=; b=Sy7TkQ1esQE1OKlv4Ol21OLU02jXHzdedMZvnB4J7kNZqQaq5PhI9WJornOHux8yKn mBMxIlpmkJ9Xzj+cEDCoA6A4NHXJPycVZt/6RkqLfoxicZZ+524amgm2jiocm/lP0DcM 3G/YiJWS22YXzpQQ6rwEFv442g4Ilyfs6wEDguI0lGiOwd4lskOC85h64pH1mwxcs8Px 7OO9tI3J+ZgxzxQ0Uh+PIWFSxBx90q0d8jZU2BuqZ6CHe3CwHuxcJ5dWm0QMNpTdhQlB uIjBUAvm5hgvqORwb+0wMa1AlKAdU0wpTgWuiAktlFIhaFkHw6vh6Nuq3a4BrWvPqv/t 3FNw== X-Gm-Message-State: AKGB3mL+MsYkqnY0OqYYQPVfEvS9+TbyJSzNxhPyANDXwn0BZl5p2tUM aTV8w51VlsbWaauQZSMX5ls= X-Google-Smtp-Source: ACJfBov/EK4eVWdpQDZ1KIJ7r/7yjltoLvHTO8AGpS4gn2YjKT0zBZACEUNllqYpbkN7akH3YEjgrg== X-Received: by 10.101.101.205 with SMTP id y13mr238203pgv.249.1512996691309; Mon, 11 Dec 2017 04:51:31 -0800 (PST) Received: from localhost.localdomain ([110.70.53.61]) by smtp.gmail.com with ESMTPSA id j13sm23374380pff.131.2017.12.11.04.51.19 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 11 Dec 2017 04:51:30 -0800 (PST) From: Sergey Senozhatsky X-Google-Original-From: Sergey Senozhatsky To: Andrew Morton , Russell King , Catalin Marinas , Mark Salter , Tony Luck , David Howells , Yoshinori Sato , Guan Xuetao , Borislav Petkov , Greg Kroah-Hartman , Thomas Gleixner , Peter Zijlstra , Vineet Gupta , Fengguang Wu Subject: [PATCH 04/13] ia64: do not use print_symbol() Date: Mon, 11 Dec 2017 21:50:16 +0900 Message-Id: <20171211125025.2270-5-sergey.senozhatsky@gmail.com> X-Mailer: git-send-email 2.15.1 In-Reply-To: <20171211125025.2270-1-sergey.senozhatsky@gmail.com> References: <20171211125025.2270-1-sergey.senozhatsky@gmail.com> X-Spam-Note: CRM114 invocation failed X-Spam-Score: -2.0 (--) X-Spam-Report: SpamAssassin version 3.4.1 on merlin.infradead.org summary: Content analysis details: (-2.0 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, no trust [2607:f8b0:400e:c00:0:0:0:243 listed in] [list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (sergey.senozhatsky.work[at]gmail.com) -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid X-BeenThere: linux-snps-arc@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Linux on Synopsys ARC Processors List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Petr Mladek , Fenghua Yu , linux-am33-list@redhat.com, linux-ia64@vger.kernel.org, linux-c6x-dev@linux-c6x.org, linux-sh@vger.kernel.org, x86@kernel.org, Sergey Senozhatsky , LKML , Steven Rostedt , Sergey Senozhatsky , linux-snps-arc@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-edac@vger.kernel.org MIME-Version: 1.0 Sender: "linux-snps-arc" Errors-To: linux-snps-arc-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org print_symbol() uses extra stack space to sprintf() symbol information and then to feed that buffer to printk() char buffer[KSYM_SYMBOL_LEN]; sprint_symbol(buffer, address); printk(fmt, buffer); Replace print_symbol() with a direct printk("%pS") call. Additionally ia64_do_show_stack() had extra buffer [128 bytes on stack], which we also can drop now. Signed-off-by: Sergey Senozhatsky Cc: Tony Luck Cc: Fenghua Yu --- arch/ia64/kernel/process.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/arch/ia64/kernel/process.c b/arch/ia64/kernel/process.c index dda0082056b3..968b5f33e725 100644 --- a/arch/ia64/kernel/process.c +++ b/arch/ia64/kernel/process.c @@ -13,7 +13,6 @@ #include #include #include -#include #include #include #include @@ -69,7 +68,6 @@ void ia64_do_show_stack (struct unw_frame_info *info, void *arg) { unsigned long ip, sp, bsp; - char buf[128]; /* don't make it so big that it overflows the stack! */ printk("\nCall Trace:\n"); do { @@ -79,11 +77,9 @@ ia64_do_show_stack (struct unw_frame_info *info, void *arg) unw_get_sp(info, &sp); unw_get_bsp(info, &bsp); - snprintf(buf, sizeof(buf), - " [<%016lx>] %%s\n" + printk(" [<%016lx>] %pS\n" " sp=%016lx bsp=%016lx\n", - ip, sp, bsp); - print_symbol(buf, ip); + ip, (void *)ip, sp, bsp); } while (unw_unwind(info) >= 0); } @@ -111,7 +107,7 @@ show_regs (struct pt_regs *regs) printk("psr : %016lx ifs : %016lx ip : [<%016lx>] %s (%s)\n", regs->cr_ipsr, regs->cr_ifs, ip, print_tainted(), init_utsname()->release); - print_symbol("ip is at %s\n", ip); + printk("ip is at %pS\n", (void *)ip); printk("unat: %016lx pfs : %016lx rsc : %016lx\n", regs->ar_unat, regs->ar_pfs, regs->ar_rsc); printk("rnat: %016lx bsps: %016lx pr : %016lx\n",