Re: [PATCH v2 1/1] binder: report txn errors via generic netlink

From: Li Li
Date: Fri Oct 11 2024 - 03:43:17 EST


On Thu, Oct 10, 2024 at 11:51 PM Greg KH <gregkh@xxxxxxxxxxxxxxxxxxx> wrote:
>
> On Thu, Oct 10, 2024 at 11:44:27PM -0700, Li Li wrote:
> > From: Li Li <dualli@xxxxxxxxxx>
> >
> > Frozen tasks can't process binder transactions, so sync binder
> > transactions will fail with BR_FROZEN_REPLY and async binder
> > transactions will be queued in the kernel async binder buffer.
> > As these queued async transactions accumulates over time, the async
> > buffer will eventually be running out, denying all new transactions
> > after that with BR_FAILED_REPLY.
> >
> > In addition to the above cases, different kinds of binder error codes
> > might be returned to the sender. However, the core Linux, or Android,
> > system administration process never knows what's actually happening.
> >
> > This patch introduces the Linux generic netlink messages into the binder
> > driver so that the Linux/Android system administration process can
> > listen to important events and take corresponding actions, like stopping
> > a broken app from attacking the OS by sending huge amount of spamming
> > binder transactions.
> >
> > To prevent making the already bloated binder.c even bigger, a new source
> > file binder_genl.c is created to host those generic netlink code.
> >
> > Signed-off-by: Li Li <dualli@xxxxxxxxxx>
> > ---
> > Documentation/admin-guide/binder_genl.rst | 69 ++++++
>
> You add a file but not to the documentation build? Did you test-build
> the documentation to see where it shows up at?
>
My bad. I met this [1] error when building the doc and forgot to add
Documentation/admin-guide/index.rst. Will fix this in v3, along with
other fixes.

[1] https://lore.kernel.org/lkml/20241008095808.1ee10054@xxxxxxxxxxxxxxxx/T/