From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-0.6 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id F228EC468B0 for ; Wed, 12 Jun 2019 14:47:56 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id CB22F208CA for ; Wed, 12 Jun 2019 14:47:56 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="sDszYOIo" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732570AbfFLOru (ORCPT ); Wed, 12 Jun 2019 10:47:50 -0400 Received: from mail-lf1-f68.google.com ([209.85.167.68]:34373 "EHLO mail-lf1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732556AbfFLOru (ORCPT ); Wed, 12 Jun 2019 10:47:50 -0400 Received: by mail-lf1-f68.google.com with SMTP id y198so12366937lfa.1; Wed, 12 Jun 2019 07:47:48 -0700 (PDT) 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=atj4Dig3dtuCtSDSSa+DD85GmhDxDaBZi0keQGxDoi8=; b=sDszYOIoZwSCOxJ1bqIhnEQdDWhP/Y13vCedI/horI8IhJjeSMtx6JDbLl80JC+2ZG hjjoGsBPdZeHRiFIHWsWGZnD+JSsmNfeOUu+u/iVVl78D1Lqj1X5BVNCUzr8jw7l2Vqk Dc9hON+r3NREYlwIIQMKt7+X4/pTnJNDFiPN7s6QmrbpReF+FoSRaBhglQ1gyZPW6Jph XzpB2HbK3Wh8IjY5piM/FVYIegFueG8QtUDvETEnv6IeftPvU7gG8wcL/hHiuQzFFZ1G qT4i+ccebM2CrhPlZcHyixAJOj+trdKGIya7w4SNdVLaUU3zR6ufQPzN6uWut3qYcHdy /tTg== 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=atj4Dig3dtuCtSDSSa+DD85GmhDxDaBZi0keQGxDoi8=; b=G9yqeB6V+Y7Q28NSvqYLbPwuNI8P2/eirMQNcSn6YyrcEpbo+p2/1+VmGrUugwuH5d nSy/VQXcbcJrefzi1ihmJg8yiM+9+Zj+YjHO6q3OHQ3u6Vl26WxpWOnr/3vWYr9ByVva 4oWxOMEjsNlcMMnrThAO4Y/UuvYQ1ngHYl94sxkLKGxLiMX6tAgeOxUQrPHfNC8ER/w1 Ik1S86NFdKZv5KQXNwLIBnwoqLQVVjpa/GgzPrXOrZRYLfkLg1vblGc0DVKS2iBNW73O X7S71EnR0QIfvRghzRve/t8BvsdTiVOFpaPBG8rlxLbhNehGXb5I48V+KEYABSlnGnpt SZZA== X-Gm-Message-State: APjAAAX8cbzbJTyR60xWPeKRA8jWBMkscoAc6zn6htmaydhYjEiAoilb VIf+oSL1j1Uw2vehNiPJw4uzA58zIfOmURn93C1AHQ== X-Google-Smtp-Source: APXvYqzv10lk2WbQXRocxToNZyod64yBRQS3n0YKJMQmBM6fU2Q+rYqgb3hw2533pYAt0M5y9gZ0toZWIapcNKr3Juk= X-Received: by 2002:ac2:4252:: with SMTP id m18mr16950403lfl.100.1560350868086; Wed, 12 Jun 2019 07:47:48 -0700 (PDT) MIME-Version: 1.0 References: <20190612113208.21865-1-naveen.n.rao@linux.vnet.ibm.com> In-Reply-To: <20190612113208.21865-1-naveen.n.rao@linux.vnet.ibm.com> From: Alexei Starovoitov Date: Wed, 12 Jun 2019 07:47:36 -0700 Message-ID: Subject: Re: [PATCH] bpf: optimize constant blinding To: "Naveen N. Rao" Cc: Daniel Borkmann , bpf , Network Development , Michael Ellerman , Jiong Wang , Jakub Kicinski Content-Type: text/plain; charset="UTF-8" Sender: bpf-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: bpf@vger.kernel.org On Wed, Jun 12, 2019 at 4:32 AM Naveen N. Rao wrote: > > Currently, for constant blinding, we re-allocate the bpf program to > account for its new size and adjust all branches to accommodate the > same, for each BPF instruction that needs constant blinding. This is > inefficient and can lead to soft lockup with sufficiently large > programs, such as the new verifier scalability test (ld_dw: xor > semi-random 64 bit imms, test 5 -- with net.core.bpf_jit_harden=2) Slowdown you see is due to patch_insn right? In such case I prefer to fix the scaling issue of patch_insn instead. This specific fix for blinding only is not addressing the core of the problem. Jiong, how is the progress on fixing patch_insn?