Received: by 2002:ac0:aa62:0:0:0:0:0 with SMTP id w31-v6csp550403ima; Fri, 26 Oct 2018 02:44:11 -0700 (PDT) X-Google-Smtp-Source: AJdET5dvd3Xh+WwCAPOoiu2Sy05+LcRGTI6xj0XvlthTnPH9gPtlf1sgI5x+UtvfGx1Wp3u8rK3R X-Received: by 2002:a62:d046:: with SMTP id p67-v6mr3047107pfg.147.1540547051200; Fri, 26 Oct 2018 02:44:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1540547051; cv=none; d=google.com; s=arc-20160816; b=DpzI4PgPRoTfuLZwucojJJClymOGRhMCLBzHhKK0en0LixfolAcqEw9IS1yE/09eV6 cvltmNnkc1KGLDSDo3+B5cIIgqm5iWhRgo6qbDBaYxFlsy8zJflulQXnKQ4+qArfv/Ds GbfOEdZD1m1H/axuOwVnrFnvHjaTF5v6qN5SIGTsuSqOXdomEW5FBIFezP/t2iRn3hbs w+JEBk9a+2+PF2fkBTbEDCDlXigF79t+8d+JTk21BR9YgeHpRecREvDA9iu5rVkvTkJ2 ajxXHB6j+lu1RyHEYRXwVvE57m+AgNUMlB4Fcij7KFFIjFXKCD+sW5jo8OmDZ88AKZo8 3Tdw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:from:cc:to:subject :content-transfer-encoding:mime-version:references:in-reply-to :user-agent:date; bh=G8mRWzm2IAlkw7/Ps2h4oC0H+SKgeNb59upy74PHKx0=; b=eVNr6zvCyXTumKHVrQAbtlB/EDuAVaocjgaxhMxB2jGhZdZiOCNX7kgA5FsZu07an0 K8uDXd7a1SEIM44H1QsbhogWaE//msLgcvd4s3oSpO9v6toRlLZQCxBGTEo4tEVYwS79 Is9PLkwE3W7Qqz5yp86iylazL63SdbJ5pwDbPkbBmwHF6TxbGXDoDypZlPGNurvHWT0F U6UJBKXciQUsEtE4ajtTtfLjAZtvnpnZWsr1WVrNkv+GX+j6LTJqBN0JUyyYc4J9j8Oa KB85Zi0hfXZ5io66omjbi2zVmIQtWfwS2OZiHybT2AFDHghQzbPIRCRnocyY7d9Uq5oU ixlA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w64-v6si7229379pfw.101.2018.10.26.02.43.55; Fri, 26 Oct 2018 02:44:11 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727020AbeJZSTr convert rfc822-to-8bit (ORCPT + 99 others); Fri, 26 Oct 2018 14:19:47 -0400 Received: from mail.skyhub.de ([5.9.137.197]:46502 "EHLO mail.skyhub.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726367AbeJZSTr (ORCPT ); Fri, 26 Oct 2018 14:19:47 -0400 X-Virus-Scanned: Nedap ESD1 at mail.skyhub.de Received: from mail.skyhub.de ([127.0.0.1]) by localhost (blast.alien8.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id oGiQcV3wI_D8; Fri, 26 Oct 2018 11:43:24 +0200 (CEST) Received: from [10.220.194.219] (x2f7fadb.dyn.telefonica.de [2.247.250.219]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.skyhub.de (SuperMail on ZX Spectrum 128k) with ESMTPSA id DDAC41EC0786; Fri, 26 Oct 2018 11:43:23 +0200 (CEST) Date: Fri, 26 Oct 2018 10:43:21 +0100 User-Agent: K-9 Mail for Android In-Reply-To: <20181026093630.8520-1-lijiang@redhat.com> References: <20181026093630.8520-1-lijiang@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8BIT Subject: Re: [PATCH] kdump, vmcoreinfo: Export sme_me_mask value to vmcoreinfo To: Lianbo Jiang , linux-kernel@vger.kernel.org CC: kexec@lists.infradead.org, tglx@linutronix.de, mingo@redhat.com, x86@kernel.org, bhe@redhat.com, dyoung@redhat.com From: Boris Petkov Message-ID: <053CC83A-9A95-4C12-9627-AABD1427DA9C@alien8.de> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On October 26, 2018 10:36:30 AM GMT+01:00, Lianbo Jiang wrote: >For AMD machine with SME feature, makedumpfile tools need to know >whether the crash kernel was encrypted or not. Why? > So it is necessary >to write the sme_me_mask to vmcoreinfo. > >Signed-off-by: Lianbo Jiang >--- > arch/x86/kernel/machine_kexec_64.c | 2 ++ > 1 file changed, 2 insertions(+) > >diff --git a/arch/x86/kernel/machine_kexec_64.c >b/arch/x86/kernel/machine_kexec_64.c >index 4c8acdfdc5a7..dcfdb64d1097 100644 >--- a/arch/x86/kernel/machine_kexec_64.c >+++ b/arch/x86/kernel/machine_kexec_64.c >@@ -357,6 +357,8 @@ void arch_crash_save_vmcoreinfo(void) > vmcoreinfo_append_str("NUMBER(pgtable_l5_enabled)=%d\n", > pgtable_l5_enabled()); > >+ VMCOREINFO_NUMBER(sme_me_mask); No we're not going to expose a kernel-internal mask to userspace. If at all needed, add functions to kexec which figure out whether we are encrypted or not and export that result as a kexec variable. -- Sent from a small device: formatting sux and brevity is inevitable.