Received: by 2002:ac0:de83:0:0:0:0:0 with SMTP id b3csp336407imk; Sat, 2 Jul 2022 20:13:45 -0700 (PDT) X-Google-Smtp-Source: AGRyM1vCOCgFidDy+hdpZ6E/QLQGk/6A8iIhIM0LbNj7oEXN//+RITyImWymy0kfK0gXELllX6RB X-Received: by 2002:a05:6402:149:b0:431:7dde:9b59 with SMTP id s9-20020a056402014900b004317dde9b59mr29195490edu.339.1656818025021; Sat, 02 Jul 2022 20:13:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1656818025; cv=none; d=google.com; s=arc-20160816; b=eeO8VSIU5oBiG1wYWzp4a7GdoaORc8P6482jOc35PxoiwYyQq03KGneYvzgpezeV3P Ojroebpo2C/bBddUWkpxhcBufyagw3CwqbYUaTuCJ5suEUCsQkDbviQFZ5MdkmRkxoWA RGjiQ4OkUp2vjXG3stbSS6GGjP2LOd4C8XFahBrKdLssRU7tiBtaDsvemS6KeQTWB8u+ 8r9Lxq5z3zaN7LG28WARoCFfex6svvwltYRjvg+513Avhnw8O+LcTPv+JGZw+l0N3OQX T9a3W/sfUJrH+8j7R9f/xnNxZVB9n3q5Lfb/j0Qqpbk0NewTpF+A/c1g7Tj0b3fWX+1B VAqA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=ns53/YL8l/fiYmgUBv8sx+DAyGGm9X+r51r4aHComts=; b=Fr9NasOL/Rs26gmZNH9tzvfGGmzBWaaUbLPpzyWIR3+hx14g63OBZRd0nljwqLy0bZ T09qKMl+JCccL5CWEjkt67EKhZf0b61emh2aE+F21tg94F+/eLDtdhgKoSNKmckIYfh9 5onj99xAEOP1JXkvzZRgFSiX4xZ7LWrkTx/wVrbo7/udC58tgFwog8Oql/PCHFS48NRL 0i7FArpHzlboCnPHo50l1Ph+SlDxtDO3ThCItSIKKplZyC2tBcm1LkE43y0EAfwP3s7t TXCy4yIPZOBr3fB3Ede2hHfphNxJ2fdTclVJW+GxkrA+L259Km9pZhhQLS0CYEj36poV tMOQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b="pT/9bZT4"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id f41-20020a05640232a900b0043983c11aa2si7214831eda.33.2022.07.02.20.12.53; Sat, 02 Jul 2022 20:13:45 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b="pT/9bZT4"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 S230181AbiGCDEN (ORCPT + 99 others); Sat, 2 Jul 2022 23:04:13 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34960 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229486AbiGCDEK (ORCPT ); Sat, 2 Jul 2022 23:04:10 -0400 Received: from mail-ej1-x62b.google.com (mail-ej1-x62b.google.com [IPv6:2a00:1450:4864:20::62b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1B7D49599; Sat, 2 Jul 2022 20:04:09 -0700 (PDT) Received: by mail-ej1-x62b.google.com with SMTP id fi2so10879550ejb.9; Sat, 02 Jul 2022 20:04:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=ns53/YL8l/fiYmgUBv8sx+DAyGGm9X+r51r4aHComts=; b=pT/9bZT4uRO7OLdbAX7dH0qxRUGFlFgvdHE4US05TWYm4623YrTcAmMIyuComRzYAa yVoACIqvzhAlynuJAw19xXnxLStR6cJCTiWULPVcdM3PjmsO+RycCviXRI+/BiVqrEA8 ld41RkLE1N38H62ToFQYR0dilXbDqw3lvq+5DENT4LHK+aQ4o6SWaUeKtpWyA0y4VZll xXAFDETn+0Mz56wVuKqHxobi9Qf3X/z5tHRHRJv+cZkYmEmv+hXucEvzJvJlgLk7kGDH Cs5/8LrniplaXyF9CMgh2Ft+DG0yTVYMQo6NhEHrQIfyC73pNAsAuSrw02T2yPvEl5ae qvMw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=ns53/YL8l/fiYmgUBv8sx+DAyGGm9X+r51r4aHComts=; b=Re2o0lyttqhssH+23OqAWhm2NynIeea+gEqFJ45vJ6dwsMltIeg3Ox7nV89DVEyjPm lOTzDMTt4hCwE1r+BWenZb4GfArD0MBMjBpapUhWcOw5pFp5O4iSUFxOSn7ncZf6aSQl kQutomQ5nah6P/TVPBp/lB7NwdLZwNAxmhohU745d2DQ3xj58HkIx3cDV17tLoxBrQSV rMy9mvw2g3Kikm4hgAXpYh2DD3R9J34tjJj8TjOw0iB/50X4RFFcgQqO0LBHlIEs9tyL 4V0VcEVXBODanKu8roOcpvmUZj4tIbOyDh3ro9ODN2tgSdYyqwjgQuz1RCe7beJTxUvA 01fw== X-Gm-Message-State: AJIora8Tcgh23RcicFTnMUPJaC6gaXV2liKqoao4bm3mQTOr58u2bnkk x1E93N9xWXG8gb6ZTqxcASf/DF+QjC59jOldu84= X-Received: by 2002:a17:906:9b86:b0:6fe:d37f:b29d with SMTP id dd6-20020a1709069b8600b006fed37fb29dmr21797701ejc.327.1656817447578; Sat, 02 Jul 2022 20:04:07 -0700 (PDT) MIME-Version: 1.0 References: <20220204185742.271030-1-song@kernel.org> <20220204185742.271030-10-song@kernel.org> <20220703030210.pmjft7qc2eajzi6c@alap3.anarazel.de> In-Reply-To: <20220703030210.pmjft7qc2eajzi6c@alap3.anarazel.de> From: Alexei Starovoitov Date: Sat, 2 Jul 2022 20:03:56 -0700 Message-ID: Subject: Re: [PATCH v9 bpf-next 9/9] bpf, x86_64: use bpf_jit_binary_pack_alloc To: Andres Freund Cc: Song Liu , bpf , Network Development , LKML , Alexei Starovoitov , Daniel Borkmann , Andrii Nakryiko , Kernel Team , Peter Zijlstra , X86 ML , Ilya Leoshkevich , Song Liu Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Jul 2, 2022 at 8:02 PM Andres Freund wrote: > > Hi, > > On 2022-02-04 10:57:42 -0800, Song Liu wrote: > > From: Song Liu > > > > Use bpf_jit_binary_pack_alloc in x86_64 jit. The jit engine first writes > > the program to the rw buffer. When the jit is done, the program is copied > > to the final location with bpf_jit_binary_pack_finalize. > > > > Note that we need to do bpf_tail_call_direct_fixup after finalize. > > Therefore, the text_live = false logic in __bpf_arch_text_poke is no > > longer needed. > > I think this broke bpf_jit_enable = 2. Good. We need to remove that knob. It's been wrong for a long time.