From patchwork Wed Oct 30 14:46:30 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mathieu Desnoyers X-Patchwork-Id: 13856642 Received: from smtpout.efficios.com (smtpout.efficios.com [167.114.26.122]) (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 1EA691F12FB; Wed, 30 Oct 2024 14:48:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=167.114.26.122 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730299699; cv=none; b=i2+LSsV9+Ju+cJOwDGGrefXUYBhRJtLrAC9v6jWLnVuB/a2UYDcTtt0iRSlIub99QCTt0oHun1rP+sRW8W/jcsiZituvHg6+SvjvjDaiYmTxSWpRxPh/ZFvVHeLnFlOnKcJ348HojA4ZOCh4TiC4M2LjexfvDCeRbHH3NnJsjek= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730299699; c=relaxed/simple; bh=huslmwSU328gHP09/A8miwhklqfMgAXZb3iiHy3RBJg=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=ROHa6owB7XxnLo6cpiwlvqZpEnFGpGmtCcU7Si816fE1R6VEhccLLcwPR1F+iVeHuqpftDtBPYl5DC+GyxZXzq56RmU3U7aGyB0fqxgBOnZeHhPsvrZ+Cuvp1Zx9HDvWLi5aSDZ/fAVsHghaX0QHYbM/Pe7My0KroIjh2+ac5yM= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=efficios.com; spf=pass smtp.mailfrom=efficios.com; dkim=pass (2048-bit key) header.d=efficios.com header.i=@efficios.com header.b=BQPz7qxc; arc=none smtp.client-ip=167.114.26.122 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=efficios.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=efficios.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=efficios.com header.i=@efficios.com header.b="BQPz7qxc" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=efficios.com; s=smtpout1; t=1730299695; bh=huslmwSU328gHP09/A8miwhklqfMgAXZb3iiHy3RBJg=; h=From:To:Cc:Subject:Date:From; b=BQPz7qxcq596k0p9YzjVkwdsGSmNohAw5zOwuCylTObeIm+CwYobYIkw1qWcde9/f zd1Y5iSQHqapbeJYTP3O7HC7mhKPDqFlNaVLvMS0Q9o3CLeJ8VvGZfc/D3bHsjEtyn 6WJDIEythzBoL7mGCvCjfxEUxA7JL5+DDzaz/OuhznvqfYuatkW3p9/hoR+fsnNZOg Gs/LCAzsME30ptvz+eR8xSuPzdg5S/giZHBfI8mioeIViALVM+jfmkj/Kj/3rRZgTt 2iSi7jYNXIlwm0PLZXcOoROHshKdE1j9IZF+R1GWJ8SDiLOGuStzNEaybuY5oEYe8b g/hsmk65uy3GA== Received: from thinkos.internal.efficios.com (96-127-217-162.qc.cable.ebox.net [96.127.217.162]) by smtpout.efficios.com (Postfix) with ESMTPSA id 4Xdqk72m21zKd4; Wed, 30 Oct 2024 10:48:15 -0400 (EDT) From: Mathieu Desnoyers To: Steven Rostedt Cc: linux-kernel@vger.kernel.org, Mathieu Desnoyers , Thomas Gleixner , Michael Jeanson , Masami Hiramatsu , Peter Zijlstra , Alexei Starovoitov , Yonghong Song , "Paul E . McKenney" , Ingo Molnar , Arnaldo Carvalho de Melo , Mark Rutland , Alexander Shishkin , Namhyung Kim , Andrii Nakryiko , bpf@vger.kernel.org, Joel Fernandes , Jordan Rife Subject: [PATCH v5 0/4] Faultable syscall tracepoints updates Date: Wed, 30 Oct 2024 10:46:30 -0400 Message-Id: <20241030144634.721630-1-mathieu.desnoyers@efficios.com> X-Mailer: git-send-email 2.39.5 Precedence: bulk X-Mailing-List: bpf@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 This series addresses use-after-free of faultable syscall tracepoints reported by test bots using Syzkaller. This applies on linux-next 20241022. Thanks, Mathieu Cc: Thomas Gleixner Cc: Michael Jeanson Cc: Masami Hiramatsu Cc: Peter Zijlstra Cc: Alexei Starovoitov Cc: Yonghong Song Cc: Paul E. McKenney Cc: Ingo Molnar Cc: Arnaldo Carvalho de Melo Cc: Mark Rutland Cc: Alexander Shishkin Cc: Namhyung Kim Cc: Andrii Nakryiko Cc: bpf@vger.kernel.org Cc: Joel Fernandes Cc: Jordan Rife Mathieu Desnoyers (4): tracing: Introduce tracepoint extended structure tracing: Introduce tracepoint_is_faultable() tracing: Fix syscall tracepoint use-after-free tracing: Add might_fault() check in __DECLARE_TRACE_SYSCALL include/linux/tracepoint-defs.h | 10 ++++++-- include/linux/tracepoint.h | 44 ++++++++++++++++++++++++++++----- include/trace/define_trace.h | 2 +- kernel/tracepoint.c | 20 ++++++++------- 4 files changed, 58 insertions(+), 18 deletions(-)