From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.3 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,INCLUDES_PATCH,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 58413C4363D for ; Fri, 25 Sep 2020 07:05:15 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 1759922211 for ; Fri, 25 Sep 2020 07:05:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1601017515; bh=zuSbzzHJit1jTTi9zp2/OL6gmoxtDNrAYKnrZaniXPA=; h=References:In-Reply-To:From:Date:Subject:To:Cc:List-ID:From; b=qq9M/qozS6amypeJqilw34unpWRxvzNrla0NPryvGqaryLZ1j25+dqBrQSuqkfJYi LQc/188ZcqP0tq6lJ7/B14TD/DAR+6W9tM2c2cBQq2xfAFBkWxC/m2NSTl7THo/sc0 7WDVi+8c0NRoq1DU/3P6KcKVwOk7BqR7umXqfjQo= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727253AbgIYHFO (ORCPT ); Fri, 25 Sep 2020 03:05:14 -0400 Received: from mail.kernel.org ([198.145.29.99]:38946 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727110AbgIYHFM (ORCPT ); Fri, 25 Sep 2020 03:05:12 -0400 Received: from mail-oi1-f179.google.com (mail-oi1-f179.google.com [209.85.167.179]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 854A422211; Fri, 25 Sep 2020 07:05:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1601017511; bh=zuSbzzHJit1jTTi9zp2/OL6gmoxtDNrAYKnrZaniXPA=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=COwzg7EwHGXHnuZghZJvITz9sRCLyESwO0uVZazEayykQMqNOsPNMcxyNMlPaVqED 43qnSWklRHTACK9OREuOd71236kx+18dr8xg22/1iZKAj6i0mNPrUHHwdn3GBqwt09 9HI4fWKfLwiw/enilovPLUkhV0fSwKKnw9e6P3VU= Received: by mail-oi1-f179.google.com with SMTP id a3so1794090oib.4; Fri, 25 Sep 2020 00:05:11 -0700 (PDT) X-Gm-Message-State: AOAM531PpET5mBNp14nWTzZ5wqL6aePT59x0njTmTLH/w1KWw5+/anaZ 1KFoy0PGShvedF5odMAmRltRjpTlu7bjVlY8z1U= X-Google-Smtp-Source: ABdhPJyCWVBClIovJDS4Ckc7x38d5+rCdPwrUW7K2rukfHvM6mTo/4WFTOfKelVr79t/hYl6HScpW9/hbc3R0gbrApw= X-Received: by 2002:aca:d845:: with SMTP id p66mr699567oig.47.1601017510722; Fri, 25 Sep 2020 00:05:10 -0700 (PDT) MIME-Version: 1.0 References: <20200918112459.918328-1-misch@google.com> In-Reply-To: <20200918112459.918328-1-misch@google.com> From: Ard Biesheuvel Date: Fri, 25 Sep 2020 09:04:59 +0200 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH] efivarfs: Replace invalid slashes with exclamation marks in dentries. To: Michael Schaller Cc: michael@5challer.de, Matthew Garrett , Jeremy Kerr , linux-efi , Linux Kernel Mailing List Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-efi@vger.kernel.org On Fri, 18 Sep 2020 at 13:25, Michael Schaller wrote: > > Without this patch efivarfs_alloc_dentry creates dentries with slashes in > their name if the respective EFI variable has slashes in its name. This in > turn causes EIO on getdents64, which prevents a complete directory listing > of /sys/firmware/efi/efivars/. > > This patch replaces the invalid shlashes with exclamation marks like > kobject_set_name_vargs does for /sys/firmware/efi/vars/ to have consistently > named dentries under /sys/firmware/efi/vars/ and /sys/firmware/efi/efivars/. Thanks Michael Can you resend this with a signed-off-by line please? > --- > fs/efivarfs/super.c | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/fs/efivarfs/super.c b/fs/efivarfs/super.c > index 28bb5689333a..15880a68faad 100644 > --- a/fs/efivarfs/super.c > +++ b/fs/efivarfs/super.c > @@ -141,6 +141,9 @@ static int efivarfs_callback(efi_char16_t *name16, efi_guid_t vendor, > > name[len + EFI_VARIABLE_GUID_LEN+1] = '\0'; > > + /* replace invalid slashes like kobject_set_name_vargs does for /sys/firmware/efi/vars. */ > + strreplace(name, '/', '!'); > + > inode = efivarfs_get_inode(sb, d_inode(root), S_IFREG | 0644, 0, > is_removable); > if (!inode) > -- > 2.28.0.681.g6f77f65b4e-goog >