Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1338018

Re: Re: [PATCH v2] arm64: add alignment fault hanling

From EunTaik Lee <eun.taik.lee@samsung.com>
Newsgroups linux.kernel
Subject Re: Re: [PATCH v2] arm64: add alignment fault hanling
Date 2016-02-19 10:50 +0100
Message-ID <r3PRg-31X-1@gated-at.bofh.it> (permalink)
Organization linux.* mail to news gateway

Show all headers | View raw


2016-02-17 2:11 GMT+09:00 Catalin Marinas <catalin.marinas@arm.com>:
> 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?

I made a new function since do_bad_area currently does not return any value.
Should I just make it return an integer instead of making a new function for the
unaligned fault?

Euntaik

Back to linux.kernel | Previous | Next | Find similar | Unroll thread


Thread

Re: Re: [PATCH v2] arm64: add alignment fault hanling EunTaik Lee <eun.taik.lee@samsung.com> - 2016-02-19 10:50 +0100

csiph-web