From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.1 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0A62AC2BA19 for ; Tue, 14 Apr 2020 18:32:50 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id D141820575 for ; Tue, 14 Apr 2020 18:32:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1586889169; bh=aMgICZ0DbRdXvD3uWrORNNguBQeKs4PhM0IInqphAhQ=; h=References:In-Reply-To:From:Date:Subject:To:Cc:List-ID:From; b=nP1qh8fY0dv72jgJTh6rRHvel96PDwHd60Vv4Y2CEA9cc3v4pKih2QjkPQTmUmAiE OO8K+jaWo/bqvtSWA8KmtuO1PEC5JJExBOgbbcDsgyA8eU6fEYP7QGFrGhOJ62Ex4v UQmBRNwjHPj5YwgTykwuXQYW38i8x/Uoym5rhKMY= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2504043AbgDNScs (ORCPT ); Tue, 14 Apr 2020 14:32:48 -0400 Received: from mail.kernel.org ([198.145.29.99]:50654 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2504019AbgDNSco (ORCPT ); Tue, 14 Apr 2020 14:32:44 -0400 Received: from mail-io1-f49.google.com (mail-io1-f49.google.com [209.85.166.49]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 040DD2074D; Tue, 14 Apr 2020 18:32:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1586889164; bh=aMgICZ0DbRdXvD3uWrORNNguBQeKs4PhM0IInqphAhQ=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=XfIhvFsgxducy/79xPb6PuW6aGDpJNTv8SgSfkKE5j8IOkLygZtW12kHVhyyfdo+I PK7OLQyfIkruNmP7rsqIhJ85FSuV148czdCpC2qQRitLDO1MefAABnaRbTqULLz7KA UFlEKdLVcW1cpZ96WHu9sVApx7wt4ztMN55pzeVI= Received: by mail-io1-f49.google.com with SMTP id s18so10966641ioe.10; Tue, 14 Apr 2020 11:32:43 -0700 (PDT) X-Gm-Message-State: AGi0PuaDfxWVsEhz/p0TGTB8sUkvxCYFTbj7eD2/nQ0uKHnjyC1kj+AB yLmBmge861Hcq0zF1Gzf0U8qqe958d8gz05yUyA= X-Google-Smtp-Source: APiQypKav3WF7b4959gYRb4rMnNBPvkKR4rIb6+qdaWp1uLO7cvZSPLe+Li9/xtzPrkG38ZrAXVf5g0i0NS110Xnpzg= X-Received: by 2002:a6b:ef03:: with SMTP id k3mr11387607ioh.203.1586889163435; Tue, 14 Apr 2020 11:32:43 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Ard Biesheuvel Date: Tue, 14 Apr 2020 20:32:32 +0200 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: Kernel V5.7-rc1 doesn't boot (EFI?) To: Linus Torvalds Cc: =?UTF-8?Q?J=C3=B6rg_Otte?= , linux-efi , Arvind Sankar , 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 On Tue, 14 Apr 2020 at 20:27, Linus Torvalds wrote: > > On Tue, Apr 14, 2020 at 3:50 AM Ard Biesheuvel wrote: > > > > [*] GRUB on x86 turns out not to zero initialize BSS when it invokes > > the EFI stub as a PE/COFF executable > > The fix seems to be to put all globals in the .data section, even if > they don't have initializers. > > That seems very fragile. Very easy to forget to not declare some > static variable with __efistub_global. > > Could we not make the EFI stub code zero out the BSS itself? Perhaps > setting a warning flag (for a later printout) if it wasn't already > zero, so that people could point fingers are buggy loaders.. > That is the quick fix, but Arvind is working on getting rid of __efistub_global entirely, and use the right linker foo to put .bss in .data. This gives a tiny bit of bloat, but we are talking about a handful of bools here.