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: 10104963 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id DEA91602B3 for ; Mon, 11 Dec 2017 12:53:15 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B305C29586 for ; Mon, 11 Dec 2017 12:53:15 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A702A29588; Mon, 11 Dec 2017 12:53:15 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, DKIM_VALID, FREEMAIL_FROM, RCVD_IN_DNSWL_MED autolearn=unavailable version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 30CE929586 for ; Mon, 11 Dec 2017 12:53:15 +0000 (UTC) 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=LsgpaCDTwkfamzGMqKbQ9ym7Z2t+9yb4CEyZ+xBPv2g=; b=LTtBLsI5Jzhn2N/66XCek5NaVI vgXTUZOIENZufxsqL3aCb+F/u4ygOojbeax46JibsGEmmf7Ju1PndX7/b6/ajcyXuHtc4o/As0bw6 JryeWEPUwFYLDE5wHNJMx2rWZSIeqMd3kNOWxMwmk53gpKnA/yABwYIjPknexKqFkEfgrk9t+BRW/ dizUPqat8WuuLz48kUtqNyaWYvayRyCd+t/DrPFG1k0SO5gUuQjIi6sVz0OzfZIEFVGnatvZ6MhQN iJpw6yB7k0v4i5/jzQiHhuAAwyeufuENspmBFRI7f+Ez1/2Z6l4Y/z7wl3Xi5Q2CxN1IZbJKA87qB wRvl8GtA==; 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 1eONa6-0000ak-5V; Mon, 11 Dec 2017 12:53:14 +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-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: 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-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP 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",