From patchwork Mon Jan 21 11:01:20 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christian Brauner X-Patchwork-Id: 10773585 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 0A70913B4 for ; Mon, 21 Jan 2019 11:01:39 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id EE52429AEB for ; Mon, 21 Jan 2019 11:01:38 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E272829E02; Mon, 21 Jan 2019 11:01:38 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9508829AEB for ; Mon, 21 Jan 2019 11:01:38 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727566AbfAULBd (ORCPT ); Mon, 21 Jan 2019 06:01:33 -0500 Received: from mail-ed1-f65.google.com ([209.85.208.65]:35986 "EHLO mail-ed1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727168AbfAULBc (ORCPT ); Mon, 21 Jan 2019 06:01:32 -0500 Received: by mail-ed1-f65.google.com with SMTP id f23so16250681edb.3 for ; Mon, 21 Jan 2019 03:01:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=brauner.io; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=QZ2CPjy7IlGoDls62PJ6M9VTltf7smGdYPcjaWrBAIo=; b=TtViGTvw1+UU0dO+tt7jCRlpRmZzVUopfnASFA/T6DNlZJbPNjrKIouCY8DTtj5xDS KH2GLEMezROXyGPMM9NPJr6zQlKHKuPo9AIkg/n6Fvmzgc4dVr/vM5RIjc0hS+QKZDCw s8tg0iHarkA70VXKiWCbSKPzFDi9b7PWfwpzZY5asAil6MClCKPuzB6qxF2j3BWhyEaH 0lTSXIiR2YVajAPZQuWTVxHm+SANITabZytrqVXLj3s7y4ql8NNROAEI2evVuzutm9Jv hpYwy3jGV0jHRiwKBkTizDSmHfdNKMqQWjRAgnRyUSO7i4C079AlM7sD4ns3jqhDYRRY Wgag== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=QZ2CPjy7IlGoDls62PJ6M9VTltf7smGdYPcjaWrBAIo=; b=ia9NH+65GJyecphMj+mECimQpSPvx/OYzSaNiE3AaqZ7ECTX+ItNTq1WR7lGk29RK2 muU8ELIirotmdabjxsRjNidqw+K4Hsf7CLEMuZvyd/ch/4fk2+kWYcBrM7XRovyaC1T6 dzJ/OoFkfrB91BSEEaMu9ltCl6M8b4LYy67N7uHmsmGHVOmlqWqaxpLXv9rlg7vISwAC Fz/3YR054BOTvKeuY8kiovEJXO/T9iZ9UimcJTgLwc0W7KfE1MMbWqyXFmtYH4alqa29 QgmzWlMGgQZbZpgAPtmI+2mrO3RJI7ea5x8PhuTMyQx/BLSWrnPgrq1SlWsHYOrkgovI OIVQ== X-Gm-Message-State: AJcUukdcb4XBin2SOstdsIY1lfwmFfDgnNLf1QLU69eA8AxflJGX+nUX czOHmQlAOLUhsOsU/IOm/246Tw== X-Google-Smtp-Source: ALg8bN7GdkWbsl6yptlQKhorGkub5cmlRxkobu3Y732Sd9FCClvzbLCMk5gJ3pWCmS+Umc73ceg5nw== X-Received: by 2002:a17:906:b297:: with SMTP id q23-v6mr23691352ejz.147.1548068490775; Mon, 21 Jan 2019 03:01:30 -0800 (PST) Received: from localhost.localdomain ([2a02:8109:b6bf:f9e4:9473:6b39:afaf:14d4]) by smtp.gmail.com with ESMTPSA id t24sm8970080edb.7.2019.01.21.03.01.29 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 21 Jan 2019 03:01:30 -0800 (PST) From: Christian Brauner To: gregkh@linuxfoundation.org, tkjos@android.com, devel@driverdev.osuosl.org, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org Cc: tkjos@google.com, Christian Brauner Subject: [PATCH 2/2] binderfs: use __u32 for device numbers Date: Mon, 21 Jan 2019 12:01:20 +0100 Message-Id: <20190121110120.27003-2-christian@brauner.io> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20190121110120.27003-1-christian@brauner.io> References: <20190121110120.27003-1-christian@brauner.io> MIME-Version: 1.0 X-Patchwork-Bot: notify Sender: linux-fsdevel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP We allow more then 255 binderfs binder devices to be created since there are workloads that require more than that. If we use __u8 we'll overflow after 255. So let's use a __u32. Note that there's no released kernel with binderfs out there so this is not a regression. Signed-off-by: Christian Brauner --- include/uapi/linux/android/binderfs.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/uapi/linux/android/binderfs.h b/include/uapi/linux/android/binderfs.h index b41628b77120..87410477aea9 100644 --- a/include/uapi/linux/android/binderfs.h +++ b/include/uapi/linux/android/binderfs.h @@ -22,8 +22,8 @@ */ struct binderfs_device { char name[BINDERFS_MAX_NAME + 1]; - __u8 major; - __u8 minor; + __u32 major; + __u32 minor; }; /**