Received: by 2002:a05:6a10:f3d0:0:0:0:0 with SMTP id a16csp1798542pxv; Sat, 26 Jun 2021 00:31:01 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzPvwiFh7k8D7D3tA+pJnXVnsFQu8dFbpiH+40DgwR99TmtOIG2LEO7WLy8BQObbprN7RPh X-Received: by 2002:a05:6402:d53:: with SMTP id ec19mr20537311edb.4.1624692661085; Sat, 26 Jun 2021 00:31:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1624692661; cv=none; d=google.com; s=arc-20160816; b=J6iYYzWOV4LrsxAuYzQVzAFru31pj6RE2La4ag6jtxCHLrH636fEMJbrHlZGRYQxGw SvkuD6eNKoKmr0haNGM/YP7aDeuWYR0CENxQIpyE39+ju0G5X/OoHTy4OdqgfbkSBFUR c6/LjZ4YqjuOc+FdYgjCbXFsuaLi/E1bnZTST6BXp3e06+tbQyJE+bMMEWAv5QCXij/r Oa7ziRQOjZt2z4MLhiEyJG76AjLprWC0cat+3ihihnH96lHOiPkimOgtBBdwAmg5iOQe 6eDar8070xMQs+Rn5/u4ri6dDVXW1HBKzs351fA93vqR7F4j40Xy1lqlxuUC/CcGcqt7 j8AQ== 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=gNj+2fmez2MuXrH1fgwZxSlSWBQCathSOO4AOcF3AKs=; b=cMRCFv6bRWrKJMQ/mH0svNi7AiBINpKQBDE5z/B6zxv5Rf9589XHLAJGgCPMFN4iGA zFxbbCzoE3bg15kjHjzfE2EbvZXsTZn7IJhNFTP/ralrlb+nNyEU5zE0JOjlKXeT9oIY +VeVV+2zBdxpsl7lP6GtSGTswm67ynQV9/LDQtbv/8eCGlm1W2suW+5onh6zDBe+NWoe Bhs1vVw8DI+EdcL9plkbTwaSLkknSR+9FmyXwt/sR352Br3W7Qw2Ilbt1AOOrl5d+EY+ K2OymH4YBbxQD1lsKU8LzAebEdN46gd4BDXqXZgOoz/j/2RtBatWI8XpIhMezLN3X4jA cviw== 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 b10si7878488ejd.716.2021.06.26.00.30.37; Sat, 26 Jun 2021 00:31:01 -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 S230116AbhFZH3l (ORCPT + 99 others); Sat, 26 Jun 2021 03:29:41 -0400 Received: from szxga02-in.huawei.com ([45.249.212.188]:5432 "EHLO szxga02-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229948AbhFZH3Z (ORCPT ); Sat, 26 Jun 2021 03:29:25 -0400 Received: from dggemv711-chm.china.huawei.com (unknown [172.30.72.57]) by szxga02-in.huawei.com (SkyGuard) with ESMTP id 4GBljC64ZZz74Ts; Sat, 26 Jun 2021 15:23:43 +0800 (CST) Received: from dggpemm500001.china.huawei.com (7.185.36.107) by dggemv711-chm.china.huawei.com (10.1.198.66) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2176.2; Sat, 26 Jun 2021 15:26:58 +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.2176.2; Sat, 26 Jun 2021 15:26:58 +0800 From: Kefeng Wang To: Arnd Bergmann , , CC: Kefeng Wang Subject: [PATCH 1/9] kallsyms: Remove arch specific text and data check Date: Sat, 26 Jun 2021 15:34:31 +0800 Message-ID: <20210626073439.150586-2-wangkefeng.wang@huawei.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20210626073439.150586-1-wangkefeng.wang@huawei.com> References: <20210626073439.150586-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: dggems703-chm.china.huawei.com (10.3.19.180) 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 1a7968cf7679..d773732cc8eb 100644 --- a/include/linux/kallsyms.h +++ b/include/linux/kallsyms.h @@ -33,8 +33,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 922288b7c03d..8a9c6c9fd0a3 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