From mboxrd@z Thu Jan 1 00:00:00 1970 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 C720E1A6813 for ; Sat, 27 Jun 2026 11:04:08 +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=1782558250; cv=none; b=sXC1X1aVxh7s2fcnJLNd/ErS19qBo7EUwrT8zWKPNvmypYRjwvmSuHY9/Lbmx9ejCyQU6ANsAho84XYDOWw3xbbU8mvRIqdy8OSKLVD8hTHlob1mB+/t7eXG8s7ZyHpNZZqX15Joe0IGipudpV7GkoCHXn+2zmtV/kQWBef3lZ0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1782558250; c=relaxed/simple; bh=HgFZHbENUrtJ/AKy7/fOfRnVUBVnQ4muPZH1Io8WqYU=; h=From:To:Cc:Subject:In-Reply-To:References:Date:Message-ID: MIME-Version:Content-Type; b=rAyztcw+6fG3bO6Ue/jnP/x+SrEDva/FkJKCVZ7qNAm1yEAh2QR+d4mLvySJnKlgMTp6gVr+gpZZAGSwztMg4XL3I3QugltnlQjVATY7FLLJxBS0paXnK73Rf6PANubzZBTw3LOnihaHZiSSbQoVQKwlKSyxlImsGt0lyN6tBkQ= 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=J+GZhcmB; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=YW52gccw; 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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="J+GZhcmB"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="YW52gccw" From: Nam Cao DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1782558246; 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: in-reply-to:in-reply-to:references:references; bh=HgFZHbENUrtJ/AKy7/fOfRnVUBVnQ4muPZH1Io8WqYU=; b=J+GZhcmBMmmSWIog9hI/3WU6KBo4Br0VB7FOzZarubbtYcU1jtcDP9AW/UTGztswjQVwKN Hg6oiQRkpn4LcAqyREHkGRStbbttjYjrVFhPdwpctf0PyY7d5/p939IjulDbYosr2UXPhJ lrFmyDAXxdLegjONt6GGKskY8c1NDqVzE/gv+amROqqbuHcMjv2v1qJFnMOIDQPB4YBmG8 GaaAd5RGMrQpzykw0Q4xz357nonhlxMJ2GImN5bGRccnnIHKiOT95XuTCOACVzUJz9lC2p cKH7p9NjQfeWIsGj4tH6+D0b3+VyOSOEu0EOnbO8bEg8p9gF3M2W6YbEXosVBA== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1782558246; 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: in-reply-to:in-reply-to:references:references; bh=HgFZHbENUrtJ/AKy7/fOfRnVUBVnQ4muPZH1Io8WqYU=; b=YW52gccwjqNBH1nwgpTaQbLaL+9mGNjsJTsoOSSokN0Vdp+ETWr7VNkr/ZN3EEoREXXKA2 aHvrH6KpNtz678Bw== To: Xiaofeng Yuan , pjw@kernel.org Cc: palmer@dabbelt.com, aou@eecs.berkeley.edu, linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org, Xiaofeng Yuan Subject: Re: [PATCH v4] riscv: probes: simulate c.jal instruction In-Reply-To: <20260627001939.3847-1-xiaofengmian@163.com> References: <20260627001939.3847-1-xiaofengmian@163.com> Date: Sat, 27 Jun 2026 13:04:05 +0200 Message-ID: <875x345joa.fsf@yellow.woof> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain Xiaofeng Yuan writes: > The c.jal instruction is currently marked REJECTED in kprobes > instruction decoding, but it should be SIMULATED like other > compressed jump instructions. > > Add simulate_c_jal() which saves the return address to RA and > sets the program counter to the target offset, reusing > simulate_c_j for the common jump logic. > > Signed-off-by: Xiaofeng Yuan Reviewed-by: Nam Cao Tested-by: Nam Cao