From patchwork Wed Mar 9 16:52:17 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "T.J. Mercier" X-Patchwork-Id: 12775294 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 8EC27C433EF for ; Wed, 9 Mar 2022 16:52:57 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id D98F610E4BE; Wed, 9 Mar 2022 16:52:56 +0000 (UTC) Received: from mail-yb1-xb49.google.com (mail-yb1-xb49.google.com [IPv6:2607:f8b0:4864:20::b49]) by gabe.freedesktop.org (Postfix) with ESMTPS id 104EC10E4BE for ; Wed, 9 Mar 2022 16:52:56 +0000 (UTC) Received: by mail-yb1-xb49.google.com with SMTP id n66-20020a254045000000b0062883b59ddbso2136212yba.12 for ; Wed, 09 Mar 2022 08:52:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=date:in-reply-to:message-id:mime-version:references:subject:from:to :cc; bh=a5Dt/ckgrAR/j0DHD5MablupC6tRY3n4B+kc2OBEq1E=; b=lf6qdnlnShM+NyA+sRumM9hivTRIGcCncGZbgQNzurEcC0PelK7f0Thi+M3ueh/60u crlhMuUH1ipr0mpuDqyE8aJ84VySIaff1FD+fE9773Bt+fv449Jm3nP3wPIlVA+Qfzav 0k2WlYeS8LRPkeGvJS/ckcrKMSgPM5JtRDzCNqenqST8iJomE7l5mxPW2JqytjG7tKEz E11F13r1PzT40iKei9VjsWcsCTlAVdI2efPX0/uTfWtH4OCy9bcb/rt71jwCVzpmmrbw 9TYlUoBsQKAMkXQRru4/JO9WydZpoUuui7gHXDFAFHPvAuocMffpVfEKhnWZZaGcVMZ7 KGKw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:in-reply-to:message-id:mime-version :references:subject:from:to:cc; bh=a5Dt/ckgrAR/j0DHD5MablupC6tRY3n4B+kc2OBEq1E=; b=UBQYPO+JNaAsCup6TudRJX8jpOAeTEWppGGJmL8/6jFZ1qVOhB13FxeestuKtG3Obb Nnni8ftUhGbDfiYnv3dtDu1E3RFrQIJhllTzx8f00TRmooX7mHbdPZzfKs6erDfKxaI6 iB8iktMCPO1lz7yIFRq/ttPHtu77W2w5bXz83d02v0Cd6okNWVqD1MV1faM2tyBMZTbP HQyMzmf2HrqPNRKTTT3oO1c9yP/Y/MqNj7wGBNX6H2NhQaBvxa9jDdrdYknSonaS5FXR 9CXaCISZeq3Th8o3wzJjwj1VnT9gnceRlePn1yoBOiWg0EfGoxBiavummbQv/bT5IUrx O1uQ== X-Gm-Message-State: AOAM531HQPwnR2jJc9W22+L7ntKN5aKFDGvMJT4POEB28JH8iuLMyps8 5vhkoa6UvAbdwoeu1SqQj+qJ8vjc3CIRLCM= X-Google-Smtp-Source: ABdhPJzdLHhn1AB/XDC8KoTs36Zqp19ShJhHV1TSxCbFMU/1hAK+2Cj1Svo6KldgaODaBXyTBc9IHyUlIGkN9Zk= X-Received: from tj2.c.googlers.com ([fda3:e722:ac3:cc00:20:ed76:c0a8:187]) (user=tjmercier job=sendgmr) by 2002:a5b:9c2:0:b0:611:ad59:be04 with SMTP id y2-20020a5b09c2000000b00611ad59be04mr510975ybq.405.1646844775149; Wed, 09 Mar 2022 08:52:55 -0800 (PST) Date: Wed, 9 Mar 2022 16:52:17 +0000 In-Reply-To: <20220309165222.2843651-1-tjmercier@google.com> Message-Id: <20220309165222.2843651-8-tjmercier@google.com> Mime-Version: 1.0 References: <20220309165222.2843651-1-tjmercier@google.com> X-Mailer: git-send-email 2.35.1.616.g0bdcbb4464-goog Subject: [RFC v3 7/8] binder: use __kernel_pid_t and __kernel_uid_t for userspace From: "T.J. Mercier" To: Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Daniel Vetter , Jonathan Corbet , Greg Kroah-Hartman , " =?utf-8?q?Arve_Hj=C3=B8?= =?utf-8?q?nnev=C3=A5g?= " , Todd Kjos , Martijn Coenen , Joel Fernandes , Christian Brauner , Hridya Valsaraju , Suren Baghdasaryan , Sumit Semwal , " =?utf-8?q?Christian_K=C3=B6nig?= " , Benjamin Gaignard , Liam Mark , Laura Abbott , Brian Starkey , John Stultz , Tejun Heo , Zefan Li , Johannes Weiner , Shuah Khan X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-doc@vger.kernel.org, Kenny.Ho@amd.com, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, linaro-mm-sig@lists.linaro.org, linux-kselftest@vger.kernel.org, kaleshsingh@google.com, cgroups@vger.kernel.org, "T.J. Mercier" , linux-media@vger.kernel.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" The kernel interface should use types that the kernel defines instead of pid_t and uid_t, whose definiton is owned by libc. This fixes the header so that it can be included without first including sys/types.h. Signed-off-by: T.J. Mercier Acked-by: Todd Kjos --- include/uapi/linux/android/binder.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/uapi/linux/android/binder.h b/include/uapi/linux/android/binder.h index 169fd5069a1a..aa28454dbca3 100644 --- a/include/uapi/linux/android/binder.h +++ b/include/uapi/linux/android/binder.h @@ -289,8 +289,8 @@ struct binder_transaction_data { /* General information about the transaction. */ __u32 flags; - pid_t sender_pid; - uid_t sender_euid; + __kernel_pid_t sender_pid; + __kernel_uid_t sender_euid; binder_size_t data_size; /* number of bytes of data */ binder_size_t offsets_size; /* number of bytes of offsets */