From mboxrd@z Thu Jan 1 00:00:00 1970 From: Borislav Petkov Subject: Re: [PATCH v7 19/25] ACPI / APEI: Only use queued estatus entry during _in_nmi_notify_one() Date: Mon, 21 Jan 2019 18:19:10 +0100 Message-ID: <20190121171910.GM29166@zn.tnic> References: <20181203180613.228133-1-james.morse@arm.com> <20181203180613.228133-20-james.morse@arm.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: <20181203180613.228133-20-james.morse@arm.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: kvmarm-bounces@lists.cs.columbia.edu Sender: kvmarm-bounces@lists.cs.columbia.edu To: James Morse Cc: Rafael Wysocki , Tony Luck , Fan Wu , linux-mm@kvack.org, Marc Zyngier , Catalin Marinas , Will Deacon , Dongjiu Geng , linux-acpi@vger.kernel.org, Naoya Horiguchi , kvmarm@lists.cs.columbia.edu, linux-arm-kernel@lists.infradead.org, Len Brown List-Id: linux-acpi@vger.kernel.org On Mon, Dec 03, 2018 at 06:06:07PM +0000, James Morse wrote: > Each struct ghes has an worst-case sized buffer for storing the > estatus. If an error is being processed by ghes_proc() in process > context this buffer will be in use. If the error source then triggers > an NMI-like notification, the same buffer will be used by > _in_nmi_notify_one() to stage the estatus data, before > __process_error() copys it into a queued estatus entry. > > Merge __process_error()s work into _in_nmi_notify_one() so that > the queued estatus entry is used from the beginning. Use the new > ghes_peek_estatus() to know how much memory to allocate from > the ghes_estatus_pool before reading the records. > > Reported-by: Borislav Petkov > Signed-off-by: James Morse > > Change since v6: > * Added a comment explaining the 'ack-error, then goto no_work'. > * Added missing esatus-clearing, which is necessary after reading the GAS, > --- > drivers/acpi/apei/ghes.c | 59 ++++++++++++++++++++++++---------------- > 1 file changed, 35 insertions(+), 24 deletions(-) Reviewed-by: Borislav Petkov -- Regards/Gruss, Boris. Good mailing practices for 400: avoid top-posting and trim the reply.