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 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id E71A9C19F2D for ; Tue, 9 Aug 2022 17:27:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S245298AbiHIR1h (ORCPT ); Tue, 9 Aug 2022 13:27:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35808 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S244949AbiHIR1c (ORCPT ); Tue, 9 Aug 2022 13:27:32 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 79DED1FCC7; Tue, 9 Aug 2022 10:27:30 -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 9FC33B8168C; Tue, 9 Aug 2022 17:27:29 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id B88DBC433D6; Tue, 9 Aug 2022 17:27:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1660066048; bh=jAu9dpyXy8eLfzB3y+ekTXCh1hUDnv0KWYvUbtEC6Xs=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=md2/BPIdoRVJYCrTG6QLMvK65R5wQujiw446y5UGapdlH1c5Xh6mKqQ3J8LXCHph2 n9IRax1IFt2RrTBh32sqlIMPEFNWsZT/IhalOswFkNYjIn64BiZwi3q2hJBxmtEsPm MzHcJYrRnl2fPVtc/5dDPIMGE9qzq+wjbxJwJEFE= Date: Tue, 9 Aug 2022 19:27:25 +0200 From: Greg Kroah-Hartman To: Manish Mandlik Cc: Arend van Spriel , marcel@holtmann.org, luiz.dentz@gmail.com, chromeos-bluetooth-upstreaming@chromium.org, linux-bluetooth@vger.kernel.org, Abhishek Pandit-Subedi , Dan Williams , Jason Gunthorpe , Johannes Berg , "Rafael J. Wysocki" , Thomas Gleixner , Won Chung , linux-kernel@vger.kernel.org Subject: Re: [PATCH v4 2/5] devcoredump: Add per device sysfs entry to enable/disable coredump Message-ID: References: <20220809083112.v4.1.I5622b2a92dca4d2703a0f747e24f3ef19303e6df@changeid> <20220809083112.v4.2.Ief1110784c6c1c3ac0ee5677c2d28d785af8686d@changeid> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220809083112.v4.2.Ief1110784c6c1c3ac0ee5677c2d28d785af8686d@changeid> Precedence: bulk List-ID: X-Mailing-List: linux-bluetooth@vger.kernel.org On Tue, Aug 09, 2022 at 08:35:24AM -0700, Manish Mandlik wrote: > The /sys/class/devcoredump/disabled provides only one-way disable > functionality. Also, disabling devcoredump using it disables the > devcoredump functionality for everyone who is using it. > > Provide a way to selectively enable/disable devcoredump for the device > which is bound to a driver that implements the '.coredump()' callback. > > This adds the 'coredump_disabled' driver attribute. When the driver > implements the '.coredump()' callback, 'coredump_disabled' file is added > along with the 'coredump' file in the sysfs folder of the device upon > driver binding. The file is removed when the driver is unbound. > > Drivers can use this attribute to enable/disable devcoredump and the > userspace can write 0 or 1 to /sys/devices/.../coredump_disabled sysfs > entry to control enabling/disabling of devcoredump for that device. > > Signed-off-by: Manish Mandlik > Reviewed-by: Abhishek Pandit-Subedi > --- > > Changes in v4: > - New patch in the series > > drivers/base/dd.c | 43 +++++++++++++++++++++++++++++++++++--- > drivers/base/devcoredump.c | 2 +- > include/linux/device.h | 4 ++++ > 3 files changed, 45 insertions(+), 4 deletions(-) You can't add a new sysfs file without also a Documentation/ABI update at the same time :( thanks, greg k-h