From patchwork Fri Jul 6 15:38:21 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kamal Mostafa X-Patchwork-Id: 940572 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.ubuntu.com (client-ip=91.189.94.19; helo=huckleberry.canonical.com; envelope-from=kernel-team-bounces@lists.ubuntu.com; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=canonical.com Received: from huckleberry.canonical.com (huckleberry.canonical.com [91.189.94.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 41MfD30q4Kz9s52; Sat, 7 Jul 2018 01:44:18 +1000 (AEST) Received: from localhost ([127.0.0.1] helo=huckleberry.canonical.com) by huckleberry.canonical.com with esmtp (Exim 4.86_2) (envelope-from ) id 1fbSu4-0006dR-KB; Fri, 06 Jul 2018 15:44:12 +0000 Received: from youngberry.canonical.com ([91.189.89.112]) by huckleberry.canonical.com with esmtps (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:128) (Exim 4.86_2) (envelope-from ) id 1fbSu2-0006dA-D9 for kernel-team@lists.ubuntu.com; Fri, 06 Jul 2018 15:44:10 +0000 Received: from 1.general.kamal.us.vpn ([10.172.68.52] helo=fourier) by youngberry.canonical.com with esmtpsa (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.76) (envelope-from ) id 1fbSu2-0004lQ-0m for kernel-team@lists.ubuntu.com; Fri, 06 Jul 2018 15:44:10 +0000 Received: from kamal by fourier with local (Exim 4.86_2) (envelope-from ) id 1fbSoR-0003f4-Vw for kernel-team@lists.ubuntu.com; Fri, 06 Jul 2018 08:38:23 -0700 From: Kamal Mostafa To: kernel-team@lists.ubuntu.com Subject: [linux-kvm-bionic][PATCH 1/2] usercopy: Do not select BUG with HARDENED_USERCOPY Date: Fri, 6 Jul 2018 08:38:21 -0700 Message-Id: <1530891502-14019-2-git-send-email-kamal@canonical.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1530891502-14019-1-git-send-email-kamal@canonical.com> References: <1530891502-14019-1-git-send-email-kamal@canonical.com> X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.20 Precedence: list List-Id: Kernel team discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: kernel-team-bounces@lists.ubuntu.com Sender: "kernel-team" BugLink: https://bugs.launchpad.net/bugs/1766777 There is no need to "select BUG" when CONFIG_HARDENED_USERCOPY is enabled. The kernel thread will always die, regardless of the CONFIG_BUG. Signed-off-by: Kamal Mostafa [kees: tweak commit log] Signed-off-by: Kees Cook (cherry picked from commit 6aa56f44253a6dd802e45d8ab1b48847feaf063a linux-next) Signed-off-by: Kamal Mostafa --- security/Kconfig | 1 - 1 file changed, 1 deletion(-) diff --git a/security/Kconfig b/security/Kconfig index 16803be..8320651 100644 --- a/security/Kconfig +++ b/security/Kconfig @@ -195,7 +195,6 @@ config HAVE_HARDENED_USERCOPY_ALLOCATOR config HARDENED_USERCOPY bool "Harden memory copies between kernel and userspace" depends on HAVE_HARDENED_USERCOPY_ALLOCATOR - select BUG imply STRICT_DEVMEM help This option checks for obviously wrong memory regions when