Received: by 2002:a19:651b:0:0:0:0:0 with SMTP id z27csp3654720lfb; Mon, 9 May 2022 00:55:32 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy4KmYr0wkNsZw9VYX7dDAsFGsy7Gsk11M42zIu28iO8vpmNE2hwsxNWmWp+hJDHzts9qp9 X-Received: by 2002:a63:618d:0:b0:3c6:222b:21a4 with SMTP id v135-20020a63618d000000b003c6222b21a4mr12557225pgb.103.1652082932337; Mon, 09 May 2022 00:55:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1652082932; cv=none; d=google.com; s=arc-20160816; b=paoDGORNPAn/LbGJKTcVUMIDkPqw0lX12Sl2hfy/ESiNjBDsDkvSaR8/i9zj0F5zLq Vp8TATjp72Ow5DBlBzB7CXSgfhpIegfwsPCa/axWhCX3PiQmZ02vqZPluOpbipOVvK8R oHxtYd0RPHOOp+Jr+M90ExIS3413te6QFP2Lflgnb6EZKenEKaNw1HrptcjUXD2/hrSV wWysze7v3Cb9rC9c06Sqv9dc7Db/utp8glb45sKQ+o5HTIiZVGJ9VfjNj+uxDEfdHc4u aMisHp8pv4SpkTAPXC54uye9a1YR7FWANmZ145ra+7HioG35eAq8TzoAvaOyLORb3z88 /RQA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=iDAhf762jxRhEv8fWwnY9wpSIpXGHrpFlmpaUo6C1zk=; b=oAewLMfd/Vw5VqbpULmboxVtX3w2mzJC6CEDfk7oIstO+tsvSvCrGT8vL38c7c4gvb x/uaA5pHGCWj2OYdyxF3ccgpmhq+k8Lpjadeb+moURDp2Tcm5WSCU0rsdtLndlaCJ8Zo Zdhftjkqt2nx6P6YkVeX/+skY/66LcSHvGBIDhNN0bMAvR7pAINHsqopx3CjPAhIN9wK OsbNChJ2rvhZXYx52/hTPALaIgePkG+KaTs1fKFsq1w54+EYRDuGugvK6AurF5/viWGX q6RpAX/Ws9TV+x9YMPTtWhOgbfp/Si+wK65HKOuF7aOO4gMSOjRGK9kxuVB+49kKlOvv clsQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=F3gz8XL2; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id gq18-20020a17090b105200b001c218be3cf0si12154103pjb.158.2022.05.09.00.55.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 09 May 2022 00:55:32 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=F3gz8XL2; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 3D54516689B; Mon, 9 May 2022 00:48:05 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1445160AbiEGBaa (ORCPT + 99 others); Fri, 6 May 2022 21:30:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50384 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236738AbiEGBa2 (ORCPT ); Fri, 6 May 2022 21:30:28 -0400 Received: from mail-oa1-x2f.google.com (mail-oa1-x2f.google.com [IPv6:2001:4860:4864:20::2f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 849033AA49; Fri, 6 May 2022 18:26:43 -0700 (PDT) Received: by mail-oa1-x2f.google.com with SMTP id 586e51a60fabf-ee1e7362caso4872692fac.10; Fri, 06 May 2022 18:26:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=iDAhf762jxRhEv8fWwnY9wpSIpXGHrpFlmpaUo6C1zk=; b=F3gz8XL26fGIg5x4zHuPywcBt3scsTWHmrRlxUXkNEfEVYZl/M35+V+YGFWfo1lE+P yhotM6PX8de5M9NSCEYYSecqiOWoxVzkwSokt7PmQxJ834yfpEZne76p+bi2YybspM/P el4Lyw701k1uZ1l9gYwf3BUAbccvic8rYHyzGmcHgGXyyUe9LpH1NrLphqCE2YFQrUu2 imT+3aMBlQzUZerRybx8SrUsoUBqjND8/NsQeokLI0WJ92ldvWKfU645zdimqXwxUIFn VR4hTGFntXAmxyuG51Drm0j3zyzGuNxV6Oaf8Joh+TF+4fZj2wkPtC75Hkl6w+/UeU7W dMpA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=iDAhf762jxRhEv8fWwnY9wpSIpXGHrpFlmpaUo6C1zk=; b=HrC149XtE6741vFJqlJh5VtsY2uPrN52rL4BzEp4teFAK1liLyNsY9WldqpmHHHjRY v2Hph+6Nw4XS3PAYw4Ue2PvFRXRoV01AeUC0HHpuh82kqmghsG+gDN8ajnSfTYt3bMUX cLIyoKTjqHlUOpg3PpakF1gdrohOqAv02vuRGxPjWrfaQbFD40KLtlETkN2dGh6zfVkL R9IeY2wF/g56oZqPlcKZr8+IYTAFlky6kAZacfe/QFha28Jr9nIi1K3rZpGffnpsIV6R f7e2sZAHvuEGLE/9l9i7AmGaxchSUfdmweqOjGkcHnW/FNXHfDqK8H/817gl6IYUOY7x rWRQ== X-Gm-Message-State: AOAM531xJirNqfDe9ZbL7a7ayfk9sUVHB60W2wHoj/0r+4mxQ6oktcvG wdCL2aKx2u6DhRp4H5pc2lAwRGTqSLzs0YEgFk3gzQkUMW0+WA== X-Received: by 2002:a05:6870:1c7:b0:ed:b4b6:27a1 with SMTP id n7-20020a05687001c700b000edb4b627a1mr5626941oad.223.1651886802927; Fri, 06 May 2022 18:26:42 -0700 (PDT) MIME-Version: 1.0 References: <20220505130826.40914-1-kerneljasonxing@gmail.com> <20220506185641.GA2289@bytedance> In-Reply-To: <20220506185641.GA2289@bytedance> From: Jason Xing Date: Sat, 7 May 2022 09:26:07 +0800 Message-ID: Subject: Re: [PATCH net-next] net: use the %px format to display sock To: Peilin Ye Cc: davem@davemloft.net, yoshfuji@linux-ipv6.org, dsahern@kernel.org, kuba@kernel.org, pabeni@redhat.com, ast@kernel.org, daniel@iogearbox.net, andrii@kernel.org, kafai@fb.com, songliubraving@fb.com, yhs@fb.com, john.fastabend@gmail.com, kpsingh@kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, bpf@vger.kernel.org, Jason Xing Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-1.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RDNS_NONE, SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, May 7, 2022 at 2:56 AM Peilin Ye wrote: > > Hi Jason, > > On Thu, May 05, 2022 at 09:08:26PM +0800, kerneljasonxing@gmail.com wrote: > > - pr_err("Attempt to release TCP socket in state %d %p\n", > > + pr_err("Attempt to release TCP socket in state %d %px\n", > > I think we cannot use %px here for security reasons? checkpatch is also > warning about it: > I noticed this warning before submitting. Since the %p format doesn't print the real address, printing the address here will be helpless and we cannot trace what exactly the bad socket is. What do you suggest? Thanks, Jason > WARNING: Using vsprintf specifier '%px' potentially exposes the kernel memory layout, if you don't really need the address please consider using '%p'. > #21: FILE: net/ipv4/af_inet.c:142: > + pr_err("Attempt to release TCP socket in state %d %px\n", > sk->sk_state, sk); > > Thanks, > Peilin Ye >