Received: by 2002:a05:6a10:d5a5:0:0:0:0 with SMTP id gn37csp42341pxb; Thu, 30 Sep 2021 00:14:21 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzhYnR1XSRZqTNaYgbmndc+HGxpCrfcrLqjGCk+G2Jc/OsEzMGwpGnQeaOoqBfYLYDe5b36 X-Received: by 2002:a17:906:7c9:: with SMTP id m9mr2411473ejc.148.1632986061665; Thu, 30 Sep 2021 00:14:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1632986061; cv=none; d=google.com; s=arc-20160816; b=e7v38mcZdb0D72j4ChqmyRfiGg6AckvsX8lljQeh1uh6WpE/2J9zd4qU7+Qv7Wy8fn fHtXH5mgNjkkH/R8/ZZhIQfiUUNmXea++q5BMgN8ddycGbLhMmlNZ86/u7gpX/eALW74 oZb8GaaVRzDAXc4J7PaVJXuDPXC6whIzVN9Y9BAVdbfbBHVF1Ww01UuJ4KLk4j9rCBMn uRYrFfRCrJjiKgFcQQt/ZKDsGNnzOGu8LeQHlM7bBsU5YdX7EwttZOv548+aq2GCzCg/ MUBCYyJmKc2mnNN8/sCCAcER7eal9p6eQz4rPSS8RJex5vyezURSkhPPaLBEnOLZ9lvy aa0Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=k88NLD3QLB0mMCNVq2DfclB/JPq/JKcV1Yc0lIygqZc=; b=zBxrYVHb9l8Ea2foo81/mvwsBPbdls9hXLHmg2/GLUhPhskjXcQnDWGxYvQCu40NwK sVvu2V4UmExG9BYPYCJR/fjT1yk1QZNUxIkUBH6VwTeyVjO/BdMo85wI2qlQNAsrI4Kh 2bf2sUo5cbcTAZUqPnbRPceCdDWc4exDkyvQXCnFq9ac5c9Gfzh2E3I/Gs/ut2JdeTMq 6FY/+ZqCKu2vy+7CIJYjczdE5TPXM/qhInmgpF8ok8Pf78tVmmH9Smf4xroDzlB4f4XB rls04rEAlEqlNYUU3xFWSSKB6RjtcMx/ijuTdIg6CkI5aZWoOgBQflSjSnjYLcycuDO/ 27Gw== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=huawei.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id k4si2655698ejo.444.2021.09.30.00.13.23; Thu, 30 Sep 2021 00:14:21 -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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=huawei.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1348586AbhI3HLa (ORCPT + 99 others); Thu, 30 Sep 2021 03:11:30 -0400 Received: from szxga01-in.huawei.com ([45.249.212.187]:27937 "EHLO szxga01-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1348542AbhI3HLI (ORCPT ); Thu, 30 Sep 2021 03:11:08 -0400 Received: from dggemv704-chm.china.huawei.com (unknown [172.30.72.56]) by szxga01-in.huawei.com (SkyGuard) with ESMTP id 4HKklQ2FYTzbn06; Thu, 30 Sep 2021 15:05:06 +0800 (CST) Received: from dggpemm500001.china.huawei.com (7.185.36.107) by dggemv704-chm.china.huawei.com (10.3.19.47) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.8; Thu, 30 Sep 2021 15:09:14 +0800 Received: from localhost.localdomain.localdomain (10.175.113.25) by dggpemm500001.china.huawei.com (7.185.36.107) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.8; Thu, 30 Sep 2021 15:09:13 +0800 From: Kefeng Wang To: , , , , , , , , , CC: , , , , , Christophe Leroy , Kefeng Wang Subject: [PATCH v4 01/11] kallsyms: Remove arch specific text and data check Date: Thu, 30 Sep 2021 15:11:33 +0800 Message-ID: <20210930071143.63410-2-wangkefeng.wang@huawei.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20210930071143.63410-1-wangkefeng.wang@huawei.com> References: <20210930071143.63410-1-wangkefeng.wang@huawei.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=US-ASCII X-Originating-IP: [10.175.113.25] X-ClientProxiedBy: dggems706-chm.china.huawei.com (10.3.19.183) To dggpemm500001.china.huawei.com (7.185.36.107) X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org After commit 4ba66a976072 ("arch: remove blackfin port"), no need arch-specific text/data check. Cc: Arnd Bergmann Signed-off-by: Kefeng Wang --- include/asm-generic/sections.h | 16 ---------------- include/linux/kallsyms.h | 3 +-- kernel/locking/lockdep.c | 3 --- 3 files changed, 1 insertion(+), 21 deletions(-) diff --git a/include/asm-generic/sections.h b/include/asm-generic/sections.h index d16302d3eb59..817309e289db 100644 --- a/include/asm-generic/sections.h +++ b/include/asm-generic/sections.h @@ -64,22 +64,6 @@ extern __visible const void __nosave_begin, __nosave_end; #define dereference_kernel_function_descriptor(p) ((void *)(p)) #endif -/* random extra sections (if any). Override - * in asm/sections.h */ -#ifndef arch_is_kernel_text -static inline int arch_is_kernel_text(unsigned long addr) -{ - return 0; -} -#endif - -#ifndef arch_is_kernel_data -static inline int arch_is_kernel_data(unsigned long addr) -{ - return 0; -} -#endif - /* * Check if an address is part of freed initmem. This is needed on architectures * with virt == phys kernel mapping, for code that wants to check if an address diff --git a/include/linux/kallsyms.h b/include/linux/kallsyms.h index 6851c2313cad..2a241e3f063f 100644 --- a/include/linux/kallsyms.h +++ b/include/linux/kallsyms.h @@ -34,8 +34,7 @@ static inline int is_kernel_inittext(unsigned long addr) static inline int is_kernel_text(unsigned long addr) { - if ((addr >= (unsigned long)_stext && addr <= (unsigned long)_etext) || - arch_is_kernel_text(addr)) + if ((addr >= (unsigned long)_stext && addr <= (unsigned long)_etext)) return 1; return in_gate_area_no_mm(addr); } diff --git a/kernel/locking/lockdep.c b/kernel/locking/lockdep.c index 7096384dc60f..dcdbcee391cd 100644 --- a/kernel/locking/lockdep.c +++ b/kernel/locking/lockdep.c @@ -803,9 +803,6 @@ static int static_obj(const void *obj) if ((addr >= start) && (addr < end)) return 1; - if (arch_is_kernel_data(addr)) - return 1; - /* * in-kernel percpu var? */ -- 2.26.2