netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jakub Kicinski <kuba@kernel.org>
To: Li Li <dualli@chromium.org>
Cc: dualli@google.com, corbet@lwn.net, davem@davemloft.net,
	edumazet@google.com, pabeni@redhat.com, donald.hunter@gmail.com,
	gregkh@linuxfoundation.org, arve@android.com, tkjos@android.com,
	maco@android.com, joel@joelfernandes.org, brauner@kernel.org,
	cmllamas@google.com, surenb@google.com, arnd@arndb.de,
	masahiroy@kernel.org, bagasdotme@gmail.com, horms@kernel.org,
	linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org,
	netdev@vger.kernel.org, hridya@google.com, smoreland@google.com,
	kernel-team@android.com
Subject: Re: [PATCH net-next v6 1/1] binder: report txn errors via generic netlink
Date: Tue, 29 Oct 2024 07:14:37 -0700	[thread overview]
Message-ID: <20241029071437.2381adea@kernel.org> (raw)
In-Reply-To: <20241028101952.775731-2-dualli@chromium.org>

On Mon, 28 Oct 2024 03:19:51 -0700 Li Li wrote:
> +			report.err = BR_ONEWAY_SPAM_SUSPECT;
> +			report.from_pid = proc->pid;
> +			report.from_tid = thread->pid;
> +			report.to_pid = target_proc ? target_proc->pid : 0;
> +			report.to_tid = target_thread ? target_thread->pid : 0;
> +			report.reply = reply;
> +			report.flags = tr->flags;
> +			report.code = tr->code;
> +			report.data_size = tr->data_size;
> +			binder_genl_send_report(context, &report, sizeof(report));

Could you break this struct apart into individual attributes?
Carrying binary structs in netlink has been done historically 
but we moved away from it. It undermines the ability to extend
the output and do automatic error checking.

BTW if you would like to keep using the uapi/linux/android directory
feel free to add this as the first patch of the series:
https://github.com/kuba-moo/linux/commit/73fde49060cd89714029ccee5d37dcc37b8291f6

  reply	other threads:[~2024-10-29 14:14 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-28 10:19 [PATCH net-next v6 0/1] binder: report txn errors via generic netlink (genl) Li Li
2024-10-28 10:19 ` [PATCH net-next v6 1/1] binder: report txn errors via generic netlink Li Li
2024-10-29 14:14   ` Jakub Kicinski [this message]
2024-10-29 15:52     ` Li Li

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20241029071437.2381adea@kernel.org \
    --to=kuba@kernel.org \
    --cc=arnd@arndb.de \
    --cc=arve@android.com \
    --cc=bagasdotme@gmail.com \
    --cc=brauner@kernel.org \
    --cc=cmllamas@google.com \
    --cc=corbet@lwn.net \
    --cc=davem@davemloft.net \
    --cc=donald.hunter@gmail.com \
    --cc=dualli@chromium.org \
    --cc=dualli@google.com \
    --cc=edumazet@google.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=horms@kernel.org \
    --cc=hridya@google.com \
    --cc=joel@joelfernandes.org \
    --cc=kernel-team@android.com \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=maco@android.com \
    --cc=masahiroy@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=smoreland@google.com \
    --cc=surenb@google.com \
    --cc=tkjos@android.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).