Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp2573070ybl; Sun, 2 Feb 2020 01:35:47 -0800 (PST) X-Google-Smtp-Source: APXvYqyZ0zcj1VJTDXgzTbiCAOCl7goeDeFeaSr2HCRKe8H9bkXnI21uMNMALWOHdBAVN1fmRAtc X-Received: by 2002:a05:6830:1d8b:: with SMTP id y11mr5312878oti.4.1580636147614; Sun, 02 Feb 2020 01:35:47 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1580636147; cv=none; d=google.com; s=arc-20160816; b=nsMjcda2BsPJnXAnoGsjLquoxrHDh147fNX3XY8BnyHpnHkwWUXWMkrRmBlO/00eci OvYfxHP+WpqiDfX2EYVEq1nSoRDAsVei6wef6yb109nSvBka/8eplPHxZe1DKAOLq8fd IxAUTW7IgekPM3D1mtnz4gHtEnTIT0S+R703wlSI5XSJAcgxQZX7965hE9Z2ksV2t7DC h4nMIg9tCvJIebjNCi+mLV9O1Sg+kFeux/C8P40Dxwj6bfelT1mLv9+zQxTjv2VPsSwz jY6OlIMI12TQe/EPT3mrLcUNPI/TriRLsT60S/gDzArSGIoLz8yISdyLy3WalIfdOvUX +J6Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=qMT94qpo08FV4JrVN2N33KTdwZL0E+uToQonSqkknrY=; b=IieCjozQtP3FOcF9y+TmnBFjgBMJh2OrC6NwE05GEKB11P/PNXKgsuJLtzz0ISJGZJ CGGmju924gmOxK4cZHUYRfL2xgznvovKG8E5Bnpveod1iCf+8rfSkYI1VmFzUyGPybnT 46lL+fZCQfue5mvuDzBiSkQVOPCwV1njqbibl7Fh7YkoEZt+zqz3FPIP2TwK98oevYvu /FYOrbl1InsBo5zlSb0qPBpTfrahzSuEeEPp95lfnPpZRhnGB+1mhqdpub9xeM9tOB45 FMrUaJjQV/24h5tv7VqnGrLOvVk7yobDSi4uuf+0HZfQ8Sh7RFtYPt5rwpAyCgmHC/7A h9dQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=TKbbrJgh; 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=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 65si7284875oif.14.2020.02.02.01.35.21; Sun, 02 Feb 2020 01:35: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=@linaro.org header.s=google header.b=TKbbrJgh; 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=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726541AbgBBJc0 (ORCPT + 99 others); Sun, 2 Feb 2020 04:32:26 -0500 Received: from mail-wm1-f67.google.com ([209.85.128.67]:53630 "EHLO mail-wm1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725947AbgBBJc0 (ORCPT ); Sun, 2 Feb 2020 04:32:26 -0500 Received: by mail-wm1-f67.google.com with SMTP id s10so12648675wmh.3 for ; Sun, 02 Feb 2020 01:32:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=qMT94qpo08FV4JrVN2N33KTdwZL0E+uToQonSqkknrY=; b=TKbbrJghnHSsK9G5qTvMvN+qZV8beOC1UJdIaBCa7to8QUHx7gvvfk8hOk3TdWIFmM URHiS8zNLACQ2fBJP+Xkg1uWeBqKGsyfgBIQroREpmvXGdohLnhUt86QU1mED8qG6JGj VfHx7TIXWELCSqJrp2lkS2dKlxd2l/9L5SYIr+kPVupL82XI2yNzuyw9lXeSjFF55Cxq xB8xtTdiJxRZK6he6rtheSBdk40B8yT4wM1TPbmUhurVs73HeWn8R5+sinI8S3YYR+E2 9PUrchJYp6hsm0PPNJbbYA6zp176RWPJHBPB6HPwKpoFZ81cMctfWcmOzJp0zvIOMHUC YvuA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=qMT94qpo08FV4JrVN2N33KTdwZL0E+uToQonSqkknrY=; b=VIWuLZcsp7zfwsUr5nTfnZbcK4qrckCK5VT+rtM/X6Wp2s66fPARvdxzu/VSQFc4nc EXpORM4z05JuR9O6GWUPFCNcqk2qrSvroNp7cbP4WwFakUbUpQDGQuvVFDtsv3kDQ3Bt zgFDJtGlsDegT7LhVfxP8b4pGZSMQa4cMEurUzumFphn1JbaoH3ZIkTA0dSkZ9JN7l9b 5Y4qJqPPG7qhMOaAHLupS8KmzMYFo88b5GHtp2wdccePED/9ujbwodOTdMv3pkuSstDz ZqJpElMsDILTMgsDo5+AUJyC5HGPbqzoWYEizrhWDxF52Fl4UhLPktNnQJmyAnmFWL1f Pjpw== X-Gm-Message-State: APjAAAXuK43lWiBdxk+0eUjcW4Od8uZJYZjddAjsBoymnSWqPsSf3Jlm ELUIgvpdlIrgfX4DE3nEhoDg8xiuKvlCTQMfQB7eHw== X-Received: by 2002:a1c:bc46:: with SMTP id m67mr22350008wmf.40.1580635942488; Sun, 02 Feb 2020 01:32:22 -0800 (PST) MIME-Version: 1.0 References: <20200131064327.GB130017@gmail.com> <20200131183658.GA71555@gmail.com> <20200202092255.GA72728@gmail.com> In-Reply-To: <20200202092255.GA72728@gmail.com> From: Ard Biesheuvel Date: Sun, 2 Feb 2020 10:32:11 +0100 Message-ID: Subject: Re: EFI boot crash regression (was: Re: 5.6-### doesn't boot) To: Ingo Molnar Cc: =?UTF-8?Q?J=C3=B6rg_Otte?= , Dan Williams , Ard Biesheuvel , Linus Torvalds , Linux Kernel Mailing List , "the arch/x86 maintainers" Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, 2 Feb 2020 at 10:22, Ingo Molnar wrote: > > > * Ard Biesheuvel wrote: > > > Hello J=C3=B6rg, > > > > Could you please try whether the change below fixes the issue? > > > > diff --git a/arch/x86/platform/efi/efi.c b/arch/x86/platform/efi/efi.c > > index 59f7f6d60cf6..ae923ee8e2b4 100644 > > --- a/arch/x86/platform/efi/efi.c > > +++ b/arch/x86/platform/efi/efi.c > > @@ -308,7 +308,7 @@ static void __init efi_clean_memmap(void) > > .phys_map =3D efi.memmap.phys_map, > > .desc_version =3D efi.memmap.desc_version, > > .desc_size =3D efi.memmap.desc_size, > > - .size =3D data.desc_size * (efi.memmap.nr_map -= n_removal), > > + .size =3D efi.memmap.desc_size * (efi.memmap.nr= _map - n_removal), > > .flags =3D 0, > > Oh, I actually noticed this one, but convinced myself that it's correct, > because GCC didn't warn about uninitialized data. > > But maybe in this weird case data.desc_size as used within its own > initializer is zero? > Something like that, yes. Note that size and desc_size appear in opposite order in the struct definition, and this may also affect how the compiler handles this.