Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp5149989pxj; Wed, 9 Jun 2021 10:14:44 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxKkJtC8Bo9STIiWKTtNtRRzlfNDsOXbR9+sur1Q8nxwELJOg6NklqsiWRBO98WNJvqSI9m X-Received: by 2002:a05:6402:520c:: with SMTP id s12mr487492edd.304.1623258884007; Wed, 09 Jun 2021 10:14:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1623258883; cv=none; d=google.com; s=arc-20160816; b=qTlVGceqfm4l6Q3MyhKW+dx4d2khhgywdv/bf00YlmWJNXXT49lUVonWqFGfOgXthH 20VfaxzVVHs9wEB+RlNdvLqRsNkveHSwHKvPw5VpifsYvpgMbBLQOiVexPHAjxxHoNu8 HlqNQLOgC44vgJD/mH3yUCWYON7bqYhGE61cGzASR1cK2Hb5EV9bOufblRop9lOE2jMH jmDC/zhrQh3TNlEipVcXVBa+q/LQV8J5ltJa3kkfU/t+DOlZH3hi+YiyMj6oGAZak0wG TCwkLLrw3q3C2oN1C/2FYRl6ol4aG+7tCngzzqxxO40/HzHrliz/kXLossBhyHOR4xG0 udLQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:in-reply-to:content-disposition :references:message-id:subject:cc:to:from:date:dkim-signature; bh=aNr4PL2+dZQnKseC9C1wnpCUTr0XP/EwUu60Miyjcqo=; b=XhrTHAzRCIPo0c9UbyRr1IfNuSWY8QK3LBCVki0c0gCS9tjSdbC0wbm7e8j/GqhAa3 MKQ+/NkUG0cAeEItqMC7nVRVXa+Cz10WmMtLcvHUAMY9oWDvMBEsRoRex8OZRQba7lIJ L2625zfbUiDqo71NbGTSCKPlQkEyqJ+9x/lqhlALKZC9BgQESk8gaJEzkLFwMNNzuiFp awZMn/gci5CCuu55zjR5Kh490pBp0y3RuvuEexozseE6RSCNmQn5FD64mlMGOdaOvegk 5BklDu/b0YoYJLNj2BHzbya3PXfv7kbSAaCtD7XavYPsNbj1XoQO2xMzEXp/9NbcRO6n bFVA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ibm.com header.s=pp1 header.b=REHWd7v+; 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=ibm.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id v30si290879ejk.135.2021.06.09.10.14.19; Wed, 09 Jun 2021 10:14:43 -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=@ibm.com header.s=pp1 header.b=REHWd7v+; 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=ibm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232113AbhFII4v (ORCPT + 99 others); Wed, 9 Jun 2021 04:56:51 -0400 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:46268 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231556AbhFII4u (ORCPT ); Wed, 9 Jun 2021 04:56:50 -0400 Received: from pps.filterd (m0098394.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.43/8.16.0.43) with SMTP id 1598awPG134297; Wed, 9 Jun 2021 04:54:47 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=date : from : to : cc : subject : message-id : references : content-type : in-reply-to : mime-version; s=pp1; bh=aNr4PL2+dZQnKseC9C1wnpCUTr0XP/EwUu60Miyjcqo=; b=REHWd7v+eay3huiT0YgVg67yfc6haxk6n47eCMwsbF3t8KyNIVjPhN8ZTjBz5z6k9Zur Z9OtvgSn4nhj+ACdJ8izRn5e2CmZuJZRz7Hi8qx2HySzQu1lKvqCGPPnNgAVL7Q6EYxa P8ueybwxwkjliupjstMQwMEI8+Tb8C3qZJhIAnF+s0nbvFYXkL84O2mfwvqm8DB3gPqR evpAn+llXASy9Sr1ie9ghRENPkrGNH5aFGQMpiIse7kr6F1+c5VA94O0Ec032PrbYhcZ KQOtiogl7Xz1E7QVum2TrvdxiMCTvYmISyf6dv4B6UEY2lK3B7VF4rOUjuM8xD6o5QYk Tg== Received: from ppma06ams.nl.ibm.com (66.31.33a9.ip4.static.sl-reverse.com [169.51.49.102]) by mx0a-001b2d01.pphosted.com with ESMTP id 392qadwth4-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 09 Jun 2021 04:54:47 -0400 Received: from pps.filterd (ppma06ams.nl.ibm.com [127.0.0.1]) by ppma06ams.nl.ibm.com (8.16.1.2/8.16.1.2) with SMTP id 1598qA5g011351; Wed, 9 Jun 2021 08:54:45 GMT Received: from b06cxnps3074.portsmouth.uk.ibm.com (d06relay09.portsmouth.uk.ibm.com [9.149.109.194]) by ppma06ams.nl.ibm.com with ESMTP id 3900hht1ub-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 09 Jun 2021 08:54:45 +0000 Received: from d06av25.portsmouth.uk.ibm.com (d06av25.portsmouth.uk.ibm.com [9.149.105.61]) by b06cxnps3074.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 1598sh6M27394326 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 9 Jun 2021 08:54:43 GMT Received: from d06av25.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id E7E7B11C058; Wed, 9 Jun 2021 08:54:42 +0000 (GMT) Received: from d06av25.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 0BC0C11C04C; Wed, 9 Jun 2021 08:54:42 +0000 (GMT) Received: from linux.ibm.com (unknown [9.145.53.236]) by d06av25.portsmouth.uk.ibm.com (Postfix) with ESMTPS; Wed, 9 Jun 2021 08:54:41 +0000 (GMT) Date: Wed, 9 Jun 2021 11:54:39 +0300 From: Mike Rapoport To: Borislav Petkov Cc: Linus Torvalds , Michael Kelley , James Morris , Sasha Levin , x86-ml , lkml , James Morris Subject: Re: [PATCH] x86/setup: Document that Windows reserves the first MiB Message-ID: References: Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-TM-AS-GCONF: 00 X-Proofpoint-GUID: 2iGNoY-E1qwLOJRJETXvAv0Jp7WrMuik X-Proofpoint-ORIG-GUID: 2iGNoY-E1qwLOJRJETXvAv0Jp7WrMuik X-Proofpoint-UnRewURL: 0 URL was un-rewritten MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.391,18.0.761 definitions=2021-06-09_04:2021-06-04,2021-06-09 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 mlxlogscore=950 phishscore=0 spamscore=0 adultscore=0 mlxscore=0 lowpriorityscore=0 bulkscore=0 impostorscore=0 suspectscore=0 priorityscore=1501 clxscore=1011 malwarescore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2104190000 definitions=main-2106090037 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jun 08, 2021 at 10:30:46PM +0200, Borislav Petkov wrote: > It does so unconditionally too, on Intel and AMD machines, to work > around BIOS bugs, as confirmed by Microsoft folks (see Link for full > details). > > Reflow the paragraph, while at it. > > Signed-off-by: Borislav Petkov Acked-by: Mike Rapoport Thanks for taking care of this! > Link: https://lkml.kernel.org/r/MWHPR21MB159330952629D36EEDE706B3D7379@MWHPR21MB1593.namprd21.prod.outlook.com > --- > arch/x86/kernel/setup.c | 21 +++++++++++---------- > 1 file changed, 11 insertions(+), 10 deletions(-) > > diff --git a/arch/x86/kernel/setup.c b/arch/x86/kernel/setup.c > index 7638ac6c3d80..85acd22f8022 100644 > --- a/arch/x86/kernel/setup.c > +++ b/arch/x86/kernel/setup.c > @@ -1060,17 +1060,18 @@ void __init setup_arch(char **cmdline_p) > #endif > > /* > - * Find free memory for the real mode trampoline and place it > - * there. > - * If there is not enough free memory under 1M, on EFI-enabled > - * systems there will be additional attempt to reclaim the memory > - * for the real mode trampoline at efi_free_boot_services(). > + * Find free memory for the real mode trampoline and place it there. If > + * there is not enough free memory under 1M, on EFI-enabled systems > + * there will be additional attempt to reclaim the memory for the real > + * mode trampoline at efi_free_boot_services(). > * > - * Unconditionally reserve the entire first 1M of RAM because > - * BIOSes are know to corrupt low memory and several > - * hundred kilobytes are not worth complex detection what memory gets > - * clobbered. Moreover, on machines with SandyBridge graphics or in > - * setups that use crashkernel the entire 1M is reserved anyway. > + * Unconditionally reserve the entire first 1M of RAM because BIOSes > + * are known to corrupt low memory and several hundred kilobytes are not > + * worth complex detection what memory gets clobbered. Windows does the > + * same thing for very similar reasons. > + * > + * Moreover, on machines with SandyBridge graphics or in setups that use > + * crashkernel the entire 1M is reserved anyway. > */ > reserve_real_mode(); > > -- > 2.29.2 > > -- > Regards/Gruss, > Boris. > > https://people.kernel.org/tglx/notes-about-netiquette -- Sincerely yours, Mike.