Received: by 2002:ab2:1689:0:b0:1f7:5705:b850 with SMTP id d9csp1698053lqa; Mon, 29 Apr 2024 17:06:09 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCULLRaPTXO1dwKZknxW+DkpF2W0XGui0WYmCD4c00ZcaOiLW4MTgH6f0IeBaw2zR8hy8X1laSQGKFBVyYbnaTah9PdQVs/TMF7JiIW/QA== X-Google-Smtp-Source: AGHT+IFfDg4Ls4BEFLwBW4uB2onphbaHcK531MIg9qZwkdBq47VfGJ9PgC8qL7XSI/v/vS20cAfF X-Received: by 2002:a50:d4cb:0:b0:570:374:d6ab with SMTP id e11-20020a50d4cb000000b005700374d6abmr756997edj.3.1714435569748; Mon, 29 Apr 2024 17:06:09 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1714435569; cv=pass; d=google.com; s=arc-20160816; b=R/Sulm19rxg+qpWjJwO90Fg7JT+gL66APo7aqgZIZ1qOu8czpmwFxXNYqN53I1f50r XIMTr6DKzt93iOIUpD/dCEAPY/Ybo0w7IBXaxdZL8YzmF7SD3P3QYPyB1IvCoz+MEpn1 xOPw0Zj+Ig8H9vmpUHVQmU6juLj0AF0iOgcJD3CEI/vZxwMs3ofgrt8IypMDEbhEcBMU SYnandyWHZ3cnnyvcyeVZS7bWeYDM7D2bt/sJn2LiXd/pH3vfX2UILdEr4dwLlu0RVbN SF/LCE8lKUfziBYt4kLztziBysS5qsGc65Ib1kkN3BmXTip3prvTn7j2mpVZhAr6g3ff U2JA== 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=Ls/x91/XqY1/yjdZUA1T/JakK/e7WGx+3CLMLeqey1k=; fh=yFRuPueYwEotekcibFHCrNI1WiNFh0xl6NdM4Ob51AI=; b=SpLZzeMTUZX33p69XLiylGawO1cgQXhLbFy9Xehdbl/BFMLHyRhc++QDpDhHpSJAIX vpP5MqRWQPMiZf9FoDOhZdrjjEQB1u1ArnqtjlqVnNs/CNKbQkuxgaRaNw+N+CA9Zntt XET4gduBsxh6RaUOchfOHiWyf4TudPKMR7oV6W0WKbGf6GRyLs8FHlg5dsaUjbSXjWGW QxuSaw2akj9UPai4HpqS/XoaOI3gnJ1/EmJRfeic2x2GFNYWha7Cdj7LJ42UzPk43oeQ faDYCpb+7FLC4jZfQjbFHoCzkESFPBnRq76wXkVDH9hp3WqBNYobixcJFB0gGaCH4fTr GC0g==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b=RV6ud2O9; arc=pass (i=1 spf=pass spfdomain=linuxfoundation.org dkim=pass dkdomain=linux-foundation.org); spf=pass (google.com: domain of linux-kernel+bounces-163171-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-163171-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id t28-20020a50d71c000000b005727948ce7esi2650010edi.494.2024.04.29.17.06.09 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 29 Apr 2024 17:06:09 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-163171-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b=RV6ud2O9; arc=pass (i=1 spf=pass spfdomain=linuxfoundation.org dkim=pass dkdomain=linux-foundation.org); spf=pass (google.com: domain of linux-kernel+bounces-163171-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-163171-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 7BAE81F23286 for ; Tue, 30 Apr 2024 00:06:09 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 702A810E4; Tue, 30 Apr 2024 00:06:01 +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="RV6ud2O9" Received: from mail-lj1-f180.google.com (mail-lj1-f180.google.com [209.85.208.180]) (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 C79A6170 for ; Tue, 30 Apr 2024 00:05:58 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.180 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714435560; cv=none; b=FRmpnF3Kt4PdEYrx4HLI6G7Ky1JrRe3b7lKIi9iE7gzMyYj+C/CF6oHWSJeDVowSl2xdLE32rA5VdVoN5/8BoFll5RxoL4SLTkhu+EcY5+sRo4pidfXE8cNtBA4MajPF2lbZ34JTYckQWP3geFtu9URSK6Pd3tAGQ2MAV5pMA1E= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714435560; c=relaxed/simple; bh=gJuDTVJm9AcKVDDIfX5i9uqqPFvs2NbSxmNtE3G0c24=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=DDTOHMde0hbLajN7RRizFx+E5SsZbneu0bIzIMMqtB8cWpjiAoDdaKFEG1C+Il8aGbMwJZ6wg6o3DPZOerU6JYnzfmIkXHJJrHwi0Yj/KahecS3jWjQAc0C5Fqk5tp0hkAvpWpyW9KPUy1qjmbFh326fTw4gvtWkKhU7vyJ8g50= 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=RV6ud2O9; arc=none smtp.client-ip=209.85.208.180 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-f180.google.com with SMTP id 38308e7fff4ca-2db17e8767cso59719951fa.3 for ; Mon, 29 Apr 2024 17:05:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux-foundation.org; s=google; t=1714435557; x=1715040357; 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=Ls/x91/XqY1/yjdZUA1T/JakK/e7WGx+3CLMLeqey1k=; b=RV6ud2O97o16AxkDsaWza9NUsBsd9YiP1YW6+Ax5oA05hYs6PadoC+q75C0kZntcWu MGQ5RporloUf4qb9aaSVHA+pP2wzJTBWloTV1CIoBVwyyNdfkE8HARp0SlWh9yPHVKuP ZuJZHZN6q7lHuBG+ZEvCdKxPaU9KtsooWOMJg= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1714435557; x=1715040357; 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=Ls/x91/XqY1/yjdZUA1T/JakK/e7WGx+3CLMLeqey1k=; b=fWCdE9m0nLC0Sc/tpQTMcgi/UsDpHc9AqN+bs2lm1KwGS6VIrZnb7M7AxfFpm3LD0k 1m3aWLb8d38zCh7fPkBDLNLx9nZ6nX20Cjb6RIHY2dTDgdI91xmEvk3tV9fmawZxK8uU cCCvnsdDQZJJ1JQruDirYrPyeVmgHvBmmBrqS3iDLlkiAu3rSDgP4SulZ9ZOfSOSX91s 4Q6I5FtBQlbWz5ea8Npis+YuE9XNTTjXnOb59121vHzvx3aITxw+Q8a9PHtos/WBjTPk 6ZMn5mQhAY9W7vpElhxAssntT3pOFeBQGB0GMuw+8WUOzPQT/BBsdS6qQp+66322MfCf 9BfA== X-Forwarded-Encrypted: i=1; AJvYcCXJxknuENTW5xyh6Td9G7qCL4j2A+Aq904DiC8yXhU6O9Kv08YsiuSl9B+qbo5HMy5Md9xlhnuwFIwG0vCIl8l3PaG7fAT0NQ+DiSp3 X-Gm-Message-State: AOJu0Ywu37PxYeSz3IUCKaUVg5TjnEJyrPvQcMmPQe+gFDryqKczDHEZ GdqfU+x025aG6OCxm+WqbxQVswe3kMmMg+F4gB23934UCq48Q92fB/d5N7J9Q0g1jGDS5R801Gg hsgt8iw== X-Received: by 2002:a2e:b8c7:0:b0:2df:ebd2:6fdb with SMTP id s7-20020a2eb8c7000000b002dfebd26fdbmr865338ljp.28.1714435556813; Mon, 29 Apr 2024 17:05:56 -0700 (PDT) Received: from mail-lf1-f49.google.com (mail-lf1-f49.google.com. [209.85.167.49]) by smtp.gmail.com with ESMTPSA id q21-20020a2e9695000000b002da25e60918sm3804641lji.18.2024.04.29.17.05.55 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 29 Apr 2024 17:05:56 -0700 (PDT) Received: by mail-lf1-f49.google.com with SMTP id 2adb3069b0e04-51967f75729so6036787e87.0 for ; Mon, 29 Apr 2024 17:05:55 -0700 (PDT) X-Forwarded-Encrypted: i=1; AJvYcCU9f5zkkhdD/rOKXoh5zXmrsyaMITW4q8+KzJabk1fCp/GqdfctYLjUmL6vyxTVS+MNo+OPO4DJxoNx6db7BStTifSHcfTlGS1/UBTw X-Received: by 2002:ac2:47ee:0:b0:51d:6f21:d3a4 with SMTP id b14-20020ac247ee000000b0051d6f21d3a4mr624436lfp.66.1714435555174; Mon, 29 Apr 2024 17:05:55 -0700 (PDT) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <0000000000009dfa6d0617197994@google.com> <20240427231321.3978-1-hdanton@sina.com> <20240428232302.4035-1-hdanton@sina.com> In-Reply-To: From: Linus Torvalds Date: Mon, 29 Apr 2024 17:05:38 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH] x86/mm: Remove broken vsyscall emulation code from the page fault code To: Andy Lutomirski Cc: Ingo Molnar , Hillf Danton , Peter Anvin , Adrian Bunk , syzbot , Tetsuo Handa , andrii@kernel.org, bpf@vger.kernel.org, linux-kernel@vger.kernel.org, syzkaller-bugs@googlegroups.com Content-Type: text/plain; charset="UTF-8" On Mon, 29 Apr 2024 at 16:30, Andy Lutomirski wrote: > > What strange page table handling do we do for XONLY? Ahh, I misread set_vsyscall_pgtable_user_bits(). It's used for EMULATE not for XONLY. And the code in pti_setup_vsyscall() is just wrong, and does it for all cases. > So I think we should remove EMULATE before removing XONLY. Ok, looking at that again, I don't disagree. I misread that XONLY as mapping it executable, but it is actually just mapping it readable Yes, let's remove EMULATE, and keep XONLY. Linus