Received: by 2002:a25:c205:0:0:0:0:0 with SMTP id s5csp4606321ybf; Wed, 4 Mar 2020 07:12:31 -0800 (PST) X-Google-Smtp-Source: ADFU+vuHIy1GooMW/koFJtJjTX/uKrd1RnQyiXunn1S3FWxh6WTX9CnN64v5xuI+VKDKBFUJkA70 X-Received: by 2002:a9d:4782:: with SMTP id b2mr2743531otf.66.1583334751479; Wed, 04 Mar 2020 07:12:31 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1583334751; cv=none; d=google.com; s=arc-20160816; b=bkl0s5tkEba5qjzPegyuXJoae38/2Ijtursc6nEhdk3Hq2NaAbWc+WdDk+uKWxgKCW tRuKkmUZCokLi9noEPcT/dAZiSakpUqw6r43wILYJeHzkkLByLGFHtsH9SYTSQ0Seerg PwFCIK7/8F4j8OMCZ4PnpxnHGtJAPAiB/Yo/OaPfbBQt9cMNEFm/WqqBN/NZobTBJ9i5 dHnx0XvROFp/ITcoOlfOG0gdQIcD9QbL6XJW+YS4x9/HlbhqAYwRoqFrTaq+gsNFmowx 2x7rm0YQNe/YjDp31kGE8bq8MdmbuIxqRQ38nFrbPprHylpHkxMO0ltwX6sRkY78CV0r hVbw== 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-transfer-encoding:content-disposition:mime-version :references:message-id:subject:cc:to:date:from:dkim-signature; bh=VOLjflFVC/lWbN0oTsQoOMlRo2O6lU0WwAevEZ9SEdI=; b=NQeA3pAHq61Tt6MoXSNlVV+2jl422cb8dLKE2DDJ5dKt78I3NeU1xoAf25kcNGDGhR t67DMo32j8dLIMD0tFZj1g+WgMPW9dJQ3M51CeEnYkbeRSbhlvjs4UxTOFugTGRU17LL q4BNAghzxEWabUo+q7tsvHx7h56B7fVoEVZAADyngYpZfWXAl8VJpAGbhxc7TmJmAO2W DymvFWXizslU43o19QhmSGCFCLiw9epYkf1fEsvqmrY2k/bZ1iEAXyRB5mwd7TxHLIlc JmAAu9u5myDdETeQF259SjTgSjteJCN6vwl/5vfmeVfUy41I3aWtGPClNdoqNAcbnl30 4ejQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=LK9qIEqA; 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 o5si1322445oie.226.2020.03.04.07.12.11; Wed, 04 Mar 2020 07:12:31 -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=LK9qIEqA; 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 S1729436AbgCDPLv (ORCPT + 99 others); Wed, 4 Mar 2020 10:11:51 -0500 Received: from mail-wr1-f65.google.com ([209.85.221.65]:45222 "EHLO mail-wr1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729012AbgCDPLv (ORCPT ); Wed, 4 Mar 2020 10:11:51 -0500 Received: by mail-wr1-f65.google.com with SMTP id v2so2806032wrp.12 for ; Wed, 04 Mar 2020 07:11:48 -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:content-transfer-encoding:in-reply-to :user-agent; bh=VOLjflFVC/lWbN0oTsQoOMlRo2O6lU0WwAevEZ9SEdI=; b=LK9qIEqAos8I+5PbVxeMUNEQowsGtb2yvZBfKLIL9byiCFb2lM/Z1VX1MUVZ2vTsq4 uUKx54WRPsWHJ9c28c79a62LXsGPnzf2yJKMxPLnsTDVKJWC7TdavhOj0h5vL2NN2CbN v7K/pyiwWMEWyHrPwkv0ylf6chj5d2kI0PN6s= 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:content-transfer-encoding :in-reply-to:user-agent; bh=VOLjflFVC/lWbN0oTsQoOMlRo2O6lU0WwAevEZ9SEdI=; b=o8NpCyV0ybheUxBH2yHhxSryheVNjkFEYY3M8XYkmr+1P8wakuwV15sBG0YsgBFDAi xJsW9KUDU6aOFPs7KNMoDRZqS31ahRC3aXMxcJKqDtVJLAIgsUAJq+ElDIuYe7ryxEh3 EMPnfrGoEwRHVLb8XY/KZ+1mRgFdfqAcUGvxvVn3HIO+tlNI7GyCw8cwPGlyYP/LR8ox tV1AhpKGk84B9n1W4Dl5nuQz9bb9JOqUueAmm/43yWHw20PL1NbJj9OMZfBCRazFS35f JhVnSOkkcvi+sE2IG6RKH0XgwE3eHEih6oU/XOqPje1YIKSTAuyvXFhScZlaWE2TS6K1 E6AA== X-Gm-Message-State: ANhLgQ02+ILs/RzLQUMqxV9OTzYr0NG4XzTrGn9WbGw1AZLEqDJx5N2f 7DZAtLqsFxaow52Wu3xqYB4WOw== X-Received: by 2002:adf:d4ca:: with SMTP id w10mr4443265wrk.407.1583334707456; Wed, 04 Mar 2020 07:11:47 -0800 (PST) Received: from chromium.org ([2a00:79e1:abc:308:8ca0:6f80:af01:b24]) by smtp.gmail.com with ESMTPSA id z16sm38642092wrp.33.2020.03.04.07.11.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 04 Mar 2020 07:11:46 -0800 (PST) From: KP Singh X-Google-Original-From: KP Singh Date: Wed, 4 Mar 2020 16:11:45 +0100 To: Andrii Nakryiko Cc: 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: <20200304151145.GB9984@chromium.org> References: <20200304015528.29661-1-kpsingh@chromium.org> <20200304015528.29661-3-kpsingh@chromium.org> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 03-M?r 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. > > > > Signed-off-by: KP Singh > > --- > > I trust invoke_bpf_prog logic didn't change, code was just moved around, right? Yes, that's correct. - KP > > Acked-by: Andrii Nakryiko > > > > arch/x86/net/bpf_jit_comp.c | 148 +++++++++++++++++++++--------------- > > 1 file changed, 85 insertions(+), 63 deletions(-) > > > > [...]