Re: [RFC 04/16] kgr: add testing kgraft patch
From: Jiri Slaby
Date: Mon May 12 2014 - 08:50:21 EST
On 05/06/2014 01:03 PM, Pavel Machek wrote:
> Hi!
Hi!
>> This is intended to be a presentation of the kgraft engine, so it is
>> placed into samples/ directory.
>>
>> It patches sys_iopl() and sys_capable() to print an additional message
>> to the original functionality.
>>
>> Jiri Kosina <jkosina@xxxxxxx>
>
> ??
This was a messed up s-o-b line. Fixed already.
>> +KGR_PATCHED_FUNCTION(patch, SyS_iopl, kgr_new_sys_iopl);
>> +
>> +static bool new_capable(int cap)
>> +{
>> + printk(KERN_DEBUG "kgr-patcher: this is a new capable()\n");
>> +
>> + return ns_capable(&init_user_ns, cap);
>> +}
>> +KGR_PATCHED_FUNCTION(patch, capable, new_capable);
>
> So for some reason when replacing sys_iopl, capable needs to be replaced, too?
Oh, no. This patch just demonstrates how to patch two functions at once.
They were chosen arbitrarily.
The rest has been fixed now.
thanks,
--
js
suse labs
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/