Received: by 2002:ab2:60d1:0:b0:1f7:5705:b850 with SMTP id i17csp25435lqm; Tue, 30 Apr 2024 11:32:45 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXHfniX6qbMq9mUUiPm1omgeSZeNFRVJo5og0Supt4TIpO6/1MJPBqV1XCpCSPSmSDPfnn2aE13gZl2zxYlUxm5FA6w+1yqmp9hvmlO9A== X-Google-Smtp-Source: AGHT+IE2/Z9poFOiStgOTTy193FNuIoYtFjGYE0hU1c9tLZls/n5y0QZ7gmpFw0r5gyjNwivGYSS X-Received: by 2002:a17:902:d54d:b0:1eb:dae:714f with SMTP id z13-20020a170902d54d00b001eb0dae714fmr310057plf.9.1714501965100; Tue, 30 Apr 2024 11:32:45 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1714501965; cv=pass; d=google.com; s=arc-20160816; b=vJHKESjlQQhbvnN2tjMM/1zwaOJ0SPjteUH6YFqG5QZjUv5oX6tm/NYz1ppQeVDDa8 rVohPabvlfjGVYF0gUi8yt2ORtEDYHqfhdAaD6/+MNGUbp2hzj4wBFafX8Msk0pRKDY5 Jwang1WfmhBB5fsDFZ+Ujff0g26Fs45FLMCZaGGujp4ShEI3DgeNwRbesGzTh3AU5ycC J6UMaLpM+lApVkAqkMx95LKcomt970teSaoGK0UDt++EwC5GD5f4v9OrzYLaGCCuqZpr QI+x9ecMXPIpNkvNzz4NK7pRVEHg+xP88hjBGThrSZIF86N4xyB4jD+682rxFrbW49cH 41sA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=L/6Q3O8wM+oXD9OiJD19cs2zfIVYoexBsVjdLXilRk0=; fh=x4ja59+hG1lg4aaKMzJg9QxdHSz56/rGph6E1dLeLMM=; b=raYsLrP5paDLj9/4psZ9ARfWH3NH0siMgl0q2DaA8ytc7qaiBZFQBavHO4p/2aDlqv +uNAAiKWyutrqjDofhc9ZeFohuvUi8pezUjjKSJbF8vXDPHUwaAuMGH7hcIatjgbxamv VC6Avgjoijtn0Ls/AC9vR0HnU0vfhk/K6tj0MUQxe3wqvlV3cr8LvLkLSbZ7BPvks8KH q8Fji1Dog5ldW6tOcVp/alljSEmBXuwC6IvQjTqJm7nmNAF/gFsKS/Arf9RYGjw3NKj8 bAlqxtb9V7YRKfsJXKlWJfeHFf5zJaw/VrCSlSF96LPaQambFC+N2rk5Xh4GQAlSVh9c hUaw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=M2LF3w5Q; arc=pass (i=1 spf=pass spfdomain=intel.com dkim=pass dkdomain=intel.com dmarc=pass fromdomain=intel.com); spf=pass (google.com: domain of linux-kernel+bounces-164589-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-164589-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id ma12-20020a170903094c00b001e49428f307si22624069plb.329.2024.04.30.11.32.44 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 30 Apr 2024 11:32:45 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-164589-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=M2LF3w5Q; arc=pass (i=1 spf=pass spfdomain=intel.com dkim=pass dkdomain=intel.com dmarc=pass fromdomain=intel.com); spf=pass (google.com: domain of linux-kernel+bounces-164589-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-164589-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id 7F953B23040 for ; Tue, 30 Apr 2024 18:32:40 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 760CE180A85; Tue, 30 Apr 2024 18:32:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="M2LF3w5Q" Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.14]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7898423C9; Tue, 30 Apr 2024 18:32:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.14 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714501951; cv=none; b=NWMlBwRDRqTj7dcmKpTdbV4SOUIqLxMzqqHU9Qo+Ry1KtluD5wSi08rPFFWqGO3K1mU6m4xTaTvHTklM62hKqSr0UfzVrV0bz9Qn9F9aMekbDZ8t8x+NnQ2MUOOXNGccT90J7n/DO7UMIO1nd9w0V/86OVXYe6FdgfL1308TPlw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714501951; c=relaxed/simple; bh=sn8HIeJeJeVc1R6mxR/8VMnsMTi83wrrXNCYmLtB/kk=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=gjBP26sMAknlHEFtIsaCqa+er8W3TPboUpctR6HOi2S4q2rjR+YnM97QkdANg2/Z+eS6jLER7DcO7/UNj9AKNfhuqDwJc4tKVIFjWV8XJ0I5DoYBcN6jS1w9pFZv6saA+su16jaMC8PkXWjA3TZ3+Emy96sJWqkegIvA7x/pVBE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com; spf=pass smtp.mailfrom=intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=M2LF3w5Q; arc=none smtp.client-ip=192.198.163.14 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=intel.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1714501950; x=1746037950; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=sn8HIeJeJeVc1R6mxR/8VMnsMTi83wrrXNCYmLtB/kk=; b=M2LF3w5Q6fX915fRlc0WbdRhSkMXUZQmT/R1yRmxBwx+ApgijBtwcOWQ 6jyHzkoYxGuKXOIBjhoWqKFdvQRw7Nfa65kDTpCTHlcVYnRRjPlX7zOkZ YiD02XYwU9TZv6tTRjE1c3COOoj6VscMjw9Vyq2tLSIe+O9d8voD1WfSf /R79LBpyNRdj8P6y/CFTCIdlWgBO7EIEVIiotS/GfXfVtXGXh5W39CNJH NVd1qmzvyndThyvTiH3lUpOmUco8DUVBicfErbt6Bkl8L3HuKg/DMuPsC MVh4Kmq44Vg6h1i+ODNveOHOo9Q2pQZKHIBwLmyoI27DooqcAme6CWpLG w==; X-CSE-ConnectionGUID: KAkH2ZAFRr2xZ7TBFcXZ7g== X-CSE-MsgGUID: KTfzve/6Q527sQUmitdBvQ== X-IronPort-AV: E=McAfee;i="6600,9927,11060"; a="10447766" X-IronPort-AV: E=Sophos;i="6.07,242,1708416000"; d="scan'208";a="10447766" Received: from fmviesa008.fm.intel.com ([10.60.135.148]) by fmvoesa108.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 30 Apr 2024 11:32:29 -0700 X-CSE-ConnectionGUID: 4LGhSSpnTYW270yu5bv0Yw== X-CSE-MsgGUID: 1Eb4y7CjRMGfVLpIYkAbVw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.07,242,1708416000"; d="scan'208";a="26555565" Received: from agluck-desk3.sc.intel.com (HELO agluck-desk3) ([172.25.222.105]) by fmviesa008-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 30 Apr 2024 11:32:28 -0700 Date: Tue, 30 Apr 2024 11:32:27 -0700 From: Tony Luck To: Ira Weiny Cc: Dave Jiang , Dan Williams , Jonathan Cameron , Smita Koralahalli , Shiju Jose , Dan Carpenter , Yazen Ghannam , Davidlohr Bueso , Alison Schofield , Vishal Verma , Ard Biesheuvel , linux-efi@vger.kernel.org, linux-kernel@vger.kernel.org, linux-cxl@vger.kernel.org, "Rafael J. Wysocki" , Borislav Petkov Subject: Re: [PATCH v4 1/2] acpi/ghes: Process CXL Component Events Message-ID: References: <20240426-cxl-cper3-v4-0-58076cce1624@intel.com> <20240426-cxl-cper3-v4-1-58076cce1624@intel.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240426-cxl-cper3-v4-1-58076cce1624@intel.com> On Fri, Apr 26, 2024 at 08:34:00PM -0700, Ira Weiny wrote: > @@ -707,6 +805,18 @@ static bool ghes_do_proc(struct ghes *ghes, > } > else if (guid_equal(sec_type, &CPER_SEC_PROC_ARM)) { > queued = ghes_handle_arm_hw_error(gdata, sev, sync); > + } else if (guid_equal(sec_type, &CPER_SEC_CXL_GEN_MEDIA_GUID)) { > + struct cxl_cper_event_rec *rec = acpi_hest_get_payload(gdata); > + > + cxl_cper_post_event(CXL_CPER_EVENT_GEN_MEDIA, rec); > + } else if (guid_equal(sec_type, &CPER_SEC_CXL_DRAM_GUID)) { > + struct cxl_cper_event_rec *rec = acpi_hest_get_payload(gdata); > + > + cxl_cper_post_event(CXL_CPER_EVENT_DRAM, rec); > + } else if (guid_equal(sec_type, &CPER_SEC_CXL_MEM_MODULE_GUID)) { > + struct cxl_cper_event_rec *rec = acpi_hest_get_payload(gdata); > + > + cxl_cper_post_event(CXL_CPER_EVENT_MEM_MODULE, rec); > } else { > void *err = acpi_hest_get_payload(gdata); You pass "rec" to cxl_cper_post_event() in all these cases for later processing in context where you can sleep to get locks. But that's just a pointer somewhere into the "gdata" error record received from BIOS. What's the lifetime of that record? Can it be re-used/overwritten before that other kernel thread gets around to looking at it? -Tony