Re: [PATCH v20 3/5] binder: introduce transaction reports via netlink

From: Greg Kroah-Hartman
Date: Thu Aug 21 2025 - 08:20:35 EST


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@xxxxxxxxxx>
> >
> > 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.

How exactly are you building this?

thanks,

greg k-h