Received: by 2002:ab2:60d1:0:b0:1f7:5705:b850 with SMTP id i17csp311714lqm; Wed, 1 May 2024 00:43:21 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUGoFtNLglZ87o/kqyVlq1+KzAmPnzpB3Qh2JDYUrkFaFsd+VqXjFRCtZRYLKrKsz0axGdjp9Vj5Fm4sqP395FkjaC9RCUw/wW56xQ/oQ== X-Google-Smtp-Source: AGHT+IEjKwBdFkpv2yAQWZOvLe17/ezyPyGxqEkEoE7Qms2D7sGF5V15gDfGW9RtAkf+LnviJ7ty X-Received: by 2002:a05:6a20:7290:b0:1ad:7e5:4594 with SMTP id o16-20020a056a20729000b001ad07e54594mr2521545pzk.53.1714549401644; Wed, 01 May 2024 00:43:21 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1714549401; cv=pass; d=google.com; s=arc-20160816; b=mGb9rGf2wOuIfdDc0qjvYQUDIyoeNAQGM4zTqorJfgIlCerl1dGXBtyzbRR1lPPBxs CfZNNaNV545mtfJbbxWIkU/02nth83g3ZuGz/AQlBk8OHimsKCklW9BBYBJONpacE5a6 Yv1GhKQE5l+aCEnWMN1NB2RrKcruJn9RVuPnERRP3ObdSYLrlIgaCT8qWZ5loHACwT78 mdPeRvI41obBdQeGWk5ItjzGaQyD2Kyl4UQFaChWuBkAjsKijPxB/Yt5+NbMnbefA92+ hrgI+gktEybtxcAOUvOuuLezHj5w3u1DAqwXswkqcqnQxDsP1eWq3FtfUw9GVygO+RO2 mKsw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:sender:dkim-signature; bh=VS97UVDmTq0jUKWg6SotUR+zNkhZ/4MYnHJe/NRtR38=; fh=cZk9tw5V3yySPTfdn6elRlS89alo3tBjhySF8oiPyq0=; b=ubiI74J9HzN0Ugb5XQ1acxEQNPzfr6SFMC6/A6RHma6mnX0AZNu1cezj14+GRXo9Jc wnPX1rKWBIcB+LRAED7VUQV7J1iT8rFOPZd4cU7kzFWfa5hf8HfpciEzrkWBAbDdI5EE KLrzhP6kZaW812vfeASe1Bsz0AbXNQlta7noqfW5ynlxb4jeQE80WJut9Nzno4EjBTUc 2B/H4Olc0bpbvd7oige4Z+GgL7QX+xbGPuAVT1nPg0RrU5SFy4NaWbN51vvD2j9WwgNk 5HO+FLXt4Wh4LvtjLvLZCL6Xr/X7DKq47f15e3MkLZ4zhKttRNGS7doJQ0mJIbqD/wv9 86sA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=EvaYDxOm; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-164996-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-164996-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id n20-20020a17090ac69400b002afc56922e9si1023288pjt.0.2024.05.01.00.43.21 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 01 May 2024 00:43:21 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-164996-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=EvaYDxOm; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-164996-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-164996-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=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 sv.mirrors.kernel.org (Postfix) with ESMTPS id C27F128202D for ; Wed, 1 May 2024 07:43:20 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id C2E2A4D9E3; Wed, 1 May 2024 07:43:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="EvaYDxOm" Received: from mail-wm1-f54.google.com (mail-wm1-f54.google.com [209.85.128.54]) (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 5ADA645000; Wed, 1 May 2024 07:43:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.54 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714549392; cv=none; b=hLUXTcck21n30UA6Kr8/daK69Et3wfB8shu2Q4kHY3yLX4d96Bi4PrNrRxwVDY13B83380IL9oCasqQyw5zjIwC3D0ycqbmpYEU5Gq5uozLLik7+A+/HbvvOPtYRgCqDQHzhT3HzLhgt5x6buiJRQ9Nfvup7YH0aQFDUpBzvkv0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714549392; c=relaxed/simple; bh=nDz7IgBIt8zcUbDYSusybKLUFygsWzYKS7tlIuHx9Xk=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=rPW5m5k/EF2CRh7BLwDxSwG+PJ1qL6hVMGG+n25y9VxWZUI1xAj1xTvOkzNSf8kwP6yV6cb8UwZGMKui+ajzV2KpZ1+ts37/KHKyq4WUQ9UrOHwPNCxg8wslDA31F/P5kY+Tf+rUqv36fx3FMkTr7btjSQt8tWVH5jB2GSU+32c= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=EvaYDxOm; arc=none smtp.client-ip=209.85.128.54 Authentication-Results: smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-wm1-f54.google.com with SMTP id 5b1f17b1804b1-41b79450f78so37502525e9.2; Wed, 01 May 2024 00:43:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1714549389; x=1715154189; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:sender:from:to:cc:subject:date:message-id :reply-to; bh=VS97UVDmTq0jUKWg6SotUR+zNkhZ/4MYnHJe/NRtR38=; b=EvaYDxOmRdxvt0t0qzk3LfyR6+Cm3+dsdaiBdYzs9D3gWMlXiovjdWh8ap25lJboNv afXdV1/2tA2rAOTFLGNdpCiiGwG2qhLCAfO/484GGfxA40d2Apx7OP6pPSizJhPeecl+ xqJ9nGkVtH3ChtH4PXMaamUvmaH3fCukE28f9bcuRpaAAM61d4wimx7po6oqEHh6x7O6 snDk3T3eRPQn5ZYIEUkuRpMxA7IzWzHj/Kv/IsQV5/CS7ThI3hQh3HS909WyhlZhyy4K MwuvFtYRjUC9dFAWaWQ4/5eDhYdIENrGH6m6CmAUu1kcoh5CncgK7JbyxWzINrfqO2Re oRhg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1714549389; x=1715154189; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:sender:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=VS97UVDmTq0jUKWg6SotUR+zNkhZ/4MYnHJe/NRtR38=; b=wjuS/+H9oMbBFljvKqKSUKf+QTWgEE0esVZ2FHcbs6mtR0D4MRFffNZXJQ0riGjJaL xAgO/crWWwzO402kErihABH3cqr4I4uhWiWw7rsHvaUKTGh8pfBWiijkmAws9v46yaWE GU+ge01KPGK+eUibQlzGwRv2MFBJTtefH630L/wF/BtEUgpz8E6ZC6RLhtXoQuFv2O4U SYJ5ctEKdHXUnPtX8MqWQTsEOyVuxb3PxCeyUnwFdBVKanGaYUTA9m3gPEx/LFpkcqxl MEzhu07DJ4PzqzRbn4NemIPMONDswWYTV/BcG6cOLag0DfUxEL9CiP5tQi03EgXdmkDw H7Pw== X-Forwarded-Encrypted: i=1; AJvYcCUMiSgF7XXxTiIMEvv2ee7BnMZuklikgjLa0Y7XX4aEkGpjpYdjRGTEGJZLj5LvzoO/zpglCFwIWlK+O9e00F9M0cfA6Gss+C8u8NbQeUnvXKYhsxd92gsHVNJ9YmSnjGIF X-Gm-Message-State: AOJu0Yyi4LBY3kz1MNKCEAQhsSOfilt9Z58Ilk3wZQFFc1zSAx65CsZ3 j+LTdbCPoBgSEdMds0FG4H52qLhx3omBHAGiLREaiTGrgtiwLaLxrFpTppkI X-Received: by 2002:a05:600c:3ba2:b0:41b:d973:24c1 with SMTP id n34-20020a05600c3ba200b0041bd97324c1mr1933561wms.12.1714549388206; Wed, 01 May 2024 00:43:08 -0700 (PDT) Received: from gmail.com (20014C4C171B8800C2E0EE13693E7E35.unconfigured.pool.telekom.hu. [2001:4c4c:171b:8800:c2e0:ee13:693e:7e35]) by smtp.gmail.com with ESMTPSA id c14-20020adfa30e000000b0034da4e80885sm2428071wrb.59.2024.05.01.00.43.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 01 May 2024 00:43:07 -0700 (PDT) Sender: Ingo Molnar Date: Wed, 1 May 2024 09:43:04 +0200 From: Ingo Molnar To: Linus Torvalds Cc: Hillf Danton , Andy Lutomirski , Peter Anvin , Adrian Bunk , syzbot , Tetsuo Handa , andrii@kernel.org, bpf@vger.kernel.org, linux-kernel@vger.kernel.org, syzkaller-bugs@googlegroups.com Subject: Re: [PATCH] x86/mm: Remove broken vsyscall emulation code from the page fault code Message-ID: References: <20240427231321.3978-1-hdanton@sina.com> <20240428232302.4035-1-hdanton@sina.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: * Ingo Molnar wrote: > > * Linus Torvalds wrote: > > > I guess that patch to rip out sig_on_uaccess_err needs to go into 6.9 and > > even be marked for stable, since it most definitely breaks some stuff > > currently. Even if that "some stuff" is pretty esoteric (ie > > "vsyscall=emulate" together with tracing). > > Yeah - I just put it into tip:x86/urgent as-is, with the various Tested-by > and Acked-by tags added, and we'll send it to you later this week if all > goes well. Update: added the delta patch below to the fix, because now 'tsk' is unused in emulate_vsyscall(). Thanks, Ingo arch/x86/entry/vsyscall/vsyscall_64.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/arch/x86/entry/vsyscall/vsyscall_64.c b/arch/x86/entry/vsyscall/vsyscall_64.c index 3b0f61b2ea6d..2fb7d53cf333 100644 --- a/arch/x86/entry/vsyscall/vsyscall_64.c +++ b/arch/x86/entry/vsyscall/vsyscall_64.c @@ -115,7 +115,6 @@ static bool write_ok_or_segv(unsigned long ptr, size_t size) bool emulate_vsyscall(unsigned long error_code, struct pt_regs *regs, unsigned long address) { - struct task_struct *tsk; unsigned long caller; int vsyscall_nr, syscall_nr, tmp; long ret; @@ -166,8 +165,6 @@ bool emulate_vsyscall(unsigned long error_code, goto sigsegv; } - tsk = current; - /* * Check for access_ok violations and find the syscall nr. *