Received: by 10.223.176.46 with SMTP id f43csp453445wra; Fri, 19 Jan 2018 21:29:47 -0800 (PST) X-Google-Smtp-Source: AH8x226r9FJbBvKH36eReDwLVl/U3w0q5ZHuKQHptWAtZeYgX+iHdAg/s8q+vuAJ47J8Oq/V2JAS X-Received: by 10.98.17.193 with SMTP id 62mr1085831pfr.126.1516426187345; Fri, 19 Jan 2018 21:29:47 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516426187; cv=none; d=google.com; s=arc-20160816; b=i2GI2XpH8YtgLQtvCiZNHBLlkQMHH1OCi4Olj65Q0EAdgp8g4wPWukePzT2MvLWi/Q 5Q4otxah6b761H+v43CbTeZvsdgpsZwD3gr+rZwxhOOreqdVf4PYZJqAYyHQoXkuaPSr AdFsya3A2PmpweDI2zZkyj+V+dkd+WjmLoeYyGEH+2aOWRlIGRjptDyfsBc280YKBvdQ H5IGEQC+UW/p7zoYIW+MfGK/dXq4Iysd8sjOp3jKz36UyoXvvpT3blkA5Ov+TV8kK4Af ISVC64/5o6oC4a56BdRPamPEbDh1/G/2bMn7mom0cxoYtkbDJ6NN2ooCIftYmDaq+Svg +CGA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :references:in-reply-to:mime-version:dkim-signature :arc-authentication-results; bh=yCbPuwP/8G3G11K6rjHKOqBd+xc4cftbRtT+vB/69DE=; b=o61ySmQmYRxS4fUQpT0w75UtBhqzyCv5eQ8B1VeDluAYyE5B6mhacZFR1gYeYDHkJY fHDbUvIsybiEVSb3Kt0QY/zvqROFJI+l4YCZqgqjuoVOYSTPLHjdwiXzafAvJtSywwqy XlwRJV+04ugzIwGw3jzbd90B9wJKZii7QgWfS0SqplQabTvL1xTshSsos+mKs+0ZHz+1 vZ7FUpUs7aQJ0/zC+KNDir7/U0Dz2jJMfr6CeYcmwEA4z9n1NtnXR0uJtSkmrqyvbi2F 3tq2N4/SPgJO25amaz6LUYRyRf9lwIWBVnUP6mcJe1/lTkvpETQCxHCttYtAm9yFqTK4 2UUA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=ZOX7brnv; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g4si9563015pgc.652.2018.01.19.21.29.33; Fri, 19 Jan 2018 21:29:47 -0800 (PST) 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; dkim=pass header.i=@gmail.com header.s=20161025 header.b=ZOX7brnv; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751419AbeATF01 (ORCPT + 99 others); Sat, 20 Jan 2018 00:26:27 -0500 Received: from mail-lf0-f48.google.com ([209.85.215.48]:36816 "EHLO mail-lf0-f48.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750736AbeATF0U (ORCPT ); Sat, 20 Jan 2018 00:26:20 -0500 Received: by mail-lf0-f48.google.com with SMTP id t79so4522681lfe.3 for ; Fri, 19 Jan 2018 21:26:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=yCbPuwP/8G3G11K6rjHKOqBd+xc4cftbRtT+vB/69DE=; b=ZOX7brnvenq2ntsXqS14c97+aNglWKWdhUZ8lxXQl1m07gNN6IBuKIvg5AKSAd83kv nT9Ch8jeHc9+2MTURIzhTX5Ubdeac1fIak7JBtUzNGhljP3+SQLuAnXzY0tGzp/xdhGx VsHww3KsfNazXqIkquuOoYx6hGGCDOWP9XH21ZudGOr+5w0VZEA9SEUaITBnKxnWGBe2 Bm5AkMcMHuy94oVOU5LEMuoprVWheaX3JUwkYqMcQJuFibRI0cLU9xGO7j6ovtgMfeR4 1O8G1QJq+dmZqmDcMFPryyadwg+s4lb+yyBP5+wn5FmEQ5icP8KBHcn/ISBdzzMbtbkK vjVA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=yCbPuwP/8G3G11K6rjHKOqBd+xc4cftbRtT+vB/69DE=; b=qxUJJnQPNc0gzdxRYRWvUqo78LvGtZlaqB5UBSolT6z395JwKEYACAsCKushwMUkmL AuyqWjwW/nCzOiVkGFO3ChmsT2GP1quFqu+RQtfSxUQNv4y4MH/r5vQAdaa7D/JAuETs UcN0rQxDbYhO6l9NNUFsmrnfPLutsNuiHhjk0bemoFtlwoh+ofmFQCmHiSt+0FuplELV 4EOWByfl31DowjpOct15hOABS6uasz6CBLYgbKArgQNt8xk/zQd89yRAOleRCEwp/Wtk f3jSk/zhIYRoN80AuFoT1Eau78yD0eMDaM4mdhTIY83cTuG1RO7jfhFhxScGC/+dku7t Jw3w== X-Gm-Message-State: AKwxyteCcoQUyaCmWzJb/o1eEAkgaWSx7A7vk0AVCBKRN0ARtNAdJuyS PQnjgW+JtfFX0ZZxZiZ18WPVEfTzjDAKpZHyVcfPNbk= X-Received: by 10.25.93.83 with SMTP id p19mr249624lfj.113.1516425978814; Fri, 19 Jan 2018 21:26:18 -0800 (PST) MIME-Version: 1.0 Received: by 10.25.113.21 with HTTP; Fri, 19 Jan 2018 21:25:48 -0800 (PST) In-Reply-To: <44505ab1-237b-88ea-1fb1-f80de9b3025a@redhat.com> References: <9fdddcb1-d122-7d52-9204-7066ada5ccba@redhat.com> <44505ab1-237b-88ea-1fb1-f80de9b3025a@redhat.com> From: Gabriel C Date: Sat, 20 Jan 2018 06:25:48 +0100 Message-ID: Subject: Re: Boot regression with bacf6b499e11 ("x86/mm: Use a struct to reduce parameters for SME PGD mapping") on top of -rc8 To: Laura Abbott Cc: Tom Lendacky , Borislav Petkov , Linus Torvalds , Peter Zijlstra , Thomas Gleixner , Ingo Molnar , Brijesh Singh , X86 ML , Linux Kernel Mailing List Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 2018-01-20 5:02 GMT+01:00 Laura Abbott : > On 01/19/2018 06:23 PM, Gabriel C wrote: >> >> 2018-01-20 2:23 GMT+01:00 Laura Abbott : >>> >>> Hi, >> >> >> Hi , >> >>> >>> Fedora got multiple reports of an early bootup crash post -rc8. >>> Bisection showed bacf6b499e11 ("x86/mm: Use a struct to reduce >>> parameters for SME PGD mapping") . It doesn't revert cleanly >>> but if I revert the few other changes in arch/x86/mm/mem_encrypt.c >>> as well it boots up fine. >>> >>> Annoyingly, I can't seem to get any actual kernel logs even with >>> earlyprintk. It just reboots immediately (triple fault?). This >>> happens on both of my Lenovo machines and I can ask other reporters >>> for details as well. >>> >> >> I tested these patches on 2 Lenovo Ideapad both with Skylake CPUs >> on a older dual Xeon box , on 2 Toshibas with AMD APUs , on a RYZEN box , >> on dual EPYC box .. ofc on EPYC with mem_encrypt=on on the Intel CPUs >> disabled. >> >> Also tested on top 4.14.13 , 4.14.14 as well on top 4.15.0-rc7 and on >> current master/rc8++ without to see something like this. >> >> Also we pushed these patches on 4.14.13/14 and didn't got any reports >> about >> something like this. >> >> What Lenovo boxes are these ? maybe I find one to reproduce. >> >> >>> $ git bisect log >>> # bad: [ec835f8104a21f4d4eeb9d316ee71d2b4a7f00de] Merge tag >>> 'trace-v4.15-rc4-3' of >>> git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace >>> # good: [a8750ddca918032d6349adbf9a4b6555e7db20da] Linux 4.15-rc8 >>> git bisect start 'origin/master' 'v4.15-rc8' >>> # bad: [79683f80e4f07dba13cc08d0ebcf5c7b0aa1bf68] Merge tag >>> 'mmc-v4.15-rc2-3' of >>> git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc >>> git bisect bad 79683f80e4f07dba13cc08d0ebcf5c7b0aa1bf68 >>> # good: [161f72ed6dbe7fb176585091d3b797125d310399] Merge tag >>> 'mac80211-for-davem-2018-01-15' of >>> git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211 >>> git bisect good 161f72ed6dbe7fb176585091d3b797125d310399 >>> # good: [88dc7fca18001fd883e5ace775afa316b68c8f2c] Merge branch >>> 'x86-pti-for-linus' of >>> git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip >>> git bisect good 88dc7fca18001fd883e5ace775afa316b68c8f2c >>> # bad: [d47924417319e3b6a728c0b690f183e75bc2a702] x86/intel_rdt/cqm: >>> Prevent >>> use after free >>> git bisect bad d47924417319e3b6a728c0b690f183e75bc2a702 >>> # good: [fc90ccfd286eabb05ec54521367df8663cf0bbbf] Revert "x86/apic: >>> Remove >>> init_bsp_APIC()" >>> git bisect good fc90ccfd286eabb05ec54521367df8663cf0bbbf >>> # bad: [bacf6b499e11760aef73a3bb5ce4e5eea74a3fd4] x86/mm: Use a struct to >>> reduce parameters for SME PGD mapping >>> git bisect bad bacf6b499e11760aef73a3bb5ce4e5eea74a3fd4 >>> # good: [1303880179e67c59e801429b7e5d0f6b21137d99] x86/mm: Clean up >>> register >>> saving in the __enc_copy() assembly code >>> git bisect good 1303880179e67c59e801429b7e5d0f6b21137d99 >>> # first bad commit: [bacf6b499e11760aef73a3bb5ce4e5eea74a3fd4] x86/mm: >>> Use a >>> struct to reduce parameters for SME PGD mapping >>> >>> >>> Configuration is at >>> >>> https://git.kernel.org/pub/scm/linux/kernel/git/jwboyer/fedora.git/commit/?h=rawhide >>> Note that I do think this is something in the Fedora configuration >>> because a generic "make defconfig" booted just fine. >> >> >> But maybe some of the Fedora patches ? >> >> Can you try an kernel with the config but without any patches ? >> Or a defconfig and just enable CONFIG_AMD_MEM_ENCRYPT ? >> > > The bisect was a vanilla kernel without Fedora patches. Ok . I did an build ( v4.15-rc8-225-g8dd903d2cf7b ) on my AMD Workstation ( EPYC CPU ) with your 64bit config and one on the Ideapad ( Intel i7-6498DU ) .. I disabled Selinux since I don't use it here and module signing. Also with your config my serial setup won't work and the kernel hangs but mem_encrypt=on/off works just fine. Also I notice on the Workstation it takes forever to boot untill 'DMA-API' reports out-of-memory ( dunno how much memory it need but the box has 128GB of RAM ).. Can you tell us your Lenovo models please ? Reagrds, Gabriel C