Received: by 2002:ab2:1689:0:b0:1f7:5705:b850 with SMTP id d9csp1084407lqa; Sun, 28 Apr 2024 18:34:13 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUNV569pxbQyqkfdkIUxa7reXCmjGsakvn5YAwtRG3vmueqnef+6Wuv6Tg6ZTWc4w4Q8A16HJE+tRdwhMAIsGXhstmwu6AOrDo5+2HNUg== X-Google-Smtp-Source: AGHT+IFXaG90tSoR2NTTtv7DthGYq+b35ZHVBEWTL2QIPPWc1dEDh2o8IvPlAFFNHC7P1KigvJCg X-Received: by 2002:a05:6a00:2e1f:b0:6ed:def8:4dc with SMTP id fc31-20020a056a002e1f00b006eddef804dcmr6772673pfb.10.1714354452930; Sun, 28 Apr 2024 18:34:12 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1714354452; cv=pass; d=google.com; s=arc-20160816; b=SuE04om4PR4SlMtBEpOqi7AtomnPRAcz9W/JbME9lnuuyjyIJd2tpnclu81kdN4+uR 7b9PpRmTHorgQY5+RMSWDxWni4N8bJlUm0O4nMiwlTCt/P9BA5Zrod0TAFnGqXB/1dOr Lu/pPVtVsVAUMcSsxzAUm++OMG7vyqLkEZ56/7p2ecUrwgSrKT3TFwE25klabuNEmJnC 3EggJOc7JK7lFDHkpNFpHYC2Ldld89pSEqsJEGzeIEhin7ej2ib1qi+vSdVYuqVbWwy7 0RwX0K57qXl8UXGN/5qtBdRLgkvTVzyD+PZlcUjIeTJWAwAQl6SL2vEBzjBRJ01vqIdQ /2MA== 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=V9FR6pOGINW5hWqGcUs2Y0pMovcHvidMbvjger7RIYI=; fh=xHIBczVV5eQ1d82krvkF4p8qqTVDgZC4FaeZjWkX8as=; b=iDtwvVU5xyDH9z88lbR+2BZMtMovN8u7muNPoeMkj9mnFx0j+RJYyvEvHZ8gKaHRZ5 RGp6/CrYnqviYTZBbA+em5unwSf6nG8ha0gLnJL3lkSVIElsLtYstjQAOSvLyG80NxC3 0t7OORdUYSyyc8TLTR84MRbwSy1U7Erp6+FyNTrwfRXTjkhjvDwHLvk1zpwbU9ZBILAx JsN5aQt3PwGwgbUQs7C9Kuy1tt99dIans8UXLIV8ymFDssciHOpH5XyZJ0VVOylRBR8g l9sR56t7qMY/+vhuu9mvCgncRZ/Y7yE1SeeEU/ptsemRHcATfQCVYNm1HCci7N82sddC rsGw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b=L7lHfAiv; arc=pass (i=1 spf=pass spfdomain=linuxfoundation.org dkim=pass dkdomain=linux-foundation.org); spf=pass (google.com: domain of linux-kernel+bounces-161668-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-161668-linux.lists.archive=gmail.com@vger.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 s9-20020a056a0008c900b006ed17908318si19263474pfu.319.2024.04.28.18.34.12 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 28 Apr 2024 18:34:12 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-161668-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=@linux-foundation.org header.s=google header.b=L7lHfAiv; arc=pass (i=1 spf=pass spfdomain=linuxfoundation.org dkim=pass dkdomain=linux-foundation.org); spf=pass (google.com: domain of linux-kernel+bounces-161668-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-161668-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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 880622821A2 for ; Mon, 29 Apr 2024 01:34:12 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id AD4081113; Mon, 29 Apr 2024 01:34:05 +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="L7lHfAiv" Received: from mail-lf1-f53.google.com (mail-lf1-f53.google.com [209.85.167.53]) (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 7C988624 for ; Mon, 29 Apr 2024 01:34:02 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.167.53 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714354444; cv=none; b=F337i8U6FEdiFpRuaowRuzT26Bgk4ddTC8kc5u8gXKmJmPWvVLZWp301a4Q9vwghdmdoFMWzDUQvkDVE2bR7oBNvC2f21i5iS4AVClK4Ex794/kJpAlmNUWHXc+Zsr6kqZm5HGYf3aPvN2eQSuQ3ijdbUheA+HRP3+QyXHRziUo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714354444; c=relaxed/simple; bh=fd0kJpD6vbyUOilYff0vqjgmGQdeo18DxumCk5VRECc=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=OWbfMQ7Efo6LON57hZaOY1Q/SidtchjWnFErUCMkKkfqubE5Wqef4PDVKTS/O1bYHxcW5J7lh2LpDpJlefW6iKha/xhg5f2J6PT/dnlAeGRrOVH+Bg//+j11d9N9ymXsn2WPbXyFG/hWocE0+QGYOl0WjO3SYgYOzfHY/0lBx7o= 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=L7lHfAiv; arc=none smtp.client-ip=209.85.167.53 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-lf1-f53.google.com with SMTP id 2adb3069b0e04-51c077cfc09so4555109e87.2 for ; Sun, 28 Apr 2024 18:34:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux-foundation.org; s=google; t=1714354440; x=1714959240; 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=V9FR6pOGINW5hWqGcUs2Y0pMovcHvidMbvjger7RIYI=; b=L7lHfAiv+3nrxhqVyu5uatYy7ieFHJ3+mVKPZgSkE3PPZQxWQ2Xjo9Gn5N0qo5gEmH vhoGBPmCOmYfSMnXubGE2GSeUuGPPKBoFXGRWd7VW5PGi6No1QJsV397Fuo0SZ4ZjeKm oOFhSYAUtx8h9p/LBfPVN4EyKfKgBa9n7t/KY= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1714354440; x=1714959240; 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=V9FR6pOGINW5hWqGcUs2Y0pMovcHvidMbvjger7RIYI=; b=SmRdClIICzxCRfUOaUFzeuQFRwQ6/2l3nVx5JlO0+eLlCgSdnUoPQSNmgWlkgR60Jh Qr4wuuUxCTn99shMpAXJPKk0QNzULtWZlISBHuldauBp+42sLsS8mIJwS+bA6hOtPyUQ Ibj6uQVjspa1O3PIydZ7sTJHURGUGbf2f72z80aLyPeiV1oM6p+ZBhLDCHUixW7d04MI wL0Fu3H6mqizL0c1XTKbX/Zq3bqoLIOZdtToaA6dX8oLvsY5b7bfBbBQoYt7jQkemuw8 35SeS1HiRC+hmK6LUMPHfDf5fVojaGPEAeGTjP6cRCBNuo5oOezI34Zn40R12XV1v+JL 1FKQ== X-Forwarded-Encrypted: i=1; AJvYcCXkC7w4NtSRHQ+pIA/uhzqYzSyxvVZ5Le6ElRuWj2cS8WRbVEsfce8zbSHWoIJ2h1rbLB6prHAyhX6sWHSXiBVRCsO2nptehRS5aTjj X-Gm-Message-State: AOJu0YzItbbTG8X7sD5Im8lTn+lUoR5Fa+bKB0bTd/+fusJsBpeTlAVH 7J+rAS77Ucc49xYCD2mhw7LQxMhfj90ieuY8sWdIpjp7pjpxKZ/3c6o4MpfM3lnCc0Nz0X9hPnN KalbSXg== X-Received: by 2002:ac2:5586:0:b0:51c:cfae:afd0 with SMTP id v6-20020ac25586000000b0051ccfaeafd0mr4569105lfg.21.1714354440266; Sun, 28 Apr 2024 18:34:00 -0700 (PDT) Received: from mail-ej1-f44.google.com (mail-ej1-f44.google.com. [209.85.218.44]) by smtp.gmail.com with ESMTPSA id 18-20020a170906309200b00a523b03a1edsm13225493ejv.20.2024.04.28.18.33.58 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 28 Apr 2024 18:33:59 -0700 (PDT) Received: by mail-ej1-f44.google.com with SMTP id a640c23a62f3a-a58c89bda70so296535166b.3 for ; Sun, 28 Apr 2024 18:33:58 -0700 (PDT) X-Forwarded-Encrypted: i=1; AJvYcCVV9zOjRtRa0Jc69lwzIVYYggX62Hs84MuNpgsL/gevGlV6TtR1W9fbeve0QBjNMpJ8iGYuOgfMdffXDusmQs8HyXnYIU/DUvnU2Cro X-Received: by 2002:a17:906:698e:b0:a52:58a7:11d1 with SMTP id i14-20020a170906698e00b00a5258a711d1mr5612258ejr.38.1714354438473; Sun, 28 Apr 2024 18:33:58 -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: Sun, 28 Apr 2024 18:33:41 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [syzbot] [bpf?] [trace?] possible deadlock in force_sig_info_to_task To: Hillf Danton , Andy Lutomirski , Peter Anvin , Ingo Molnar , Adrian Bunk Cc: syzbot , Tetsuo Handa , andrii@kernel.org, bpf@vger.kernel.org, linux-kernel@vger.kernel.org, syzkaller-bugs@googlegroups.com Content-Type: multipart/mixed; boundary="0000000000005346490617323fd6" --0000000000005346490617323fd6 Content-Type: text/plain; charset="UTF-8" On Sun, 28 Apr 2024 at 17:50, Linus Torvalds wrote: > > But the immediate problem is > not the user space access, it's that something goes horribly wrong > *around* it. Side note: that stack trace from hell actually has three nested page faults, and I think that's actually the important thing here: - the first page fault is from user space, and triggers the vsyscall emulation. - the second page fault is from __do_sys_gettimeofday, and that should just have caused the exception that then sets the return value to -EFAULT - the third nested page fault is due to _raw_spin_unlock_irqrestore -> preempt_schedule -> trace_sched_switch, which then causes that bpf trace program to run, which does that bpf_probe_read_compat, which causes that page fault under pagefault_disable(). It's quite the nasty backtrace, and there's a lot going on. And I think I finally see what may be going on. The problem is literally the vsyscall emulation, which sets current->thread.sig_on_uaccess_err = 1; and that causes the fixup_exception() code to send the signal *despite* the exception being caught. And I think that is in fact completely bogus. It's completely bogus exactly because it sends that signal even when it *shouldn't* be sent - like for the bpf user mode trace gathering. In other words, I think the whole "sig_on_uaccess_err" thing is entirely broken, because it makes any nested page-faults do all the wrong things. Now, arguably, I don't think anybody should enable vsyscall emulation any more, but this test case clearly does. I think we should just make the "send SIGSEGV" be something that the vsyscall emulation does on its own, not this broken per-thread state for something that isn't actually per thread. The x86 page fault code actually tried to deal with the "incorrect nesting" by having that if (in_interrupt()) return; which ignores the sig_on_uaccess_err case when it happens in interrupts, but as shown by this example, these nested page faults do not need to be about interrupts at all. IOW, I think the only right thing is to remove that horrendously broken code. The attached patch is ENTIRELY UNTESTED, but looks like the ObviouslyCorrect(tm) thing to do. NOTE! This broken code goes back to commit 4fc3490114bb ("x86-64: Set siginfo and context on vsyscall emulation faults") in 2011, and back then the reason was to get all the siginfo details right. Honestly, I do not for a moment believe that it's worth getting the siginfo details right here, but part of the commit says This fixes issues with UML when vsyscall=emulate. and so my patch to remove this garbage will probably break UML in this situation. I cannot find it in myself to care, since I do not believe that anybody should be running with vsyscall=emulate in 2024 in the first place, much less if you are doing things like UML. But let's see if somebody screams. Also, somebody should obviously test my COMPLETELY UNTESTED patch. Did I make it clear enough that this is UNTESTED and just does crapectgomy on something that is clearly broken? Linus "UNTESTED" Torvalds --0000000000005346490617323fd6 Content-Type: text/x-patch; charset="US-ASCII"; name="patch.diff" Content-Disposition: attachment; filename="patch.diff" Content-Transfer-Encoding: base64 Content-ID: X-Attachment-Id: f_lvkac5u00 IGFyY2gveDg2L2VudHJ5L3ZzeXNjYWxsL3ZzeXNjYWxsXzY0LmMgfCAyNSArKy0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tCiBhcmNoL3g4Ni9pbmNsdWRlL2FzbS9wcm9jZXNzb3IuaCAgICAgIHwgIDEg LQogYXJjaC94ODYvbW0vZmF1bHQuYyAgICAgICAgICAgICAgICAgICB8IDMzICstLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLQogMyBmaWxlcyBjaGFuZ2VkLCAzIGluc2VydGlvbnMoKyks IDU2IGRlbGV0aW9ucygtKQoKZGlmZiAtLWdpdCBhL2FyY2gveDg2L2VudHJ5L3ZzeXNjYWxsL3Zz eXNjYWxsXzY0LmMgYi9hcmNoL3g4Ni9lbnRyeS92c3lzY2F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