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: <aPjyQsHoN62zEKOE@gpd4>
Date: Wed, 22 Oct 2025 17:03:30 +0200
From: Andrea Righi <arighi@...dia.com>
To: Emil Tsalapatis <emil@...alapatis.com>
Cc: Tejun Heo <tj@...nel.org>, David Vernet <void@...ifault.com>,
	Changwoo Min <changwoo@...lia.com>, sched-ext@...ts.linux.dev,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH sched_ext/for-6.19] sched_ext: Use ___v2 suffix for new
 kfuncs and fix scx build errors

On Wed, Oct 22, 2025 at 10:44:02AM -0400, Emil Tsalapatis wrote:
...
> > +/*
> > + * v6.19: Mirror the following _args structs, to prevent build errors in
> > + * kernels that don't have these structs defined yet.
> > + *
> > + * The kernel will carry these mirrored structs until v6.23 (see below).
> > + */
> > +struct scx_bpf_select_cpu_and_args {
> > +       s32                     prev_cpu;
> > +       u64                     wake_flags;
> > +       u64                     flags;
> > +};
> > +
> > +struct scx_bpf_dsq_insert_vtime_args {
> > +       u64                     dsq_id;
> > +       u64                     slice;
> > +       u64                     vtime;
> > +       u64                     enq_flags;
> > +};
> > +
> 
> This redefinition seems to cause compilation problems when compiling
> the selftests on 6.19 w/ the patch (errors below). Turning the definitions
> into declarations gets the tests to compile.
> 
> Maybe we can gate the definitions behind some ifdef? This issue aside,
> compiling the tests on a 6.17 system and running them on a 6.19 system
> still works, so everything else is in order.
> 
> # cd /linux/tools/sched_ext
> # make -j9

Ah bummer, yes, we can probably put them behind an ifdef, let me do some
tests...

Thanks,
-Andrea

> 
> In file included from scx_simple.bpf.c:23:
> In file included from /linux/tools/sched_ext/include/scx/common.bpf.h:765:
> /linux/tools/sched_ext/include/scx/compat.bpf.h:170:8: error: redefinition of
>       'scx_bpf_select_cpu_and_args'
>   170 | struct scx_bpf_select_cpu_and_args {
>       |        ^
> /linux/tools/sched_ext/build/include/vmlinux.h:83614:8: note: previous
> definition
>       is here
>  83614 | struct scx_bpf_select_cpu_and_args {
>        |        ^
> In file included from scx_simple.bpf.c:23:
> In file included from /linux/tools/sched_ext/include/scx/common.bpf.h:765:
> /linux/tools/sched_ext/include/scx/compat.bpf.h:176:8: error: redefinition of
>       'scx_bpf_dsq_insert_vtime_args'
>   176 | struct scx_bpf_dsq_insert_vtime_args {
>       |        ^
> /linux/tools/sched_ext/build/include/vmlinux.h:83607:8: note: previous
> definition
>       is here
>  83607 | struct scx_bpf_dsq_insert_vtime_args {
>        |        ^
> 2 errors generated.
> make: *** [Makefile:176:
> /linux/tools/sched_ext/build/obj/sched_ext/scx_simple.bpf.o] Error 1
> make: *** Waiting for unfinished jobs....
> In file included from scx_qmap.bpf.c:25:
> In file included from /linux/tools/sched_ext/include/scx/common.bpf.h:765:
> /linux/tools/sched_ext/include/scx/compat.bpf.h:170:8: error: redefinition of
>       'scx_bpf_select_cpu_and_args'
>   170 | struct scx_bpf_select_cpu_and_args {
>       |        ^
> /linux/tools/sched_ext/build/include/vmlinux.h:83614:8: note: previous
> definition
>       is here
>  83614 | struct scx_bpf_select_cpu_and_args {
>        |        ^
> In file included from scx_qmap.bpf.c:25:
> In file included from /linux/tools/sched_ext/include/scx/common.bpf.h:765:
> /linux/tools/sched_ext/include/scx/compat.bpf.h:176:8: error: redefinition of
>       'scx_bpf_dsq_insert_vtime_args'
>   176 | struct scx_bpf_dsq_insert_vtime_args {
>       |        ^
> /linux/tools/sched_ext/build/include/vmlinux.h:83607:8: note: previous
> definition
>       is here
>  83607 | struct scx_bpf_dsq_insert_vtime_args {
>        |        ^
> 2 errors generated.
> make: *** [Makefile:176:
> /linux/tools/sched_ext/build/obj/sched_ext/scx_qmap.bpf.o] Error 1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ