Received: by 2002:a05:7412:40d:b0:e2:908c:2ebd with SMTP id 13csp652191rdf; Tue, 21 Nov 2023 12:23:23 -0800 (PST) X-Google-Smtp-Source: AGHT+IE2QAWMynN6laRmehEE/liUyou4oPAeI9RTQn6GiB3yNfn9wSRVDjmybkNrkfMhdv0ubmFQ X-Received: by 2002:a92:c982:0:b0:35b:cca:a55f with SMTP id y2-20020a92c982000000b0035b0ccaa55fmr68288iln.2.1700598203373; Tue, 21 Nov 2023 12:23:23 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700598203; cv=none; d=google.com; s=arc-20160816; b=OVvl0sTgDpYGKwbAymdsYh7LAb7Uixp1mp6nmc/aYH7rpSC16qB5SspfC5pJ0md97B aUwzA8J/zulXKooBOG9IY0xwWQW2L4l+26Hwon8n0lvQ4YQdPY8K3GHd+mAwy7Fqq+OV hk1R2GRotATKfHJMNiRpk8fDlBxvNYzF9Gimi+E9r9pcIl4V7FcAwKfmzifLwkYka7X9 3TfijEKIKbaWIEmz2oXu+meOOhWUrHVfJOATDaHwRKxxOARcQs7Bti9svIiQBdfJoc3w O8J0MHGGWQIZbd4mja3vy3la97GF01zMahn75GVeOhnmYEgDniYkXd3YUBhE4LCsa5B7 chVA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version; bh=RFcJ06QeR5OjFqHGJyWbQvPR3sKOIuFI/QSemzZs4fc=; fh=1/FESQKauR7cQJA/rZU35t/+1q9f+8gxi40v2W4cd3Q=; b=QkeLc/D/NnIXaOJRLY607Fff2be+9lo4FsTpwzmUft7IXu0tBKseu2nSCbcAxH4AXP QGrwLKC4VJps4aJBTzt2O1QON2TgsGGf+4JDMmijSw2/yKbQGPkM8ESBxQMdaOhp3stv 4JXkVp23BxIPWeJK60boSQNfrvr/ugnN8Ia8ls9i2PEFD2pO1E1eD5FrcmphA3mmtw/r 5wFCpZvxJu2OgKATP8quaW44HW5fRB8xskdUsB5KpmLlLkF52D3XK1xwF+x9XGSGZiaN z2GTvJwWTAEX2DlkuAvyJCfxeFhyYjSJo+HU6eWMEEtPDWQnLqrY6cRIAbHTafXoVWJb XzWQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from fry.vger.email (fry.vger.email. [23.128.96.38]) by mx.google.com with ESMTPS id v71-20020a63894a000000b0057745d87b53si11038213pgd.686.2023.11.21.12.23.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 Nov 2023 12:23:23 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) client-ip=23.128.96.38; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by fry.vger.email (Postfix) with ESMTP id 8ACC980A5F04; Tue, 21 Nov 2023 12:23:20 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at fry.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229545AbjKUUMr convert rfc822-to-8bit (ORCPT + 99 others); Tue, 21 Nov 2023 15:12:47 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39108 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229495AbjKUUMq (ORCPT ); Tue, 21 Nov 2023 15:12:46 -0500 Received: from mail-oo1-f41.google.com (mail-oo1-f41.google.com [209.85.161.41]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 39C06112; Tue, 21 Nov 2023 12:12:40 -0800 (PST) Received: by mail-oo1-f41.google.com with SMTP id 006d021491bc7-58a106dd421so289204eaf.0; Tue, 21 Nov 2023 12:12:40 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700597559; x=1701202359; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=5z/CJO7e3iTwW4OMryoZAQBQUEGSEP4jZRhULM4OHDs=; b=niODAcAYzbWEiM4h00v4dGeZa1l50jnblAiSSSTVxyaXgJs9dYkynkt8jJ7Y0hBiJg kzW/N4FzmAL0Hw2leXPBwZ0KJMsF/i8sqONruOxI0O6WTnUBb9zAzvdkoYsb2oGgroWd PwM8GDbtZI+UltWgBgdOc4U5sD0KcCtUWnuZ1NUvu3vdqyU3WdK7z/tJ29OJZyXdfXkK l6MeSWpMwolqd+StjrYRCsRf8RWlrucCDu9uAMH1b3kxSw0cHDYFHQUZhiAnZiZ+rIRn dBFxtXcyUS/sg2vpPBAdoUqkASzZwpHHA0ZXSZKjyv+SbRmf8/DfeGGrwwUBnhPjXnBD 1Rdw== X-Gm-Message-State: AOJu0YzRSHkWcHHLbVvb7lqVysoIkI7/4clFaJMYW6pYDXzZZ2JhBDnF N6v5q9+6xDrJNbo6IMmuRI2J1B8sUDt/ga8L7Z4= X-Received: by 2002:a05:6820:311:b0:58c:e80a:537d with SMTP id l17-20020a056820031100b0058ce80a537dmr459120ooe.1.1700597559366; Tue, 21 Nov 2023 12:12:39 -0800 (PST) MIME-Version: 1.0 References: <20231116224725.3695952-1-avadhut.naik@amd.com> In-Reply-To: <20231116224725.3695952-1-avadhut.naik@amd.com> From: "Rafael J. Wysocki" Date: Tue, 21 Nov 2023 21:12:28 +0100 Message-ID: Subject: Re: [PATCH v6 0/4] Add support for Vendor Defined Error Types in Einj Module To: Avadhut Naik Cc: linux-acpi@vger.kernel.org, linux-fsdevel@vger.kernel.org, rafael@kernel.org, gregkh@linuxfoundation.org, lenb@kernel.org, james.morse@arm.com, tony.luck@intel.com, bp@alien8.de, linux-kernel@vger.kernel.org, alexey.kardashevskiy@amd.com, yazen.ghannam@amd.com, avadnaik@amd.com Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8BIT X-Spam-Status: No, score=-1.0 required=5.0 tests=MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on fry.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (fry.vger.email [0.0.0.0]); Tue, 21 Nov 2023 12:23:20 -0800 (PST) On Thu, Nov 16, 2023 at 11:47 PM Avadhut Naik wrote: > > This patchset adds support for Vendor Defined Error types in the einj > module by exporting a binary blob file in module's debugfs directory. > Userspace tools can write OEM Defined Structures into the blob file as > part of injecting Vendor defined errors. Similarly, the very tools can > also read from the blob file for information, if any, provided by the > firmware after error injection. > > The first patch refactors available_error_type_show() function to ensure > all errors supported by the platform are output through einj module's > available_error_type file in debugfs. > > The second patch adds a write callback for binary blobs created through > debugfs_create_blob() API. > > The third patch fixes the permissions of panicinfo file in debugfs to > ensure it remains read-only > > The fourth patch adds the required support i.e. establishing the memory > mapping and exporting it through debugfs blob file for Vendor-defined > Error types. > > Changes in v2: > - Split the v1 patch, as was recommended, to have a separate patch for > changes in debugfs. > - Refactored available_error_type_show() function into a separate patch. > - Changed file permissions to octal format to remove checkpatch warnings. > > Changes in v3: > - Use BIT macro for generating error masks instead of hex values since > ACPI spec uses bit numbers. > - Handle the corner case of acpi_os_map_iomem() returning NULL through > a local variable to a store the size of OEM defined data structure. > > Changes in v4: > - Fix permissions for panicinfo file in debugfs. > - Replace acpi_os_map_iomem() and acpi_os_unmap_iomem() calls with > acpi_os_map_memory() and acpi_os_unmap_memory() respectively to avert > sparse warnings as suggested by Alexey. > > Changes in v5: > - Change permissions of the "oem_error" file, being created in einj > module's debugfs directory, from "w" to "rw" since system firmware > in some cases might provide some information through OEM-defined > structure for tools to consume. > - Remove Reviewed-by: Alexey Kardashevskiy from the > fourth patch since permissions of the oem_error file have changed. > - Add Reviewed-by: Greg Kroah-Hartman for > second and third patch. > - Rebase on top of tip master. > > Changes in v6: > - Minor formatting undertaken in the first and fourth patch per v5 > feedback by Boris. > - Added check in the second patch to ensure that only owners can write > into the binary blob files. Mentioned the same in commit description. > - Modified commit description of the third patch per recommendations > provided by Tony. > - Add Reviewed-by: Borislav Petkov (AMD) for first and > fourth patch. > - Add Reviewed-by: Tony Luck for second, third and > fourth patch. > > > [NOTE: > > - The second patch already had the below tags for v5: > Reviewed-by: Alexey Kardashevskiy > Reviewed-by: Greg Kroah-Hartman > > Since the changes to the patch for v6 are very minimal i.e. addition of > a check to ensure that only owners write into the blobs, have retained > the tags for v6 as well. > > - Similarly, the third patch already had the below tag for v5: > Reviewed-by: Greg Kroah-Hartman > > Since only the commit description was slightly changed for this patch > in v6, have retained the tag for v6 too. > > Having said so, if advised, will attempt to reacquire the tags.] > > > Avadhut Naik (4): > ACPI: APEI: EINJ: Refactor available_error_type_show() > fs: debugfs: Add write functionality to debugfs blobs > platform/chrome: cros_ec_debugfs: Fix permissions for panicinfo > ACPI: APEI: EINJ: Add support for vendor defined error types > > drivers/acpi/apei/einj.c | 71 +++++++++++++++-------- > drivers/platform/chrome/cros_ec_debugfs.c | 2 +- > fs/debugfs/file.c | 28 +++++++-- > 3 files changed, 72 insertions(+), 29 deletions(-) > > > base-commit: a1cc6ec03d1e56b795607fce8442222b37d1dd99 > -- All patches in the series applied as 6.8 material, thanks!