Messages in this thread | | | Date | Mon, 12 May 2014 14:50:08 +0200 | From | Jiri Slaby <> | Subject | Re: [RFC 04/16] kgr: add testing kgraft patch |
| |
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@suse.cz> > > ??
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
| |