From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758235AbcBXXja (ORCPT ); Wed, 24 Feb 2016 18:39:30 -0500 Received: from mail-pa0-f44.google.com ([209.85.220.44]:34003 "EHLO mail-pa0-f44.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752208AbcBXXj2 (ORCPT ); Wed, 24 Feb 2016 18:39:28 -0500 Subject: Re: [PATCH 06/12] powerpc/module: Rework is_early_mcount_callsite() To: Michael Ellerman , linuxppc-dev@ozlabs.org References: <1456324115-21144-1-git-send-email-mpe@ellerman.id.au> <1456324115-21144-6-git-send-email-mpe@ellerman.id.au> Cc: duwe@lst.de, linux-kernel@vger.kernel.org, rostedt@goodmis.org, kamalesh@linux.vnet.ibm.com, pmladek@suse.com, jeyu@redhat.com, jkosina@suse.cz, live-patching@vger.kernel.org, mbenes@suse.cz From: Balbir Singh Message-ID: <56CE3F25.8030100@gmail.com> Date: Thu, 25 Feb 2016 10:39:17 +1100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.5.0 MIME-Version: 1.0 In-Reply-To: <1456324115-21144-6-git-send-email-mpe@ellerman.id.au> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 25/02/16 01:28, Michael Ellerman wrote: > is_early_mcount_callsite() needs to detect either the two instruction or > the three instruction versions of the _mcount() sequence. > > But if we're running a kernel with the two instruction sequence, we need > to be careful not to read instruction - 2, otherwise we might fall off > the front of a page and cause an oops. > > While we're here convert to bool to make the return semantics clear. > > Signed-off-by: Michael Ellerman > --- > arch/powerpc/kernel/module_64.c | 30 ++++++++++++++---------------- > 1 file changed, 14 insertions(+), 16 deletions(-) > > Squash. > > Do we even need to do this anymore? Balbir Singh.