From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755585AbcBPRLm (ORCPT ); Tue, 16 Feb 2016 12:11:42 -0500 Received: from foss.arm.com ([217.140.101.70]:55352 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755189AbcBPRLk (ORCPT ); Tue, 16 Feb 2016 12:11:40 -0500 Date: Tue, 16 Feb 2016 17:11:33 +0000 From: Catalin Marinas To: EunTaik Lee Cc: "vladimir.murzin@arm.com" , "suzuki.poulose@arm.com" , "will.deacon@arm.com" , "linux-kernel@vger.kernel.org" , "salyzyn@android.com" , "riandrews@android.com" , "james.morse@arm.com" , "Dave.Martin@arm.com" , "linux-arm-kernel@lists.infradead.org" Subject: Re: [PATCH v2] arm64: add alignment fault hanling Message-ID: <20160216171133.GB24950@localhost.localdomain> References: <329817481.954581455597874663.JavaMail.weblogic@epmlwas08c> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <329817481.954581455597874663.JavaMail.weblogic@epmlwas08c> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Feb 16, 2016 at 04:44:38AM +0000, EunTaik Lee wrote: > diff --git a/arch/arm64/mm/fault.c b/arch/arm64/mm/fault.c > index 19211c4..a5ebb99 100644 > --- a/arch/arm64/mm/fault.c > +++ b/arch/arm64/mm/fault.c > @@ -371,6 +371,14 @@ static int __kprobes do_translation_fault(unsigned long addr, > return 0; > } > > +static int __kprobes do_alignment_fault(unsigned long addr, > + unsigned int esr, > + struct pt_regs *regs) > +{ > + do_bad_area(addr, esr, regs); > + return 0; > +} > + > /* > * This abort handler always returns "fault". > */ > @@ -418,7 +426,7 @@ static struct fault_info { > { do_bad, SIGBUS, 0, "synchronous parity error (translation table walk" }, > { do_bad, SIGBUS, 0, "synchronous parity error (translation table walk" }, > { do_bad, SIGBUS, 0, "unknown 32" }, > - { do_bad, SIGBUS, BUS_ADRALN, "alignment fault" }, > + { do_alignment_fault, SIGBUS, BUS_ADRALN, "alignment fault" }, Do you need a new function, can you not just add do_bad_area in the fault_info array? -- Catalin