From patchwork Sun Feb 4 13:49:46 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 196503 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:168b:b0:106:860b:bbdd with SMTP id ma11csp359908dyb; Sun, 4 Feb 2024 05:50:12 -0800 (PST) X-Google-Smtp-Source: AGHT+IHH9tALP6KmDwgOEuCIE8Xd34WpCcx9k5+4Vxy1748mPNgsDs/jfmaoUTIDl6dMSuf4Ycug X-Received: by 2002:a17:906:af1b:b0:a31:8dd6:6ae0 with SMTP id lx27-20020a170906af1b00b00a318dd66ae0mr9051149ejb.7.1707054612327; Sun, 04 Feb 2024 05:50:12 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707054612; cv=pass; d=google.com; s=arc-20160816; b=HRqQ7fN3yzeARbzV7FIFjMeKtaIWAXYlw8PNNYMTnJUxhC69QmrKjWZUQo2crfr2Ey dBOCFyPbObGUIxZWJUH+7ElxGLUrN2qW5DomhOfVG4+VBNA+AHQCIPEQtp8qoRJhjLYV f5A12jKrwLE/yDuFyLw7Wl6WpHi7sfwaAB2oP+ol8Gw4/eN9Jjby+hrz0W9MNmBEdXYH T5suhqXfXUYJ063LbzkZg2/cmTZAldPSalAJItIiPfrgKiofTzwpj23ntNtIFCFQYztu bm3IliRIi+ZkEtvpcqyUrchkroPM2kNssI0jKQBcy522mJZDli5kTe263jwegOgB8uZH Yr2Q== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from:dkim-signature; bh=RVRI9KxfEIp+9TWUHVbg7CRAFkFlMvm1nTPsDrEN8eM=; fh=AesHmYMeHIh9e6mWrzV8RAhOFS+XGUocMFuIfJy42fs=; b=fYQ0NRbqeOkB6w3TBAcNfPv/AbcHLbDxfQAqK+RkH0niDdJ4dGjgIvnrR/NkjwY2UO uX7aOBseLUjkmrzQpyTVQ20V+8c2YMbMakbF8GqmJ4/EzhWGX7ZX4VnfDyhHuk1P3MGq 60vIKRxw5sNfw+qH5khcXjVpceLsQZj4HhIis+JLEDYklPd81S7BTTrHEi6bzEFMM02p UfRqTuimAfXmicdwcztj9eAxBLnJJgXZQz0BZ6HH5mVpj5CxXDFq7VqeWnPvV7wDmQvL tU9XCO+GnkwgYcmRnIGzdc5Covi84X/H4yZ5F8eJjpQh+Udfa9eW9rGcJN3aoi0ZY5B2 s5Sg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=IPnFYiNQ; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-51682-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-51682-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org X-Forwarded-Encrypted: i=1; AJvYcCXMPmj2Uq0uNDBWJOFzbk4sWxJzCeFhVOWDH5VT0BbgNC+uzR9Ku5vWJoyExvHUrWLWspZlVStweWwI3gNbR9simNU75w== Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id lf8-20020a170907174800b00a316f007a47si2942021ejc.57.2024.02.04.05.50.12 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 04 Feb 2024 05:50:12 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-51682-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=IPnFYiNQ; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-51682-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-51682-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id C33A71F21A90 for ; Sun, 4 Feb 2024 13:50:11 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 1AA01225D6; Sun, 4 Feb 2024 13:49:57 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="IPnFYiNQ" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5BF3622337; Sun, 4 Feb 2024 13:49:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707054594; cv=none; b=rOQ5Y9ChafoWFWjfglO2su2wOvfEbZS64IUEW+TWSSe4cIXKdXjc1PQnbl30XgkQsMBhy80GuWzKI5aIzsqua4dtEbJv6M/sWDGfp50UQkfV556nEMuOcGThRh+18r3L/gZdbaEZS07khiNsIRu+CW+EOVbQuppVkIxcKo2JJuU= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707054594; c=relaxed/simple; bh=PZFvkp+4a4vR109kECCnsi1EUbc9O9oigoCrIe9bzU0=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=M8DhtPMN57BlLbWYMzcg1Ie+DAeLIIvLBDrKREwCtzkF2vn1Zl98BHL4KmYoySd4do1Cto/Gfs2y216rjzVgMds93RNH9VFSAaIGrJn4y9UMAxCgvBDz7W0e6qYwu+j563S1rdw2FQ5PxYYhE6TEd93hXzFkmk3FpaQEx5mFJ34= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=IPnFYiNQ; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id A9A88C433F1; Sun, 4 Feb 2024 13:49:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1707054593; bh=PZFvkp+4a4vR109kECCnsi1EUbc9O9oigoCrIe9bzU0=; h=From:To:Cc:Subject:Date:From; b=IPnFYiNQhJZO3IjixQos/KLuDQyQs398v1cXm5ZCrtFgSvl66h4XxCpMoACQdOuyM e2H7bYUrstqSFdq3F9vVKajq+asnPaU2XfQXM3N833zVuonbr1i2ilr5NQAxuyIqN/ Dk040dfcpeYGkGu+tSTNFcPz7lGcO060Fdc466CBT1LHIrKsATIfziTK4JoVZxRSc/ 5qslbpxU3gr1DHn4lFw9C0VZlkUKPJGiwyQenaiPoOauyJsZHVsSIZKfceyvpAb/h2 C6WzCKbbYzf46VT28AFc0RAkIDkbiy84MqHSj+wZqOkyqnxSS7BVp/96DnRk60w3pr xO5kwH0UUzE6w== From: Masahiro Yamada To: Huacai Chen , WANG Xuerui , loongarch@lists.linux.dev Cc: YiFei Zhu , Kees Cook , Masahiro Yamada , linux-kernel@vger.kernel.org Subject: [PATCH] loongarch: select HAVE_ARCH_SECCOMP to use the common SECCOMP menu Date: Sun, 4 Feb 2024 22:49:46 +0900 Message-Id: <20240204134946.62509-1-masahiroy@kernel.org> X-Mailer: git-send-email 2.40.1 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1789976497121821744 X-GMAIL-MSGID: 1789976497121821744 LoongArch missed the refactoring made by commit 282a181b1a0d ("seccomp: Move config option SECCOMP to arch/Kconfig") because LoongArch was not mainlined at that time. The 'depends on PROC_FS' statement is stale as described in that commit. Select HAVE_ARCH_SECCOMP, and remove the duplicated config entry. Signed-off-by: Masahiro Yamada --- arch/loongarch/Kconfig | 18 +----------------- 1 file changed, 1 insertion(+), 17 deletions(-) diff --git a/arch/loongarch/Kconfig b/arch/loongarch/Kconfig index 64e9a01c7f36..929f68926b34 100644 --- a/arch/loongarch/Kconfig +++ b/arch/loongarch/Kconfig @@ -100,6 +100,7 @@ config LOONGARCH select HAVE_ARCH_KFENCE select HAVE_ARCH_KGDB if PERF_EVENTS select HAVE_ARCH_MMAP_RND_BITS if MMU + select HAVE_ARCH_SECCOMP select HAVE_ARCH_SECCOMP_FILTER select HAVE_ARCH_TRACEHOOK select HAVE_ARCH_TRANSPARENT_HUGEPAGE @@ -633,23 +634,6 @@ config RANDOMIZE_BASE_MAX_OFFSET This is limited by the size of the lower address memory, 256MB. -config SECCOMP - bool "Enable seccomp to safely compute untrusted bytecode" - depends on PROC_FS - default y - help - This kernel feature is useful for number crunching applications - that may need to compute untrusted bytecode during their - execution. By using pipes or other transports made available to - the process as file descriptors supporting the read/write - syscalls, it's possible to isolate those applications in - their own address space using seccomp. Once seccomp is - enabled via /proc//seccomp, it cannot be disabled - and the task is only allowed to execute a few safe syscalls - defined by each seccomp mode. - - If unsure, say Y. Only embedded should say N here. - endmenu config ARCH_SELECT_MEMORY_MODEL