Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp618807pxb; Tue, 5 Apr 2022 16:08:32 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz3UYSC6iQ3JVd4s285m/sIMc3txyzXNZEYtOUX+Gvvaj5wtNnCacblQB0NG1Hq963SbbF/ X-Received: by 2002:a65:5a82:0:b0:386:f95:40fd with SMTP id c2-20020a655a82000000b003860f9540fdmr4803350pgt.256.1649200111946; Tue, 05 Apr 2022 16:08:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649200111; cv=none; d=google.com; s=arc-20160816; b=FYsFmw4h1h9OcNZoL7iei0GEdN504yMffwSDzI7VRdvr7bx0ykP3le70uTtgrZrg1s 7QbgdUnPUvzBWR7T/QM6D8jfatYBopnXdIxH97JqbO6FdwlM7XrCnXWhiUSK43VSSzJr DEe9yw/5ikEK8suHbuLXeXqDwn5l//hzkGTomsH41GqqoKe+pR8VCHsc1OaTaHgrph+G YWHADTXBzlyc/87mq++V6m/8vkxNbNmXd97AEayhCkIWlT73g0y8ZkYw+PAAxpHmWSuq ijygRM6/QoCmzjrgTpyHa7mmymHTgsqsYkgPMUPl26sh4c1LBJ3m0wCyWkKqobid4Krs tLZg== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=WHn4TShWdZJE0bhd3XXJKFgCj/4clcXHVheYHcUVAa0=; b=YkI2iRSz/Rt5JgJzV4VDUIrbTrLD71qky0xQtRSamLSe9BcFPqoFG3ZuztcmLo29Lu Hscg2LzmK/0SyRz6dXf9dvr6YvWBpVNFC4HLEuSjBB0GIPKy1FALp0oWTVTN218zJqD2 ECJ7mQ5yiSxpunsYUpX5tgU38YpLC37f0uwXgFifFDsYW+0F3wr2GjW/uCY1TDldYR6B fFOjdBR00Gx0D4Xrql+dxXMOk3CByc95p6L+ceRdPJukOanjziZxL8MszJ8yGhoPHM68 S/kSLG73J2h3SHxKpFor8cbIzIj4JiS4ocCBISVC5v2oo9HzrPKwCATt04wSXwkDKKba n7+w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=L+v2fXqi; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id d37-20020a631d65000000b003816043ee58si14398419pgm.77.2022.04.05.16.08.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 Apr 2022 16:08:31 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=L+v2fXqi; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: from out1.vger.email (out1.vger.email [IPv6:2620:137:e000::1:20]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 96F6B19D614; Tue, 5 Apr 2022 15:52:57 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1377022AbiDELZR (ORCPT + 99 others); Tue, 5 Apr 2022 07:25:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38380 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242743AbiDEIt3 (ORCPT ); Tue, 5 Apr 2022 04:49:29 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E839470F70; Tue, 5 Apr 2022 01:37:39 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id BA5A9614E2; Tue, 5 Apr 2022 08:37:30 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id CF48AC385A0; Tue, 5 Apr 2022 08:37:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1649147850; bh=S9aXtfEKDGdBQZkVkd+a1yTaeGJtvtEgjUrZ0wayzj4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=L+v2fXqiy9ax9kTB/1Kdi6r6Gj9Q4QumHYW2/s2d1BXvmjAY94/GPcUVxWAjl71ab YMuvQvG4SvIIRJ2QB50+fcgcQMYLjJMZuV1IPAD7ehq9P8CWi5UYS/tDHEsx2B0NV3 aGIb51stzuuPvgrHeGmAQMcgvXi6ZsJQLf5ubIug= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, linux-security-module@vger.kernel.org, Christian Brauner , =?UTF-8?q?Micka=C3=ABl=20Sala=C3=BCn?= Subject: [PATCH 5.16 0143/1017] landlock: Use square brackets around "landlock-ruleset" Date: Tue, 5 Apr 2022 09:17:36 +0200 Message-Id: <20220405070358.448959069@linuxfoundation.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220405070354.155796697@linuxfoundation.org> References: <20220405070354.155796697@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no 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: X-Mailing-List: linux-kernel@vger.kernel.org From: Christian Brauner commit aea0b9f2486da8497f35c7114b764bf55e17c7ea upstream. Make the name of the anon inode fd "[landlock-ruleset]" instead of "landlock-ruleset". This is minor but most anon inode fds already carry square brackets around their name: [eventfd] [eventpoll] [fanotify] [fscontext] [io_uring] [pidfd] [signalfd] [timerfd] [userfaultfd] For the sake of consistency lets do the same for the landlock-ruleset anon inode fd that comes with landlock. We did the same in 1cdc415f1083 ("uapi, fsopen: use square brackets around "fscontext" [ver #2]") for the new mount api. Cc: linux-security-module@vger.kernel.org Signed-off-by: Christian Brauner Link: https://lore.kernel.org/r/20211011133704.1704369-1-brauner@kernel.org Cc: stable@vger.kernel.org Signed-off-by: Mickaël Salaün Signed-off-by: Greg Kroah-Hartman --- security/landlock/syscalls.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/security/landlock/syscalls.c +++ b/security/landlock/syscalls.c @@ -192,7 +192,7 @@ SYSCALL_DEFINE3(landlock_create_ruleset, return PTR_ERR(ruleset); /* Creates anonymous FD referring to the ruleset. */ - ruleset_fd = anon_inode_getfd("landlock-ruleset", &ruleset_fops, + ruleset_fd = anon_inode_getfd("[landlock-ruleset]", &ruleset_fops, ruleset, O_RDWR | O_CLOEXEC); if (ruleset_fd < 0) landlock_put_ruleset(ruleset);