From patchwork Mon Jan 21 10:48:01 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christian Brauner X-Patchwork-Id: 10773567 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 633A4139A for ; Mon, 21 Jan 2019 10:49:53 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 528C0298E3 for ; Mon, 21 Jan 2019 10:49:53 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 470F5298F2; Mon, 21 Jan 2019 10:49:53 +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 E047D298E3 for ; Mon, 21 Jan 2019 10:49:52 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727679AbfAUKtw (ORCPT ); Mon, 21 Jan 2019 05:49:52 -0500 Received: from mail-ed1-f65.google.com ([209.85.208.65]:33375 "EHLO mail-ed1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727440AbfAUKtw (ORCPT ); Mon, 21 Jan 2019 05:49:52 -0500 Received: by mail-ed1-f65.google.com with SMTP id p6so16256117eds.0 for ; Mon, 21 Jan 2019 02:49:50 -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:mime-version :content-transfer-encoding; bh=672DNVKwdLNkeWCU6kub9NAgBn35eHdiFpr81qoO9bc=; b=OuRDQgF9bkAEdlynczwdsl9IT5s2WEODOlqnit7XOXdBvQpWbL7MyMDhG6Duo6tM2C b3xQUQANlTE4hzEnBwie4AXFLfTvbyJed1fJrVnNcJbdZiTGxEVuvuVT0+miCgEyecoV EUoBqshmYeuKMirOQGLqvIg3ljSlKbl3Gd23wymE8UzTVxQ5bHJxMY69StaQYjvqZ8vL FOeBimuDqzTZZtYpob7GnU2BrW/5Wk1+g+dXnnxZrCdx/Kafn4R0YvyqKj/uiAF61MDg Z9spXBr8EZHngBeGCLfrxP0yA8JfQxxKWrUvo20z0USmPEp0L4Cy14u3ydT9nzl3JFTa +T6Q== 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:mime-version :content-transfer-encoding; bh=672DNVKwdLNkeWCU6kub9NAgBn35eHdiFpr81qoO9bc=; b=hRyjobdtZin8lOAieg/9nFIBcTGgQNfKY2s6oU22VA0PGB+1PQsjRW/54W8o2J67NY sEbgSUfwBmpHM/leJfF55Zm2DITFyRhapTLxxW8r3P9e7+JKGhSK5V9eoeYlU3Co8VWK URi3NLXoFNpiJEjTa1jtSd6KFsmyTcuoIMz1xelyLG0Ctuh2YXxpL79I31vqv92HErFI 3FzReYClmXXtqyHqReWrJzD84XQRRq7OAO/M14garxtU9SqaYW1CB2YUNXSsH0Hex2sc UogoN43g7iIYM8no72r2WhjSWaZw6H0858Oy2UtcZ8bkLlFGM1AmlIcmRXnN2lqoVZzB b3Ww== X-Gm-Message-State: AJcUukdKBpOLEyWVhShl+q2rIWfX7/vwySdXHMV7L4PsBOQ+Cse4c7VH K+a4J7bSc13bB+AmVsX/WnylDw== X-Google-Smtp-Source: ALg8bN6Q/uvuQOP2WnqOBnnW8Saqcasjq4ZCBlnbtJJ6aoIbWyhXeYf1wYXn10AIQCms8Q0IEQp2Pg== X-Received: by 2002:a50:8bb5:: with SMTP id m50mr25944625edm.211.1548067790131; Mon, 21 Jan 2019 02:49:50 -0800 (PST) Received: from localhost.localdomain ([2a02:8109:b6bf:f9e4:9473:6b39:afaf:14d4]) by smtp.gmail.com with ESMTPSA id e35sm9006196eda.13.2019.01.21.02.49.48 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 21 Jan 2019 02:49:49 -0800 (PST) From: Christian Brauner To: gregkh@linuxfoundation.org, devel@driverdev.osuosl.org, linux-fsdevel@vger.kernel.org, viro@zeniv.linux.org.uk, dhowells@redhat.com Cc: tkjos@google.com, Christian Brauner Subject: [PATCH v1 0/7] binderfs: debug galore Date: Mon, 21 Jan 2019 11:48:01 +0100 Message-Id: <20190121104808.24108-1-christian@brauner.io> X-Mailer: git-send-email 2.19.1 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 Hey everyone, Al gave me a really helpful review of binderfs and pointed out a range of bugs. The most obvious and serious ones have fortunately already been taken care of by patches sitting in Greg's char-misc-linus tree. The others are hopefully all covered in this patchset. /* Changelog */ Nothing major apart from working in a bunch of good comments and suggestions from Al. The most interesting one is probably the switch from d_alloc_name() + d_lookup() to lookup_one_len() when detecting name clashes between binder devices. This also forces us to switch from d_add() to d_instantiate() since lookup_one_len() adds new dentries to the hashqueue. If we were to use d_add() after this we'd end up with the same dentry over the same inode twice. I moved the switch from d_add() to d_instantiate() into a separate commit. The rest should hopefully be pretty mundane. Thanks! Christian Christian Brauner (7): binderfs: remove outdated comment binderfs: prevent renaming the control dentry binderfs: rework binderfs_fill_super() binderfs: rework binderfs_binder_device_create() binderfs: kill_litter_super() before cleanup binderfs: drop lock in binderfs_binder_ctl_create binderfs: switch from d_add() to d_instantiate() drivers/android/binderfs.c | 121 +++++++++++++------------------------ 1 file changed, 43 insertions(+), 78 deletions(-)