Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=113.46.200.226 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796025490; b=shfZwIosYTMHejkSiT5BMLewp3NcEBYOf5qzxTnY2WSt2OgVB7PPpAQtTscwoX2b9mUk ZLMPP7v6aONiuIHsvurNzmiQlKY+6UvXxcrpMTCSvPJvmo48GXSz/bXzhyEno86yJgk3a 0D7cHvaQuW9vlLxQaqPrNqjoWBWkSSw7oq2Mt9eDmKol+8RpAjn6IAYu1GWl+EV2lxOjp MWlWAbclwlkbNViFyZqUir1HwdWboUlHDya/Cq/vt+Amm7asqTNvSrG9ykJEt8CMns7q6 UBJFPd+lIcbX2qz7WCCUWfTmzocwJADnFNHzbJZ+9r+qBi+vAKp3L2XMzatZrUitREw== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796025490; h=DMARC-Filter:dkim-signature:Received:Received:Received:From:To:CC: Subject:Date:Message-ID:X-Mailer:In-Reply-To:References:MIME-Version: Content-Type:X-Originating-IP:X-ClientProxiedBy; bh=WcPrkYpCPtkNS6bUPWLEwOYUA5sriEX0LgUqZ6+jJbg=; b=hAavcVPLFgC8v4fX1JeKbvD7Mz73IBpwGLKbU8iaUIOWUbOsuYjJZJMpSugoa46a+Yob GvU9YWa3WEL/6pVWAIwewdAqZ5c2qYNt16rSsWpShk6NHKXCtAv24hvb8Jt+j6m6Y7ZMJ sfZlB9rxHmtIrTgTC/tlpJixhIfXR7Zj2K9JzLwnW2P9xrwvRWIU9w8cUysoqwHW4ua6G rcATBiNWNKhmcs/tuYq6pAI+shLm8UTz93kxhB95ya7He6+zTik7eU/mTofrxG9uoOMSK je6p+sqQhbxpd06Kbs/Q1IR8l+xcVZJ5xalvjGSb1nVfu8by4GZLVAfYWYmSCMPJ/6w== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=huawei.com; spf=pass smtp.mailfrom=huawei.com; dkim=pass header.d=huawei.com header.i=@huawei.com header.a=rsa-sha256 header.s=dkim header.b=Pgn+61DY; arc=none smtp.remote-ip=113.46.200.226 Received: from canpmsgout11.his.huawei.com (canpmsgout11.his.huawei.com [113.46.200.226]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6B32D606A32F; Mon, 30 Nov 2026 07:58:09 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 6B32D606A32F Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=huawei.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=huawei.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=huawei.com header.i=@huawei.com header.a=rsa-sha256 header.s=dkim header.b=Pgn+61DY dkim-signature: v=1; a=rsa-sha256; d=huawei.com; s=dkim; c=relaxed/relaxed; q=dns/txt; h=From; bh=WcPrkYpCPtkNS6bUPWLEwOYUA5sriEX0LgUqZ6+jJbg=; b=Pgn+61DY89XFFwe5nqDF9l8ZbAehBW36H3rWHnWeYFFOAzuDlp81rWZ3kvbW9gHdvTYIypCX2 /dUiQ00zKVGpeWvKbFHvaIs1yT11Y0VS+uT+6va/rb1OWQiEwND09QY+H5bM+DIZ4poJi2kg8mr EqW/01YNKx1BA7lLWRX6O7Q= Received: from mail.maildlp.com (unknown [172.19.163.15]) by canpmsgout11.his.huawei.com (SkyGuard) with ESMTPS id 4jdGb76m0VzKm7G; Mon, 30 Nov 2026 15:57:39 +0800 (CST) Received: from whupemk100010.china.huawei.com (unknown [7.152.184.41]) by mail.maildlp.com (Postfix) with ESMTPS id A8EB140578; Mon, 30 Nov 2026 15:58:01 +0800 (CST) Received: from octopus.huawei.com (10.67.174.191) by whupemk100010.china.huawei.com (7.152.184.41) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.2562.56; Mon, 30 Nov 2026 15:58:00 +0800 From: Cai Xinchen To: , , , , , , , , CC: , , , , Subject: [PATCH v4 3/8] lockdown: select SECURITYFS Date: Mon, 30 Nov 2026 16:29:09 +0800 Message-ID: <20261130082914.129495-4-caixinchen1@huawei.com> X-Mailer: git-send-email 2.18.0.huawei.25 In-Reply-To: <20261130082914.129495-1-caixinchen1@huawei.com> References: <20261130082914.129495-1-caixinchen1@huawei.com> X-Mailing-List: bpf@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain X-ClientProxiedBy: kwepems500002.china.huawei.com (7.221.188.17) To whupemk100010.china.huawei.com (7.152.184.41) The lockdown LSM exposes /sys/kernel/security/lockdown, but it does not select SECURITYFS. If SECURITYFS is disabled, securityfs_create_file() returns -ENODEV, lockdown_secfs_init() fails and the LSM framework logs: failed LSM lockdown core initcall with errno -19 while the interface that the LOCK_DOWN_KERNEL_FORCE_NONE help text presents as a way to enable lockdown is missing. Select SECURITYFS like the other LSMs that create securityfs entries (AppArmor, SafeSetID, TOMOYO and IMA) already do. Tested-by: Guicai Ma Reviewed-by: Nicolas Bouchinet Signed-off-by: Cai Xinchen --- security/lockdown/Kconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/security/lockdown/Kconfig b/security/lockdown/Kconfig index e84ddf484010..82b69d8253bd 100644 --- a/security/lockdown/Kconfig +++ b/security/lockdown/Kconfig @@ -2,6 +2,7 @@ config SECURITY_LOCKDOWN_LSM bool "Basic module for enforcing kernel lockdown" depends on SECURITY select MODULE_SIG if MODULES + select SECURITYFS help Build support for an LSM that enforces a coarse kernel lockdown behaviour. -- 2.18.0.huawei.25