From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751789AbdG1HKS (ORCPT ); Fri, 28 Jul 2017 03:10:18 -0400 Received: from mail.skyhub.de ([5.9.137.197]:33826 "EHLO mail.skyhub.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751746AbdG1HKQ (ORCPT ); Fri, 28 Jul 2017 03:10:16 -0400 Date: Fri, 28 Jul 2017 09:09:33 +0200 From: Borislav Petkov To: Steven Rostedt Cc: linux-edac , Tony Luck , Yazen Ghannam , X86 ML , LKML Subject: Re: [RFC PATCH 6/8] EDAC, mce_amd: Convert to seq_buf Message-ID: <20170728070933.GA1884@nazgul.tnic> References: <20170725154601.27427-1-bp@alien8.de> <20170725154601.27427-7-bp@alien8.de> <20170727214708.24396586@vmware.local.home> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20170727214708.24396586@vmware.local.home> User-Agent: Mutt/1.6.0 (2016-04-01) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jul 27, 2017 at 09:47:08PM -0400, Steven Rostedt wrote: > What happens if two CPUs have mce's at the same time? Wouldn't one > corrupt the other buffer. 128 isn't too big to put on the stack is it? Yeah, putting it on the stack is probably safer, just in case. What is even better, though, is if I extended arch/x86/kernel/cpu/mcheck/mce-genpool.c to allocate a second buffer for the decoded strings. We use it for the struct mces right now. And 1-2 pages should be fine: 8192 / 128 = 64 decoded strings in flight. I guess that should cover most situations. Famous last words. In any case, thanks for pointing this out. -- Regards/Gruss, Boris. ECO tip #101: Trim your mails when you reply. --