Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp1392229rwb; Thu, 11 Aug 2022 23:22:01 -0700 (PDT) X-Google-Smtp-Source: AA6agR4lvsLvNVq1lbQqK9dRWdQqYPRZaN4Y/ItnCj7zf53QNYIv8BJaUgZLnjZb2L7cwKHj+7nz X-Received: by 2002:a17:907:2ceb:b0:730:e0ce:34f1 with SMTP id hz11-20020a1709072ceb00b00730e0ce34f1mr1623810ejc.293.1660285321441; Thu, 11 Aug 2022 23:22:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660285321; cv=none; d=google.com; s=arc-20160816; b=YvUUvvn99qL+29BRfj10XMA/RVyYIMhkoeKiW8aoGSw/cLjvP8iiadrmdpUxrElDlG RBaGfnd+kpcZRUnNekuVC1j8L/VTFlSOJbh6FLlUyceO6HKck6GIcQt6XVa8fn0Du39n 0dt7DIIJuhBa3w6FM+Z8WjW8OahVT61yvlf5TTZWNw4AAj6gfmunYK0UqLG2REuzv1Qt gPus3PdG8iCybMNoKnn5jPhE9acuKeNV4B/qmeVDjb1QlbNTgfVwwkOEYz6wJkeBwF64 nmY8v3BYHMzzz/uqlEToR0szvkpwI3IDYtHna492qwz6G9c0Fro/u/E9/YSx+89UPQ/r ODMg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=wJhFF9ZLjn1RiL+prckkPwGINyuuqWKdkOZ0W+gy1/4=; b=U9Dodi1cHcBcY9iqemsFH2hIKxUnvZAoBRAOaMlV2zsZdNyugtDwu8eJBecISbCGm2 u/m2d2oz1yOvslfC1/lvtx5X3v6uEZF6IxVQldBCp4G1uqZWYBwV2JeJhrd4DdiZSF0N PKdG/Ebp9pIczlloGRBvY0LZQY8kwW2GjzQl23Zg++YGbiu5NhtdDjTakAhaGlAAsiCx +lYga9M2B/tEg6KxbIb+uqK9d6Nr07GyiCLcTeMC5fyEArjFFV8fDPiaaHuJ/xy0xC/N iK5aLcGLSLQAFgDm81LMt4jg2fUy4eL2FVya9MK5ByzgGeOukBp1Y/vrnbsrhWTJYA3z 7yew== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=OcfHnH9q; spf=pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id s16-20020aa7c550000000b0043bbba1c32asi1289839edr.158.2022.08.11.23.21.23; Thu, 11 Aug 2022 23:22:01 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-bluetooth-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; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=OcfHnH9q; spf=pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231627AbiHLGKF (ORCPT + 99 others); Fri, 12 Aug 2022 02:10:05 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46818 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234931AbiHLGKC (ORCPT ); Fri, 12 Aug 2022 02:10:02 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B17D3A4B2F; Thu, 11 Aug 2022 23:10:01 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 2F721B81A6B; Fri, 12 Aug 2022 06:10:00 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3AFACC433C1; Fri, 12 Aug 2022 06:09:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1660284598; bh=8sV3XZOg58DpG6LIkEH130HfyjeZTPgBQd2AwBSjxwI=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=OcfHnH9qRK3vponWPY9s9bHFoHxiz60ojylon1FIGI5uXm6pBZPPhra71d3Zxr72F vHEDalz9cXMB8o2HAtw/pRHp1H4E5OHxWflCpAxV9sgrtC4NoT2eWyW6C+3ufmKQkJ /bptqaQHLnlP9R49xdU2ygOrndH1soH/TsSVBtg4= Date: Fri, 12 Aug 2022 08:09:55 +0200 From: Greg Kroah-Hartman To: Manish Mandlik Cc: Johannes Berg , Arend van Spriel , marcel@holtmann.org, luiz.dentz@gmail.com, Dan Williams , Jason Gunthorpe , linux-bluetooth@vger.kernel.org, Thomas Gleixner , "Rafael J . Wysocki" , chromeos-bluetooth-upstreaming@chromium.org, Won Chung , Abhishek Pandit-Subedi , linux-kernel@vger.kernel.org Subject: Re: [PATCH v5 1/5] sysfs: Add attribute info for /sys/devices/.../coredump_disabled Message-ID: References: <20220810085753.v5.1.I5622b2a92dca4d2703a0f747e24f3ef19303e6df@changeid> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-7.7 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,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-bluetooth@vger.kernel.org On Thu, Aug 11, 2022 at 04:21:54PM -0700, Manish Mandlik wrote: > On Wed, Aug 10, 2022 at 9:21 AM Greg Kroah-Hartman < > gregkh@linuxfoundation.org> wrote: > > > On Wed, Aug 10, 2022 at 06:03:37PM +0200, Johannes Berg wrote: > > > On Wed, 2022-08-10 at 09:00 -0700, Manish Mandlik wrote: > > > > This patch adds the specification for > > /sys/devices/.../coredump_disabled > > > > attribute which allows the userspace to enable/disable devcoredump for > > a > > > > particular device and drivers can use it to enable/disable > > functionality > > > > accordingly. It is available when the CONFIG_DEV_COREDUMP is enabled > > and > > > > driver has implemented the .coredump() callback. > > > > > > > > > > It would be nice to say _why_? What problem does this solve? You could > > > just create the dump and discard it, instead, for example? > > > > Agreed, I do not understand the need for this at all. > > > > The existing /sys/class/devcoredump/disabled (devcd) switch has two > limitations - it disables dev_coredump for everyone who's using it; Which is good and is the design of the thing. > and > drivers don't have visibility if devcd is disabled or not, so, the > dev_coredump API simply lets drivers collect the coredump from a device but > then later discards it if devcd is disabled. Why would a driver care? > Now that there are more subsystems using the base dev_coredump API, having > a granular control will make it easier to selectively disable dev_coredump > only for a particular device. For ChromeOS, this is useful to allow drivers > to develop coredump functionality and deploy it without affecting other > drivers with stable devcoredump implementations (example, we've had some > devcoredumps that take 12s to run and we only want to enable it on test > builds because it has lots of PII). The drivers can use this flag to > refrain from collecting or triggering coredump when undesirable. This feels odd. You have various out-of-tree drivers that take too long when they crash to make a dump and it causes some unknown issue elsewhere? I don't really understand, sorry. If you need something for development of a system, that's one thing, but this feels like you are adding fine-grained tweaks that no one in a real system would ever use. What is broken with the current system of "on/off" that does not work for you now? Why would a normal user only want to turn this on for one driver and not another? thanks, greg k-h