From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mail.toke.dk (Postfix) with ESMTPS id E2B099C28AF for ; Wed, 16 Nov 2022 00:14:06 +0100 (CET) Authentication-Results: mail.toke.dk; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=AAPHuv76 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1668554045; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=sC7yfAmEIqng20oOuq5+wuXrHEutJPdkpZYYMEgozhE=; b=AAPHuv76TzWhIDcthD9/pStWwRHakL24RJUnIp0JmXFGF88ymSkZ1wupoLWiBRhvxmRlJf 5ySDkIp56T99uF+4Y7OZEDnFBNz1bofjft8caw24Fvh79qVjY2bf+Ai//mnZHVn9iFjIRT vBK80lFbCQOEZT8EaAeXikL0xgue1gY= Received: from mail-ed1-f72.google.com (mail-ed1-f72.google.com [209.85.208.72]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_128_GCM_SHA256) id us-mta-526-iSF80gO5Pi-FF3Cg1iQXPQ-1; Tue, 15 Nov 2022 18:14:04 -0500 X-MC-Unique: iSF80gO5Pi-FF3Cg1iQXPQ-1 Received: by mail-ed1-f72.google.com with SMTP id z9-20020a05640235c900b0046358415c4fso10917229edc.9 for ; Tue, 15 Nov 2022 15:14:03 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=/HeSwBts+JSgnN4qNzSCdOMxQO+gGwYD3f5ouvjaYqA=; b=ciS1SIUyBWQYaHB1FJme489xqSzg9J7LzpPxpF5OuvLr2qgc26KjhUR+YvhdFzHWAh bEyy+P867CBbVf2q9PLxzCa2LqkabqqL+2qsbOyuHsYJzy2ABb1tkDuui2z8vY+M4Xe5 5seVKU+v06Ed1920n8Yjp2zpsE4GHiJLYo6X3A466g7lYCinlPH+fthQg46o327It/QP uqE1nNwAWdTP+d3A50MBT6I5Z9lNCpSj5ODw7DM9QbXNwDyV2N9aSkYQj7Z1V64uhGHg RpaqpQtEbpjMngS+22KuhDT5TFJF3ux7wm6KHgEBiZT5oSmfc/kjGFFWAwQ7CjCOlfxS Sz4w== X-Gm-Message-State: ANoB5pmhiOF1ViRUn08WCs4CFNkkEkks28Nj+tiVIcg7i9x3G9DoWsev ECbNDMlr5yhcOokBoLB3zVHehQ4GXq3tLTLolxov2vlxY2tqLlDDGKYaVGfJ4zR4rV0fBoZoZzm PjAv68lrbcSydh4mjIlOs X-Received: by 2002:a05:6402:b50:b0:459:2b41:3922 with SMTP id bx16-20020a0564020b5000b004592b413922mr16560722edb.160.1668554042071; Tue, 15 Nov 2022 15:14:02 -0800 (PST) X-Google-Smtp-Source: AA0mqf7pl/gGMle47sfiL6lZ912AHH0UDHMN2Q/n0F8Q3WYCaLSOvQx4KjSEf3L5DPcBEHTJXR2z2A== X-Received: by 2002:a05:6402:b50:b0:459:2b41:3922 with SMTP id bx16-20020a0564020b5000b004592b413922mr16560671edb.160.1668554041139; Tue, 15 Nov 2022 15:14:01 -0800 (PST) Received: from alrua-x1.borgediget.toke.dk ([2a0c:4d80:42:443::2]) by smtp.gmail.com with ESMTPSA id y14-20020aa7ccce000000b0045b4b67156fsm6759985edt.45.2022.11.15.15.14.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 15 Nov 2022 15:14:00 -0800 (PST) Received: by alrua-x1.borgediget.toke.dk (Postfix, from userid 1000) id 7AE7E7A6D67; Wed, 16 Nov 2022 00:13:59 +0100 (CET) From: Toke =?utf-8?Q?H=C3=B8iland-J=C3=B8rgensen?= To: Alexei Starovoitov , Stanislav Fomichev In-Reply-To: References: <20221115030210.3159213-1-sdf@google.com> <87mt8si56i.fsf@toke.dk> X-Clacks-Overhead: GNU Terry Pratchett Date: Wed, 16 Nov 2022 00:13:59 +0100 Message-ID: <87zgcrdd54.fsf@toke.dk> MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Message-ID-Hash: PBSXLFMQIJIHCV7GJE4GI2BFGYHSGXKD X-Message-ID-Hash: PBSXLFMQIJIHCV7GJE4GI2BFGYHSGXKD X-MailFrom: toke@redhat.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: bpf , Alexei Starovoitov , Daniel Borkmann , Andrii Nakryiko , Martin KaFai Lau , Song Liu , Yonghong Song , John Fastabend , KP Singh , Hao Luo , Jiri Olsa , David Ahern , Jakub Kicinski , Willem de Bruijn , Jesper Dangaard Brouer , Anatoly Burakov , Alexander Lobakin , Magnus Karlsson , Maryam Tahhan , xdp-hints@xdp-project.net, Network Development X-Mailman-Version: 3.3.6 Precedence: list Subject: [xdp-hints] Re: [PATCH bpf-next 00/11] xdp: hints via kfuncs List-Id: XDP hardware hints design discussion Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: Alexei Starovoitov writes: > On Tue, Nov 15, 2022 at 10:38 AM Stanislav Fomichev wrot= e: >> >> On Tue, Nov 15, 2022 at 7:54 AM Toke H=C3=B8iland-J=C3=B8rgensen wrote: >> > >> > Stanislav Fomichev writes: >> > >> > > - drop __randomize_layout >> > > >> > > Not sure it's possible to sanely expose it via UAPI. Because every >> > > .o potentially gets its own randomized layout, test_progs >> > > refuses to link. >> > >> > So this won't work if the struct is in a kernel-supplied UAPI header >> > (which would include the __randomize_layout tag). But if it's *not* in= a >> > UAPI header it should still be included in a stable form (i.e., withou= t >> > the randomize tag) in vmlinux.h, right? Which would be the point: >> > consumers would be forced to read it from there and do CO-RE on it... >> >> So you're suggesting something like the following in the uapi header? >> >> #ifndef __KERNEL__ >> #define __randomize_layout >> #endif >> > > 1. > __randomize_layout in uapi header makes no sense. I agree, which is why I wanted it to be only in vmlinux.h... > 2. > It's supported by gcc plugin and afaik that plugin is broken > vs debug info, so dwarf is broken, hence BTF is broken too, > and CO-RE doesn't work on kernels compiled with that gcc plugin. ...however this one seems a deal breaker. Ah well, too bad, seemed like a neat trick to enforce CO-RE :( -Toke