Received: by 2002:ac0:8c9a:0:0:0:0:0 with SMTP id r26csp909319ima; Fri, 1 Feb 2019 12:58:04 -0800 (PST) X-Google-Smtp-Source: ALg8bN68UxB1fCL53zuKkC5T5oUA8MHVF9O/Or1SnAw/1Ps4ZEGyfwOn65xkmjW7Td50/aQVkXwh X-Received: by 2002:a63:5252:: with SMTP id s18mr36944281pgl.326.1549054684277; Fri, 01 Feb 2019 12:58:04 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1549054684; cv=none; d=google.com; s=arc-20160816; b=yA/pD5K+h2ticOcbG0pB03v4csrRiI3vl7r4T/7AAwr4z4I75LyrUNvUUjm/VesOhA RR0nOoS2Q9TKLiBrNDV5ZtzXnXjtDu/5pVV+TD/Bs/YthuJFbi1/2GpSAp5hXBu+IGiC B6/gF35z38ozYlcOQGWIPCIqvikphqsTSxZVtfYLdM/zlXH8kamFWqg5jin0rQTU3Qke ohkzYvwo48uks8nbYah9uY34ajclLnEwr22ovb68f6iju5jP6xIUDe+rIkFP1E6QW+1B 6kEe9bzW7KfRf6WOJ2yguGwuxNLFiTTpvrB0faTi8PcKOt7/fZTHiDuWkISGU+q6urUa I2PQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=47VwDDCazP214pjIUYufF9yxpsIo+Vh1ZNA21uRjQXk=; b=UGW43Q4Ujsv5i0pJOsbSYrc4aVQ4kXXx+rEk6zC4f2gwbLviZDWMrZvAYSooTMRs+B aecxO21aphP5dYve0C2tqYNwppFJZlTrehfyWJ0xXTzHIP0KjSjtuf2Ra6Y0Fcb0pslt rIhja8ydyXEvFwho7R/TJ2Dz096GMt80+MSTlRobbxmwz1V+8z2AjlA888OdE3fNmsI/ gYbBXLahg8KstEVjYbgOSlxFqfEtKIcQXhMTExRHluaSJG0gZwKk06DS+4Ljv4dMLk8c 4ABlK2OsTSomCpBriYLd7CVTByKdH+llpYL0CQjb27vdgB4s4E0WXkH4wZuVglN83BW5 4Lqw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w12si4066828pfn.212.2019.02.01.12.57.48; Fri, 01 Feb 2019 12:58:04 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728106AbfBAUyh (ORCPT + 99 others); Fri, 1 Feb 2019 15:54:37 -0500 Received: from mga18.intel.com ([134.134.136.126]:59549 "EHLO mga18.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726506AbfBAUyh (ORCPT ); Fri, 1 Feb 2019 15:54:37 -0500 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by orsmga106.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 01 Feb 2019 12:54:36 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.56,549,1539673200"; d="scan'208";a="140866323" Received: from chang-linux-2.sc.intel.com ([10.3.52.165]) by fmsmga004.fm.intel.com with ESMTP; 01 Feb 2019 12:54:36 -0800 From: "Chang S. Bae" To: Andy Lutomirski , Thomas Gleixner , Ingo Molnar , "H . Peter Anvin" , Andi Kleen Cc: Markus T Metzger , Ravi Shankar , "Chang S . Bae" , LKML Subject: [PATCH v5 01/13] taint: Introduce a new taint flag (insecure) Date: Fri, 1 Feb 2019 12:53:06 -0800 Message-Id: <20190201205319.15995-2-chang.seok.bae@intel.com> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20190201205319.15995-1-chang.seok.bae@intel.com> References: <20190201205319.15995-1-chang.seok.bae@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org For testing (or root-only) purposes, the new flag will serve to tag the kernel taint accurately. When adding a new feature support, patches need to be incrementally applied and tested with temporal parameters. Currently, there is no flag for this usage. Suggested-by: H. Peter Anvin Signed-off-by: Chang S. Bae Cc: Andy Lutomirski Cc: Thomas Gleixner Cc: Ingo Molnar Cc: Andi Kleen --- Documentation/sysctl/kernel.txt | 1 + include/linux/kernel.h | 3 ++- kernel/panic.c | 1 + 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/Documentation/sysctl/kernel.txt b/Documentation/sysctl/kernel.txt index 379063e58326..fb4244515314 100644 --- a/Documentation/sysctl/kernel.txt +++ b/Documentation/sysctl/kernel.txt @@ -1064,6 +1064,7 @@ ORed together. The letters are seen in "Tainted" line of Oops reports. 32768 (K): The kernel has been live patched. 65536 (X): Auxiliary taint, defined and used by for distros. 131072 (T): The kernel was built with the struct randomization plugin. +262144 (Z): The kernel is running in a known insecure configuration. ============================================================== diff --git a/include/linux/kernel.h b/include/linux/kernel.h index 8f0e68e250a7..dc149ff8cc52 100644 --- a/include/linux/kernel.h +++ b/include/linux/kernel.h @@ -599,7 +599,8 @@ extern enum system_states { #define TAINT_LIVEPATCH 15 #define TAINT_AUX 16 #define TAINT_RANDSTRUCT 17 -#define TAINT_FLAGS_COUNT 18 +#define TAINT_INSECURE 18 +#define TAINT_FLAGS_COUNT 19 struct taint_flag { char c_true; /* character printed when tainted */ diff --git a/kernel/panic.c b/kernel/panic.c index f121e6ba7e11..cb6b90538375 100644 --- a/kernel/panic.c +++ b/kernel/panic.c @@ -362,6 +362,7 @@ const struct taint_flag taint_flags[TAINT_FLAGS_COUNT] = { [ TAINT_LIVEPATCH ] = { 'K', ' ', true }, [ TAINT_AUX ] = { 'X', ' ', true }, [ TAINT_RANDSTRUCT ] = { 'T', ' ', true }, + [ TAINT_INSECURE ] = { 'Z', ' ', false }, }; /** -- 2.19.1