Received: by 2002:ab2:6816:0:b0:1f9:5764:f03e with SMTP id t22csp780329lqo; Fri, 17 May 2024 00:57:26 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXdguFks4qJdQ8OrtlZMlQIhoCTTZX3bYOcIVquPtVla+2dt7DkZqumococ4lrqa6eFvbFWcydA0rdsjiroIxChsdaB2oRx06IBN7hUcQ== X-Google-Smtp-Source: AGHT+IGA7VFezjg+JcCm8k0PpyWB/vx73Wwi5PaFCBNNinNeRAKULvyJM2P1lYpZhPUmPK8k1Bpg X-Received: by 2002:a05:620a:690b:b0:792:bc24:edaf with SMTP id af79cd13be357-792bc24ee15mr2880305385a.0.1715932646216; Fri, 17 May 2024 00:57:26 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715932646; cv=pass; d=google.com; s=arc-20160816; b=gdRO5YhvhtUu5MS68/5+8ORLbPVe4Vh+LTRtce2tYJvTrD10qDEsNqFhwRLuuy6Ewn 1CyqxGpreiD+BNk/wy13PD4Cwac2Fa4WX/PsHgz2sE5pkqneXtOcnDfRIptbin4rM9IZ AYNFmAB69o/YIcIMPt9aik6ictUQUuw/oolDysjl2UeQpBMgsZfYQnh6JFu0tAywDXDq qhwBpE9zrugFJPfozNtCbUpwWF4D04ii6K4jeWp7gZEc4+2VmZGGwpIyibmSe/9F/xeW /8td4XO2NV5km7c0ed77enFLPZ4YiUqvw0P+To+AwZ2o1H2gL4X9dILcjuX2sXL5qUxh QIrA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=2+jG2UN45Z0JvX/V83PsUb5yMQORYV9ShWj2nAq73LA=; fh=GqQv+Wf+lcinXVluNkF8mHeoGyIkWWhsV76wytrlFbc=; b=k4TUKBbV5ss8Wd+qqXLCk3dVUEMdBeOwn6smy0XGnNGDrFb7clhl+p9aAowmnsfw56 EH43cJsHdR6TsUSzidWbxHLGg9Hsj6QNcxkEbEtklEb7eeeJSYEZ9CKGJXqHE5iwNtKJ PObazqqFLq8SDlLO/JWseqIO9KZNoyV5cjSxgCC8NUg5yYH6ihEb7ObjhWsX9aUrsoiH zXesTpb4vza7XeCC0vSFxKhGULl1Vs0704VmlNjtN1GRGC8ivO8tIBMwZSAmscW9AP2/ 0Al7YS/jiCrMIXJAo8Reiq10l8WBF09bzeQnvfrRgk501fBwJ5NyI6ncOaJNR/W7suTT aSwQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=c87Vm4Sh; arc=pass (i=1 spf=pass spfdomain=redhat.com dkim=pass dkdomain=redhat.com dmarc=pass fromdomain=redhat.com); spf=pass (google.com: domain of linux-kernel+bounces-181826-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-181826-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id af79cd13be357-792bf365edfsi1774180585a.654.2024.05.17.00.57.26 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 17 May 2024 00:57:26 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-181826-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=c87Vm4Sh; arc=pass (i=1 spf=pass spfdomain=redhat.com dkim=pass dkdomain=redhat.com dmarc=pass fromdomain=redhat.com); spf=pass (google.com: domain of linux-kernel+bounces-181826-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-181826-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id D100E1C2123D for ; Fri, 17 May 2024 07:57:25 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id D877E22324; Fri, 17 May 2024 07:57:06 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="c87Vm4Sh" Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) (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 841D917C69 for ; Fri, 17 May 2024 07:57:04 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.133.124 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715932626; cv=none; b=YerMBtrnovc3QJAdBKza0OQ3v14TeyfHSRKEhw+eKjFVIuRDW5qq6cE3euTf3G+2cMNLm1axEo+fFzo6j+kV6qeLFixIPiVBt01FzguTt80F6aWuMir4vR7CvUxn0EINgAU/RW79mdEy8JD2UjPMVhv8jqHbu3nodV1kDTItznM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715932626; c=relaxed/simple; bh=j4mDDIQXQY6Yt0ARbhylixXExzCaLztKBD5Eb//BJs8=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=KQQSvQNggGl73zbSftTiFPRFlfoWLmj/H6SRHlnrz0/MHfvGG+wY9W5ajivR4WhYTj6P1/0HVo4XDwKzjKl8b0Mv87O2un9uSWRoUVVc7hKaXyuhCqkH9EoqH8nqaEUWNq84hMcAeXljd4SiSVMTBDAFQjApQnBtrec31MeYaoE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=c87Vm4Sh; arc=none smtp.client-ip=170.10.133.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1715932623; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=2+jG2UN45Z0JvX/V83PsUb5yMQORYV9ShWj2nAq73LA=; b=c87Vm4ShnqlOAmVozSkjzhRgafpscyvHrKWYpdrDi9/Ns7lthkxXBTDTNRbsDyc9gprYRi xGpgr1g+ghs8Na+1iy69PGtYd+tgQnQn0c0AWzsA4Xs6WrsIsfazD0hQWdVAGK5WHwmlAN /xh0hD1asc8ixvCUvpj64labohTvUpU= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-264-_AF1HgkKO6uhxaIdJBA8cg-1; Fri, 17 May 2024 03:56:59 -0400 X-MC-Unique: _AF1HgkKO6uhxaIdJBA8cg-1 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 19FD6800074; Fri, 17 May 2024 07:56:59 +0000 (UTC) Received: from alecto.usersys.redhat.com (unknown [10.43.17.36]) by smtp.corp.redhat.com (Postfix) with ESMTP id 8184828E2; Fri, 17 May 2024 07:56:57 +0000 (UTC) From: Artem Savkov To: Michael Ellerman , Nicholas Piggin , Christophe Leroy , "Naveen N. Rao" , linuxppc-dev@lists.ozlabs.org Cc: Alexei Starovoitov , Daniel Borkmann , Andrii Nakryiko , bpf@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Artem Savkov Subject: [PATCH 1/5] powerpc64/bpf: jit support for 32bit offset jmp instruction Date: Fri, 17 May 2024 09:56:46 +0200 Message-ID: <20240517075650.248801-2-asavkov@redhat.com> In-Reply-To: <20240517075650.248801-1-asavkov@redhat.com> References: <20240517075650.248801-1-asavkov@redhat.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.5 Add jit support for JMP32_JA instruction. Tested using test_bpf module. Signed-off-by: Artem Savkov --- arch/powerpc/net/bpf_jit_comp64.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/arch/powerpc/net/bpf_jit_comp64.c b/arch/powerpc/net/bpf_jit_comp64.c index 8afc14a4a1258..3071205782b15 100644 --- a/arch/powerpc/net/bpf_jit_comp64.c +++ b/arch/powerpc/net/bpf_jit_comp64.c @@ -1053,6 +1053,9 @@ int bpf_jit_build_body(struct bpf_prog *fp, u32 *image, u32 *fimage, struct code case BPF_JMP | BPF_JA: PPC_JMP(addrs[i + 1 + off]); break; + case BPF_JMP32 | BPF_JA: + PPC_JMP(addrs[i + 1 + imm]); + break; case BPF_JMP | BPF_JGT | BPF_K: case BPF_JMP | BPF_JGT | BPF_X: -- 2.45.0