All of lore.kernel.org
 help / color / mirror / Atom feed
From: Peter <peter.spamcatcher@rimuhosting.com>
To: user-mode-linux-devel@lists.sourceforge.net
Subject: [uml-devel] 2.4 do_mmap_pgoff compile problem
Date: Mon, 21 Mar 2005 17:13:42 +1200	[thread overview]
Message-ID: <423E5806.2070501@rimuhosting.com> (raw)
In-Reply-To: <cbec11ac05032020433867d95e@mail.gmail.com>

linux-2.4.27.tar.bz2 + uml-2.4.27-bs2-pre6.patch.bz2 patches with no 
error.  But I get the error below compile.  It seems like the UML code 
is passing in a mm as the first arg and the only definitions of 
`do_mmap_pgoff' I can find start with a file arg and have no mm.  I 
dropped the mm arg in the code, and it then compiles OK.  But segfaults 
immediately on use.  I'm not sure if that is caused by my code change or 
not.

BTW: what is the current recommendation for a 'stable' 2.4 UML guest kernel?

Regards, Peter


gcc -D__KERNEL__ -I/usr/src/uml/linux-2.4.27-rimu2/linux-2.4.27/include 
-Wall -Wstrict-prototypes -Wno-trigraphs -O2 
-fno-strict-aliasing-fno-common  -U__i386__ -Ui386 -DUM_FASTCALL -g 
-D__arch_um__ -DSUBARCH="i386" -D_LARGEFILE64_SOURCE 
-I/usr/src/uml/linux-2.4.27-rimu2/linux-2.4.27/arch/um/include 
-Derrno=kernel_errno 
-I/usr/src/uml/linux-2.4.27-rimu2/linux-2.4.27/arch/um/kernel/skas/include 
    -nostdinc -iwithprefix include -DKBUILD_BASENAME=syscall_kern  -c -o 
syscall_kern.o syscall_kern.c
syscall_kern.c: In function `do_mmap2':
syscall_kern.c:82: warning: passing arg 1 of `do_mmap_pgoff' from 
incompatible pointer type
syscall_kern.c:82: warning: passing arg 2 of `do_mmap_pgoff' makes 
integer from pointer without a cast
syscall_kern.c:82: too many arguments to function `do_mmap_pgoff'
make[2]: *** [syscall_kern.o] Error 1

relevant code:

/* common code for old and new mmaps */
long do_mmap2(struct mm_struct *mm, unsigned long addr, unsigned long len,
               unsigned long prot, unsigned long flags, unsigned long fd,
               unsigned long pgoff)
{
         int error = -EBADF;
         struct file * file = NULL;

         flags &= ~(MAP_EXECUTABLE | MAP_DENYWRITE);
         if (!(flags & MAP_ANONYMOUS)) {
                 file = fget(fd);
                 if (!file)
                         goto out;
         }

         down_write(&mm->mmap_sem);
         error = do_mmap_pgoff(mm, file, addr, len, prot, flags, pgoff);
         up_write(&mm->mmap_sem);

         if (file)
                 fput(file);
  out:
         return error;
}


-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel

  reply	other threads:[~2005-03-21  5:13 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-03-18  3:18 [uml-devel] Can't compile under vanilla 2.6.11 Ian McDonald
2005-03-18  3:40 ` Rob Landley
2005-03-18  6:34   ` Ian McDonald
2005-03-18 23:42 ` Rob Landley
2005-03-18 23:43 ` Rob Landley
2005-03-19 21:31   ` [uml-devel] Running JDK1.5 Maxes Out CPU Peter
2005-03-21  4:43   ` BUG with proposed fix Re: [uml-devel] Can't compile under vanilla 2.6.11 Ian McDonald
2005-03-21  5:13     ` Peter [this message]
2005-03-22 17:50       ` [uml-devel] 2.4 do_mmap_pgoff compile problem Blaisorblade
2005-03-21  5:30     ` BUG with proposed fix Re: [uml-devel] Can't compile under vanilla 2.6.11 Ian McDonald
2005-03-24 11:03       ` Blaisorblade
2005-04-08  4:04         ` Ian McDonald
2005-04-08  4:24           ` Blaisorblade

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=423E5806.2070501@rimuhosting.com \
    --to=peter.spamcatcher@rimuhosting.com \
    --cc=user-mode-linux-devel@lists.sourceforge.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.