[PATCH v3 5/7] arm: kgdb: Handle read-only text / modules

Kees Cook keescook at chromium.org
Tue Aug 12 12:40:55 PDT 2014


On Tue, Aug 12, 2014 at 12:38 PM, Stephen Boyd <sboyd at codeaurora.org> wrote:
> On 08/12/14 11:24, Kees Cook wrote:
>> @@ -244,6 +248,32 @@ void kgdb_arch_exit(void)
>>       unregister_die_notifier(&kgdb_notifier);
>>  }
>>
>> +int kgdb_arch_set_breakpoint(struct kgdb_bkpt *bpt)
>> +{
>> +     int err;
>> +
>> +     /* patch_text() only supports int-sized breakpoints */
>> +     if (sizeof(int) != BREAK_INSTR_SIZE)
>> +             return -EINVAL;
>
> Could this be a BUILD_BUG_ON too?

Ah yes, good call. I'll adjust that.

Thanks!

-Kees

-- 
Kees Cook
Chrome OS Security



More information about the linux-arm-kernel mailing list