Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753305AbbBMFx7 (ORCPT ); Fri, 13 Feb 2015 00:53:59 -0500 Received: from szxga02-in.huawei.com ([119.145.14.65]:35346 "EHLO szxga02-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753061AbbBMFwu (ORCPT ); Fri, 13 Feb 2015 00:52:50 -0500 From: Wang Nan To: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , CC: , , , Subject: [RFC PATCH v3 19/26] early kprobes: perhibit probing at early kprobe reserved area. Date: Fri, 13 Feb 2015 13:41:03 +0800 Message-ID: <1423806063-62276-1-git-send-email-wangnan0@huawei.com> X-Mailer: git-send-email 1.8.4 In-Reply-To: <1423805941-61407-1-git-send-email-wangnan0@huawei.com> References: <1423805941-61407-1-git-send-email-wangnan0@huawei.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.107.197.247] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 961 Lines: 33 Puts early kprobe reserved area into kprobe blacklist. Signed-off-by: Wang Nan --- kernel/kprobes.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/kernel/kprobes.c b/kernel/kprobes.c index fa1e422..b83c406 100644 --- a/kernel/kprobes.c +++ b/kernel/kprobes.c @@ -1358,6 +1358,13 @@ static bool within_kprobe_blacklist(unsigned long addr) if (arch_within_kprobe_blacklist(addr)) return true; + +#ifdef CONFIG_EARLY_KPROBES + if (addr >= (unsigned long)__early_kprobes_start && + addr < (unsigned long)__early_kprobes_end) + return true; +#endif + /* * If there exists a kprobe_blacklist, verify and * fail any probe registration in the prohibited area -- 1.8.4 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/