From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-ed1-f46.google.com (mail-ed1-f46.google.com [209.85.208.46]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 16B0C33F368 for ; Sun, 23 Aug 2026 22:12:42 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.46 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787523165; cv=none; b=JThhUv7DSHznNdMyr3PS6lKiz9lHeIT8Eyn4DWoMhUs1iWKZaOTZl/cdvZvL0iGt1qLxFz6+3W0GurHT/nM3yqjHmNSzy5t2tm11Dc0YamBqBLSNdt0gVirx0M7S4OJ/omiW7vwb4FSy083jZQA+m7Z0rmP/oofBaDUaQjtoUxs= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787523165; c=relaxed/simple; bh=GqPg7liRNMqrm8j4qggfPJWb6w6iifsnP6+v+SgJcSk=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=UJoLWNww6ir0/qNi9RS4Mv9hPhkZMhwfT/sJczH1hYBvhxK6UfMEPJxhAGPYmKNT8MR4z5zK027vRQVjFvsVsszpL91vk9cOayryfdYuFUeP0e7dJeCe/sUF4noDfT3SKjjuhx6aZB/FbHhLB8q5MYE0Fg3TFsB+lTb5J9fhUPY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=baylibre.com; spf=pass smtp.mailfrom=baylibre.com; dkim=pass (2048-bit key) header.d=baylibre.com header.i=@baylibre.com header.b=FPfqc06J; arc=none smtp.client-ip=209.85.208.46 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=baylibre.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=baylibre.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=baylibre.com header.i=@baylibre.com header.b="FPfqc06J" Received: by mail-ed1-f46.google.com with SMTP id 4fb4d7f45d1cf-6a17211b9ecso7352001a12.2 for ; Sun, 23 Aug 2026 15:12:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre.com; s=google; t=1787523160; x=1788127960; darn=lists.linux.dev; h=in-reply-to:content-disposition:content-type:mime-version :references:message-id:subject:cc:to:from:date:from:to:cc:subject :date:message-id:reply-to:content-type; bh=//7iEXuM0dwaErrYwlxiIsbco7Xb10BSWAJJRQqIeEQ=; b=FPfqc06Jb3ITFgV1DG3qV2CPOcxOxTNhFSrjBwOPkCMCz17ZRp2+6V4ZbQ7XLsPcTO R9V+oRekps23w4ZcqeUA/y9rlEwc3KNa9ansJxDTz07/jmKAI8p+Nn0iMZ+DLU5KvqaS taIQxLGjXIJfNOK9CX40J4vLOtu6zKpzgO0RMTbjZCQMBdk1Lsae7fP3EMqgTxu/ggju E2Q2vtWA5pqCjAt3KkpzWycNCJqqwIDrur4h4E7Z2+3n1n3X0uF6TUFmCl/FDYiV34iz KGpEShIqs4vS7RNaGkqwNTjm1V5otMFKFYo0df0tl3zH2/l7yzYKHt/Ftv8hxAMFG9R5 kICw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1787523160; x=1788127960; h=in-reply-to:content-disposition:content-type:mime-version :references:message-id:subject:cc:to:from:date:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=//7iEXuM0dwaErrYwlxiIsbco7Xb10BSWAJJRQqIeEQ=; b=bcta2TbHaMVGpF7bS6RodWYPuZUfRDX/RKKhhplip8XCDxMLkKSF15uy4UWa0FZBaH C+U0dYK4hF06LwXCMXFXEo8TklZ2TA9UEPZ8zLQyCkW/lqY4HoJY1Ec9orZmR7G1rcDC GkeiRKITrRkbBDXi1LScbCeo5y1WNi5ldw7lKe2iAWjL+3kZGQLZ0UJIyYKjFwzQwKBT 1tBXIwlBa3HpF7Z/aAj7yYaBIOINmqFrDBHg4LGvtlxOFv1u2xnVp05YNfbqQMsDjhZ/ YcAAGURa4x50XW0M7DlUanPPwdsaJk70tIVKT0SfoMtclljon5JQqiicVW8rPV0uHUGT BXMA== X-Forwarded-Encrypted: i=1; AHgh+Rr2qnkXCUOEuAK4s9sgblsu60in7sU2lWkmkFUFnDM5j/Qg+KCV425SA3LWzV5kjMRgRv9Vksk=@lists.linux.dev X-Gm-Message-State: AFuF++l9dKjEz6AfYkTmmtOe6c8EBdr4sb1LbluhlhjjzpLkPXG4Vytd PgrbgaP8lMUwVByeAotdOcgRw60ffeeeg5mIcd2q61qY8eHBhVn4lusSZgyALHmZ6+M= X-Gm-Gg: AR+sD12bu/AuvRfjO6m7AniHdpSq8J337KvAZjm5rkjISoPB0EAI3IdFXAUnJu7ieCM 4/lRi28jNz+HW5J2LF52OThLc0gBxFFfMyBZAwYkkDv+C69hg3xroaBNKGJa7nB1W/LVixiYirQ 6gvo8vKc5FBR/veqDM4dV6ZNj8U7sbD1tgLSmrANmLhLK79T1WdIa6vFzFyer7fxTNg6L2MVEXh bySBJJpeylakj7Yq6/7MJoB3Uds3JBmchq2/uv8i+YPy29T7ommYLe8Vdz4TA/UzT2rls9HqF+E lCe6e3ZfZ2Fhos7AW5eg7ilD0w5msjYKFW82AzIuaKN0SEZQCjHocgeF7pVi420yPS3TdU4cTKY 1G3OH5L0zL74mTklzU3nQggw/sTB9PWog5+/P4EM9TtfwAdvMMrgYBAIy8xY5pu+XHKqeguuDP2 KuZz4JyBEKcjpZdi/5dF+PEBa7RhfbraAkCXDFRrjPVdfL16Ceu/MAJ2RDNogbO6LqsCCndaMwD WKX X-Received: by 2002:a05:6402:505b:b0:69c:811f:8f5 with SMTP id 4fb4d7f45d1cf-6a42f1b9325mr25356134a12.6.1787523160405; Sun, 23 Aug 2026 15:12:40 -0700 (PDT) Received: from localhost ([2a02:8071:56d1:2de0:1d24:d58d:2b65:c291]) by smtp.gmail.com with UTF8SMTPSA id 4fb4d7f45d1cf-6a59e00108asm7547158a12.2.2026.08.23.15.12.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 23 Aug 2026 15:12:39 -0700 (PDT) Date: Mon, 24 Aug 2026 00:12:38 +0200 From: Uwe =?utf-8?Q?Kleine-K=C3=B6nig?= To: Mauricio Faria de Oliveira Cc: Kees Cook , Joel Granados , Nathan Chancellor , Nicolas Schier , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Simon Horman , kernel-dev@igalia.com, linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org, fsverity@lists.linux.dev, keyrings@vger.kernel.org, bpf@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-kbuild@vger.kernel.org, netdev@vger.kernel.org, linux-wpan@vger.kernel.org, lvs-devel@vger.kernel.org, netfilter-devel@vger.kernel.org, coreteam@netfilter.org, linux-sctp@vger.kernel.org, linux-rdma@vger.kernel.org, linux-s390@vger.kernel.org, bridge@lists.linux.dev, mptcp@lists.linux.dev, rds-devel@oss.oracle.com, virtualization@lists.linux.dev Subject: Re: [PATCH RFC v3 03/13] sysctl, mod_devicetable: add macro MODULE_SYSCTL_TABLE Message-ID: References: <20260819-sysctl-module-aliases-v3-0-aab90569365d@igalia.com> <20260819-sysctl-module-aliases-v3-3-aab90569365d@igalia.com> <4e3eaf1d3419e808be046035f114bf6c@igalia.com> Precedence: bulk X-Mailing-List: bridge@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="6dsww6grbwx7uy7i" Content-Disposition: inline In-Reply-To: <4e3eaf1d3419e808be046035f114bf6c@igalia.com> --6dsww6grbwx7uy7i Content-Type: text/plain; protected-headers=v1; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Subject: Re: [PATCH RFC v3 03/13] sysctl, mod_devicetable: add macro MODULE_SYSCTL_TABLE MIME-Version: 1.0 Hello Mauricio, On Sat, Aug 22, 2026 at 01:57:24PM -0300, Mauricio Faria de Oliveira wrote: > On 2026-08-22 10:41, Uwe Kleine-K=F6nig wrote: > > On Wed, Aug 19, 2026 at 03:16:16PM -0300, Mauricio Faria de Oliveira wr= ote: > >> The MODULE_SYSCTL_TABLE macro emits a struct module_sysctl_table varia= ble > >> with pointers to a sysctl table's path and entries, and table/entry si= zes. > >=20 > > That new struct doesn't seem to contain any pointer? >=20 > The struct module_sysctl_table fields .path and .table are pointers, > although with kernel_ulong_t type so that the same 32/64-bit size is > used in file2alias.c based on KERNEL_ELFCLASS (and not on the host, > which might differ with CROSS_COMPILE). Cross compilation isn't an issue for the already existing device id structures; many of them also contain pointers. (While modpost doesn't use the pointers, the size of the structures must be known to correctly interpret the arrays.) Also sizeof(long) differs between architectures and I can compile for arm(32) just fine on amd64. Additionally there is hardware out there that has sizeof(void *) =3D 16 but sizeof(long) =3D 8. Up until recently I worked on mainlining that (and it has business reasons only I stopped, so I guess and hope I will continue at some point in the future). See https://lwn.net/Articles/1037974/ for some details if you're interested. I would be great if your series didn't introduce a new obstacle for that. > >> That symbol will be handled by file2alias.c (modpost) with the changes= in > >> mod_devicetable.h and devicetable-offsets.c. > >>=20 > >> The option macros MODULE_SYSCTL_TABLE_{DISABLE,UNIQUE_ID} can be used = on > >> a per-file basis to disable the macro and change the symbol name patte= rn. > >>=20 > >> Signed-off-by: Mauricio Faria de Oliveira > >> --- > >> include/linux/mod_devicetable.h | 7 +++++++ > >> include/linux/sysctl.h | 42 ++++++++++++++++++++++++++++++= +++++++++ > >> scripts/mod/devicetable-offsets.c | 6 ++++++ > >> 3 files changed, 55 insertions(+) > >=20 > > Please put the new struct in a separate header. Apart from not being > > about a device table, I'm currently work on removing > > . See commit > > ad428f5811bd7fb3d91fa002174de533f9da94d7 for more details. >=20 > Sure; I looked at that earlier (thanks for the instructive commit > message, by the way) and found the new struct to be similar to "struct > cpu_feature isn't really a device_id struct" (not moved), but apparently > missed the trailing "fow now", which is clearer now. Fixed for v4. Yeah, I didn't move that because it was an outlier in the header as it's not a device id. IMHO it should go to something like include/linux/cpu_feature.h. Best regards Uwe --6dsww6grbwx7uy7i Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAABCgAdFiEEP4GsaTp6HlmJrf7Tj4D7WH0S/k4FAmqLcFMACgkQj4D7WH0S /k74fgf+L2E+C5s7/Uv60MggM8SluqqYOIYVRQMrJ0YZ292Po2lSpcrxuhUuQU2B oXhO4fsc1HgZsK331x/O/bMuTOPLltQaKOsxLiMi24UglNQqmujyzSUFLnsr9NlL 1xjI1icd6tMaie8k1PK7ynotnvtfYE9Fbl/52MAUgNFbTbWqnaXhNv+fzm/C72Cc xjp+GuDi0DimbriiFBYP3aUccUEUCgsrwh3Zwss3iQSaV2gZ3Y+jYlUBB3YlBSZQ +m5a8ZWC4FeqCD+8NXyqc01adbOF9gkilqmoa2KsUhRY9+jPqn0pQhpfPxEl6Lf9 /YNG96sk855Er0BHcQ1R8Pg+AcsRrg== =t37g -----END PGP SIGNATURE----- --6dsww6grbwx7uy7i--