Received: by 2002:a25:2c96:0:0:0:0:0 with SMTP id s144csp894114ybs; Mon, 25 May 2020 01:45:58 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw4QaQW8kIdfuMXpF0RMSe6ENLtZU2wDhlr1giXPB6xaAvPFvH9pOLw3FKgM/mDhqYdNQ/a X-Received: by 2002:a50:bf04:: with SMTP id f4mr13650701edk.91.1590396357990; Mon, 25 May 2020 01:45:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1590396357; cv=none; d=google.com; s=arc-20160816; b=oUseBqkGLQ7G6qgMlfka5tShMX/jJ7se3NT8LIuRjGS3kzsoMdIdQhrQQV5iUCvkEJ s0+RHEr/b+U3sUiXM1qi01T2+sXTCxrjpEoxVwXaoJC0eZrtpf/kn84xj4xV02IVR2+h dr9IVpVWLmf7/xD0tXG73RcGM6QYbT9c1rtrcjIDLYswZnpL4BC4cdDamc54B7u6x2ir jSGDWhKktqyA8/AQKazBwzOAMmqpB6nNGRKZ8XwHgeUkdGqAdU87hL2f+0w/0Z5Fk7/8 wAodCFTPgF5JBuJQ+5oTvcmwYzXQ219JR6XX6q6DIrD6gQrHSFLXEiVHtKnk8ATrnKCV h3nQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=UU9mwExwG7phfaeGhfmb0Ch/IK2jqIuaqB+TBFcLweo=; b=JhaKROmUmqQLQIgEyl86L3cyNrFcJsOWeXccMO5CLYTlwpsupgx8L+jy8jUBWMsxN9 5ybygKdYtIwl3CTS2b9M3TuebGKVSmtNZo5v/eUzR4QDUWXwcNjpP1G951U7sJFMA3ca zutHVBKFeY7hh2B3XM4bTCJGPY001bJpW9I8B3R/BlDj1us/Q2yZy0KH2FaLy8HxapIS KBH1xdPWjjSHg7XVD1sN4WkTtfRAkBdbUtYHr5Nhr7oLb9atcu7IMAkGKWV4aRhh3plp EwJcQNC2PW/zb2ejRInNPHoQsFbSRS3A2pw8i75foTOmUY1FWW5VLtwJzqPJSS0nHT9R vDJg== 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 e4si9132422edm.144.2020.05.25.01.45.35; Mon, 25 May 2020 01:45:57 -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 S2389225AbgEYImW (ORCPT + 99 others); Mon, 25 May 2020 04:42:22 -0400 Received: from mx2.suse.de ([195.135.220.15]:44406 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388945AbgEYImV (ORCPT ); Mon, 25 May 2020 04:42:21 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 77D14AF52; Mon, 25 May 2020 08:42:22 +0000 (UTC) Date: Mon, 25 May 2020 10:42:18 +0200 From: Petr Mladek To: Tetsuo Handa Cc: Andrew Morton , linux-kernel@vger.kernel.org, Dmitry Vyukov , Ondrej Mosnacek , Sergey Senozhatsky , Steven Rostedt Subject: Re: [PATCH] twist: allow converting pr_devel()/pr_debug() into printk(KERN_DEBUG) Message-ID: <20200525084218.GC5300@linux-b0ei> References: <20200524145034.10697-1-penguin-kernel@I-love.SAKURA.ne.jp> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200524145034.10697-1-penguin-kernel@I-love.SAKURA.ne.jp> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun 2020-05-24 23:50:34, Tetsuo Handa wrote: > syzbot found a NULL pointer dereference bug inside mptcp_recvmsg() due to > ssock == NULL, but this bug manifested inside selinux_socket_recvmsg() > because pr_debug() was no-op [1]. > > pr_debug("fallback-read subflow=%p", > mptcp_subflow_ctx(ssock->sk)); > copied = sock_recvmsg(ssock, msg, flags); The NULL pointer deference was found even without this patch. This patch would just cause that it will manifest itself on another place. What is the benefit, please? > Since console loglevel used by syzkaller will not print KERN_DEBUG > messages to consoles, always evaluating pr_devel()/pr_debug() messages > will not cause too much console output. Thus, let's allow fuzzers to > always evaluate pr_devel()/pr_debug() messages. I see few drawbacks with this patch: 1. It will cause adding much more messages into the logbuffer even though they are not flushed to the console. It might cause that more important messages will get overridden before they reach console. They might also make hard to read the full log. 2. Crash inside printk() causes recursive messages. They are currently printed into the printk_safe() buffers and there is a bigger risk that they will not reach the console. 3. pr_debug() messages are not printed by default. It is possible that nobody used them for ages. You might get many errors in less maintained code instead in the really used one. I mean that you will get more noise with less gain. Have you tested this patch by the syzcaller with many runs, please? Did it helped to actually discover more bugs? Did it really made things easier? I am not able to judge usefulness without more data. My intuition tells me that we should keep the number of syzcaller-related twists as small as possible. Otherwise, syscaller will diverge more and more from reality. Best Regards, Petr