Received: by 2002:a05:6a10:6d10:0:0:0:0 with SMTP id gq16csp902879pxb; Fri, 22 Apr 2022 13:54:13 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxPyLDdYVLS1rnxTm+15m1xB8RXcrxgmNJnEmH7IJW4WVCtb8vGIOAvyk2RyKkuwjIvNkhl X-Received: by 2002:a17:90a:c70f:b0:1bf:3e2d:6cfa with SMTP id o15-20020a17090ac70f00b001bf3e2d6cfamr7494173pjt.70.1650660853311; Fri, 22 Apr 2022 13:54:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1650660853; cv=none; d=google.com; s=arc-20160816; b=acwnIcwUpm1p3ozbTIKSbi+y5fld+mN3DS4xX9zyVoWx5SrxqM8JnLqwICJBtmFGn/ toLv/OIMtmYHJyTtcmUWo/lfSdiT9Hd4z+hw5rz9U1lF0Tt/7mCIyyG5ZuYU8wKW8Be6 XhGa9muzhPR4YxIvdOnaTJrdOwZEXsjGfmWJMQ8205IPD+EjiS2CMospot2ZoMVSl+nN Oh9Qyrxt9bTr8HgM2QZpri75JJLxTgg6k5W6S637mM6YMgcRu/+AI+/0kBriEPw4E4As CG60KS5GfwUUDO2ZpZRZaPmQlgubzC1D8wRg2d5BgUzXSMTwdlYwaNixYp1JXo3U2LN6 lHOw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=fvtAej5JGuVNellLLY4vrStrSV2CBZuRCp+5/JoyStg=; b=lo+gtrjojumPtjuBdJonjb2G3pBQl7amRDHsxarHe8GR4OgJhJI4qFfvgVvV+7MWso cqtqgsp/z0/tD47tXYUQh16eg5VYHJ+ledgZhl2RXCRuNpn2jSLx6NmDRDvSjPME5dtg NkMekmsFZAukUlyVqC3pY4BjUdI0MaakN27Wpni5nI7bw2iKfVoCXo8W3VAQ3fGNSznS pSD0Q5nZ61us+DGWLfI3/Eg8AMm09eVa8kp8Hs9tOosEc4Th0oUyW4Tbk6W7a8DQzN5l VNZyPVbd6CKEa0hXH1royRCzQjDFBiI1OsBbfw55YHLOU76tI0jKusnsJC6ydLvdGeZk 7qNw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=bOdn0jIm; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id i190-20020a6387c7000000b003a158337b8bsi8857643pge.0.2022.04.22.13.54.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 Apr 2022 13:54:13 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=bOdn0jIm; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 49A34315CD5; Fri, 22 Apr 2022 12:48:39 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1359158AbiDVQEx (ORCPT + 99 others); Fri, 22 Apr 2022 12:04:53 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39628 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1349941AbiDVQEm (ORCPT ); Fri, 22 Apr 2022 12:04:42 -0400 Received: from mail-pf1-x431.google.com (mail-pf1-x431.google.com [IPv6:2607:f8b0:4864:20::431]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C59E15B3D7 for ; Fri, 22 Apr 2022 09:01:48 -0700 (PDT) Received: by mail-pf1-x431.google.com with SMTP id y14so7638330pfe.10 for ; Fri, 22 Apr 2022 09:01:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=fvtAej5JGuVNellLLY4vrStrSV2CBZuRCp+5/JoyStg=; b=bOdn0jImn1WzfjZlNuqZ0NhMzBD2ETilnRrtGpFJWNkMinZAyvm3Y5DhXSZMK7Gb7Q l8Z+XPs33ywbyztRtDR265zlFXOgQI9pw7HM6nwoKJDbteEH0Vd5EUon5g3ClY9b/vlB HonsGIi18Lr55450daKO0nITBr8Nf9xv5FEqlK5LP3HebVJ6Y64/EhwSlY0DO2lMapkB hhtIj73Uy4tcDLPDhxsY3duBU90/0xmP6g9NaJu1bdFU3+PSykbe5ztWaCSFc8HBeESU rc2FnydIYFD3xCQsXVAnkhCXBJkY/qQp9n/v6fNfST4mQ5foZo8rm7wV1105F8RvnL0k LWOw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=fvtAej5JGuVNellLLY4vrStrSV2CBZuRCp+5/JoyStg=; b=RJS7kXc42yj43cSTgveQR5dZ6qbRZj2MR/t7RAjsXjoynD4qvCWAWBZFBaX5ekCL8e xO4eGp6GJ8+IEdQuhQGM/jR4/W8Vwe/8jFnyZSpVCJV1ws8MgY3UAon5Y40XjHTyup4i urlvFERndPQnzP7neTUza5XuvHQ5GdEtD52/7A3FxeCDpwR/tIHwXOG783XcsU2KEsIM kvE0Jrd+g4aKeR2pXGMm+X/bVz61BDeEZJCMtHvr1QFoykqGiUSzpWlvZojQWPuXFHNo cf8jIE4jahROqDz4RR5NOK7vKjIS0pL0GL/Y7dUuGdqadU4AsRL9z2SFN0+zVpSEb8ui Yw8g== X-Gm-Message-State: AOAM533T4sIECViJ0tQcY8kE2CFxgr9+zJ5+ePToZuHa03h+/p/ycpEL Bj8CcLaJMYPYxX3m2BPSuisEDw== X-Received: by 2002:a05:6a00:1a8f:b0:50a:8c2d:2edf with SMTP id e15-20020a056a001a8f00b0050a8c2d2edfmr5629277pfv.82.1650643307893; Fri, 22 Apr 2022 09:01:47 -0700 (PDT) Received: from google.com (201.59.83.34.bc.googleusercontent.com. [34.83.59.201]) by smtp.gmail.com with ESMTPSA id l5-20020a63f305000000b0039daaa10a1fsm2525043pgh.65.2022.04.22.09.01.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 Apr 2022 09:01:47 -0700 (PDT) Date: Fri, 22 Apr 2022 16:01:43 +0000 From: Carlos Llamas To: Greg Kroah-Hartman Cc: Arve =?iso-8859-1?B?SGr4bm5lduVn?= , Todd Kjos , Martijn Coenen , Joel Fernandes , Christian Brauner , Hridya Valsaraju , Suren Baghdasaryan , Arnd Bergmann , Masahiro Yamada , Li Li , linux-kernel@vger.kernel.org Subject: Re: [PATCH] binder: add BINDER_GET_EXTENDED_ERROR ioctl Message-ID: References: <20220421042040.759068-1-cmllamas@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-9.5 required=5.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,USER_IN_DEF_DKIM_WL autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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