Received: by 2002:a05:7412:a9a2:b0:e2:908c:2ebd with SMTP id o34csp1703203rdh; Sat, 28 Oct 2023 04:06:54 -0700 (PDT) X-Google-Smtp-Source: AGHT+IG54Nnb6NKAKXGv8GjEfWSWKpjrhjoaYkx/vqCrmoOyRa3FbjUc54LDGWcyBKydhFUmzF99 X-Received: by 2002:a05:6a21:193:b0:16a:b651:dcd6 with SMTP id le19-20020a056a21019300b0016ab651dcd6mr7072789pzb.7.1698491214613; Sat, 28 Oct 2023 04:06:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698491214; cv=none; d=google.com; s=arc-20160816; b=vKxSMVEpDCOSqUx2eIruYpLEUVJe+giAObJBDdLCMv60vHNaa2T1yiQil69vaLraCy ZWVnvrnLPTA+wNDskUIiDOBsz95wd12H+3p654XRuXSxgTEPGqjc/VPaWKgt7+x8P2Cj JOUQub9TXwftpfXHnwXwfieT2iA+PPR43nSFR48lYTC19oqtNph2WMMqE44N8W7Ro3PV TYIM1IgyszU1TLa4c/pZkypq0nT1pHbaohPO8ZnhAiTDLM5wMAPjDRj8uu4lbrtOK04r dKP4RlVxrgvS71Bar9RdHggNpBrrWegmMefA2PR1AIjQ0AN/hz+foQufIb0uQALRL8fs CEBw== 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=EHjBb96lcMnmWWDcbNaD4wXBmqS+NphkqDuHPnHecec=; fh=FTbfwiwZJgzA1mn6GIuTarSRb5P4ssYPy9wWoO14q3U=; b=B9bCb6OdAaIWDs+U/WqoLZow9cnfibAmLuOVzsA99PEWKdcWltIDv/sFfULZiy1L72 WMhvLdFJceKkeXcTvvTQBhhPR6KbCLwHGls2prn1AQgPvjaMxA1UPEj3FTsIXusq5NHD FXiIY71AiUxehBXlHhyRhKzQLrIV1+5FXP8MD12e3PhDT6e+LuzCAfApVVPXzRHVi+/k san0yI7P+tQERRgdOd5BbJEKf+Hueo6TIQMGK4Gl3FbdPU62BAIkZ47ZlBnWLbirXm5Y 2G+b0HwvTDCLF8vegGdZV4Emyuwd8R0vg1PhUr3FasW6dVCpLl1qAAFEPg/ebDQlQrPA buRA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@alien8.de header.s=alien8 header.b=VtY4ftls; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=alien8.de Return-Path: Received: from fry.vger.email (fry.vger.email. [2620:137:e000::3:8]) by mx.google.com with ESMTPS id b13-20020a63340d000000b005641315d956si2365135pga.147.2023.10.28.04.06.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 28 Oct 2023 04:06:54 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) client-ip=2620:137:e000::3:8; Authentication-Results: mx.google.com; dkim=pass header.i=@alien8.de header.s=alien8 header.b=VtY4ftls; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=alien8.de Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by fry.vger.email (Postfix) with ESMTP id 0A9C780A9DC3; Sat, 28 Oct 2023 04:06:52 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at fry.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229967AbjJ1LGe (ORCPT + 99 others); Sat, 28 Oct 2023 07:06:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58514 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229661AbjJ1LGb (ORCPT ); Sat, 28 Oct 2023 07:06:31 -0400 Received: from mail.alien8.de (mail.alien8.de [65.109.113.108]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BC960C0; Sat, 28 Oct 2023 04:06:28 -0700 (PDT) Received: from localhost (localhost.localdomain [127.0.0.1]) by mail.alien8.de (SuperMail on ZX Spectrum 128k) with ESMTP id 6F82140E0171; Sat, 28 Oct 2023 11:06:26 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at mail.alien8.de Authentication-Results: mail.alien8.de (amavisd-new); dkim=pass (4096-bit key) header.d=alien8.de Received: from mail.alien8.de ([127.0.0.1]) by localhost (mail.alien8.de [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id kPqXeTtDDo9z; Sat, 28 Oct 2023 11:06:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alien8.de; s=alien8; t=1698491183; bh=EHjBb96lcMnmWWDcbNaD4wXBmqS+NphkqDuHPnHecec=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=VtY4ftls8QE2bTI6UlkII5vgHpZDr946Z5wLzVI4b+EqGpZX0QOrAdqXl6GuXlsoR xYA9/F6VbaKNNhUnuKA1aI6JSePqlZrm5v9k5xoGAm40uKreUPU6WM4VTxT5Ee2nz2 hFmaeo0wKpYxzoE1o3/beUTixBnskz0v+rbE6cbUAsmVFWouQ3bEykTm3MXuxGFBVG iLyHGhsQMDgS9oJ+LQ6B38Hj6iGJMM/s5LiDescjhj0kn1F+ChxNjskhu4jKjtbDnl oDoAtjt6/vvF8qPRU/NgZ7ctWREEX+OcHY3U44MbzFxDHX/0MW8I2RIVsQElTIqLju zljXPpWDJS3fRMGSkFA8MBxCpJuji8yaWvRuwHR3fByzDda2UmesgxA8DAwc0fck7J /9rs62sWTn6AsGQ4914uT3dHZP2j+KLbNCDyf2P8wtvev2Ibn1hrnP9g5GcOr6l7f8 MUAYbyh0JNdr7HaREza30ZChjyVNUAI+cBWa5zFWPxsjuLgOoEqfvCa/pj/BHkXJNW CYJuySDFXF3Pk1grJBBoxYWgfTqA0aIOtfTqi5fE2Pka6Jv5Z0S0X5xElWXqG6bCPY M6en9OhQ8CAntqGN9GEorQrtCV8JovYdU6uBIHc5Wl899IK+vuILYrFLVh2ugmzfIk 72ZKBG9OsUn4VrOTbzVR0Fis= Received: from zn.tnic (pd95304da.dip0.t-ipconnect.de [217.83.4.218]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature ECDSA (P-256) server-digest SHA256) (No client certificate requested) by mail.alien8.de (SuperMail on ZX Spectrum 128k) with ESMTPSA id 5F7E640E018F; Sat, 28 Oct 2023 11:06:10 +0000 (UTC) Date: Sat, 28 Oct 2023 13:06:04 +0200 From: Borislav Petkov To: Jeshua Smith Cc: keescook@chromium.org, tony.luck@intel.com, gpiccoli@igalia.com, rafael@kernel.org, lenb@kernel.org, james.morse@arm.com, linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org, linux-hardening@vger.kernel.org, linux-tegra@vger.kernel.org, treding@nvidia.com, jonathanh@nvidia.com Subject: Re: [PATCH V3] ACPI: APEI: Use ERST timeout for slow devices Message-ID: <20231028110604.GCZTzrHKnsDB+Dmljr@fat_crate.local> References: <20231027223309.22883-1-jeshuas@nvidia.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20231027223309.22883-1-jeshuas@nvidia.com> X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS 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]); Sat, 28 Oct 2023 04:06:52 -0700 (PDT) On Fri, Oct 27, 2023 at 10:33:09PM +0000, Jeshua Smith wrote: > Slow devices such as flash may not meet the default 1ms timeout value, > so use the ERST max execution time value as the timeout if it is larger > and if the ERST has the "slow" attribute set. > > Example: > A NOR flash spec lists "Page program time (256 bytes)" as 120us typical, > and 1800us max. A 32KB error log would be (32K/256) = 128 nor-flash > pages. Writing those 128 nor-flash pages would then take > 120us * 128 = 15ms typical, or 1800us * 128 = 230.4ms max. > > Without this change, when pstore calls APEI's ERST code to write a 32KB > error log to the NOR flash in the example, the code will flag a timeout > after 1ms and return an error to pstore. With this change, unless the > max time value from the ERST table is exceeded, the code will not flag a > timeout and will return success to pstore after the operation completes. > > Signed-off-by: Jeshua Smith > --- Reviewed-by: Borislav Petkov (AMD) -- Regards/Gruss, Boris. https://people.kernel.org/tglx/notes-about-netiquette