lkml.org 
[lkml]   [2019]   [Feb]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH V4 5/9] x86/alternative: Split text_poke_bp() into tree steps
From
Date
On 2/8/19 1:15 AM, Steven Rostedt wrote:
> On Mon, 4 Feb 2019 20:58:58 +0100
> Daniel Bristot de Oliveira <bristot@redhat.com> wrote:
>
>>
>> +static void text_poke_bp_set_handler(void *addr, void *handler,
>> + unsigned char int3)
>> +{
>> + bp_int3_handler = handler;
>> + bp_int3_addr = (u8 *)addr + sizeof(int3);
>> + text_poke(addr, &int3, sizeof(int3));
>> +}
>> +
>> +
>> +static void patch_first_byte(void *addr, const void *opcode, unsigned char int3)
>> +{
>> + /* patch the first byte */
>> + text_poke(addr, opcode, sizeof(int3));
>> +}
> Hmm, perhaps get rid of the first function entirely, and just do...
> (although why have the "int3" here anyway?)
>

These helpers were created because they were used twice in the first versions of
this patch set. But with the change suggested by Masami, they are called only in
the text_poke_bp_batch() now, so I am thinking to get rid of them all (removing
this patch).

Thoughts?

Thanks!
-- Daniel

\
 
 \ /
  Last update: 2019-02-15 13:48    [W:0.092 / U:3.852 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site