[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <aKchboXyR1oQDV_e@google.com>
Date: Thu, 21 Aug 2025 13:38:54 +0000
From: Carlos Llamas <cmllamas@...gle.com>
To: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Cc: Thorsten Leemhuis <linux@...mhuis.info>, Li Li <dualli@...gle.com>,
Tiffany Yang <ynaffit@...gle.com>, John Stultz <jstultz@...gle.com>,
Shai Barack <shayba@...gle.com>,
Thiébaud Weksteen <tweek@...gle.com>,
kernel-team@...roid.com, linux-kernel@...r.kernel.org,
"David S. Miller" <davem@...emloft.net>,
Joel Fernandes <joelagnelf@...dia.com>,
Todd Kjos <tkjos@...roid.com>,
Arve Hjønnevåg <arve@...roid.com>,
Donald Hunter <donald.hunter@...il.com>,
Christian Brauner <brauner@...nel.org>,
Eric Dumazet <edumazet@...gle.com>,
"open list:NETWORKING [GENERAL]" <netdev@...r.kernel.org>,
Martijn Coenen <maco@...roid.com>,
Stephen Rothwell <sfr@...b.auug.org.au>,
Linux Next Mailing List <linux-next@...r.kernel.org>,
Jakub Kicinski <kuba@...nel.org>,
Linux kernel regressions list <regressions@...ts.linux.dev>,
Alice Ryhl <aliceryhl@...gle.com>,
Suren Baghdasaryan <surenb@...gle.com>,
Paolo Abeni <pabeni@...hat.com>, Simon Horman <horms@...nel.org>
Subject: Re: [PATCH v20 3/5] binder: introduce transaction reports via netlink
On Thu, Aug 21, 2025 at 03:25:59PM +0200, Greg Kroah-Hartman wrote:
> On Thu, Aug 21, 2025 at 03:00:50PM +0200, Thorsten Leemhuis wrote:
> > On 21.08.25 14:19, Greg Kroah-Hartman wrote:
> > > On Thu, Aug 21, 2025 at 10:49:09AM +0200, Thorsten Leemhuis wrote:
> > >> On 27.07.25 20:29, Carlos Llamas wrote:
> > >>> From: Li Li <dualli@...gle.com>
> > >>>
> > >>> Introduce a generic netlink multicast event to report binder transaction
> > >>> failures to userspace. This allows subscribers to monitor these events
> > >>> and take appropriate actions, such as stopping a misbehaving application
> > >>> that is spamming a service with huge amount of transactions.
> > >>>
> > >>> The multicast event contains full details of the failed transactions,
> > >>> including the sender/target PIDs, payload size and specific error code.
> > >>> This interface is defined using a YAML spec, from which the UAPI and
> > >>> kernel headers and source are auto-generated.
> > >>
> > >> It seems to me like this patch (which showed up in -next today after
> > >> Greg merged it) caused a build error for me in my daily -next builds
> > >> for Fedora when building tools/net/ynl:
> > >>
> > >> """
> > >> make[1]: Entering directory '/home/kbuilder/ark-vanilla/linux-knurd42/tools/net/ynl/lib'
> > >> gcc -std=gnu11 -O2 -W -Wall -Wextra -Wno-unused-parameter -Wshadow -c -MMD -c -o ynl.o ynl.c
> > >> AR ynl.a
> > >> make[1]: Leaving directory '/home/kbuilder/ark-vanilla/linux-knurd42/tools/net/ynl/lib'
> > >> make[1]: Entering directory '/home/kbuilder/ark-vanilla/linux-knurd42/tools/net/ynl/generated'
> > >> GEN binder-user.c
> > >> Traceback (most recent call last):
> > >> File "/home/kbuilder/ark-vanilla/linux-knurd42/tools/net/ynl/generated/../pyynl/ynl_gen_c.py", line 3673, in <module>
> > >> main()
> > >> ~~~~^^
> > >> File "/home/kbuilder/ark-vanilla/linux-knurd42/tools/net/ynl/generated/../pyynl/ynl_gen_c.py", line 3382, in main
> > >> parsed = Family(args.spec, exclude_ops)
> > >> File "/home/kbuilder/ark-vanilla/linux-knurd42/tools/net/ynl/generated/../pyynl/ynl_gen_c.py", line 1205, in __init__
> > >> super().__init__(file_name, exclude_ops=exclude_ops)
> > >> ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> > >> File "/home/kbuilder/ark-vanilla/linux-knurd42/tools/net/ynl/pyynl/lib/nlspec.py", line 462, in __init__
> > >> jsonschema.validate(self.yaml, schema)
> > >> ~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^
> > >> File "/usr/lib/python3.13/site-packages/jsonschema/validators.py", line 1307, in validate
> > >> raise error
> > >> jsonschema.exceptions.ValidationError: 'from_pid' does not match '^[0-9a-z-]+$'
> > >>
> > >> Failed validating 'pattern' in schema['properties']['attribute-sets']['items']['properties']['attributes']['items']['properties']['name']:
> > >> {'pattern': '^[0-9a-z-]+$', 'type': 'string'}
> > >>
> > >> On instance['attribute-sets'][0]['attributes'][2]['name']:
> > >> 'from_pid'
> > >> make[1]: *** [Makefile:48: binder-user.c] Error 1
> > >> make[1]: Leaving directory '/home/kbuilder/ark-vanilla/linux-knurd42/tools/net/ynl/generated'
> > >> make: *** [Makefile:25: generated] Error 2
> > >> """
> > >
> > > Odd, this works for me.
> >
> > Hmmm, happened on various Fedora releases and archs in Fedora's coprs
> > buildsys for me today. And with a local Fedora 41 x86_64 install, too;
> > in the latter case (just verified) both when checking out next-20250821
> > and 63740349eba78f ("binder: introduce transaction reports via netlink")
> > from -next.
> >
> > > How exactly are you building this?
> >
> > Just "cd tools/net/ynl; make".
>
> Odd, this works for me in the driver-core-next branch, but in linux-next
> it blows up like this. Is it a merge issue somewhere? I don't know
> what this tool is doing to attempt to debug it myself, sorry.
>
> greg k-h
The commit enforcing the restriction on underscores is:
af852f1f1c95 ("netlink: specs: enforce strict naming of properties")
I'm able to reproduce the issue locally now, and switching to dashes
fixes it. Sorry, I was not aware of this restriction but I'll send a
quick patch to fix this.
--
Carlos Llamas
Powered by blists - more mailing lists