From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-10.3 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,MAILING_LIST_MULTI, NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id E81FFC433FE for ; Wed, 22 Sep 2021 18:05:49 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id D20C06115A for ; Wed, 22 Sep 2021 18:05:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236995AbhIVSHS (ORCPT ); Wed, 22 Sep 2021 14:07:18 -0400 Received: from mail-pl1-f181.google.com ([209.85.214.181]:33650 "EHLO mail-pl1-f181.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236837AbhIVSHP (ORCPT ); Wed, 22 Sep 2021 14:07:15 -0400 Received: by mail-pl1-f181.google.com with SMTP id t4so2363865plo.0; Wed, 22 Sep 2021 11:05:45 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; 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=I5sYw+bSyHIGaSpNI3tdpwWRWpZhz0nrSXfvUCbXn7I=; b=ssXy9U40+F9IfrC6fpp5u1P/cJQsmr5M1RK/MO2W7t3ebmS/1ryhi5MjDc9eCs341O Kp03CXrFKcNv6kEiu/lzv68+ztkdkgKCBPBTDlOzovKwUwK99Wng3nZvGV9fw8UHdVHF 7nP+BDPhRPCEkdVJMVd3KVUfcq9KlA1WuY58eJDZuCK80AaxMBWLyOwJCKNyceFNYk+P Zf6qWdZrpEoc8imdbrqfY6xan346HnwRVZm/3uQgY23UXLO7I7eek4Xd4beS+rMseKdg Dq5CGrgICGYp0rbojUxy1rm6VS1eHAABSFWS6LvKCqFRjJkpgRFBJREr7fZsJ9SNT54c CG3A== X-Gm-Message-State: AOAM530oWMY3BXbQXSMGixYY8YXNnp0mziDOtJlqLG2G6txPApH9pDxD Asj9wypxlacnWr/lzQuejtZaUGxk3C0= X-Google-Smtp-Source: ABdhPJyOaDgTW+/81YD2pq3w8KkpuBCHttPDwqG4QLnT22VlpSS/51FacXz/PHjs/8l/aU7tQwNd/g== X-Received: by 2002:a17:902:ab16:b0:13a:356c:6a03 with SMTP id ik22-20020a170902ab1600b0013a356c6a03mr167270plb.38.1632333944401; Wed, 22 Sep 2021 11:05:44 -0700 (PDT) Received: from bvanassche-linux.mtv.corp.google.com ([2620:15c:211:201:f3b9:da7d:f0c0:c71c]) by smtp.gmail.com with ESMTPSA id c9sm3050706pfi.212.2021.09.22.11.05.43 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 22 Sep 2021 11:05:43 -0700 (PDT) Subject: Re: [PATCH] infiniband hfi1: fix misuse of %x in ipoib_tx.c To: "Marciniszyn, Mike" , Guo Zhi , "Dalessandro, Dennis" , "dledford@redhat.com" Cc: "linux-rdma@vger.kernel.org" , "linux-kernel@vger.kernel.org" References: <20210922134857.619602-1-qtxuning1999@sjtu.edu.cn> From: Bart Van Assche Message-ID: <276b9343-c23d-ac15-bb73-d7b42e7e7f0f@acm.org> Date: Wed, 22 Sep 2021 11:05:42 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.13.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 9/22/21 10:51 AM, Marciniszyn, Mike wrote: >> Subject: [PATCH] infiniband hfi1: fix misuse of %x in ipoib_tx.c >> >> Pointers should be printed with %p or %px rather than cast to (unsigned long >> long) and printed with %llx. >> Change %llx to %p to print the pointer. >> >> Signed-off-by: Guo Zhi > > The unsigned long long was originally used to insure the entire accurate pointer as emitted. > > This is to ensure the pointers in prints and event traces match values in stacks and register dumps. > > I think the %p will obfuscate the pointer so %px is correct for our use case. How about applying Guo's patch and adding a configuration option to the kernel for disabling pointer hashing for %p and related format specifiers? Pointer hashing is useful on production systems but not on development systems. Thanks, Bart.