From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from out-171.mta1.migadu.com (out-171.mta1.migadu.com [95.215.58.171]) (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 1D273111A8 for ; Wed, 13 Nov 2024 14:06:27 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=95.215.58.171 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1731506790; cv=none; b=ajaRD5B1MM9FnCWi1+SxQ4KVXBqPndf9EcIXGfipRKpZl5lpsfL/HvCjDUidRKn/CfmtJDjkUHAVDRrBxWNUWHivvx9R5ZkVDt5rKOJ1Cw6EURsHL4EXUKLrFvrqy7RxDbJH5gXX0h/oH4r+QcyAP1NwraIqwwW/rt9TfY85lbY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1731506790; c=relaxed/simple; bh=rRhzu2DQbLlS03rN6PfOz4wLAMj6TChH6CZjgR8zf+Y=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=pbVsP8ylVbTKlt43f0XNFmZeC9xESorPHR597DpFcpUdoLd1IfnaJUcH3Mfvhjc2wJysqBlpG1cIgMdagfv3ikcP9fgkioCLeN08Ldx2YGOpOSZPeWx+oMoHwyz7eZf4O4r4CC4NAWl+DVIL5m5GZqbDj8IeC9ze9M0PRouxxjs= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev; spf=pass smtp.mailfrom=linux.dev; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b=SEBQkpTA; arc=none smtp.client-ip=95.215.58.171 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.dev Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="SEBQkpTA" Message-ID: <3084f512-7476-4de7-9c28-92546d0358c7@linux.dev> DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1731506786; 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: in-reply-to:in-reply-to:references:references; bh=b1LpJSEXTIsVtvFtU7z5WsJvp58+MoemqzStkxUQMbQ=; b=SEBQkpTAMyNiBlmpqvIV935RROsFBT19EGk+IojLYpvzHL0BIvGIv+vvWtPSsL6ueUWMqU lNygzxtR7O26eKosip7dBKlaBKnOzLq2bGd1LDCDo3petjqeNVlTOkncKmCQ/duoAuF0GS YFD9LM4zYRlxG51SMvBEynQqIvLODrc= Date: Wed, 13 Nov 2024 14:06:18 +0000 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Subject: Re: [PATCH v2] ARC: bpf: Correct conditional check in 'check_jmp_32' To: Hardevsinh Palaniya , ast@kernel.org, list+bpf@vahedi.org Cc: tarang.raval@siliconsignals.io, Daniel Borkmann , Andrii Nakryiko , Martin KaFai Lau , Eduard Zingerman , Song Liu , Yonghong Song , John Fastabend , KP Singh , Stanislav Fomichev , Hao Luo , Jiri Olsa , Vineet Gupta , bpf@vger.kernel.org, linux-snps-arc@lists.infradead.org, linux-kernel@vger.kernel.org References: <20241113134142.14970-1-hardevsinh.palaniya@siliconsignals.io> Content-Language: en-US X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Vadim Fedorenko In-Reply-To: <20241113134142.14970-1-hardevsinh.palaniya@siliconsignals.io> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Migadu-Flow: FLOW_OUT On 13/11/2024 13:41, Hardevsinh Palaniya wrote: > The original code checks 'if (ARC_CC_AL)', which is always true since > ARC_CC_AL is a constant. This makes the check redundant and likely > obscures the intention of verifying whether the jump is conditional. > > Updates the code to check cond == ARC_CC_AL instead, reflecting the intent > to differentiate conditional from unconditional jumps. > > Suggested-by: Vadim Fedorenko > Signed-off-by: Hardevsinh Palaniya > --- > > Changelog in V2: > > - Changed subject line > - Updated condition check to 'if (cond == ARC_CC_AL)' instead of removing it > > Link for v1: https://lore.kernel.org/bpf/e6d27adb-151c-46c1-9668-1cd2b492321b@linux.dev/T/#t > --- Reviewed-by: Vadim Fedorenko