Received: by 2002:a25:868d:0:0:0:0:0 with SMTP id z13csp1147902ybk; Sat, 16 May 2020 02:31:49 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy8MqWjW2quFKbQ0vB0vA01ZstiTa0LLGsugDK9iZGh7i8DdGWe2YWiQTBbqIs/9p5b9prK X-Received: by 2002:a50:e704:: with SMTP id a4mr5907355edn.146.1589621509349; Sat, 16 May 2020 02:31:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1589621509; cv=none; d=google.com; s=arc-20160816; b=ALt3fqq1v97YlHB7qs+W3tpQ4SsSdBrCNH/L6kgRS/jzlNbSklVXEfgKBofj7rVCQN CLy6pqnjaDj0hX4yCpQGXXUFtpgTUboWFP8Ia06Bn4i+efBdt/gV3utIZR7hezZGAK3M PEI91GBkO/PexIfm3P/72vlCMk3Br9oCe+/g5myTHJi3teF0C9idTAGVmmdo5vUY/MPX FgCH5N9sKmOph+KdxXkml/nxm0QIeT7ah/t14b8h1CaKQsEn/wFCwuBJgyS6VGrTiIK/ RJLkWzMZCSDKC+O9Dkw+c2iZluCumaejLLBFDVJsp8xBdGwxc24ThGUUbFuWEgLofvNs HVjg== 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=Pyo9phapEC6pvB/344CvVVXed28eErr1qWzJ32ML5zY=; b=rjlodT6x2t8SRvtwG+NGbzMMEGxUcxBq501OkkyYYl0QJT5jnWPxoeCgHiFGDxfCkn 3thjdWkhuNwkT1CAa6ovL6uwcSoYbHud16h1iU9XbOZwdSgcEkmQsGBIZz3KxjpRYsj9 AnU0n0BnWpIFPii1k7qHZjYvCCatHL5KoO88PuhKeC4BRullQTn8BUr+K5M8ct9iZ8Zn QM/ATOdHdB0d1hOnHL8hSwQ0hZaWUmNC9SADMHvwxD7273gSgHRUTqaMgHr5j7JNZL2g zcnw8G+oLJBU95TXg5lap0xduut0hvJ8ccQFFRxwCAJL8EMDakkKp+TVXclnADUU1nei f1YQ== 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 y1si2860990ejh.219.2020.05.16.02.31.25; Sat, 16 May 2020 02:31:49 -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 S1726462AbgEPJaC (ORCPT + 99 others); Sat, 16 May 2020 05:30:02 -0400 Received: from szxga07-in.huawei.com ([45.249.212.35]:52774 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726271AbgEPJaC (ORCPT ); Sat, 16 May 2020 05:30:02 -0400 Received: from DGGEMS408-HUB.china.huawei.com (unknown [172.30.72.60]) by Forcepoint Email with ESMTP id 585C89868A0B93C86D5A; Sat, 16 May 2020 17:29:59 +0800 (CST) Received: from euler.huawei.com (10.175.124.27) by DGGEMS408-HUB.china.huawei.com (10.3.19.208) with Microsoft SMTP Server id 14.3.487.0; Sat, 16 May 2020 17:29:57 +0800 From: Wei Li To: Doug Anderson , Jason Wessel , Daniel Thompson , Masahiro Yamada CC: , LKML Subject: [PATCH v2] kdb: Make the internal env 'KDBFLAGS' undefinable Date: Sat, 16 May 2020 17:26:06 +0800 Message-ID: <20200516092606.41576-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.124.27] 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 Reviewed-by: Douglas Anderson --- v1 -> v2: - Fix lack of braces. kernel/debug/kdb/kdb_main.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/kernel/debug/kdb/kdb_main.c b/kernel/debug/kdb/kdb_main.c index 4fc43fb17127..75b798340300 100644 --- a/kernel/debug/kdb/kdb_main.c +++ b/kernel/debug/kdb/kdb_main.c @@ -423,6 +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; } /* -- 2.17.1