[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <aKcfOXcutUwoivDD@google.com>
Date: Thu, 21 Aug 2025 13:29:29 +0000
From: Carlos Llamas <cmllamas@...gle.com>
To: Thorsten Leemhuis <linux@...mhuis.info>
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
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: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".
>
> Ciao, Thorsten
Judging by the regex in the error log it seems there is a new
restriction to not using underscores in the yml files. This restriction
probably raced with my patch in next. It should be very easy to fix. Can
you please try replacing the underscores?
$ sed -i 's/_/-/' Documentation/netlink/specs/binder.yaml
I think that should fix your build. I'll try to reproduce.
--
Carlos Llamas
Powered by blists - more mailing lists