Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp623828pxb; Tue, 5 Apr 2022 16:19:05 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxaW5COw3R/Yzy+gFcxOlh/nqazNwcedpRwEYTL/U6xp49f6aj5/WSSbAdOoOv4mdCfaKkA X-Received: by 2002:a17:902:b185:b0:14f:2d94:184 with SMTP id s5-20020a170902b18500b0014f2d940184mr5830746plr.56.1649200744853; Tue, 05 Apr 2022 16:19:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649200744; cv=none; d=google.com; s=arc-20160816; b=qnfDz+8ItRXYlQF+IfR8arFLpfRhsT//6LmH6jYNXC0FKTx6C+vZWDsEU7VVdWGogZ PsyyX2GfshaJXPTId7ZcEjjw5Aa15tw1eoiRi61JI1OqSHLp9mfRmIY/s1ue8KQP+RH4 wpSxIR5wcpAXofINTw1yxGhZu9dxPb59bUDMC3AJzNOJzVBIJY5TEbRd7Y3iJ9jGnocl QngyPOU61O+td46Kk7j01Gnitt9i4Pt7tt0Ewn4EdSCc1uBc8PlUMSO6Alh6ONvNKGaz ziz/F4efK4B+MnidiFEs8iEZjCNRdIafWnWO0BiNI0umSuDM75rxErwtpwc+ts+RTdMS Msbg== 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=h/ty7vayo5bN9Kdh3Bdk93+Ib3HTF1kN5iLiTAkHwXacTTu4O+/mLhReg+QwVRunjY nmapgFbztVk4vlDnKbZmS+sREWkliTCBfvrFxz+3uOQoUVmmMVXwmWSJETtZ4AnkxiGw +7ehW+7KTrJiXJMwLPQQgfWHDBP/HarSYmTlLNcXL6LEvaXVc26CAliKdjS59hb5umip 23RDNW8sBVOpncM+eolEvHavToxbxwZbalHevW3+rfgN+NkGlzkdS+13bcGH+43bQz3x LeNCiYXCjy8H356ge6Ek6vD/1WPxZ9FDBgvp/RMIZAQe3kmRMrqkJ8V1RZN7WFPjuCiT zX8g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=tyujKVS8; 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 bg5-20020a056a02010500b0039938b98775si6474276pgb.436.2022.04.05.16.19.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 Apr 2022 16:19:04 -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=tyujKVS8; 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 2EB3822C8FF; Tue, 5 Apr 2022 16:03:25 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1384467AbiDEOij (ORCPT + 99 others); Tue, 5 Apr 2022 10:38:39 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42308 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242682AbiDEJhz (ORCPT ); Tue, 5 Apr 2022 05:37:55 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3F1B3A1445; Tue, 5 Apr 2022 02:24:27 -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 ams.source.kernel.org (Postfix) with ESMTPS id 6BE45B81C69; Tue, 5 Apr 2022 09:24:26 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id CEE4DC385A2; Tue, 5 Apr 2022 09:24:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1649150665; bh=S9aXtfEKDGdBQZkVkd+a1yTaeGJtvtEgjUrZ0wayzj4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=tyujKVS8wKWcbVSzxWWYCeqlh6QKdMbI4yElPpuvcBq/pPWnSLtA8MdzlknEUyeI6 NjKgO5697yIz7GyxDpWwBk27jQsWDCjdBrlJ+9R6GBfzz4/LpHsRoLSFC+ECnQCtY4 gZsxQFMA26pYKJiuZ3VYOMedt5ThgEd5lHIEC/h8= 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.15 137/913] landlock: Use square brackets around "landlock-ruleset" Date: Tue, 5 Apr 2022 09:19:59 +0200 Message-Id: <20220405070343.938274918@linuxfoundation.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220405070339.801210740@linuxfoundation.org> References: <20220405070339.801210740@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);