From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-ot1-x331.google.com (mail-ot1-x331.google.com [IPv6:2607:f8b0:4864:20::331]) by mail.toke.dk (Postfix) with ESMTPS id ACFE19C27AD for ; Tue, 15 Nov 2022 19:38:04 +0100 (CET) Authentication-Results: mail.toke.dk; dkim=pass (2048-bit key; unprotected) header.d=google.com header.i=@google.com header.a=rsa-sha256 header.s=20210112 header.b=l4KnKYj5 Received: by mail-ot1-x331.google.com with SMTP id 94-20020a9d0067000000b0066c8d13a33dso9003984ota.12 for ; Tue, 15 Nov 2022 10:38:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=9+VdkugDTO7BCZkCTE9pFpR9a05B5UZh6ZZa6FBhM2k=; b=l4KnKYj5JF2WH2hBfbspNe+5SW4ET3v180caFh2zKX05ZHTiI3wyhTH9sBXeDMJFCk hpQPmXu1xLfTAGXc1ue92syyloJdffWPa3XcF8WYZ69T6tAhMvyOI/j0gP1u7KNjN5oo FrfldtLPrOaaT5kvleK+20sYKQJb3rXr9CvcD0mX0VunevEQ74NBnRgBR8UaWF+ugCow smFSQtCt2Po95IS0tgSdyotAnxcSclp5Fx7BnGByuZW64X4SS0z90hgpEdF1ZMVrMaXh i5N4ZgCBVCo8p/25Mgv70XoKmsEXZJTYTJ/FRUJfUwG355YWmdLytDiKOKzFa9jbF7Io IcIg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=9+VdkugDTO7BCZkCTE9pFpR9a05B5UZh6ZZa6FBhM2k=; b=cu/korNXUYesOu6qdn7VxxdW6Upl6Th/v0oYDtLhQsHWMe/jO4Xx7TJSG5ROvhl9Pm WNRDY48EvNzeEf/2gUQiNuAaHDTWJ64EEOKTfrxJJ6lKEvGczSK6DOHwBxmrihpiTYLO B26UfAj0mdZpCIbVPpKlPle61UBWfxmfZRX/B4ryJtwXVkaT6m1bYgSthJIgI6QpU4TT clLWAdV08HcPoFOMhhDD+83D8Iw8dy99dQOCOwWhOW6p9Q2dkdRlIsbdCSp7grQeJg4g 5p78W33O5S4U5n/YTGElFOXYGyQiLhS4eloVXAEKAYGRNdN6Kg/FsX67McPUEgbVxHDs Guyg== X-Gm-Message-State: ANoB5plIRvDnbxnUC4zgouUj5dzpeVeDae20Hmtf86E4Mi2m0bUyQxKF /d/IYy+FKflX7wZAVyz1EDFyDE0ISpBOR4X9l6X/Fg== X-Google-Smtp-Source: AA0mqf7uy61XIH5ek2si94nsVcYZV0O/Cv5AoaYbVCmqlSUGBSYsjU+fl3rqjpjuomfhfS9srtXa3/W9v62fUrIoGcs= X-Received: by 2002:a9d:4f06:0:b0:66c:794e:f8c6 with SMTP id d6-20020a9d4f06000000b0066c794ef8c6mr9438397otl.343.1668537482593; Tue, 15 Nov 2022 10:38:02 -0800 (PST) MIME-Version: 1.0 References: <20221115030210.3159213-1-sdf@google.com> <87mt8si56i.fsf@toke.dk> In-Reply-To: <87mt8si56i.fsf@toke.dk> From: Stanislav Fomichev Date: Tue, 15 Nov 2022 10:37:51 -0800 Message-ID: To: =?UTF-8?B?VG9rZSBIw7hpbGFuZC1Kw7hyZ2Vuc2Vu?= Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Message-ID-Hash: S3FDC2NLCP7CMHG45AXCDCOYCW55XD6K X-Message-ID-Hash: S3FDC2NLCP7CMHG45AXCDCOYCW55XD6K X-MailFrom: sdf@google.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: 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 ? Let me try to add some padding arguments to xdp_skb_metadata plus the above to see how it goes.