From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.3 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9406AC35DF9 for ; Tue, 25 Feb 2020 10:05:44 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 5A00B222C2 for ; Tue, 25 Feb 2020 10:05:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729977AbgBYKFn (ORCPT ); Tue, 25 Feb 2020 05:05:43 -0500 Received: from mx2.suse.de ([195.135.220.15]:44780 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727016AbgBYKFn (ORCPT ); Tue, 25 Feb 2020 05:05:43 -0500 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id EA0CEAD81; Tue, 25 Feb 2020 10:05:40 +0000 (UTC) Date: Tue, 25 Feb 2020 11:05:39 +0100 (CET) From: Miroslav Benes To: Will Deacon cc: linux-kernel@vger.kernel.org, kernel-team@android.com, akpm@linux-foundation.org, "K . Prasad" , Thomas Gleixner , Greg Kroah-Hartman , Frederic Weisbecker , Christoph Hellwig , Quentin Perret , Alexei Starovoitov , Masami Hiramatsu , live-patching@vger.kernel.org Subject: Re: [PATCH 0/3] Unexport kallsyms_lookup_name() and kallsyms_on_each_symbol() In-Reply-To: <20200221114404.14641-1-will@kernel.org> Message-ID: References: <20200221114404.14641-1-will@kernel.org> User-Agent: Alpine 2.21 (LSU 202 2017-01-01) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org CC live-patching ML, because this could affect many of its users... On Fri, 21 Feb 2020, Will Deacon wrote: > Hi folks, > > Despite having just a single modular in-tree user that I could spot, > kallsyms_lookup_name() is exported to modules and provides a mechanism > for out-of-tree modules to access and invoke arbitrary, non-exported > kernel symbols when kallsyms is enabled. > > This patch series fixes up that one user and unexports the symbol along > with kallsyms_on_each_symbol(), since that could also be abused in a > similar manner. > > Cheers, > > Will > > Cc: K.Prasad > Cc: Thomas Gleixner > Cc: Greg Kroah-Hartman > Cc: Frederic Weisbecker > Cc: Christoph Hellwig > Cc: Quentin Perret > Cc: Alexei Starovoitov > Cc: Masami Hiramatsu > > --->8 > > Will Deacon (3): > samples/hw_breakpoint: Drop HW_BREAKPOINT_R when reporting writes > samples/hw_breakpoint: Drop use of kallsyms_lookup_name() > kallsyms: Unexport kallsyms_lookup_name() and > kallsyms_on_each_symbol() > > kernel/kallsyms.c | 2 -- > samples/hw_breakpoint/data_breakpoint.c | 11 ++++++++--- > 2 files changed, 8 insertions(+), 5 deletions(-) > > -- > 2.25.0.265.gbab2e86ba0-goog >