Received: by 2002:ab2:6a05:0:b0:1f8:1780:a4ed with SMTP id w5csp2390769lqo; Mon, 13 May 2024 18:03:27 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUBoWJPt4JAAZuQnKotMr5AvVTDL0RcMCd010EJ812KNEHz9bGurHEUw7Q1j6KDyhQsIXOK+ijhoRJ65r1JtpWs3e0/BiGSeVaepYt5tg== X-Google-Smtp-Source: AGHT+IG3kCX52Hukh2vIfg/k5SLX6JxqZgxO42OTdPnobe5V/eoFs5VJYYAQNbF1XaP9STZx1Xgz X-Received: by 2002:a17:906:d10a:b0:a59:b498:3ae5 with SMTP id a640c23a62f3a-a5a2d676354mr1007748966b.67.1715648606542; Mon, 13 May 2024 18:03:26 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715648606; cv=pass; d=google.com; s=arc-20160816; b=1DqFv1XyeMzfBGCTKIlf5FSHtEgwNnUhQQjjubdj76UfL6NyBy/q5eot+pzxWLVH1t 8gmqng2yUIMbjncVkbUub1YRZ5BB8jh2Y1W+gIdO8uKwxzHLJPUR4wj1QPodfx9GOI+i orqRusyAfurHqZau0W+rcW06XSCQceOA/s8ChNt5NEydsook3mqpHg0L20i/CBDV8deD 4S9Au64hQTuf9bKL0zJafkfuUuNzW7JqxOW7/6/UVq8sjbhFyUhTzDEHzNNdH/Luhpc9 ZIeZ6YcisGTn/bwLJW9jDM2I9HJuuYrofvTVi/Q7ml5yVf7C911TZigoH9dAGu2Hgj3W /dJQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :dkim-signature; bh=k5CdkRdgFHJBeaGlLOzrrq5zI+RRCPQz8DEEq+Gptqg=; fh=uI7rqazgBtrGhTM0yJBzwMN2SYuN9DXRm9VJYIpJg5U=; b=NXkPF35ccEfus/F4Ak2syS03F5pfX+E++c0BgZtrS+itKHRBEixHxW55hwh/Lqt80S vta5AAKEwUmQUYoZvvvQIqILK/QLxtoeaqs0XHXq7PZ2shU/15i2KVFZFH1WYcZzxOan cT4Je7jtG76AMKqsuzpoHog2WObZtLFJTWJO/IGlSB6TQIY790cDkV2KxrPxy/SfC3yk m0kT3ILkdTDBAenu1nUbfP1UQMMZda7m3Ts3xphQZ1vEQGBdfeXs6I7gGCr8oHkQtjO/ S0jVTCaMpIFSaEEXMREzn+gMR5EMbU816UEnqMmirQGskJ8GmRaHteA+oMxaPR9zZapR Y9Xg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b=IRTRWiz8; arc=pass (i=1 spf=pass spfdomain=linuxfoundation.org dkim=pass dkdomain=linux-foundation.org); spf=pass (google.com: domain of linux-kernel+bounces-178228-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-178228-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id a640c23a62f3a-a5a17ba4fc7si571623766b.646.2024.05.13.18.03.26 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 13 May 2024 18:03:26 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-178228-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b=IRTRWiz8; arc=pass (i=1 spf=pass spfdomain=linuxfoundation.org dkim=pass dkdomain=linux-foundation.org); spf=pass (google.com: domain of linux-kernel+bounces-178228-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-178228-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 440691F22A9C for ; Tue, 14 May 2024 01:03:26 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 3673F17EF; Tue, 14 May 2024 01:03:20 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux-foundation.org header.i=@linux-foundation.org header.b="IRTRWiz8" Received: from mail-lj1-f182.google.com (mail-lj1-f182.google.com [209.85.208.182]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1288CEC5 for ; Tue, 14 May 2024 01:03:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.182 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715648599; cv=none; b=c4KqoHC3eFYZ/oIWo92LWPXtt2RJaEwtqTax8R8gqtOmLDsgd7GYJrz2onY1RlXJ0glV3Hci8lRBzl0jF09bAbQSiMxrONMUWvuyVhkxzRMPiStt4lnZ8dnjJVm54rXWCQu8WnaRGU0xsfNsivD9RxObmsAnA1RRHbMQieFTDBA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715648599; c=relaxed/simple; bh=7dQLwwE3ln7On0AlPEwJlYxpqrpUlDJ5OpTLUT6s5YY=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=LhokjgnrDmJOg3+gqU4J5SEJDet6XqOjcIBFR6JmtWSZVTb5Bh81KfHy5FyTMqhMwD/mraWZihG1nsd3xvCNhq4LxSduG3N74IfrY1vK3qRRfjJff4B0Z99GxQjRAyeq4b1PxuprxZNeUZHzar5XVIDG25elNm6hZ9NCgFZPMWk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=linux-foundation.org; spf=pass smtp.mailfrom=linuxfoundation.org; dkim=pass (1024-bit key) header.d=linux-foundation.org header.i=@linux-foundation.org header.b=IRTRWiz8; arc=none smtp.client-ip=209.85.208.182 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=linux-foundation.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linuxfoundation.org Received: by mail-lj1-f182.google.com with SMTP id 38308e7fff4ca-2e0a34b2899so77306841fa.3 for ; Mon, 13 May 2024 18:03:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux-foundation.org; s=google; t=1715648595; x=1716253395; darn=vger.kernel.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=k5CdkRdgFHJBeaGlLOzrrq5zI+RRCPQz8DEEq+Gptqg=; b=IRTRWiz83i4UqiwhIBBUpEphAlUuqzIghxSw1Jwbxqnf8CL5yzSZeu7/vM2i57vxfq FW0A8uETIuIQKj6MC8AOjKfpR6RwimEDma83XyLFWgK441VLrRc56tVX/Kl96plgnJT4 iIdV+xKC5t8X16n7GqPGyeFmP32RhNzGRnQpc= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1715648595; x=1716253395; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=k5CdkRdgFHJBeaGlLOzrrq5zI+RRCPQz8DEEq+Gptqg=; b=vmTGzaUpTy10yfZUK0V/xLbcz3H+Tv06VGekKcFYvFaAbUrJuJo7vy1xMzLApLleUf PWPEi9peUzajpGqufVfhEQFo6d6LsBPQseLzeJqBnS+yE+MNRYcPjcHsBR2lbdfbTAY0 QsK1ejd3Uw3gFZT9Rhmx9C+Zyin6nm12QsDzf7wCB9iVASionHT3ThsacS87ggpNC62v v/A8cRuM95F+bOpsLU15NtjxxoFvSYeE7qMUtJc2ygg5zwzE5Imw5AYM575a9XeuXbmA eeaVBFW2LHB4Hs/D9CB54sznOJ6jr33ZKhLc8HOtpI183dlyc4w+PvH0k0dXq5oc7CXb NhrA== X-Gm-Message-State: AOJu0YwghBCR+N3biS7tGlAEkbrlL6BWLjWxi3ifeAS5jbf3zdL5nJhS bGYVJwhlgYCX4MJTEoeYwii+9nxWYrj29VoJMSZsal1H0AC0amQ5ZqSAeW9YNXuMAi/WB4KhWAU APY+ktA== X-Received: by 2002:a2e:719:0:b0:2e5:2f6b:263 with SMTP id 38308e7fff4ca-2e52f6b02c2mr76881451fa.50.1715648595066; Mon, 13 May 2024 18:03:15 -0700 (PDT) Received: from mail-lf1-f46.google.com (mail-lf1-f46.google.com. [209.85.167.46]) by smtp.gmail.com with ESMTPSA id 38308e7fff4ca-2e4d162301csm16152731fa.128.2024.05.13.18.03.14 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 13 May 2024 18:03:14 -0700 (PDT) Received: by mail-lf1-f46.google.com with SMTP id 2adb3069b0e04-51f71e4970bso5922170e87.2 for ; Mon, 13 May 2024 18:03:14 -0700 (PDT) X-Received: by 2002:a19:7416:0:b0:51d:804a:232 with SMTP id 2adb3069b0e04-5220fc6e614mr8505759e87.11.1715648593961; Mon, 13 May 2024 18:03:13 -0700 (PDT) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: In-Reply-To: From: Linus Torvalds Date: Mon, 13 May 2024 18:02:57 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [GIT PULL] x86/boot changes for v6.10 To: Ingo Molnar Cc: linux-kernel@vger.kernel.org, "the arch/x86 maintainers" , Ard Biesheuvel , "H. Peter Anvin" Content-Type: text/plain; charset="UTF-8" On Sun, 12 May 2024 at 23:51, Ingo Molnar wrote: > > - Re-introduce a bootloader quirk wrt. CR4 handling I've pulled this, but shouldn't the compressed boot also just stop setting the G flag that it didn't understand? For example, arch/x86/kernel/head64.c seems to do this: pmd_entry = __PAGE_KERNEL_LARGE_EXEC & ~_PAGE_GLOBAL; but arch/x86/boot/compressed/ident_map_64.c does the somewhat suspect mapping_info.page_flag = __PAGE_KERNEL_LARGE_EXEC | sme_me_mask; without masking off _PAGE_GLOBAL. The hibernation code does pgprot_t pmd_text_prot = __pgprot(__PAGE_KERNEL_LARGE_EXEC); pgprot_val(pmd_text_prot) &= __default_kernel_pte_mask; and again there are several situations where __default_kernel_pte_mask does not have _PAGE_GLOBAL. So again, the boot/compressed code seems a bit at an odds with other code paths. The cr4 games seem to work around the fact that this code is just buggy. Hmm? Linus