Received: by 2002:ab2:3141:0:b0:1ed:23cc:44d1 with SMTP id i1csp1904668lqg; Mon, 4 Mar 2024 07:17:07 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCVUAn97hoZ6npwaUMldmU/16rnDmSkBXTxd1NBxadN/zHzcxq5diX8y6NJqJv725Z5//5prK8pQ7Yv8UwHhRf2aXuiDgwZEQew2PAzrVg== X-Google-Smtp-Source: AGHT+IHKjr6L5ntGHComIQtrqoyyQZnoMJowrzU2reppOR+ziLge3EnpiOMSTfi/NDp2fF6Kq21a X-Received: by 2002:a17:902:b098:b0:1db:d184:c45a with SMTP id p24-20020a170902b09800b001dbd184c45amr9551298plr.67.1709565427633; Mon, 04 Mar 2024 07:17:07 -0800 (PST) Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id e17-20020a17090301d100b001d720fa139esi8446820plh.17.2024.03.04.07.17.07 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 04 Mar 2024 07:17:07 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-90797-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@google.com header.s=20230601 header.b=FN46C1w0; arc=fail (body hash mismatch); spf=pass (google.com: domain of linux-kernel+bounces-90797-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-90797-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=REJECT sp=REJECT dis=QUARANTINE) header.from=google.com 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 4918928B840 for ; Mon, 4 Mar 2024 15:17:07 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id C3EED4CB46; Mon, 4 Mar 2024 15:15:49 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=google.com header.i=@google.com header.b="FN46C1w0" Received: from mail-ed1-f49.google.com (mail-ed1-f49.google.com [209.85.208.49]) (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 4B0D24CB47 for ; Mon, 4 Mar 2024 15:15:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.49 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709565348; cv=none; b=bQYioIOYzf+A7yfm/YiXm+rmLlfAihzT7CV6Yg3BlqgYskZ3xrApR6uOtM86+8Xkv8mx6tUCdsFgsw3z2Bw85UuThW39Ng5WqGkVj+U3dMQ7mG1Il9YV0mmMjO/vZtdliH2V3SdsaBi6JAd2CGmNUaNVMoGGewQSHNsJFAsGHMI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709565348; c=relaxed/simple; bh=JaftqBjRUd5OiE9mP6ElGruCPofNrsQHVf3pU9lO0lo=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=BmrS2zwIpW+8+V1KLUVEgP9qTgwaPDNJkvfor5c0JIGMWfKzEUJ38I55/8SD4wg+dn3EFbqXokhncILmna9Ry/pirw+Wqkr7WAUw+28k6uWZCzp0E6TVGa9f508AyYz/a9ntvt+CiGRUqtFfBvpTrw8p5EQyMOqQMtLvOv8kfDc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=FN46C1w0; arc=none smtp.client-ip=209.85.208.49 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=google.com Received: by mail-ed1-f49.google.com with SMTP id 4fb4d7f45d1cf-56693f0d235so23481a12.0 for ; Mon, 04 Mar 2024 07:15:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1709565345; x=1710170145; darn=vger.kernel.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=JaftqBjRUd5OiE9mP6ElGruCPofNrsQHVf3pU9lO0lo=; b=FN46C1w0opZL3pGHIueXrQM50J/X+AFiedCy/K528RxK763i+sQCdC2uY7bnXfK82f A9+2zCM8hCtu4sp81xtJiNEq9IT19WJF3WtakgIMRd51hXxnRJHQzxyvmbuQ1+FC0Y3B 8pKg7oWwCsIoqYfQs6WG9XRykmZIFoNaSWAm+VaIpupWLR+PVfWh2G8NOF78d2EuAngy BGI46NV0vW/PofhoEtOAm1e2T2wmcJd9GtWDpdyA1ZJeEkohbbX4OtAH+YK5pQkafxMR hCIlyk2x35x50+RvMMaG/pt05FsHcJTTan01adb5a9qfyxo0VvXozafRMfkHs7PKV7Th tu7A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709565345; x=1710170145; h=content-transfer-encoding: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=JaftqBjRUd5OiE9mP6ElGruCPofNrsQHVf3pU9lO0lo=; b=KIb6fJqvQ+J/dx1t1BDuUnxWJTgSoKzWbpzg/m/Usa7HY8r2qvGfbnA0Q97lbiJcrr 0eOhFzlGItJalOgUZSgdp/3e/rWFd6X3Cwr8omEepbdgN8h//2EPcOCDYVzMoNKQGcHd KpYTz4HzPXClbADsAbjag6hHjcaAPSLmDlu+QGgXQPeME9U5xStnAfQYUxufnjQe7m0v /DddNlKLM457WrTj4goH57jD4vHTxszUXIwr3g1rsa70gWyaVunm++2zoJgfR10yu407 7VCbmzCxRTqC/MWhgHiUTOh1/6+mUdGK752ZCSMXcbkQi2Dh68GNKZAX2yTzioowFelZ LQRA== X-Forwarded-Encrypted: i=1; AJvYcCXpSsQuk2Jhmav6BEk+dUZdBmp4BsJpQLbBYDcnH1ZC/kN5CUA4aVQ4BEcq/RvYuB4dMQa2/Ijm5z9H1V2uti8pS4jhv5aGtaUQOczT X-Gm-Message-State: AOJu0YwgrMs4khds9MPPevvpfuu/b8zn+BMRN8qnUXDU/AdS8/Incqxz y8QwqVlT2ZUJfluuVxKxzDiIlALIDbsoC8N955dUKqqnrZYDBTQNPRiXHsFAf0JoimPK9SRDu9C ewVcunipjtDHJUHIzyz/w7ZktKO1ugYVL4dtb X-Received: by 2002:a50:bac2:0:b0:566:ecde:290d with SMTP id x60-20020a50bac2000000b00566ecde290dmr291227ede.4.1709565344548; Mon, 04 Mar 2024 07:15:44 -0800 (PST) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <1709516385-7778-1-git-send-email-xiaojiangfeng@huawei.com> In-Reply-To: <1709516385-7778-1-git-send-email-xiaojiangfeng@huawei.com> From: Jann Horn Date: Mon, 4 Mar 2024 16:15:07 +0100 Message-ID: Subject: Re: [PATCH] usercopy: delete __noreturn from usercopy_abort To: Jiangfeng Xiao Cc: gustavoars@kernel.org, akpm@linux-foundation.org, jpoimboe@kernel.org, peterz@infradead.org, dave.hansen@linux.intel.com, kirill.shutemov@linux.intel.com, keescook@chromium.org, linux-kernel@vger.kernel.org, linux-hardening@vger.kernel.org, linux-mm@kvack.org, nixiaoming@huawei.com, kepler.chenxin@huawei.com, wangbing6@huawei.com, wangfangpeng1@huawei.com, douzhaolei@huawei.com Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Mon, Mar 4, 2024 at 3:02=E2=80=AFAM Jiangfeng Xiao wrote: > When the last instruction of a noreturn function is a call > to another function, the return address falls outside > of the function boundary. This seems to cause kernel > to interrupt the backtrace. [...] > Delete __noreturn from usercopy_abort, This sounds like the actual bug is in the backtracing logic? I don't think removing __noreturn annotations from an individual function is a good fix, since the same thing can happen with other __noreturn functions depending on what choices the compiler makes.