Received: by 2002:a25:c205:0:0:0:0:0 with SMTP id s5csp4127995ybf; Tue, 3 Mar 2020 20:53:24 -0800 (PST) X-Google-Smtp-Source: ADFU+vvIZxjko+m4+ogmhXmtW8e5glGi2XISSgM/9QWQ+nd24LquA3vpg49u+BRvafGTdnTnIO7B X-Received: by 2002:a9d:4787:: with SMTP id b7mr1004892otf.323.1583297604143; Tue, 03 Mar 2020 20:53:24 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1583297604; cv=none; d=google.com; s=arc-20160816; b=LKg8fl47wRoNOBzC6Hseht/GQ7h1/K2OcLc3BmfSYWVASl+eHgawfJQ2L6KtE+HAXC KkPRyTFvgKkBmWZpoDmr15YJm9AaLr6U/V5QpKpf58uhVTE2RKdQzjSC/5stJIGv1fIq ATEqClD5fzUxKHQZeXr/IYFOFDQyIjb6Y5l3KX++tQaSgrDF1kqnqxm1SxYuuaqsSfis AG0KQh93/z6lvwQ4DjoIJr7BVcOHb4JeRDPPuZ9i9DMX/iLBmWlINAUwZto09m7zDY0q ISQfrF1sniMxoI3JTPMYal27rSFpSVC+NoxFUKMgsgUZHhNRs86GibRcjpIFcFGpHJ/M 2TyQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=elQiMiSIlwsVZFc7wIV+2p0BrWOjGT79bn2K8KP98PA=; b=L7HrmiTtkP43eEVb8U7z0hKDpYh4KqRghnPrB/8JAghGKPh716KNnj9jYE0IpiwitY U7iQQJe2Mo3wtRResOYhwTSavXC3tLSnlg2/St/Kir4L160Se0a1ra5oZdBByl+w3oR1 1BKeLuU6YLPq4nGR0Fjb2fBU4pFXLAJ4nePGqi7s9cY/gPMZ59rwABUpwUhbmnpFxavy 2fZCi2CZtEVBq8lo+aZqNXb5IwFdB/Km+sAoVWenjLqHeEc0zsMLYuKX7/Nm4EHx02gE Nh/M9/GCYkqAIHMYusUTHWOZn02pDTM1ibQZ/HY+0d+JlZRibbiRGprhZCCIP59Y3ylD tC4Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=ip5FzACi; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j2si394760otr.255.2020.03.03.20.53.12; Tue, 03 Mar 2020 20:53:24 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=ip5FzACi; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727176AbgCDExI (ORCPT + 99 others); Tue, 3 Mar 2020 23:53:08 -0500 Received: from mail-qv1-f65.google.com ([209.85.219.65]:39561 "EHLO mail-qv1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726094AbgCDExI (ORCPT ); Tue, 3 Mar 2020 23:53:08 -0500 Received: by mail-qv1-f65.google.com with SMTP id fc12so244704qvb.6; Tue, 03 Mar 2020 20:53:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=elQiMiSIlwsVZFc7wIV+2p0BrWOjGT79bn2K8KP98PA=; b=ip5FzACiuBD4caplknRMheN+SbqwHFezKX9FMqRtXbikvzvokFZQWThWXYpWCyE42/ pbJcpQ1somye53DkfATARc8fx0KXqzOeQe4uzs1NK/OhS+2GwowWntFIO8AKOh3xXdq0 EInrY8VtLbqpZEbSCTTGQ7cavuzqkW4InMg2j++KoP6CyLPRdyxgg4O0i1Z/qTvzJJ/l 9kijTr3FAwdxfQnOlSQW2XEkI0NRrENuSh+PtspNILlyx4VkRWEWYKMezpH8MCLljmsi bIWqrcdoY18hZqkt3eodRElzimKr8+muafGlAvClBH3WK1SwqPt1/Y6CVVMr9fbi4dXU jojg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=elQiMiSIlwsVZFc7wIV+2p0BrWOjGT79bn2K8KP98PA=; b=uX7aSePFWln3CbX6hWtMJaBQ7ZccZ1RN58H5EqXQj9ntNlagtPCi2DwwccQM+WZuHp 8mvXXZzeW0kWPRFuV6Lkj6eV43bdrAFKHg7c9eL/zqke743pSOX+7syZ33i8mEFTqtgv SR2wm2CPlRXRejW3yyVvzhVu9yLGskF2D1Qahyxaa7GiGY2AtHgEDljJBCXrPGgY/ouI vEcCW8/4xaZ10SxGLGPxFvvYDti5etViid+fdCNQV/lro3wf3DFIyKTBvr8NN2l2GQ5K CAKWWoVWMF8GX86XMjka2WMV/QBf2xmDug24L7cN4IMEaEVc04INjTYsfdV5QuOerleD bBTA== X-Gm-Message-State: ANhLgQ2Yg9ELnNIrq3uluLAFstY+rZXlb0gO5Es9L5P2Xm21j7AifHse OM6xgUPU/ubJRr9UQQ49n+d4Q2xQFFVQamiAdwE= X-Received: by 2002:ad4:480f:: with SMTP id g15mr684381qvy.247.1583297585797; Tue, 03 Mar 2020 20:53:05 -0800 (PST) MIME-Version: 1.0 References: <20200304015528.29661-1-kpsingh@chromium.org> <20200304015528.29661-3-kpsingh@chromium.org> In-Reply-To: <20200304015528.29661-3-kpsingh@chromium.org> From: Andrii Nakryiko Date: Tue, 3 Mar 2020 20:52:53 -0800 Message-ID: Subject: Re: [PATCH bpf-next v2 2/7] bpf: JIT helpers for fmod_ret progs To: KP Singh Cc: linux-security-module@vger.kernel.org, open list , bpf , Alexei Starovoitov , Daniel Borkmann , Paul Turner , Jann Horn , Florent Revest , Brendan Jackman Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Mar 3, 2020 at 5:56 PM KP Singh wrote: > > From: KP Singh > > * Split the invoke_bpf program to prepare for special handling of > fmod_ret programs introduced in a subsequent patch. > * Move the definition of emit_cond_near_jump and emit_nops as they are > needed for fmod_ret. > * Refactor branch target alignment into its own function > align16_branch_target. > > Signed-off-by: KP Singh > --- I trust invoke_bpf_prog logic didn't change, code was just moved around, right? Acked-by: Andrii Nakryiko > arch/x86/net/bpf_jit_comp.c | 148 +++++++++++++++++++++--------------- > 1 file changed, 85 insertions(+), 63 deletions(-) > [...]