Received: by 2002:ac0:950c:0:0:0:0:0 with SMTP id f12csp1891236imc; Tue, 12 Mar 2019 02:52:00 -0700 (PDT) X-Google-Smtp-Source: APXvYqy4J13RyF+dRvLSI7juTb3cPmzSqIWeLf6tqfphOVOwtjEQ6oC5N6rwIalEPC9eFwvgWuT0 X-Received: by 2002:a62:1303:: with SMTP id b3mr38998379pfj.147.1552384320735; Tue, 12 Mar 2019 02:52:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1552384320; cv=none; d=google.com; s=arc-20160816; b=rjWLrV4IZDoALo0iIMu10mxO13esSsrQ96pX5wycXUOWgc5NidLafKvC09K//OIAoV /BwipvekNM1UOoE4GOVjJeBHyrvSK+u/hNM5y+WZM0tHgKqvD5svHCmh+mDlrr55fI4C tL2mior1tE9g6mGijEpywxV1hLeNMSA2FHXoZfW7ug0Mr03zyH972baVZzzPok7AiM8l I4d93cMCfNXTlPBomMej3B+/vfp/rx6NqGzAMHDG1Rx6ZjOjcwAMWVfrxjpTbeQmTAPU 1NC9VncqlAUcmpRy2cgR4cjEXyYyElIAoxFnyoFaPCXcfx/GmVbCraRYJx6E8wbnBtKH EihA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=0D7OV4c9X2n8zGW+F3FNLmEy0PklCf74U0Xfmop9WTA=; b=VTvBgMrxm6plDbvGZiR3AxjuhN0/I3O8UUsKvDbf1l0eW0ifjhjfMaluKI33ahtpXp wZ+X99G7cPKIM8uBZ9M0wCy49Q99Cgnrp29g44D5VIFerFB2vQdmOv4VpeycwU2z+Qx+ xZPtywsMyhpQUVlGzVcwTGEF70xGbHn8vmEzEtFlGnO5zIHG2mod5gWQz6a6vVfyEQfb wm6DRC8nXtNXFjz7iIYkGMyg3u9ba21RdujGcusM6r9bblYHj/tEs5Y/DPPeD3I6L2M3 UHCEFXSrqOfr1r3cCxIwPXCBtXZnnHVX47nsF1TG84jedfhClsEA0kSqDUqcTARAZSiE ODXQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@shutemov-name.20150623.gappssmtp.com header.s=20150623 header.b=lR+XvUt+; 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 a7si6872942pgq.429.2019.03.12.02.51.44; Tue, 12 Mar 2019 02:52:00 -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; dkim=pass header.i=@shutemov-name.20150623.gappssmtp.com header.s=20150623 header.b=lR+XvUt+; 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 S1726512AbfCLJuc (ORCPT + 99 others); Tue, 12 Mar 2019 05:50:32 -0400 Received: from mail-pg1-f196.google.com ([209.85.215.196]:36209 "EHLO mail-pg1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725882AbfCLJub (ORCPT ); Tue, 12 Mar 2019 05:50:31 -0400 Received: by mail-pg1-f196.google.com with SMTP id r124so1419236pgr.3 for ; Tue, 12 Mar 2019 02:50:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=shutemov-name.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=0D7OV4c9X2n8zGW+F3FNLmEy0PklCf74U0Xfmop9WTA=; b=lR+XvUt+gcXKVe8QBPRWg8Xb9Ed2cVDz/e31b9tyoQwvtD0m3/VNtF3Cd2uHIvwr+R tLLF5VnRypSgc63GHOFaJ0GIjna+48sSZF7Z5sa2xcAixy1lYyvGFdz8s41YGNnEy7b3 h+rUTKbvgR51gL7G7Cg2zB9oN1rQ7FJuzijlbzbJgId6SmfHEduoMz6eum5OHWcbGzP4 7g5mXVMvGAhP5C46A743XzmewtyxV+3X+HsP9j87sdDCf/L7F1LTx88S/DHb3HjJQk6C RHJ57oztHbo2o8OM+bqQQrXmlA52qdcvzoqv8AgTVfFl/S2PgLi4Kb7+vr8mDZ9syZE/ PXtw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=0D7OV4c9X2n8zGW+F3FNLmEy0PklCf74U0Xfmop9WTA=; b=CoAGzEuw39jrorLslOKOls1yoxUxaqjzMXvvPB+R1ctTozu+JzH8x+weP2mXXdeNR4 YwazQwBPbi+VIlT7PQ6ranurhXMqoXEUJwdtAQJXl7Tl8b7jj3p612XFZWvwWRs/jpAN CbXr4dja+F0jdDSbrs/sY9IIP9yFfaarlznnVGgYl4b0ev4CGEPNQNswAHitcQ/mLD0o 8uUtkbnMhDDSXK7rGSwijHQYWHezNLzEgRFrCLUrHSKr3nyX9HcwYMlxeZgRqV+W7ldn SRRUi9YEd3NilrsbWzoskWAU030B4g1STIeS/kWfy8P/YTE8l90W8qcPZXCWtWW20t08 4wsw== X-Gm-Message-State: APjAAAWfqbUWWuJdiseGfX9T09nUqG475jgtGDD780Kd9HLs3pHZjGIy JxZuyArq2wmX5wL1kbz7r202jA== X-Received: by 2002:a62:41cc:: with SMTP id g73mr36985243pfd.145.1552384229725; Tue, 12 Mar 2019 02:50:29 -0700 (PDT) Received: from kshutemo-mobl1.localdomain ([134.134.139.83]) by smtp.gmail.com with ESMTPSA id a7sm12907564pff.54.2019.03.12.02.50.28 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 12 Mar 2019 02:50:29 -0700 (PDT) Received: by kshutemo-mobl1.localdomain (Postfix, from userid 1000) id 8856B3011CA; Tue, 12 Mar 2019 12:50:26 +0300 (+03) Date: Tue, 12 Mar 2019 12:50:26 +0300 From: "Kirill A. Shutemov" To: hpa@zytor.com Cc: Greg Kroah-Hartman , linux-kernel@vger.kernel.org, stable@vger.kernel.org, Pitam Mitra , "Kirill A. Shutemov" , Thomas Gleixner , Bockjoo Kim , bp@alien8.de Subject: Re: [PATCH 5.0 30/46] x86/boot/compressed/64: Do not read legacy ROM on EFI system Message-ID: <20190312095026.obzxv65roj3fcu32@kshutemo-mobl1> References: <20190308124902.257040783@linuxfoundation.org> <20190308124904.216497374@linuxfoundation.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: NeoMutt/20180716 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Mar 09, 2019 at 10:10:19PM -0800, hpa@zytor.com wrote: > >@@ -47,8 +50,18 @@ static unsigned long find_trampoline_pla > > * This code is based on reserve_bios_regions(). > > */ > > > >- ebda_start = *(unsigned short *)0x40e << 4; > >- bios_start = *(unsigned short *)0x413 << 10; > >+ /* > >+ * EFI systems may not provide legacy ROM. The memory may not be > >mapped > >+ * at all. > >+ * > >+ * Only look for values in the legacy ROM for non-EFI system. > >+ */ > >+ signature = (char *)&boot_params->efi_info.efi_loader_signature; > >+ if (strncmp(signature, EFI32_LOADER_SIGNATURE, 4) && > >+ strncmp(signature, EFI64_LOADER_SIGNATURE, 4)) { > >+ ebda_start = *(unsigned short *)0x40e << 4; > >+ bios_start = *(unsigned short *)0x413 << 10; > >+ } > > > > if (bios_start < BIOS_START_MIN || bios_start > BIOS_START_MAX) > > bios_start = BIOS_START_MAX; > > Only one objection: the explanation is nonsensical. Well, that's the best explanation I've come up with :/ I would be glad for any insight here. -- Kirill A. Shutemov