Received: by 2002:a25:2c96:0:0:0:0:0 with SMTP id s144csp798524ybs; Sun, 24 May 2020 22:28:44 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyxqPrfbZXvN6Hyqptaoy9SGKn+FjRff8IinRisGNC1UNepFoa3zjuFnTBhuFDcouNgPHhN X-Received: by 2002:a05:6402:306a:: with SMTP id bs10mr13853820edb.227.1590384524461; Sun, 24 May 2020 22:28:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1590384524; cv=none; d=google.com; s=arc-20160816; b=a6GOQz2B/sYlvUo27uQlK6Nfnb1kyGn9DTIiPeo4DIGtb9oAQcm63e7u579FN95JG7 VpKfoBtnuHdJEE5zv9lIzV00jHuSSl6IsXixAZOJSvm/gmJhc7xs70Od/MlGrbRizUV9 4aYGNYHU12iqkyADei+pg+NSrDGeMtuuqhBCe5FDleYaJDSCgHezEX7GbccWTsrcxwSO A9oSsPzVWxkz3gA8x3Pdc93mXN20Fow1hGw63Xa6vmsS3QGr0KEMHmCpVwObnh/CQ9MN rCLljOZThZM+G2kjdGU2K7Bq8P+Sqt+js8u8VN14XItt8DEZds7clmVUQ355EjVbZDZJ ezCw== 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; bh=flWM78SUF7F/ooxKx13IattqhdjBdgNt4aq/BBCGzds=; b=Fwba+Lf6c9HETPcm0euR4T+kPDXNGknnG86cm7wjdXOsLRcmluPw5lYjv4R3INK7fN D9eajObIZcutxrwLl6O0a9EdhwPJw5/8R/bFGzR89uIX8xfV4jinMc1vvGvLnIkg5Kph 85v5ISm/Uwl+ENOJvvacJC2E8Pk7hBkWar9etzbrBzLx7T1PztNpZZYi5JaglGKdMAEu fKb8VtTfF8FrYCDhvBRhbBoGZM7kMCJkmCB8GAEvYT5dU8G6VU4z0gs4h0Lar2m9KFMs T/zmsn7JhrQq75Lu70Z/Kxz4B5fva4Igl2QpocErSK+vFNa8C+pzbCxVEL8OHoOm1a6p XaPQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id jo23si4829433ejb.15.2020.05.24.22.28.18; Sun, 24 May 2020 22:28:44 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729338AbgEYFD5 (ORCPT + 99 others); Mon, 25 May 2020 01:03:57 -0400 Received: from www262.sakura.ne.jp ([202.181.97.72]:53000 "EHLO www262.sakura.ne.jp" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725848AbgEYFD4 (ORCPT ); Mon, 25 May 2020 01:03:56 -0400 Received: from fsav404.sakura.ne.jp (fsav404.sakura.ne.jp [133.242.250.103]) by www262.sakura.ne.jp (8.15.2/8.15.2) with ESMTP id 04P53sDK065057; Mon, 25 May 2020 14:03:54 +0900 (JST) (envelope-from penguin-kernel@i-love.sakura.ne.jp) Received: from www262.sakura.ne.jp (202.181.97.72) by fsav404.sakura.ne.jp (F-Secure/fsigk_smtp/550/fsav404.sakura.ne.jp); Mon, 25 May 2020 14:03:54 +0900 (JST) X-Virus-Status: clean(F-Secure/fsigk_smtp/550/fsav404.sakura.ne.jp) Received: from [192.168.1.9] (M106072142033.v4.enabler.ne.jp [106.72.142.33]) (authenticated bits=0) by www262.sakura.ne.jp (8.15.2/8.15.2) with ESMTPSA id 04P53rFU065032 (version=TLSv1.2 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 25 May 2020 14:03:53 +0900 (JST) (envelope-from penguin-kernel@i-love.sakura.ne.jp) Subject: Re: [PATCH] twist: allow converting pr_devel()/pr_debug() into printk(KERN_DEBUG) To: Ondrej Mosnacek , Joe Perches Cc: Andrew Morton , Linux kernel mailing list , Dmitry Vyukov , Petr Mladek , Sergey Senozhatsky , Steven Rostedt References: <20200524145034.10697-1-penguin-kernel@I-love.SAKURA.ne.jp> From: Tetsuo Handa Message-ID: <94f7ce4f-74fb-bccc-2e87-749e0c8da92c@i-love.sakura.ne.jp> Date: Mon, 25 May 2020 14:03:48 +0900 User-Agent: Mozilla/5.0 (Windows NT 6.3; Win64; x64; rv:68.0) Gecko/20100101 Thunderbird/68.8.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 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 2020/05/25 4:18, Ondrej Mosnacek wrote: > I'm also not sure if this is really worth it... It would help localize > the bug in this specific case, but there is nothing systematic about > it. Are there that many debug print statements that dereference > pointers that are later passed to functions, but not dereferenced > otherwise? Maybe yes, but it seems to be quite an optimistic > assumption... I don't consider it such a big problem that a bug in > function X only manifests itself deeper in the callchain. There will > always be such bugs, no matter how many moles you whack. There are about 1400 pr_debug() callers. About 1000 pr_debug() callers seem to pass plain '%p' (which is now likely useless for debugging purpose due to default ptr_to_id() conversion inside pointer()), and about 400 pr_debug() callers seem to pass '%p[a-zA-Z]' (which does some kind of dereference inside pointer()). Thus, we might find some bugs by evaluating '%p[a-zA-Z]'. On Sun, May 24, 2020 at 7:38 PM Joe Perches wrote: > While I think this is rather unnecessary, > what about dev_dbg/netdev_dbg/netif_dbg et al ? Maybe a good idea, for there are about 24000 *dev_dbg() callers, and 479 callers pass '%p[a-zA-Z]'. But we can defer to another patch, in case this patch finds crashes before fuzz testing process starts.