From patchwork Tue Aug 8 16:28:41 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Helge Deller X-Patchwork-Id: 9888739 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 94EFD60384 for ; Tue, 8 Aug 2017 16:29:02 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 84D9127FA9 for ; Tue, 8 Aug 2017 16:29:02 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 77D6A27FB1; Tue, 8 Aug 2017 16:29:02 +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,FREEMAIL_FROM, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from mother.openwall.net (mother.openwall.net [195.42.179.200]) by mail.wl.linuxfoundation.org (Postfix) with SMTP id 81BEF27FA9 for ; Tue, 8 Aug 2017 16:29:00 +0000 (UTC) Received: (qmail 17560 invoked by uid 550); 8 Aug 2017 16:28:59 -0000 Mailing-List: contact kernel-hardening-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-ID: Delivered-To: mailing list kernel-hardening@lists.openwall.com Received: (qmail 17518 invoked from network); 8 Aug 2017 16:28:57 -0000 Date: Tue, 8 Aug 2017 18:28:41 +0200 From: Helge Deller To: Theodore Ts'o , "Jason A. Donenfeld" , linux-kernel@vger.kernel.org, linux-parisc@vger.kernel.org, torvalds@linux-foundation.org, kernel-hardening@lists.openwall.com, linux-ia64@vger.kernel.org Message-ID: <20170808162841.GA8668@p100.box> MIME-Version: 1.0 Content-Disposition: inline User-Agent: M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ZhmYTUW/LOrxFXBxyz1eo2kfDF6fg+ALskfmGv/tUa pbS8mnQK9ieZNVuUPnxs3VW2JcdYA== Subject: [kernel-hardening] [PATCH] random: fix warning message on ia64 and parisc X-Virus-Scanned: ClamAV using ClamSMTP Fix the warning message on the parisc and IA64 architectures to show the correct function name of the caller by using %pS instead of %pF. The message is printed with the value of _RET_IP_ which calls __builtin_return_address(0) and as such returns the IP address caller instead of pointer to a function descriptor of the caller. The effect of this patch is visible on the parisc and ia64 architectures only since those are the ones which use function descriptors while on all others %pS and %pF will behave the same. Cc: Theodore Ts'o Cc: Jason A. Donenfeld Signed-off-by: Helge Deller Fixes: eecabf567422 ("random: suppress spammy warnings about unseeded randomness") Fixes: d06bfd1989fe ("random: warn when kernel uses unseeded randomness") diff --git a/drivers/char/random.c b/drivers/char/random.c index afa3ce7..8ad9270 100644 --- a/drivers/char/random.c +++ b/drivers/char/random.c @@ -1492,7 +1492,7 @@ static void _warn_unseeded_randomness(const char *func_name, void *caller, #ifndef CONFIG_WARN_ALL_UNSEEDED_RANDOM print_once = true; #endif - pr_notice("random: %s called from %pF with crng_init=%d\n", + pr_notice("random: %s called from %pS with crng_init=%d\n", func_name, caller, crng_init); }