Received: by 2002:a05:7412:b10a:b0:f3:1519:9f41 with SMTP id az10csp1411894rdb; Fri, 1 Dec 2023 16:20:38 -0800 (PST) X-Google-Smtp-Source: AGHT+IErrqCREZ2bx0oiuRgRYt6gkcCggZMV0BmfjhhnWPwGsP0xvr8ZHThTz0rA6l9nZMVbEdud X-Received: by 2002:a92:db46:0:b0:35d:59a2:2b3 with SMTP id w6-20020a92db46000000b0035d59a202b3mr367359ilq.83.1701476438606; Fri, 01 Dec 2023 16:20:38 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701476438; cv=none; d=google.com; s=arc-20160816; b=EsDKgmErbEXR36SYIO0GZk27LRJb09k8CjnvBJ2aapPKXBH0JjxoTZWq8zDZUEHXdO +bCiHLMgCJ+J7VL9OHMB+sHC7C1GFQCGQFcrKtMxsFYjGKN3VOfUGzN2jKeXuqkte4K8 IWm66LGVfollP9yqrZEfIMv/u0D1iFx284ThUgH4g2Vdc6BnaTRpRa7WWHcMsSx4zhne EdcICRqS5YB+B49a3+drvR8ohGIsSIwO6aWopXExjV2vyDmuxMmuHqelM7+u38HdNRD6 qLvh71yWZlScCozqkckkr9rGqMKNp6ReKzJbHq+5xhgor+0QKpgrD9sPqNI4ZipjZSE/ 32bA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent :content-transfer-encoding:autocrypt:references:in-reply-to:date:cc :to:from:subject:message-id:dkim-signature; bh=V7H5mtM4rdlF96TurskSVKsv77wngFKN9XzMokfXX3o=; fh=kVOGmoipEDhvdPk8Kh2VGWSAheF6Wz+e7fNgoYrIyyg=; b=XpgSTTvIeqltbixSuY83vW0vpSu5R/KfRF3/PIaP/KZrKyQxo5U1s48EX+VXXElQRZ 9BeFN3bInMqgvhj1WZNfsX7QLmzPZo3dCCbnZ1sD90YhW645VcbmTrkSg3HxiIV7EhqP JYni9AHCVsz5BkXpdo/O7AIqJ3sd8kVNApCcS7Vv+a2PFC9lGdqR7ly90+f61DupXvwe Oem5t/0eM+ufb8s8l/dHVGfn6qIBNGEOJ4qrlJJ6AmcTOUbadEgNZ2tvv0hqwgDt9pq8 wL2mGpYKlEebtJAnrRst4OXRKdGcpDtQN/BGeLKfsTwTnT0li47+lAOTQE0ocmIZoIW7 tjzw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=Jn43UGKF; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 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 groat.vger.email (groat.vger.email. [23.128.96.35]) by mx.google.com with ESMTPS id n13-20020a170902e54d00b001cfd5af29cfsi3237880plf.293.2023.12.01.16.20.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 01 Dec 2023 16:20:38 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) client-ip=23.128.96.35; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=Jn43UGKF; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by groat.vger.email (Postfix) with ESMTP id BFB0C83014B0; Fri, 1 Dec 2023 16:20:35 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231124AbjLBAUN (ORCPT + 99 others); Fri, 1 Dec 2023 19:20:13 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38810 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229456AbjLBAUN (ORCPT ); Fri, 1 Dec 2023 19:20:13 -0500 Received: from mail-lj1-x231.google.com (mail-lj1-x231.google.com [IPv6:2a00:1450:4864:20::231]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 34B6CCF; Fri, 1 Dec 2023 16:20:19 -0800 (PST) Received: by mail-lj1-x231.google.com with SMTP id 38308e7fff4ca-2c9b5c12898so34226401fa.2; Fri, 01 Dec 2023 16:20:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1701476417; x=1702081217; darn=vger.kernel.org; h=mime-version:user-agent:content-transfer-encoding:autocrypt :references:in-reply-to:date:cc:to:from:subject:message-id:from:to :cc:subject:date:message-id:reply-to; bh=V7H5mtM4rdlF96TurskSVKsv77wngFKN9XzMokfXX3o=; b=Jn43UGKFRFJ0+BEoGYvujtwfUqqKtIr6LDAE+RABaR+aVGqcnIx9X9jdWX7QQ8vIhF E+loP/zR25iuxh77C4btFqjufM4WD3BO2iyr9QdKMy3yGDdswhGhTm5BhnKpzH++fMND zGK4JuVbf316yQGLyUbTcV9WKT/UktTEHsfqJbJUTSbSRn9q/6/p8gjzreGNi/SmfCr3 pnE4OHHQKOcPdAIY3UXT0u+zXq3fVybVi4WWzvlKWrVN1lRZ1poPiJ5Lc1qAlyBMy1hf 19xNACl2sU2y+boBKntWDxToJ9O9xgm4rJmEJRv0/UPG0I5o8AHMU2uoTIaX3dJFq48F +qdw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701476417; x=1702081217; h=mime-version:user-agent:content-transfer-encoding:autocrypt :references:in-reply-to:date:cc:to:from:subject:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=V7H5mtM4rdlF96TurskSVKsv77wngFKN9XzMokfXX3o=; b=gIOVEQWQwbhgyaaxtu5zJHX9YrxLDozKa65p7yZFZ3XnQDZ+2UTERbXnoS+q31ndcw P22HAiS1z0JdsQ8D4grM9jZizJEaNRxooKqL7IgBXFMx1sr0dA4/6Q2Tozfhq+lwyvuM MCeABfqJiw3+o83O8Bpd4c3bEV8ToxHoq/Qd1S5qVgdIo1GTzO/4GvOzSPLB/58WkiYr 7IvClF9NCAwyr1DyBAOuVG2RtOsb1Tc827OScTX5uFC8519CddvS0SUz0lUrUfD2hbLD ldOnyohNNbT9K72H0U+K+MuHZDRY/8+PpJTjPzGRnHyFT/1ApaN1CsY0akVNxbeWYX/U TUcQ== X-Gm-Message-State: AOJu0YyIQYXyB5sJRa0qtUuuTaLChD+qCrslkclMvnKDilrM+kMxyquo 4lJR/sdi+eq0zwrodjLs/sM= X-Received: by 2002:a2e:8895:0:b0:2c9:d874:6efc with SMTP id k21-20020a2e8895000000b002c9d8746efcmr1441290lji.89.1701476417363; Fri, 01 Dec 2023 16:20:17 -0800 (PST) Received: from [192.168.1.95] (host-176-36-0-241.b024.la.net.ua. [176.36.0.241]) by smtp.gmail.com with ESMTPSA id l13-20020a170906a40d00b00a18a9931dc1sm2365617ejz.105.2023.12.01.16.20.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 01 Dec 2023 16:20:16 -0800 (PST) Message-ID: Subject: Re: [PATCH ipsec-next v3 5/9] libbpf: selftests: Add verifier tests for CO-RE bitfield writes From: Eduard Zingerman To: Daniel Xu , Andrii Nakryiko Cc: ast@kernel.org, daniel@iogearbox.net, shuah@kernel.org, andrii@kernel.org, steffen.klassert@secunet.com, antony.antony@secunet.com, alexei.starovoitov@gmail.com, yonghong.song@linux.dev, mykolal@fb.com, martin.lau@linux.dev, song@kernel.org, john.fastabend@gmail.com, kpsingh@kernel.org, sdf@google.com, haoluo@google.com, jolsa@kernel.org, linux-kernel@vger.kernel.org, bpf@vger.kernel.org, linux-kselftest@vger.kernel.org, devel@linux-ipsec.org, netdev@vger.kernel.org Date: Sat, 02 Dec 2023 02:20:15 +0200 In-Re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h0rkFgay0hAvMU/mAW/CFNSIxV397zm749ZNLA0L2dMy1AKuOqH+/B+/ImBfJMDjmdyJQ8WU/OFRuGLdqOd2oZrA1iuPIa+yUYyZkaZfz/emQwpIL1+Q4p1R/OplA4yc301AqruXXUcVDbEB+joHW3hy5FwK5t5OwTKatrSJBkydSF9zdXy98fYzGniRyRA65P0Ix/8J3BYB4edY2/w0Ip/mdYsYQljBY0A== Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.50.1 MIME-Version: 1.0 X-Spam-Status: No, score=-0.6 required=5.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,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on groat.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (groat.vger.email [0.0.0.0]); Fri, 01 Dec 2023 16:20:36 -0800 (PST) On Fri, 2023-12-01 at 17:10 -0700, Daniel Xu wrote: [...] > > > +SEC("tc") > > > +__description("single CO-RE bitfield roundtrip") > > > +__btf_path("btf__core_reloc_bitfields.bpf.o") > > > +__success __failure_unpriv > >=20 > > do we want __failure_unpriv at all? Is this failure related to > > *bitfield* logic at all? >=20 > Oh, I pre-emptively added it. From the docs, I thought __failure_unpriv > meant "don't try to load this as an unprivileged used cuz it'll fail". > And since I used the tc hook, I figured it'd fail. Actually it means: "try to load as unprivileged user and expect failure, report error on successful load". In general, the meaning of "___xxx" and "___xxx_unpriv" annotations is identical, except first instructs to run the test in privileged mode, while second instructs to run test in unprivileged mode: - if only annotations w/o "*_unpriv" suffix are present the test would be executed as privileged; - if only annotations with "*_unpriv" suffix are present the test would be executed as unprivileged; - if both kinds of annotations are present the test would be executed in both modes. [...]