From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from casper.infradead.org (casper.infradead.org [90.155.50.34]) (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 8788A72612 for ; Thu, 4 Dec 2025 14:50:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=90.155.50.34 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764859831; cv=none; b=lu7XbHHzjwiwxWfqBte5/2qi0IDQtGrW1ZnyryILIwFdsU1n01unMlSmNpFDWu3340cHz+gG06MQaReG7G0kscbrdlxnRzmD1pRjjjZEpo7MWdTNbkyaljhzLghQI24yO5udLtnxPPk7unXX1ZprN2hVNC4g96L45zfNjkp9G60= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764859831; c=relaxed/simple; bh=vhuoG6qmVJ+42GOdauRanR/JYWYid4zs9hHQVIKr5eA=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=fgcVE7YZL9ZPGjUmHZHagyLtJQk/lysXJMmfCS5js9ZEGL3/tTH77clMuXXxHFqwg7vWoML45OYYkIQWL3TWY5wnQ0PxsaG6FoKQRdjka9jcywtolFEQOQnQH6PhAP8PFzGwM6XgM7fepWhpOfyld08qma8Br6dPRtHUiqfOMDM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=infradead.org; spf=none smtp.mailfrom=infradead.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b=rMPqM9TT; arc=none smtp.client-ip=90.155.50.34 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=infradead.org Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=infradead.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="rMPqM9TT" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=lp8Y/nwya8xBBImYI6Qt+5kuqUknHtzM7eC24FLJNcc=; b=rMPqM9TTLZp0V7LnwypQ5x85TI jRlANLpQ6UxI5ofOtq01Wa+e1gIbUXIQ5iHkmWq2te7nU1md7o8mjBtTe1CevFMSNtuu/1chXtjfm nLKxAgRP4r+Sb5nXlwQzGW79fhCkiLLeSxH+e4PZH8TfMShMEt3mbHLJMoybowszyJCwj1xmoygPe 4F+mGkJQhxlJA7pSbM9hV0SV0wzgQaUUSyCN17doSn1vh26sjrqKAtfVu8LiH2Xk78LK7szBxEbxj WDh5h3Mywm//YrNED4TAFDwoefwlGR4GtZmpJccbFDD/B8/+v06LYXC8lFf6k97qycSSmqD7LYwH3 yIwKG8ZQ==; Received: from 2001-1c00-8d85-5700-266e-96ff-fe07-7dcc.cable.dynamic.v6.ziggo.nl ([2001:1c00:8d85:5700:266e:96ff:fe07:7dcc] helo=noisy.programming.kicks-ass.net) by casper.infradead.org with esmtpsa (Exim 4.98.2 #2 (Red Hat Linux)) id 1vRAes-00000004KD2-2450; Thu, 04 Dec 2025 14:50:14 +0000 Received: by noisy.programming.kicks-ass.net (Postfix, from userid 1000) id E55313004B8; Thu, 04 Dec 2025 15:50:13 +0100 (CET) Date: Thu, 4 Dec 2025 15:50:13 +0100 From: Peter Zijlstra To: ellyndra Cc: linux-kernel@vger.kernel.org, luto@kernel.org, tglx@linutronix.de, mingo@redhat.com, bp@alien8.de, dave.hansen@linux.intel.com, x86@kernel.org, paul@paul-moore.com, jmorris@namei.org, serge@hallyn.com Subject: Re: [PATCH RESEND] kprobes: Blacklist risky functions from being probed Message-ID: <20251204145013.GN2528459@noisy.programming.kicks-ass.net> References: <20251204144142.61936-1-ellyesparza8@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20251204144142.61936-1-ellyesparza8@gmail.com> On Thu, Dec 04, 2025 at 11:41:41AM -0300, ellyndra wrote: > From: Elly I Esparza > > Blacklist 'x64_sys_call()' from being kprobed to prevent syscall hooking > techniques that overwrite the content of a 'case' block inside the main > syscall dispatch switch statement. > > Also blacklist 'kallsyms_lookup_name()' to prevent a potential bypass > of the blacklist, since this function can be used to discover and target > arbitrary kernel symbols. > > Add a Kconfig option under security/ to enable or disable this feature. > > Signed-off-by: Elly I Esparza > --- I'd be okay doing this unconditionally. Pretty much everything else until that point lives in noinstr which is already excluded from probes.