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 EE50DEB64DD for ; Fri, 23 Jun 2023 08:09:36 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231741AbjFWIJe (ORCPT ); Fri, 23 Jun 2023 04:09:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50120 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230180AbjFWIJb (ORCPT ); Fri, 23 Jun 2023 04:09:31 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 542172130; Fri, 23 Jun 2023 01:09:29 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id C503E619A2; Fri, 23 Jun 2023 08:09:28 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id D0309C433C0; Fri, 23 Jun 2023 08:09:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1687507768; bh=xI802DpDgRHiKKm9ZC+9C09p1dJUgMzr/A8W7L0AnFs=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=QHwQqYhYKxKYeoouZxEd56bHoeia4f2VpmI9D0VLeQnUC/4R4Dyfoh+jXWHAIHGnS +x1BRtE2ZzZIcRxXsbCkWUbBplItwlufrc7vS30Wh4/sQK7oV136o1M+bOpxuJdjez vIHshj/T60yAJv4nPOtdLCf+0EeUpls+3QsRUU3c= Date: Fri, 23 Jun 2023 10:09:20 +0200 From: Greg KH To: Avadhut Naik Cc: rafael@kernel.org, lenb@kernel.org, linux-acpi@vger.kernel.org, linux-fsdevel@vger.kernel.org, yazen.ghannam@amd.com, alexey.kardashevskiy@amd.com, linux-kernel@vger.kernel.org, avadnaik@amd.com Subject: Re: [PATCH v4 2/4] fs: debugfs: Add write functionality to debugfs blobs Message-ID: <2023062313-crabgrass-puppet-3528@gregkh> References: <20230621035102.13463-1-avadhut.naik@amd.com> <20230621035102.13463-3-avadhut.naik@amd.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230621035102.13463-3-avadhut.naik@amd.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jun 21, 2023 at 03:51:00AM +0000, Avadhut Naik wrote: > From: Avadhut Naik > > Currently, debugfs_create_blob() creates read-only debugfs binary blob > files. > > In some cases, however, userspace tools need to write variable length > data structures into predetermined memory addresses. An example is when > injecting Vendor-defined error types through the einj module. In such > cases, the functionality to write to these blob files in debugfs would > be desired since the mapping aspect can be handled within the modules > with userspace tools only needing to write into the blob files. > > Implement a write callback to enable writing to these blob files in > debugfs. > > Signed-off-by: Avadhut Naik > Reviewed-by: Alexey Kardashevskiy Reviewed-by: Greg Kroah-Hartman