Received: by 2002:a05:6358:7058:b0:131:369:b2a3 with SMTP id 24csp7584486rwp; Tue, 18 Jul 2023 18:41:05 -0700 (PDT) X-Google-Smtp-Source: APBJJlH7XKerxUv7OtbQSPQR4kDKzUGDqAFwSggHmQlv6mCad6slZEZXCm92TpO+1/MUcQj62qd5 X-Received: by 2002:a17:907:9620:b0:982:a022:a540 with SMTP id gb32-20020a170907962000b00982a022a540mr898985ejc.11.1689730865424; Tue, 18 Jul 2023 18:41:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689730865; cv=none; d=google.com; s=arc-20160816; b=rvc4fA/oz415c4fhL1QJLjEbuEpAujROSbHr7DP193uiPNntR0h0lPO5ZF0vUqySzP tPifxlIqHFHuymdup36sDLrn63hXjygT6aaNT/E3GDEyNW447pJZwF08hitKN33f04Bp EmlXFUxRq3yd9l/8syizWKbdxMBU9gFSA6RkFmB4w7yV/oeXFK5E2bVKJtRd2wQFLgvb aVjron4fnRxvyttb1PJz3rlPlG+26OwWDb2+udmYc+MNSgj04VKkAPajOC9OAevK+YYW PDe9ob8tC6Qd3ABb1mUmXTehItl10LNBEbqJHB7sJV0dh5BFqVI2nstyeSryhyEhyiHL ntow== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:subject:user-agent:mime-version:date:message-id; bh=luBGFNdxOo/o/UZlwprUdsDldrKSktKP2UxmYj/Y8mU=; fh=O/xkv6A8mT/VvECTJRRBKXWiZGkRGbQe+8cpl3nXc8M=; b=JB7qmIT7m9bqeFGDOL+OQvjOgVMfqqw1uK8ajWyv3EQfb7g2ewFTMl/NELSYaPvvq3 MwYIrCALPWuDByILNMT4w7feSc3TvZD4rySHLG7dREDREGkYD757JLHQvkoWDKoMiMsV aRqxzP39h+2kFEk85PtsoSy+J8hykRzH/iE6OYRWOS85A0Rp60aDf9SJncdXxCWbbuyr 2BB8pD9Nw+IL83zP7YdclItxr1NoNWZeB5JtDaaNw+5ifLXF8sxL/n1lXzmTuyeuEO1+ J3gKSXh17on3ioyndHyk6bDOgVLVyxGRUasS345e/PsBE7hANREX4+xfyoNKs/wNIkN/ ddBQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id u21-20020a170906409500b00992d122db36si2030038ejj.245.2023.07.18.18.40.42; Tue, 18 Jul 2023 18:41:05 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229861AbjGSBZh (ORCPT + 58 others); Tue, 18 Jul 2023 21:25:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35960 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229479AbjGSBZg (ORCPT ); Tue, 18 Jul 2023 21:25:36 -0400 Received: from hust.edu.cn (mail.hust.edu.cn [202.114.0.240]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E258B12F; Tue, 18 Jul 2023 18:25:34 -0700 (PDT) Received: from [IPV6:2001:250:4000:5113:b1a1:bdb4:62a:cbc5] ([172.16.0.254]) (user=dzm91@hust.edu.cn mech=PLAIN bits=0) by mx1.hust.edu.cn with ESMTP id 36J1P3dQ011344-36J1P3dR011344 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NO); Wed, 19 Jul 2023 09:25:03 +0800 Message-ID: Date: Wed, 19 Jul 2023 09:25:03 +0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.12.0 Subject: Re: [PATCH v3] wifi: ath9k: fix printk specifier To: =?UTF-8?Q?Toke_H=c3=b8iland-J=c3=b8rgensen?= , Jonas Gorski Cc: Kalle Valo , linux-wireless@vger.kernel.org, linux-kernel@vger.kernel.org References: <20230706111700.14305-1-dzm91@hust.edu.cn> <87cz15s2gv.fsf@toke.dk> <87a5w7hm46.fsf@toke.dk> From: Dongliang Mu In-Reply-To: <87a5w7hm46.fsf@toke.dk> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-FEAS-AUTH-USER: dzm91@hust.edu.cn X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,NICE_REPLY_A, SPF_HELO_PASS,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham 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-wireless@vger.kernel.org On 2023/7/7 21:44, Toke Høiland-Jørgensen wrote: > Jonas Gorski writes: > >> On Thu, 6 Jul 2023 at 13:39, Toke Høiland-Jørgensen wrote: >>> Dongliang Mu writes: >>> >>>> Smatch reports: >>>> >>>> ath_pci_probe() warn: argument 4 to %lx specifier is cast from pointer >>>> ath_ahb_probe() warn: argument 4 to %lx specifier is cast from pointer >>>> >>>> Fix it by modifying %lx to %p in printk. >>>> >>>> Signed-off-by: Dongliang Mu >>> Third time is the charm! :) >>> >>> Acked-by: Toke Høiland-Jørgensen >> But do we *want* to replace %lx with %p? Because this now causes a >> change in behavior, as the kernel will omit the pointer's address, >> while before it printed the actual memory address. Using %px would >> have kept the original behavior. > So this is basically an informational log message, which really > shouldn't be leaking kernel pointer addresses. So I think %p is the > right choice here, and if someone wants to see the real address for > debugging they should be booting with no_hash_pointers. > >> So if the change is desired, it should be noted in the commit message. > That is a fair point, documenting this in the commit message would be > good... Hi Toke, What's the next? Patch v4 with a note at the end, like the following, "Note that %p would by default print a hashed value without leaking the kernel pointer to user space." > -Toke