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 3BF799C2812 for ; Tue, 15 Nov 2022 23:31:25 +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=H2mE83X3 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1668551484; 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=pJmNXPp6LKbLV1/7iK18cP0hnwLnprb5IV7cNfNC70k=; b=H2mE83X3H50LK1AAnmZitpF7B1/J9OngzWbrk82lxgQ/aED4QtHszdKkG7lVMtfk935GyR a6RD90ERWmdzlAJ0AG3J617LGkDlTpkdeHxPsscWZwCv3Ae2wNqBAfr7uVr9xVTCQUGoFV 7DlfgOd53LUdnVKiy9Tyq716evKA/zc= Received: from mail-ej1-f72.google.com (mail-ej1-f72.google.com [209.85.218.72]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_128_GCM_SHA256) id us-mta-192-E2VGACB1PKyqFrfUZ3ejKQ-1; Tue, 15 Nov 2022 17:31:23 -0500 X-MC-Unique: E2VGACB1PKyqFrfUZ3ejKQ-1 Received: by mail-ej1-f72.google.com with SMTP id sd31-20020a1709076e1f00b007ae63b8d66aso8228883ejc.3 for ; Tue, 15 Nov 2022 14:31:22 -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=pJmNXPp6LKbLV1/7iK18cP0hnwLnprb5IV7cNfNC70k=; b=SZ9eE4NVT9GXzUEy32sz8daTpXUUMXvRtfc/MsyNb5vzBkYaa6sF/Fpkur2r0JONdu rZbpeR7tnqidT/2CWjfS61HI5zFB4YFK9xSaKoMne1rYT/6Bcc7IjKLW7GYizwleUkJp qy97JBDa3VDgxMyUR5+Haosir115fENrUnuNbPmFKegMkXkBYzt16u0Mkp832oRRqjQd r2cBMF5to5wp5cBD7n2aFQRfGVisFWdDERmVM3Aa8FJJbsLErZCbEQpdduMKJ4QbxyJk 7fttFpYaTt3ZuO8WPbS3YuZJ2b+YRDl5Yi8k/2b6AWb5z0RyuH8upn6s32XjYghk1R0m dtiA== X-Gm-Message-State: ANoB5pngg2IZVCrRM4RxO2Y2HuAiIqFnX2D47VEDEnPATgNIakBt1U6p UaRqCqo8mGYWGtqUnRnPjvc23KZn0k9Rp2Mm6JP70UnYDgoM0u1xqtRS+/rWRyO1zoVf+NHqMHi CV7a9BzJDli0bXSWeowFF X-Received: by 2002:a17:906:8385:b0:7ad:8035:ae3d with SMTP id p5-20020a170906838500b007ad8035ae3dmr15568058ejx.46.1668551480920; Tue, 15 Nov 2022 14:31:20 -0800 (PST) X-Google-Smtp-Source: AA0mqf5cKn9LxWnWYRHp2/avkxz4II6DYsHD6dVz4O0FXSxYE6XoeL8CyodjK/ugPYHIHG0uyPAzUg== X-Received: by 2002:a17:906:8385:b0:7ad:8035:ae3d with SMTP id p5-20020a170906838500b007ad8035ae3dmr15567998ejx.46.1668551479511; Tue, 15 Nov 2022 14:31:19 -0800 (PST) Received: from alrua-x1.borgediget.toke.dk ([2a0c:4d80:42:443::2]) by smtp.gmail.com with ESMTPSA id e20-20020a170906315400b0077b2b0563f4sm6123623eje.173.2022.11.15.14.31.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 15 Nov 2022 14:31:18 -0800 (PST) Received: by alrua-x1.borgediget.toke.dk (Postfix, from userid 1000) id 96E997A6D4B; Tue, 15 Nov 2022 23:31:17 +0100 (CET) From: Toke =?utf-8?Q?H=C3=B8iland-J=C3=B8rgensen?= To: Stanislav Fomichev In-Reply-To: References: <20221115030210.3159213-1-sdf@google.com> <87mt8si56i.fsf@toke.dk> X-Clacks-Overhead: GNU Terry Pratchett Date: Tue, 15 Nov 2022 23:31:17 +0100 Message-ID: <875yffetoq.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: ZLP5LDSY4BAB75RNTVKJZXYN43QHISOY X-Message-ID-Hash: ZLP5LDSY4BAB75RNTVKJZXYN43QHISOY 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@vger.kernel.org, ast@kernel.org, daniel@iogearbox.net, andrii@kernel.org, martin.lau@linux.dev, song@kernel.org, yhs@fb.com, john.fastabend@gmail.com, kpsingh@kernel.org, haoluo@google.com, jolsa@kernel.org, David Ahern , Jakub Kicinski , Willem de Bruijn , Jesper Dangaard Brouer , Anatoly Burakov , Alexander Lobakin , Magnus Karlsson , Maryam Tahhan , xdp-hints@xdp-project.net, netdev@vger.kernel.org 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: Stanislav Fomichev writes: > 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., without >> 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 > > ? I actually just meant "don't put struct xdp_metadata in an UAPI header file at all". However, I can see how that complicates having the skb_metadata pointer in struct xdp_md, so if the above works, that's fine with me as well :) > Let me try to add some padding arguments to xdp_skb_metadata plus the > above to see how it goes. Cool! -Toke