lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250519164949.597d6e92@kmaincent-XPS-13-7390>
Date: Mon, 19 May 2025 16:49:49 +0200
From: Kory Maincent <kory.maincent@...tlin.com>
To: Jakub Kicinski <kuba@...nel.org>
Cc: davem@...emloft.net, netdev@...r.kernel.org, edumazet@...gle.com,
 pabeni@...hat.com, andrew+netdev@...n.ch, horms@...nel.org,
 donald.hunter@...il.com, daniel@...earbox.net, nicolas.dichtel@...nd.com,
 jacob.e.keller@...el.com
Subject: Re: [PATCH net-next 8/9] tools: ynl: enable codegen for all rt-
 families

On Thu, 15 May 2025 16:16:49 -0700
Jakub Kicinski <kuba@...nel.org> wrote:

> Switch from including Classic netlink families one by one to excluding.
> 
> Signed-off-by: Jakub Kicinski <kuba@...nel.org>
> ---
>  tools/net/ynl/Makefile.deps      | 4 ++++
>  tools/net/ynl/generated/Makefile | 7 +++----
>  2 files changed, 7 insertions(+), 4 deletions(-)
> 
> diff --git a/tools/net/ynl/Makefile.deps b/tools/net/ynl/Makefile.deps
> index a5e6093903fb..e5a5cb1b2cff 100644
> --- a/tools/net/ynl/Makefile.deps
> +++ b/tools/net/ynl/Makefile.deps
> @@ -33,5 +33,9 @@ CFLAGS_ovs_flow:=$(call
> get_hdr_inc,__LINUX_OPENVSWITCH_H,openvswitch.h) CFLAGS_ovs_vport:=$(call
> get_hdr_inc,__LINUX_OPENVSWITCH_H,openvswitch.h) CFLAGS_rt-addr:=$(call
> get_hdr_inc,__LINUX_RTNETLINK_H,rtnetlink.h) \ $(call
> get_hdr_inc,__LINUX_IF_ADDR_H,if_addr.h) +CFLAGS_rt-link:=$(call
> get_hdr_inc,__LINUX_RTNETLINK_H,rtnetlink.h) \
> +	$(call get_hdr_inc,_LINUX_IF_LINK_H,if_link.h)
> +CFLAGS_rt-neigh:=$(call get_hdr_inc,__LINUX_RTNETLINK_H,rtnetlink.h)
>  CFLAGS_rt-route:=$(call get_hdr_inc,__LINUX_RTNETLINK_H,rtnetlink.h)
> +CFLAGS_rt-rule:=$(call get_hdr_inc,__LINUX_FIB_RULES_H,fib_rules.h)
>  CFLAGS_tcp_metrics:=$(call get_hdr_inc,_LINUX_TCP_METRICS_H,tcp_metrics.h)
> diff --git a/tools/net/ynl/generated/Makefile
> b/tools/net/ynl/generated/Makefile index 6603ad8d4ce1..9208feed28c1 100644
> --- a/tools/net/ynl/generated/Makefile
> +++ b/tools/net/ynl/generated/Makefile
> @@ -22,10 +22,9 @@ TOOL:=../pyynl/ynl_gen_c.py
>  TOOL_RST:=../pyynl/ynl_gen_rst.py
>  
>  SPECS_DIR:=../../../../Documentation/netlink/specs
> -GENS_PATHS=$(shell grep -nrI --files-without-match \
> -		'protocol: netlink' \
> -		$(SPECS_DIR))
> -GENS=$(patsubst $(SPECS_DIR)/%.yaml,%,${GENS_PATHS}) rt-addr rt-route
> +SPECS_PATHS=$(wildcard $(SPECS_DIR)/*.yaml)
> +GENS_UNSUP=conntrack nftables tc
> +GENS=$(filter-out ${GENS_UNSUP},$(patsubst
> $(SPECS_DIR)/%.yaml,%,${SPECS_PATHS})) SRCS=$(patsubst %,%-user.c,${GENS})
>  HDRS=$(patsubst %,%-user.h,${GENS})
>  OBJS=$(patsubst %,%-user.o,${GENS})

This patch introduces a build error when building the specs.

Maybe we should add a spec build check in the net CI?

$ make -C tools/net/ynl -j9
-e 	CC rt-neigh-user.o
rt-neigh-user.c:122:10: error: ‘NDTPA_INTERVAL_PROBE_TIME_MS’ undeclared here (not in a function); did you mean ‘NDTPA_DELAY_PROBE_TIME’?
  122 |         [NDTPA_INTERVAL_PROBE_TIME_MS] = { .name = "interval-probe-time-ms", .type = YNL_PT_U64, },
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
      |          NDTPA_DELAY_PROBE_TIME
rt-neigh-user.c:122:10: error: array index in initializer not of integer type
rt-neigh-user.c:122:10: note: (near initialization for ‘rt_neigh_ndtpa_attrs_policy’)
rt-neigh-user.c:122:42: warning: excess elements in array initializer
  122 |         [NDTPA_INTERVAL_PROBE_TIME_MS] = { .name = "interval-probe-time-ms", .type = YNL_PT_U64, },
      |                                          ^
rt-neigh-user.c:122:42: note: (near initialization for ‘rt_neigh_ndtpa_attrs_policy’)
rt-neigh-user.c:146:10: error: ‘NDA_FLAGS_EXT’ undeclared here (not in a function)
  146 |         [NDA_FLAGS_EXT] = { .name = "flags-ext", .type = YNL_PT_U32, },
      |          ^~~~~~~~~~~~~
rt-neigh-user.c:146:10: error: array index in initializer not of integer type
rt-neigh-user.c:146:10: note: (near initialization for ‘rt_neigh_neighbour_attrs_policy’)
rt-neigh-user.c:146:27: warning: excess elements in array initializer
  146 |         [NDA_FLAGS_EXT] = { .name = "flags-ext", .type = YNL_PT_U32, },
      |                           ^
rt-neigh-user.c:146:27: note: (near initialization for ‘rt_neigh_neighbour_attrs_policy’)
rt-neigh-user.c:147:10: error: ‘NDA_NDM_STATE_MASK’ undeclared here (not in a function)
  147 |         [NDA_NDM_STATE_MASK] = { .name = "ndm-state-mask", .type = YNL_PT_U16, },
      |          ^~~~~~~~~~~~~~~~~~
rt-neigh-user.c:147:10: error: array index in initializer not of integer type
rt-neigh-user.c:147:10: note: (near initialization for ‘rt_neigh_neighbour_attrs_policy’)
rt-neigh-user.c:147:32: warning: excess elements in array initializer
  147 |         [NDA_NDM_STATE_MASK] = { .name = "ndm-state-mask", .type = YNL_PT_U16, },
      |                                ^
rt-neigh-user.c:147:32: note: (near initialization for ‘rt_neigh_neighbour_attrs_policy’)
rt-neigh-user.c:148:10: error: ‘NDA_NDM_FLAGS_MASK’ undeclared here (not in a function); did you mean ‘XDP_FLAGS_MASK’?
  148 |         [NDA_NDM_FLAGS_MASK] = { .name = "ndm-flags-mask", .type = YNL_PT_U8, },
      |          ^~~~~~~~~~~~~~~~~~
      |          XDP_FLAGS_MASK
rt-neigh-user.c:148:10: error: array index in initializer not of integer type
rt-neigh-user.c:148:10: note: (near initialization for ‘rt_neigh_neighbour_attrs_policy’)
rt-neigh-user.c:148:32: warning: excess elements in array initializer
  148 |         [NDA_NDM_FLAGS_MASK] = { .name = "ndm-flags-mask", .type = YNL_PT_U8, },
      |                                ^
rt-neigh-user.c:148:32: note: (near initialization for ‘rt_neigh_neighbour_attrs_policy’)
make[1]: *** [Makefile:52: rt-neigh-user.o] Error 1

Regards,
-- 
Köry Maincent, Bootlin
Embedded Linux and kernel engineering
https://bootlin.com

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ