Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp1271426ybl; Fri, 30 Aug 2019 15:05:09 -0700 (PDT) X-Google-Smtp-Source: APXvYqz4Jar+Ap0GzMzySR/p4mQif0+L/dy8QZzEx3lu8FPERWC1YvZaw0G19yn7i3RVWF0gw1+u X-Received: by 2002:a17:90a:e501:: with SMTP id t1mr697901pjy.25.1567202709015; Fri, 30 Aug 2019 15:05:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1567202709; cv=none; d=google.com; s=arc-20160816; b=oY6dk4CdTB+Tk74KbLqmZkLJAE8OkKFPONU6zUhD3YN0St22PF9hONn08B/lFWCuNL X5wjEKdMhtvG0c95rFfoTmdQNlD+f1Pu5qYmoici0UQqCcCUqAHEloTRSMIVdPb9sQWz RytVJ4Pi8Pm1pcbpNbv3hwvKyc/UBKzMFMvcQLLjZ4dsY8xSw3WmGyICrCJ9Mq55ANq1 2C1h5mF1eVtwprmReKPhUv1EfdcEeCuck46kSmjhl0Eu45nvRTv5C9cRUgWzEw0FDE90 8fF86BLz11sEwMcfOn8+5fXgWsdAmF3WxDzsSdxgYUFrtpLz0onnaeq1TE9a57t9X9Ef S7Mw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature; bh=+CLMhNM5gPu732EY0YQc5MeoyNi9A2+mkByQgSox020=; b=BqRCQFs5BoBBNDFbjinrFuuuVabVJ7ktSO373iwTaiw4ZssEUwWY9IypLtW+/Nafaf mLHrVaTV9UtqKG74uTNBfRCieNC6RiuxEQ91D2WUoutLtd7xDNAQXcS4i2RSi5KgVonV dk5XGjERLzR9AJ2aekrKn8FxG8ltRfWyYvCufAuveLX8jc6hL4R93Mu1o0HufH9Ga3Dw f5bPt3T/PMgj8QqnpJV7AJ8+6vIladPgEjSCV+b3t5zymaSFF5Y1RQCpQZEMQptU4SuU xFRdL7dnA98bzhQp03Gl/KymiS0TVpzwHZzlq+V/SC2OnsJUjXA1E99N3blB/GWiz1hk q9vQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@rasmusvillemoes.dk header.s=google header.b=WgwqfRjC; 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 d1si6881667pfo.72.2019.08.30.15.04.54; Fri, 30 Aug 2019 15:05:09 -0700 (PDT) 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; dkim=pass header.i=@rasmusvillemoes.dk header.s=google header.b=WgwqfRjC; 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 S1728248AbfH3WEC (ORCPT + 99 others); Fri, 30 Aug 2019 18:04:02 -0400 Received: from mail-ed1-f68.google.com ([209.85.208.68]:41401 "EHLO mail-ed1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728007AbfH3WEC (ORCPT ); Fri, 30 Aug 2019 18:04:02 -0400 Received: by mail-ed1-f68.google.com with SMTP id z9so4338723edq.8 for ; Fri, 30 Aug 2019 15:04:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rasmusvillemoes.dk; s=google; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=+CLMhNM5gPu732EY0YQc5MeoyNi9A2+mkByQgSox020=; b=WgwqfRjCXhL1vF6NjwfGzSOjDnhkh8u+SJL9yPVcRIkdSN6FMYls+gJNd0DBqY+ebX pLaZoSxnuBIgEHqABrKiFjo1iX37kfvjHkJIDMn/tZuMfgQYreNprSssm64szgVc3OUP YWGMqT5WmISbE5woFDfuJPXUT24nKFCnoO97E= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=+CLMhNM5gPu732EY0YQc5MeoyNi9A2+mkByQgSox020=; b=QOrDGx7aVLnzQaatq6GjwHc2flEKRVUamtEpng/QG6mc3oqKYYVzzULsYSL1zr4cbR AlopmJWW8EXNK1DX5yriov6kWLkPtXYjqjaEdTp3aLtbikNgWksaFKNatlmXXpBKRbAW TK7u64pafIly9Q9bZosvn35Pn06Ye5CLoxbFJIxSpqM1Ipg92+M/hyLhDgseleur4VKv 3kXbSbiwJIUjfDwvHy69aNhV7bMsrQDtVdjimUE4Tqwr05LcdTf/mDkEXnUp76j5cc6S c0UScxKnb2KlBikTIAdjAL3E4nXsHtqe0hvMaueIEDy5CsE1vCIYvjWmGFAPE0m5Wu3l McDw== X-Gm-Message-State: APjAAAUkwXuBs381YrgkDJVgb1Ez1EX8ME2uO7lywjOLKNoluM4AARvy rFxmnhCG2t7qnucQNvtiup+aPa3iPFa87G4x X-Received: by 2002:a50:fa05:: with SMTP id b5mr18013381edq.84.1567202640321; Fri, 30 Aug 2019 15:04:00 -0700 (PDT) Received: from [192.168.1.149] (ip-5-186-115-35.cgn.fibianet.dk. [5.186.115.35]) by smtp.gmail.com with ESMTPSA id i4sm930846ejs.39.2019.08.30.15.03.59 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 30 Aug 2019 15:03:59 -0700 (PDT) Subject: Re: [PATCH] printf: add support for printing symbolic error codes To: Joe Perches , Rasmus Villemoes , Sergey Senozhatsky , =?UTF-8?Q?Uwe_Kleine-K=c3=b6nig?= , Petr Mladek Cc: Andrew Morton , Jani Nikula , Juergen Gross , linux-kernel@vger.kernel.org References: <20190830214655.6625-1-linux@rasmusvillemoes.dk> <64a000cc3b0fcd7c99b5cd41b0db7f1b5e9e6db7.camel@perches.com> From: Rasmus Villemoes Message-ID: <9fecd3a9-e1ae-a1f9-a0c5-f5db3430c81d@rasmusvillemoes.dk> Date: Sat, 31 Aug 2019 00:03:58 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0 MIME-Version: 1.0 In-Reply-To: <64a000cc3b0fcd7c99b5cd41b0db7f1b5e9e6db7.camel@perches.com> Content-Type: text/plain; charset=windows-1252 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 30/08/2019 23.53, Joe Perches wrote: > >> diff --git a/lib/vsprintf.c b/lib/vsprintf.c > [] >> @@ -2178,8 +2204,6 @@ char *pointer(const char *fmt, char *buf, char *end, void *ptr, >> return flags_string(buf, end, ptr, spec, fmt); >> case 'O': >> return kobject_string(buf, end, ptr, spec, fmt); >> - case 'x': >> - return pointer_string(buf, end, ptr, spec); >> } >> >> /* default is to _not_ leak addresses, hash before printing */ > > why remove this? > The handling of %px is moved above the test for ptr being an ERR_PTR, so that %px, ptr continues to be (roughly) equivalent to %08lx, (long)ptr. Rasmus