From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757372AbbFPWhO (ORCPT ); Tue, 16 Jun 2015 18:37:14 -0400 Received: from relay5-d.mail.gandi.net ([217.70.183.197]:46533 "EHLO relay5-d.mail.gandi.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752988AbbFPWhH (ORCPT ); Tue, 16 Jun 2015 18:37:07 -0400 X-Originating-IP: 107.170.219.250 Date: Tue, 16 Jun 2015 15:37:00 -0700 From: Anton Vorontsov To: Kees Cook Cc: trivial@kernel.org, LKML , Colin Cross , Tony Luck , Scott Wood Subject: Re: [PATCH 20/22] pstore: %pF is only for function pointers Message-ID: <20150616223700.GA26982@d1stkfactory> References: <1426130037-17956-1-git-send-email-scottwood@freescale.com> <1426130037-17956-20-git-send-email-scottwood@freescale.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jun 16, 2015 at 03:02:50PM -0700, Kees Cook wrote: > On Wed, Mar 11, 2015 at 8:13 PM, Scott Wood wrote: > > Use %pS for actual addresses, otherwise you'll get bad output > > on arches like ppc64 where %pF expects a function descriptor. > > > > Signed-off-by: Scott Wood ... > > - seq_printf(s, "%d %08lx %08lx %pf <- %pF\n", > > + seq_printf(s, "%d %08lx %08lx %ps <- %pS\n", ... > Anton, does this look okay to you? (i.e. switching from function > pointer to direct pointer?) vsprintf docs say: > * Note: The difference between 'S' and 'F' is that on ia64 and ppc64 > * function pointers are really function descriptors, which contain a > * pointer to the real address. > > So this seems correct to me. > > Reviewed-by: Kees Cook Without questioning the confusing behaviour of "%pF", yes, sure... ack. :) (However, intuitively I'd expect %pF to behave like %pS... but this surely not going to change...) Thanks! Anton