Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp14123pxb; Tue, 26 Oct 2021 20:02:19 -0700 (PDT) X-Google-Smtp-Source: ABdhPJziDO9W8AzCL4HV4SS+ri7AQMPEHDTLFxGzPoaYbNkhrzmPipZi5MLhjeTLXMsbxxc0MrSJ X-Received: by 2002:a50:d554:: with SMTP id f20mr1281432edj.102.1635303739168; Tue, 26 Oct 2021 20:02:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1635303739; cv=none; d=google.com; s=arc-20160816; b=TtobwvQ3NWh3N3QYbgd+oJqprk4f6LPRXeTlY2AFmExb8eNT/9UTvkUHvgp5C+hG94 CkFXXJVwVYvNfHExUPxm4Z3+dbFi4+OqR3U0KppkjUqwylexwlkh7pe3bx6eAHJbfosR 4WM1AzDIwOW9XYkkTSlpmfrXZw0CB6aQ+6DjE2BRob7f5JiN44PP8M1AlZcKtTeC+vPN jRIRkTcIT3Yi9jATzeSW0N1mZ8GWGIqJQzt09dnIqPqiP5Jtd1+18AaT35Ytz3dBi/yu cJq9tlnvyRMjAzIJdhtYqaoqb5vrWCeEJ5D856EwdnbZ3ON8CzMRwh0WaAMZUbsD4lyo DBtA== 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=FO4cs2yK2aOHZmwCs+eplkvcELqzW5qJSg1ryHvi0gA=; b=pcCb3uTBOZtSMEV4iBQWp8ZgINeFoVeG4Gn3+vtmQ7l7Nbd/7GWYvLqsJQgMT6NoAm 4wHSdtkj4M60Ooo+FM2kryufzdwoX5IGCcuAw7O63PGcL1qri41MFZ/IRC2N5XMJYScT tNiGqYtUm8RO0vXLClrHEzpSN39vSXJQCiMbTWPfe8v78x8AO305YtrLSfe1hfLzy/ga g0Fg0f7LVgQ21uKYf+4pLy+VIn97d4jwEBLyBmH3ejmMWqUQyi+U3uUbCLUQl4SNh0uL mn0oG0yBg8iBPhm1KUwZyEqjZDXmcSZJmbNXGXfHziMP5cE5i7lt1DQ+oXa0B7WOXDLU TKPw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@alien8.de header.s=dkim header.b=G3kaVMD3; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id do13si10652100ejc.704.2021.10.26.20.01.49; Tue, 26 Oct 2021 20:02:18 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@alien8.de header.s=dkim header.b=G3kaVMD3; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=alien8.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236293AbhJZRRy (ORCPT + 99 others); Tue, 26 Oct 2021 13:17:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38070 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230160AbhJZRRx (ORCPT ); Tue, 26 Oct 2021 13:17:53 -0400 Received: from mail.skyhub.de (mail.skyhub.de [IPv6:2a01:4f8:190:11c2::b:1457]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5CD0AC061745; Tue, 26 Oct 2021 10:15:29 -0700 (PDT) Received: from zn.tnic (p200300ec2f131c005b0c7ba9fa303376.dip0.t-ipconnect.de [IPv6:2003:ec:2f13:1c00:5b0c:7ba9:fa30:3376]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.skyhub.de (SuperMail on ZX Spectrum 128k) with ESMTPSA id 00EBB1EC05D6; Tue, 26 Oct 2021 19:15:26 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alien8.de; s=dkim; t=1635268527; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:in-reply-to:in-reply-to: references:references; bh=FO4cs2yK2aOHZmwCs+eplkvcELqzW5qJSg1ryHvi0gA=; b=G3kaVMD3ZsBlYSmv6zLVGThlHAc3j4F33iKu51Di9gE1QLnj01bPSnuPShC9iTp4G1W30B nRUrsluxHNtOqy035nWI/jTBUygh9QOehcBE8WdLHxyrjFIL16E2BRVWTEu0eSUi+SzUjf XiQkUxpOOmHG0mC4cHWf5zj4NgIbneE= Date: Tue, 26 Oct 2021 19:15:24 +0200 From: Borislav Petkov To: "Koralahalli Channabasappa, Smita" Cc: Smita Koralahalli , x86@kernel.org, linux-edac@vger.kernel.org, linux-kernel@vger.kernel.org, Tony Luck , "H . Peter Anvin" , yazen.ghannam@amd.com Subject: Re: [PATCH v2 2/5] x86/mce/inject: Warn the user on a not set valid bit in MCA_STATUS Message-ID: References: <20211019233641.140275-1-Smita.KoralahalliChannabasappa@amd.com> <20211019233641.140275-3-Smita.KoralahalliChannabasappa@amd.com> <00f4a0ab-f241-6674-f37f-623f3d9a8337@amd.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <00f4a0ab-f241-6674-f37f-623f3d9a8337@amd.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Oct 26, 2021 at 11:58:58AM -0500, Koralahalli Channabasappa, Smita wrote: > Like how it was done here? > https://lkml.kernel.org/r/20210915232739.6367-3-Smita.KoralahalliChannabasappa@amd.com Whoops, sorry about that. So let's analyze this properly - there are two cases: 1. warn if VAL=0: what does that bring us? The person doing the injection will simply have to set the valid bit and repeat the injection. I guess "maybe the user wants to inject with Val not set" doesn't make a whole lot of sense because nothing will happen - error will get ignored. So we can do all the warning we want - it will be useless and in some cases the user might not even see it. So it sounds to me like setting the valid bit directly makes a lot more sense. 2. Automatically set VAL=1 to correct any VAL=0 injections. Yes, we force the VAL bit to 1 and that is not what the user injected but the user injecting with VAL=0 will get ignored, i.e., it will be pointless. So we "help" here and set the valid bit. Anything else I'm missing? Sorry again for being back'n'forth on this. -- Regards/Gruss, Boris. https://people.kernel.org/tglx/notes-about-netiquette