Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp5163534pxj; Wed, 26 May 2021 04:29:42 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzEQWS3xp6kqaYb06kuGyuzGJOnrAZYDVBNCneeNXUlvuJY+KQVJEqMwN259Sndbyeb2C5S X-Received: by 2002:a05:6e02:1a67:: with SMTP id w7mr22797797ilv.137.1622028582010; Wed, 26 May 2021 04:29:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1622028582; cv=none; d=google.com; s=arc-20160816; b=dTaFuFzeN2YCwtEqL8ReloEgCKohFv4gON2TognAMdc8PO8y24EpH5Euq0xfck+I0r ZYtaAtdh885qwWWJ+vM0JHpXAwNQYYuvje3xLhVKJl/0viUcZvOCV9JSKguRd8J6inv9 pN5bKtYwJ25IznlrcdTC/zaI/li+pL08xfmJTMpQ0/jxGMEIQgPx5Z96wk572ni11Vnh xI/tIO9TtVkDhPkhdCTqqTMR1NIgdEa2PF9mpqKIevOt8u3KkwmcEKKpZdc0yIIfnykq zdeptByZZPhrOqWruGrUzevF/M5avVHdNGof3FYzvqD9U4imiX4JUYPVR/UHN9njzP/Q HzXA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=dDbqcN7yPNZ7DXqdwmtnFTmSQPgsADBgy42h99rlSic=; b=NFuh+eJaX1Wm+KAA3SbhIWzB80d9hLBPdMit+HUKyD6oYutcl1tyhQwJVHZA33dBE7 xKM8buM+jJYYnROA6Qw+YjO/b6zIConADDUh95QCc7gFkaU0mkiSEeB1KSH2XxxoxMDQ jXOV34dV/BKojdSZApgowTyEGCatIdDnXUqQ9kTRczFKZ3feHzib9ePlf7ZDcAUDGZLp PMLwg7tAZWSS7UhkMgfJDsj0aMOE/NpV1VtjrxoXBDgN2avhkH+QsH9QuLUWNvW5ZJwz i+x1s0wbPtDkmFNfbr+fywGe3nSDm2pQFvCw4wQYbAP023/ghHpkqWjpbVjo02EXGUwj 4meg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@alien8.de header.s=dkim header.b=FkuIyLU8; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=alien8.de Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id h6si19403321jaj.29.2021.05.26.04.29.26; Wed, 26 May 2021 04:29:41 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@alien8.de header.s=dkim header.b=FkuIyLU8; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=alien8.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232537AbhEZIs4 (ORCPT + 99 others); Wed, 26 May 2021 04:48:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39490 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232358AbhEZIs4 (ORCPT ); Wed, 26 May 2021 04:48:56 -0400 Received: from mail.skyhub.de (mail.skyhub.de [IPv6:2a01:4f8:190:11c2::b:1457]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1FC88C061574 for ; Wed, 26 May 2021 01:47:25 -0700 (PDT) Received: from zn.tnic (p200300ec2f0d490061818bcc6f3e1c2b.dip0.t-ipconnect.de [IPv6:2003:ec:2f0d:4900:6181:8bcc:6f3e:1c2b]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.skyhub.de (SuperMail on ZX Spectrum 128k) with ESMTPSA id 821EF1EC01DF; Wed, 26 May 2021 10:47:23 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alien8.de; s=dkim; t=1622018843; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:in-reply-to:in-reply-to: references:references; bh=dDbqcN7yPNZ7DXqdwmtnFTmSQPgsADBgy42h99rlSic=; b=FkuIyLU8R5xYoTpbaviKFDBYEBRKhT8xXPBltG6593nog/obko6w9uzCSWXqb6meAZZYTt FlfZyEdUOfJ1Zy6nTEAIZKIP7isWnF5kngboWUk1Uhp7GNEcmXmruZ3fXvgi7q2k7FZmLx BbwpXnoqJqLi2THEopInA4wu6SYClVQ= Date: Wed, 26 May 2021 10:47:21 +0200 From: Borislav Petkov To: Mike Rapoport Cc: Ingo Molnar , "H. Peter Anvin" , Thomas Gleixner , Mike Rapoport , untaintableangel@hotmail.co.uk, x86@kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] x86/Kconfig: decrease maximum of X86_RESERVE_LOW to 512K Message-ID: References: <20210526081100.12239-1-rppt@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20210526081100.12239-1-rppt@kernel.org> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, May 26, 2021 at 11:11:00AM +0300, Mike Rapoport wrote: > From: Mike Rapoport > > After the consolidation of early memory reservations introduced by the > commit a799c2bd29d1 ("x86/setup: Consolidate early memory reservations") > the kernel fails to boot if X86_RESERVE_LOW is set to 640K. > > The boot fails because real-time trampoline must be allocated under 1M (or > essentially under 640K) but with X86_RESERVE_LOW set to 640K the memory is > already reserved by the time reserve_real_mode() is called. > > Before the reordering of the early memory reservations it was possible to > allocate from low memory even despite user's request to avoid using that > memory. This lack of consistency could potentially lead to memory > corruptions by BIOS in the areas allocated by kernel. Hmm, so this sounds weird to me: real-time trampoline clearly has precedence over X86_RESERVE_LOW because you need former to boot the machine, right? In that case, real-time trampoline should allocate first and *then* the rest of low range requested to be reserved should be reserved, no? Thx. -- Regards/Gruss, Boris. https://people.kernel.org/tglx/notes-about-netiquette