Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp12118476rwd; Fri, 23 Jun 2023 01:24:29 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6OqSQPqoYn0dIgzZonVWvoD2lkKbMANi41qdDiXuTtGoTyDUNiOVvOh7BMNslcn76IupAR X-Received: by 2002:a05:6808:1788:b0:39e:a94e:11e with SMTP id bg8-20020a056808178800b0039ea94e011emr28149191oib.51.1687508668809; Fri, 23 Jun 2023 01:24:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687508668; cv=none; d=google.com; s=arc-20160816; b=EDIN9Ik1cVqkh8leDH4bKKsptxRvPkHiOJY9Fv+5kaKX3Vot51K2PM4na4caFbCmrb MjtITwqVsmriRtWho/H2Il8R6hlstu0aW0R5s/NSM0i2XolubfK6hipV8ShnuwcBTt0v n+EzRXKZxnKcln30Srn2xl7SpftMlcletDKW9yZRNxAvoGVHBW5793JqSeXlVvdTH+Z9 OPnbbx4ABl8jAsd4ePsFDEhb2Ux5Gb3zrBB/+anHZRBGsgYx90NX4ed4QivzN9ffpeWA nEtw01r+bz5Cd3Pvkwb970i3tqXGj46CqBJM9YWclyLH2EZLmcJFowmt3ked82ax5PsF kFgw== 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=hoXknc3IcB2X1rLeysU9uaycnWjLppjshRl/skNIFUA=; b=wsWJ+2I5W4HjjGFeKudmTmnRenVcZwriWpqlkltAOxzxEgaShX0Y0KuluRIXIWOZmG 2NAtKzeOVFt0oqnQwu+MTBewqd97FuOjHosQ+H1qKLl+EZgdcgb9eaDPVYaAHYgKt0/N A6TnxNLVtYd+sQ/h2e58jW8t8GdyxsX5F0fAnhtP5qEkYMLvE+hutjUFZcXm6+y/GJMB WRxmjATJtyLjBAaBDLIsiPyhuAJcPLDzoGEaaRXQtiE4n9A+e4zkBQ4Vl7pa1UAc/VBo e2VKZsBXNyVFp0xfzfYTZev6ClawOw5ZKQXBzh6Ys9Ol9mfp62DF2ixkOiAknYDPeOOI kXAg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=QHwQqYhY; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-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 ls17-20020a17090b351100b00259ae5e1c8fsi1572985pjb.23.2023.06.23.01.24.15; Fri, 23 Jun 2023 01:24:28 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-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=QHwQqYhY; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-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 S231278AbjFWIJd (ORCPT + 99 others); Fri, 23 Jun 2023 04:09:33 -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> X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED 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-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