public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Carlos Llamas <cmllamas@google.com>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: "Arve Hjønnevåg" <arve@android.com>,
	"Todd Kjos" <tkjos@android.com>,
	"Martijn Coenen" <maco@android.com>,
	"Joel Fernandes" <joel@joelfernandes.org>,
	"Christian Brauner" <brauner@kernel.org>,
	"Hridya Valsaraju" <hridya@google.com>,
	"Suren Baghdasaryan" <surenb@google.com>,
	"Arnd Bergmann" <arnd@arndb.de>,
	"Masahiro Yamada" <masahiroy@kernel.org>,
	"Li Li" <dualli@google.com>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] binder: add BINDER_GET_EXTENDED_ERROR ioctl
Date: Fri, 22 Apr 2022 16:01:43 +0000	[thread overview]
Message-ID: <YmLRZ4zFuw34nyOE@google.com> (raw)
In-Reply-To: <YmLI03OT6st9fcQD@kroah.com>

On Fri, Apr 22, 2022 at 05:25:07PM +0200, Greg Kroah-Hartman wrote:
> On Thu, Apr 21, 2022 at 04:20:36AM +0000, Carlos Llamas wrote:
> > Provide a userspace mechanism to pull precise error information upon
> > failed operations. Extending the current error codes returned by the
> > interfaces allows userspace to better determine the course of action.
> > This could be for instance, retrying a failed transaction at a later
> > point and thus offloading the error handling from the driver.
> > 
> > Some of the elements for logging failed transactions and similar are
> > folded into this new logic to avoid duplication. Such is the case for
> > error line numbers, which become irrelevant after assigning individual
> > error messages instead.
> > 
> > This patch also adds BINDER_GET_EXTENDED_ERROR to the binderfs feature
> > list, to help userspace determine if the new ioctl is supported by the
> > driver.
> 
> Hint, when you say "also" in a changelog text, that's a hint that this
> should be more than one patch.  The last thing should be a separate
> change, right?

Yes it should. I now notice I forgot to add the binderfs feature to the
kselftests too, so I'll include that in v2.

> > @@ -2845,22 +2885,20 @@ static void binder_transaction(struct binder_proc *proc,
> >  			/*
> >  			 * return_error is set above
> >  			 */
> > -			return_error_param = -EINVAL;
> > -			return_error_line = __LINE__;
> > +			binder_txn_error(e, &ee, return_error, -EINVAL,
> > +				"cannot find target node");
> 
> You do this a lot, how about making this one commit (first one), and
> then adding the new "back end" to the error stuff in a second commit.
> That would make it much easier to review, first commit does nothing new,
> second one adds the new functionality, and third adds the feature flag.

Yeah, that sounds like the appropiate split. Thanks!

> 
> thanks,
> 
> greg k-h

--
Carlos Llamas

      reply	other threads:[~2022-04-22 16:02 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-21  4:20 [PATCH] binder: add BINDER_GET_EXTENDED_ERROR ioctl Carlos Llamas
2022-04-22 15:25 ` Greg Kroah-Hartman
2022-04-22 16:01   ` Carlos Llamas [this message]

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=YmLRZ4zFuw34nyOE@google.com \
    --to=cmllamas@google.com \
    --cc=arnd@arndb.de \
    --cc=arve@android.com \
    --cc=brauner@kernel.org \
    --cc=dualli@google.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=hridya@google.com \
    --cc=joel@joelfernandes.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=maco@android.com \
    --cc=masahiroy@kernel.org \
    --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