Message ID | 20221110203405.611600-1-dualli@chromium.org |
---|---|
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp364762wru; Thu, 10 Nov 2022 12:39:30 -0800 (PST) X-Google-Smtp-Source: AMsMyM5XxDAoAaJiOCezc592dUkHfhxzXHGlULLXOOIDmMy2hImYotnIzuWpaynMMBV65JvLtz7i X-Received: by 2002:a63:135e:0:b0:46b:8e9:747 with SMTP id 30-20020a63135e000000b0046b08e90747mr3230061pgt.365.1668112769620; Thu, 10 Nov 2022 12:39:29 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668112769; cv=none; d=google.com; s=arc-20160816; b=B2NrgBvLwvlAFi4GDKr9BXez46QDDc0S9zxfNX4StpVhSzL7HGjsnyry5wkZEVKftj +vYxvioj/Y1vLsQ8ZsxNubLibQfJZu3hvEV/ftTQNKW11R8Sb6Ug0ZN5anWNBrJmyb4o oG4WbsvzUxG3YWIsPhfBJq6iRXFCs3lbu2XiWkGe23yMs8vgmJwI7ELQeSH510kR4E8D 2SwvfHwUgw/mV6YencmmTCygG0pDPmfItHZ6GtHVe8Hp6p1GJtRygPrRV/DM+4HnYtoB ye12pH5S0STMyBG8USt0drup+07difnasxoewvbgW2Mi0GnmlCPYrktn2XsRop2Ds6zB J+tA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=fveASnawEKq49sScldsH7xrgcmtVfcP4IVtANZfOHI4=; b=sWEpd1pNTQSYKRRbn+0xJmbYWND7ba3vvl8QIuzt7u6EE2hYhYwfpFpaF8X7aRyKgg O2RofNudA4Wse8rXC9OqjwMZWre4p8HiEObrs20n+nymEVHfXnctMYlfD7VtRcEvXm9c 7qxxnbcKmViHsH780HyXQep+9WNd5ggARWKqR56hgs/ldLnB+EpiarA4bro31SKQJNTb hUihbLYlP6by+jr2sM9tUAdOpoMXAH5969BrAQU4RCdcbRuu0/DlzAAD7dMlRwPeP/bR 4DJPkp0f5b0LDBzxWPPDLHKmIh6rWv6dY+saxTSIXZ8VHbvOAMHVy1N2zkiSXZyvsgIp NZDA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=I8kyV2WK; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id e13-20020a63db0d000000b0046f4d4cc59asi229561pgg.160.2022.11.10.12.39.15; Thu, 10 Nov 2022 12:39:29 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=I8kyV2WK; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231513AbiKJUeP (ORCPT <rfc822;winker.wchi@gmail.com> + 99 others); Thu, 10 Nov 2022 15:34:15 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41924 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230175AbiKJUeL (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Thu, 10 Nov 2022 15:34:11 -0500 Received: from mail-pj1-x102c.google.com (mail-pj1-x102c.google.com [IPv6:2607:f8b0:4864:20::102c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 44DFFD6F for <linux-kernel@vger.kernel.org>; Thu, 10 Nov 2022 12:34:10 -0800 (PST) Received: by mail-pj1-x102c.google.com with SMTP id d59-20020a17090a6f4100b00213202d77e1so5926488pjk.2 for <linux-kernel@vger.kernel.org>; Thu, 10 Nov 2022 12:34:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=fveASnawEKq49sScldsH7xrgcmtVfcP4IVtANZfOHI4=; b=I8kyV2WKMz19LsPkoABC4KCBlLbb6sBq8zHFxRiOQcZ2FYzU+B4dzHpSA5b1OQ4sa7 robQmEgo1Lm9tM24LRMkGesNQaMKi15AKLbsfsJ/8TfL41FeUwzcSZYmSrdECkoP/t// 255edwZnDyeamI3tMATmSuFv+LAkkOCy4z3i4= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=fveASnawEKq49sScldsH7xrgcmtVfcP4IVtANZfOHI4=; b=S3JKGeWIepmpaOEgYD8tQe1MfPAQK3pxmJsmiGeCiuybDG0G5zXLICtE7O0pEcX/zm 1TU939JvORA3ouJOG/azy+ZCJZPOZhr2FwLk84r0+0X/phjNUCzEPRisqcjoHEeqQUSl qukleiqsNu0dtZrtNBy0q3zb1my7xIvY/qYMN/dKd/GSr8EonHu8N857EVK4CYAjODTT +CZaFucBddYkHeFtaO6kp20rFFtihC1O3vcUhW4dY1Yo7zBK0zufgpPyzTdlLlmUfSLO pPYwaHlC+fYYO7a9DNAOsv5V3460IkRmR57G0cctEM3Gt5N1beLQEONylle0Q86jgeDF Zt5A== X-Gm-Message-State: ACrzQf2VLgFiBgj2ujuv+k6E0Wa7R1xsV+sGpyQigwyZX2gawI1FoKxB lDdnqC1Xmc9IDOa+6nniW574VA== X-Received: by 2002:a17:902:b20a:b0:178:6f5b:f903 with SMTP id t10-20020a170902b20a00b001786f5bf903mr67857044plr.39.1668112449765; Thu, 10 Nov 2022 12:34:09 -0800 (PST) Received: from li-cloudtop.c.googlers.com.com (30.161.125.34.bc.googleusercontent.com. [34.125.161.30]) by smtp.gmail.com with ESMTPSA id d207-20020a621dd8000000b0056be1581126sm67703pfd.143.2022.11.10.12.34.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 10 Nov 2022 12:34:09 -0800 (PST) From: Li Li <dualli@chromium.org> To: dualli@google.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, devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org, hridya@google.com, smoreland@google.com Cc: kernel-team@android.com Subject: [PATCH v2 0/1] binder: return pending info for frozen async txns Date: Thu, 10 Nov 2022 12:34:04 -0800 Message-Id: <20221110203405.611600-1-dualli@chromium.org> X-Mailer: git-send-email 2.38.1.431.g37b22c650d-goog MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS autolearn=ham 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: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1748503562901988240?= X-GMAIL-MSGID: =?utf-8?q?1749143015495010955?= |
Series |
binder: return pending info for frozen async txns
|
|
Message
Li Li
Nov. 10, 2022, 8:34 p.m. UTC
From: Li Li <dualli@google.com>
User applications need to know if their binder transactions reach a
frozen process or not. For sync binder calls, Linux kernel already
has a dedicated return value BR_FROZEN_REPLY, indicating this sync
binder transaction will be rejected (similar to BR_DEAD_REPLY) as the
target process is frozen. But for async binder calls, the user space
application doesn't have a way to know if the target process is frozen.
This patch adds a new return value, BR_TRANSACTION_PENDING, to fix this
issue. Similar to BR_TRANSACTION_COMPLETE, it means the async binder
transaction has been put in the queue of the target process, but it's
waiting for the target process to be unfrozen.
v1: checkpatch.pl --strict passed
v2: protect proc->is_frozen with lock, fix typo in comments
Li Li (1):
binder: return pending info for frozen async txns
drivers/android/binder.c | 31 +++++++++++++++++++++++------
drivers/android/binder_internal.h | 3 ++-
include/uapi/linux/android/binder.h | 7 ++++++-
3 files changed, 33 insertions(+), 8 deletions(-)