Received: by 2002:ab2:6857:0:b0:1ef:ffd0:ce49 with SMTP id l23csp1879420lqp; Sat, 23 Mar 2024 12:52:20 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUpH4be42W8O8s7oD5uVlwct18/KcjNRDZPO5QIxEz9NEOti3gWHkS1P2XYfQo82qEEvswfn9Dk6JKyFMEe+i0/vMHFpNdjXU5BYcGsLQ== X-Google-Smtp-Source: AGHT+IEDax6mvtk40EON1O1FkbV10+yEVmDA9aa3RuTFFCBwcN5Yn6gaa2HzReDBlsPEvEjbyeyE X-Received: by 2002:a17:902:d487:b0:1dc:b6ef:e237 with SMTP id c7-20020a170902d48700b001dcb6efe237mr3254673plg.31.1711223540400; Sat, 23 Mar 2024 12:52:20 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711223540; cv=pass; d=google.com; s=arc-20160816; b=cAjk9F66QFSnjoZVQk6s48Zx7Q7Q+Pb5CVna9vnmo5l9HbIyZZpucufbfc6a2yPM41 mKjQdDchjxJlz7Mhyhar52TvR8MNh+O0QrUjrYYenmjbYsj3ydOmbincTVx84jukwWF8 e8LnFVbn1/pOVoknUtc+ulkPb+odK4MS6Bf2WQnP2iwVGmniMU85ko6GIRFw6kqE8AQw K8n+DoPwdIfpvoG96ctQtY7TvXet9S1SPG2WlNI1tXd1AbD5ruRXjDQVZyc9P0DsC9Da L4b75AaitUm/sqIKR1TRHa/3d3MGBEHIaz+gYOIXwbZivdxs9EDTcdYO+Rpx+U5vREoN KcAA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=date:mime-version:list-unsubscribe:list-subscribe:list-id :precedence:content-transfer-encoding:message-id:subject:cc:to :dkim-signature:dkim-signature:from; bh=5mmZYSyibTQ86Vjh8SC+yDAWuhU0roQ3z0+SGbZ1rQU=; fh=6LkEhNBL2mo5Mo+t6yemqdayPsF8SyUW68IBAGIUZAo=; b=rgCLNWxRpCHG4CXDs+47xgq6U4+ZpQsTR+zZFD5unJQ5NOdGQSGpeyUDmhCH5Zcpw7 4Kf4GHmgKSTM14tfcFyWb98kcvdKvHWNijmglLppP002owDAXiN/eAHN3OjYxIAFgqXe uIEms2M5qZyxUOBJWCkav/15i7QaIjH1hi3hHx9d+trW6aM5FphUtjenVDZVTemmbSSy dvHaH1mWfL/yZz68Katzlnf09gl0MikIuWmW62FHHM3cDUwMG5/9ihoiLRujnMeBAN6y C0HYECxyBcZ1C0zfO3kBtpI84jMJ77S4LJ0S2R2UE5W2bXJRTs+wALLo1Y7eYqgwm0Lj UJww==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=N6BNGBcM; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e; arc=pass (i=1 spf=pass spfdomain=linutronix.de dkim=pass dkdomain=linutronix.de dmarc=pass fromdomain=linutronix.de); spf=pass (google.com: domain of linux-kernel+bounces-112466-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-112466-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id q8-20020a170902f78800b001e0077efa94si2213789pln.243.2024.03.23.12.52.19 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 23 Mar 2024 12:52:20 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-112466-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=N6BNGBcM; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e; arc=pass (i=1 spf=pass spfdomain=linutronix.de dkim=pass dkdomain=linutronix.de dmarc=pass fromdomain=linutronix.de); spf=pass (google.com: domain of linux-kernel+bounces-112466-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-112466-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de 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 sy.mirrors.kernel.org (Postfix) with ESMTPS id 9E230B21523 for ; Sat, 23 Mar 2024 19:52:13 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 91F9E59168; Sat, 23 Mar 2024 19:52:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="N6BNGBcM"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="SydqB8Ta" Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 340994C3C3 for ; Sat, 23 Mar 2024 19:52:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=193.142.43.55 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711223524; cv=none; b=mCdxHYNSpzX72Q/ZGmY2/TFMSfsc5629RLyjVbkuPt00YoShodCXMQm+fVuwtpEDOJ9Xd3p6vxKkxyqgJ51GYr2bY4EfVPushMI9l5ZfawqvTKGQjPFmHMdUhg59Lkfn3Sf6Q98wbjGlOwsVBMtH8Y3A9IWUVChIM/QX/KZFTTI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711223524; c=relaxed/simple; bh=3Nxa5aBjaYeomuUjnSGnVU2uphSo7pNI38vouVxBOsM=; h=From:To:Cc:Subject:Message-ID:Content-Type:MIME-Version:Date; b=h3BqTWmk045Jb2xgr5RY3yH60RGGKkJHIsPHlRJkBuBWUO/WERAFSdmRyOUzkU8WWpXvFucLg5v3n/y1ojB/t4glNysLAuEyIoCi4Ek+6CsuyZoBWclrMbh70r8Mz52UL13MQJn7L6AIOWiB8QTdM0WoF1StbeY/ago9XYkLMbU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de; spf=pass smtp.mailfrom=linutronix.de; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=N6BNGBcM; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=SydqB8Ta; arc=none smtp.client-ip=193.142.43.55 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linutronix.de From: Thomas Gleixner DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1711223520; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5mmZYSyibTQ86Vjh8SC+yDAWuhU0roQ3z0+SGbZ1rQU=; b=N6BNGBcMeB2mAyyA5zX2k1F6JKdJujLs6lCDcqDOn8LPQoig6m1vbrS3drWgMVkgS4aiGL 1kxm7Em5Z3HMt8McbRkn/CNaccl37KPgd9NrDxkd0CrY8yvwpF0LkrIj/YoKA3hBmiJPQm 3QvgAK6F++ERkQnSXehxA9Zny3xmGkgJt/gm3x4VZ8lyQbgMROMSMNV+hdmOn8sThwjTpo ARe3A++Qb9d2k6BDutCMNV6v7ettusxSj1CXrzeH8ev+Mk8tL5KqRtyzesa5l7hyGIVzqR ctdEbv2CteTGPYDzUxaGi56KOOH+wLQqvlBFntGdOP1sNwkLsVzemL1aGsoTHA== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1711223520; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5mmZYSyibTQ86Vjh8SC+yDAWuhU0roQ3z0+SGbZ1rQU=; b=SydqB8TaNWuikyhD3E2WiZYumIMtzgvH5+bmP90hHkfrGiZ+289PlJUXRgfOEo2n8YCvcV GWIeMFyci58ZK9BA== To: Linus Torvalds Cc: linux-kernel@vger.kernel.org, x86@kernel.org Subject: [GIT pull] core/entry for v6.9-rc1 Message-ID: <171122346785.2772088.10596056144848184713.tglx@xen13> Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Date: Sat, 23 Mar 2024 20:51:59 +0100 (CET) Linus, please pull the latest core/entry branch from: git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git core-entry-2024-= 03-23 up to: fb13b11d5387: entry: Respect changes to system call number by trace_s= ys_enter() A single fix for the generic entry code: THe trace_sys_enter() tracepoint can modify the syscall number via kprobes or BPF in pt_regs, but that requires that the syscall number is re-evaluted from pt_regs after the tracepoint. A seccomp fix in that area removed the re-evaluation so the change does not take effect as the code just uses the locally cached number. Restore the original behaviour by re-evaluating the syscall number after the tracepoint. Thanks, tglx ------------------> Andr=C3=A9 R=C3=B6sti (1): entry: Respect changes to system call number by trace_sys_enter() kernel/entry/common.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/kernel/entry/common.c b/kernel/entry/common.c index 88cb3c88aaa5..90843cc38588 100644 --- a/kernel/entry/common.c +++ b/kernel/entry/common.c @@ -57,8 +57,14 @@ long syscall_trace_enter(struct pt_regs *regs, long syscal= l, /* Either of the above might have changed the syscall number */ syscall =3D syscall_get_nr(current, regs); =20 - if (unlikely(work & SYSCALL_WORK_SYSCALL_TRACEPOINT)) + if (unlikely(work & SYSCALL_WORK_SYSCALL_TRACEPOINT)) { trace_sys_enter(regs, syscall); + /* + * Probes or BPF hooks in the tracepoint may have changed the + * system call number as well. + */ + syscall =3D syscall_get_nr(current, regs); + } =20 syscall_enter_audit(regs, syscall); =20