lkml.org 
[lkml]   [2013]   [Mar]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 0/5] kmap cleanups for uretprobes (Was: extract fill_page() and trampoline implementation)
On Sun, Mar 24, 2013 at 07:20:40PM +0100, Oleg Nesterov wrote:
> On 03/24, Oleg Nesterov wrote:
> >
> > On 03/22, Anton Arapov wrote:
> > >
> > > +static void fill_page(struct page *page, unsigned long offset, uprobe_opcode_t *insn)
> > ^^^^^^^^^^^^^^^
> > Well, it should be "u8 *insn" or "char *".
>
> Or void*.
>
> And we have another reason for this helper.
>
> And I really think that we need to cleanup the kmap mess in uprobe.c
> before we add the new abuser.
>
> How about this simple series?
>
> > sizeof(insn) == UPROBE_SWBP_INSN_SIZE != MAX_UINSN_BYTES. See also the
> > comments above.
>
> I think that copy_to_page() added by 4/5 is what you need, and it solves
> the problems with typeof/sizeof. Plus it have another caller.

That's what I can't come up with. My fill_page() was indeed ugly.

Thanks!
Anton.

> Oleg.
>


\
 
 \ /
  Last update: 2013-03-25 12:01    [W:0.475 / U:0.232 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site