Received: by 2002:a25:c205:0:0:0:0:0 with SMTP id s5csp4618113ybf; Wed, 4 Mar 2020 07:25:29 -0800 (PST) X-Google-Smtp-Source: ADFU+vuHhZC8SKmRL2jYC4rKieM6hrCE6QlkxCeQPVHmuEz4VDhompueABdcCnvhM+gmkpTVxiEL X-Received: by 2002:aca:e106:: with SMTP id y6mr2122128oig.131.1583335528748; Wed, 04 Mar 2020 07:25:28 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1583335528; cv=none; d=google.com; s=arc-20160816; b=F0a2zhzEHI2lEUyYdPscs/6W4WNNOMJc4cYgXtqduF/ymBL/qAuAPVfzaQ5EJx9OLv pg4VyttiD044XS84Mp2nNwDfFF8SL1i/oV8XEKdyIYdm5i2qD700a5LXkE74u5oCXr5C +2hrlZQ6bFM/DEmVNlHYjU5yoOwlRjU9txlW2T0OKPnJ59rOi6F+sueiPR3xt1ZVrnne zxY/oVPOL9OGOamZfA9GW+zMdbO5pkJKNtySCx0qhX5RG58ZgDaxmihOd6h1FqPIjECd Rh42RbH2xsHOkLi5UTdPdeYHKzfqTNTkUkOtre6IEZEAab10ZyQj3EAFoR4FdjgtX9bk cmtw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:date:from:dkim-signature; bh=ZmLS9qnO1Q66v/wtUwX9VxbxLnQwytCVRya2k8J6vNI=; b=khliCDMHfAAYJ5aIb6peKrbgD8Z9Gjqk848dfo5/nKudjxotbH8CenoXNo6Iukyapd YKNdS+moRClPessuoWsraobXdGmZdY2lVVOk+/rvqzy5HJZqbELv4RBnXlmbgCs9eqHd pkpF9u3KY8gM7A/xQr9lSOPLG6g005tiUUyviIeJDTvbQ27K4YBkjfBKfMqHfRw5hh9p /4Tg3ad+6gl3bGt4+bOqGe2oo+nMBVbuKdKYm4PtHD58P4//OG+eIZbP7nvmmt2hUX4b uk/31SCZ9p+0oKBk7YuApxtJ6t+v0SJS+Nkxfc1UcdtQbm8qv40zEm7gMr1sFyTmRerE 6lDQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=FQPR4T3f; 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=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y25si1314758oih.73.2020.03.04.07.25.16; Wed, 04 Mar 2020 07:25:28 -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=@chromium.org header.s=google header.b=FQPR4T3f; 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=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729447AbgCDPY4 (ORCPT + 99 others); Wed, 4 Mar 2020 10:24:56 -0500 Received: from mail-wm1-f68.google.com ([209.85.128.68]:37252 "EHLO mail-wm1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728432AbgCDPY4 (ORCPT ); Wed, 4 Mar 2020 10:24:56 -0500 Received: by mail-wm1-f68.google.com with SMTP id a141so2287123wme.2 for ; Wed, 04 Mar 2020 07:24:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:date:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=ZmLS9qnO1Q66v/wtUwX9VxbxLnQwytCVRya2k8J6vNI=; b=FQPR4T3fjY4rOCvwbAQ0z8QbhMr1ZjWh/xFw9Lzc6W6+ZG7u3WI8Ah6jcGVr/7iX06 PwPe9WEyKHVL3xuyryUBVKXmU47z4QmcSlCbFjOVUp4BD1ILDAbH8mc0KFDN/IyJyIUA UCIVqbT+3CO8S6wCXr7gfGksuTKj7jCzv4fV8= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:date:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=ZmLS9qnO1Q66v/wtUwX9VxbxLnQwytCVRya2k8J6vNI=; b=PA3w/+Y2KSDOLtv5rY1J4J7MChX4ZgbAmnkNyb4hYpfpt9+3XRHdxPwqHZdKto2Qpy UZtlfZ089OMF/k94uaMKDZQ7Xh2CtYwUSJsLKsamryX6jIsYHtmsGf9Ui5fmg8Qmw/LI H7mw+WF+sV23Hzyry7B+8SuXx+urHr6IYhN5+oFFbOiFm6mhGaI8y+A72oEogDtyB4TF n52/ehVTj1+bI4CG1Cg0+YFflb2ACpnLwQE/BZ7nVH+oCtorSUUvaBc4aEcjjyTpN0L2 qc5zoJYscCJy4ctLS07j9wyWGjrCKxEwuLd5J821yPB1NxeFN2e7+GxZjp6QIkmF0QB7 JsOQ== X-Gm-Message-State: ANhLgQ1fYoZH/q1YVtS1Lg0TiCNFI2KQz6OstsqsjNnfdCaj+gnvr+GY olROom1nK4wal0WnW4ToTg2HPg== X-Received: by 2002:a7b:c857:: with SMTP id c23mr4209940wml.68.1583335492265; Wed, 04 Mar 2020 07:24:52 -0800 (PST) Received: from google.com ([2a00:79e0:42:204:8a21:ba0c:bb42:75ec]) by smtp.gmail.com with ESMTPSA id z10sm4687059wmk.31.2020.03.04.07.24.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 04 Mar 2020 07:24:51 -0800 (PST) From: KP Singh X-Google-Original-From: KP Singh Date: Wed, 4 Mar 2020 16:24:50 +0100 To: Andrii Nakryiko Cc: KP Singh , linux-security-module@vger.kernel.org, open list , bpf , Alexei Starovoitov , Daniel Borkmann , Paul Turner , Jann Horn , Florent Revest , Brendan Jackman Subject: Re: [PATCH bpf-next v2 2/7] bpf: JIT helpers for fmod_ret progs Message-ID: <20200304152450.GA53576@google.com> References: <20200304015528.29661-1-kpsingh@chromium.org> <20200304015528.29661-3-kpsingh@chromium.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.12.2 (2019-09-21) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 03-Mar 20:52, Andrii Nakryiko wrote: > 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. I updated this as well, as we changed it to emit_align. - KP > > > > 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(-) > > > > [...]