From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753977AbbGaRQh (ORCPT ); Fri, 31 Jul 2015 13:16:37 -0400 Received: from bombadil.infradead.org ([198.137.202.9]:43713 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752985AbbGaRQg (ORCPT ); Fri, 31 Jul 2015 13:16:36 -0400 Date: Fri, 31 Jul 2015 19:16:27 +0200 From: Peter Zijlstra To: Sebastian Andrzej Siewior Cc: linux-kernel@vger.kernel.org, Rusty Russell , Ananth N Mavinakayanahalli , Anil S Keshavamurthy , tglx@linutronix.de Subject: Re: [RFC 2/4] jump_label: use rcu_read_lock() while accessing __module_*() Message-ID: <20150731171627.GA25159@twins.programming.kicks-ass.net> References: <1438362488-29857-1-git-send-email-bigeasy@linutronix.de> <1438362488-29857-3-git-send-email-bigeasy@linutronix.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1438362488-29857-3-git-send-email-bigeasy@linutronix.de> User-Agent: Mutt/1.5.21 (2012-12-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jul 31, 2015 at 07:08:06PM +0200, Sebastian Andrzej Siewior wrote: > __jump_label_mod_text_reserved() should most likely use rcu_read_lock() > while invoking __module_text_address(). I'm not sure there is anything > to protect the module pointed by `start' and `end' from removal. > I *think* the protection is based on the preempt_disable() in > check_kprobe_address_safe(). That preempt_disable however does not > protect from module removal on a SMP machine. Yes it does, seeing how it uses sync_sched().