From patchwork Mon Oct 28 19:09:23 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mathieu Desnoyers X-Patchwork-Id: 13853919 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 3AF211DFE12; Mon, 28 Oct 2024 19:11:12 +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=1730142675; cv=none; b=mI6pscrIcIoUPRtO/u2l4+6cH5MskVWoaCSSEbkpu6SaCPu5hT8Fp4Ai3FeEMtyDAlYwEoW5NsMXwD41WHp1DJd4jm1vDDXyub6bp64jSJxB4/jYub6XihmIYNrLhfJHepbFWevb6buJhTgLy0CLFIPHxbziYRkjgDRwU2QyUL4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730142675; c=relaxed/simple; bh=azit2JlFxdQSSE1/em8t51Zw3redoFo4Pp+bPR9ZzJw=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=Ksag6BL/sDmdwfzmBK/Vg8NTVJTc82K4zDlqeOO/8SfbSWV9JRvFv0qa6vVX506X3YXLv7PZY8oz3wk6Q1VfK3xNfwFEJnrI7K/XJ/Xh/fpqZu2svYvNCCh40NaA5uwd72Dbf9hbEEDvHwHzPvhAeiugkeJJTE9Nx8aR3NItHHM= 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=Qp8BivVh; 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="Qp8BivVh" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=efficios.com; s=smtpout1; t=1730142672; bh=azit2JlFxdQSSE1/em8t51Zw3redoFo4Pp+bPR9ZzJw=; h=From:To:Cc:Subject:Date:From; b=Qp8BivVhMhcPBpQ57MxG2m7CaD0/x7fR06QM1j7jStScE6P0t9jNZuukiGkuVEaZh g2qRJUb2IhISjOZAVN3RaNFXIEbrijktGHez0aZzdRBLVaqdbVQ01wHJccSqn2rcnL ykZ/yP29+KSf70FqH95PcW6iczTNwRGsm88J1WWKDRCf9h7zjl3Gfd2kRhMtsZJJTb LZAmqDKCBEbQOrGmfkLFr5+N73k32BjetYQgoMPQV3mcjp/c8WuqcamKuzTPMW9pDL b11qCfD1XZYiUBrTBGCTe97FsSqivACDtnj4/X9D79rN+hQFfyjJS9FCzp5PGZQwDe w2bwaw+ii1d+A== 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 4XcjfR0wxGzs18; Mon, 28 Oct 2024 15:11:11 -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: [RFC PATCH v4 0/4] Faultable syscall tracepoints updates Date: Mon, 28 Oct 2024 15:09:23 -0400 Message-Id: <20241028190927.648953-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 X-Patchwork-State: RFC 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 __DO_TRACE() for syscall include/linux/tracepoint-defs.h | 10 +++++-- include/linux/tracepoint.h | 49 +++++++++++++++++++++++++++------ include/trace/define_trace.h | 2 +- kernel/tracepoint.c | 20 ++++++++------ 4 files changed, 61 insertions(+), 20 deletions(-)