Received: by 2002:a25:868d:0:0:0:0:0 with SMTP id z13csp1507835ybk; Sun, 10 May 2020 19:23:29 -0700 (PDT) X-Google-Smtp-Source: APiQypLOc6jfxGbFu4595BkZ/eB5xI5Az9eOoD8EAK0TkGp/Fmabb50woxEcChLi2BiDq6u4smiY X-Received: by 2002:a05:6402:1596:: with SMTP id c22mr12124156edv.100.1589163809665; Sun, 10 May 2020 19:23:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1589163809; cv=none; d=google.com; s=arc-20160816; b=s420r4twXIiQ0E4kC+Det+HuMCl4ZPUD5uliPcftJFkViDzdmc81XgofGsQ4C3BL7x VnhBShEAtyP9fjXeKRyw+L9V/zSQhxx4g3dTWTsVTeL+y8uN/D6jCSvbKFqn04zmw3Xo zYXZbxslWFIjjDWacA8/SzWmi672VxiGQeGAAHeQMk1KNS4KkwgvV+mCpixXEwnrySPg tRb/XbFm/WN4lVLBozgO+CDIWlxkwCmK9UfHr0mVnRUpk2jlLAGC5PQL9cHKgXfPjmBT l623z8s1ZfgcwjQlFSBN7prAkAtjpnk18JLpdgFkTKlTaWqh2aN6rLVYfjI7T/Fvd/xh co2Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:subject:cc :to:from; bh=EJvPRlZk+ulXFzy+ZlM3CsDVc3WpzUPPg+o4awKH6NM=; b=z7DomCX2qzkNkOI4Z6V+1pG1oRmnjN4K9Z1BessGA7J2j7sHda/S8wssb0bMyfy4sm wmiRsepoHDJ8BYGu1ZLF+zvoRsUeiol7FrlVSJCQrv8QKFfjKuulGchEZzLpCVrmTzXC LN/pDuShKYIjjGtNsce98PZegszwPd2Rj30OJYHib3rMX739W6pM+RfyVIoY/6YebfUe c1osGtXNSn+6MqhP6hsitE9ze5kqN8nhTEZqGyDz/B9nQxFKpyv9/57P+jyevdgYlBIz +joi21CeLey71zLAztW7PpZ0ZDGZkvbbC+nHT80NCNBmmzXmDUG1QZhhVCpGA/nQu9If 8vxA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id u19si5231091edi.518.2020.05.10.19.23.01; Sun, 10 May 2020 19:23:29 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729473AbgEKCSE (ORCPT + 99 others); Sun, 10 May 2020 22:18:04 -0400 Received: from szxga07-in.huawei.com ([45.249.212.35]:50748 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1729272AbgEKCSE (ORCPT ); Sun, 10 May 2020 22:18:04 -0400 Received: from DGGEMS403-HUB.china.huawei.com (unknown [172.30.72.58]) by Forcepoint Email with ESMTP id BD2768CF532A022CC47C; Mon, 11 May 2020 10:18:02 +0800 (CST) Received: from euler.huawei.com (10.175.101.6) by DGGEMS403-HUB.china.huawei.com (10.3.19.203) with Microsoft SMTP Server id 14.3.487.0; Mon, 11 May 2020 10:17:59 +0800 From: Wei Li To: Jason Wessel , Daniel Thompson , Douglas Anderson , Masahiro Yamada CC: , Subject: [PATCH] kdb: Make the internal env 'KDBFLAGS' undefinable Date: Mon, 11 May 2020 10:16:37 +0800 Message-ID: <20200511021637.37029-1-liwei391@huawei.com> X-Mailer: git-send-email 2.17.1 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.175.101.6] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 'KDBFLAGS' is an internal variable of kdb, it is combined by 'KDBDEBUG' and state flags. But the user can define an environment variable named 'KDBFLAGS' too, so let's make it undefinable to avoid confusion. Signed-off-by: Wei Li --- kernel/debug/kdb/kdb_main.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/kernel/debug/kdb/kdb_main.c b/kernel/debug/kdb/kdb_main.c index 4fc43fb17127..d3d060136821 100644 --- a/kernel/debug/kdb/kdb_main.c +++ b/kernel/debug/kdb/kdb_main.c @@ -423,7 +423,8 @@ int kdb_set(int argc, const char **argv) | (debugflags << KDB_DEBUG_FLAG_SHIFT); return 0; - } + } else if (strcmp(argv[1], "KDBFLAGS") == 0) + return KDB_NOPERM; /* * Tokenizer squashed the '=' sign. argv[1] is variable -- 2.17.1