kernelnewbies.kernelnewbies.org archive mirror
 help / color / mirror / Atom feed
From: gmate.amit@gmail.com (Kumar amit mehta)
To: kernelnewbies@lists.kernelnewbies.org
Subject: kernel build error
Date: Wed, 20 Mar 2013 23:16:57 -0700	[thread overview]
Message-ID: <20130321061657.GA2795@gmail.com> (raw)
In-Reply-To: <20130320070757.GC6275@gmail.com>

Inline

On Wed, Mar 20, 2013 at 12:07:57AM -0700, Kumar amit mehta wrote:
> On Tue, Mar 19, 2013 at 11:56:44PM -0700, Kumar amit mehta wrote:
> > On Tue, Mar 19, 2013 at 09:43:11PM +0700, Mulyadi Santosa wrote:
> > > Hi ...
> > > 
> > > On Tue, Mar 19, 2013 at 12:28 PM, Kumar amit mehta <gmate.amit@gmail.com> wrote:
> > > > grep for copy_from_user_overflow gives me this:
> > > >
> > > > amit at ubuntu:~/linux-next/linux-next$ grep -ri copy_from_user_overflow *
> > > > arch/s390/include/asm/uaccess.h:extern void copy_from_user_overflow(void)
> > > > arch/s390/include/asm/uaccess.h:                copy_from_user_overflow();
> > > > arch/tile/include/asm/uaccess.h:extern void copy_from_user_overflow(void)
> > > > arch/tile/include/asm/uaccess.h:                copy_from_user_overflow();
> > > > arch/parisc/include/asm/uaccess.h:extern void copy_from_user_overflow(void)
> > > > arch/parisc/include/asm/uaccess.h:                copy_from_user_overflow();
> > > > arch/x86/include/asm/uaccess_32.h:extern void copy_from_user_overflow(void)
> > > > arch/x86/include/asm/uaccess_32.h:              copy_from_user_overflow();
> > > > drivers/vfio/pci/vfio_pci_config.c:      * with count of 1/2/4 and hits
> > > > copy_from_user_overflow without this.
> > > > lib/usercopy.c:void copy_from_user_overflow(void)
> > > 
> > > 
> > > IMHO, I think uaccess_32.h is what you need here.
> > > 
> > > I draw that conclusion after checking this line:
> > > http://lxr.linux.no/#linux+v3.8.3/arch/x86/include/asm/uaccess_32.h#L194
> > > 
> > > I might be wrong, so feel free to test first
> > > 
> > Actually the above header file is supposed to get included, based on the 
> > architecture only.
> > 
> > <snip from arch/x86/include/asm/uaccess.h>
> > #ifdef CONFIG_X86_32
> > # include <asm/uaccess_32.h>
> > #else
> > # include <asm/uaccess_64.h>
> > #endif
> > <snip from arch/x86/include/asm/uaccess.h>
> > 
> > <snip from .config>
> > amit at ubuntu:~/linux-next/linux-next$ grep -w CONFIG_X86_32 .config 
> > CONFIG_X86_32=y
> > <snip from .config>
> > 
> > CPU arch on my machine: 
> > amit at ubuntu:~/linux-next/linux-next$ uname -m
> > i686
> > 
> > Based on this observation, I think, I do not need to include the uaccess_32.h
> > in any of those files. 
> >
>

Based on the above understanding, I didn't tried including uaccess_32.h in any
of those files, complaining for copy_from_user_overflow symbol error [1], and
Instead I thought I'll de-select these modules from being build and will thus
not hit this issue. So now my .config file looks something like this:

amit at ubuntu:~/linux-next/linux-next$ egrep -i 'pktgen|binfmt_misc|cxt1|isdn'
.config 
# CONFIG_BINFMT_MISC is not set
# CONFIG_NET_PKTGEN is not set
# CONFIG_ISDN is not set
# CONFIG_CXT1E1 is not set

I didn't face any issue with the build now and while trying to boot from this
newly built kernel, I found myself hopelessly staring at the screen, which
seem to have stuck in the boot process. I think the kernel configuration file
and the boot screenshot can be helpful for inspecting this boot issue. But 
before attaching these small files(136K and 32K respectively) and send it to
the mailing list, I'd like to ask, if that's fine with you folks.

[1] build error when modules such as pktgen are selected:
ERROR: "copy_from_user_overflow" [net/core/pktgen.ko] undefined!
ERROR: "copy_from_user_overflow" [fs/binfmt_misc.ko] undefined!
ERROR: "copy_from_user_overflow" [drivers/staging/cxt1e1/cxt1e1.ko] undefined!
ERROR: "copy_from_user_overflow" [drivers/isdn/icn/icn.ko] undefined!
ERROR: "copy_from_user_overflow" [drivers/isdn/hardware/avm/b1.ko] undefined!

> I forgot that 'uname -m' will return me the kernel version and _not_ the CPU
> architecture. The CPU on my machine seem to be 64 bit (/proc/cpuinfo|grep flags
> shows 'lm'). So my understanding is that I've a 32 bit kernel running on a 64
> bit machine.

  parent reply	other threads:[~2013-03-21  6:16 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-17 15:28 kernel build error Kumar amit mehta
2013-03-18  4:21 ` Mulyadi Santosa
2013-03-19  5:28   ` Kumar amit mehta
2013-03-19 14:43     ` Mulyadi Santosa
2013-03-20  6:56       ` Kumar amit mehta
2013-03-20  7:07         ` Kumar amit mehta
2013-03-20  9:48           ` Ben Wu
2013-03-20  9:49           ` wake_lock in linux kernel Ben Wu
2013-03-21  4:34             ` Yuva Raj
2013-03-20 17:32           ` kernel build error Valdis.Kletnieks at vt.edu
2013-03-21  6:16           ` Kumar amit mehta [this message]
2013-03-22  3:41             ` Mulyadi Santosa
2013-03-22 10:17               ` Kumar amit mehta
2013-03-24  5:49                 ` Mulyadi Santosa
2013-03-25  5:04                   ` Kumar amit mehta
2013-03-25  7:36                     ` Mulyadi Santosa
     [not found]                   ` <20130331044544.GA3291@gmail.com>
2013-04-02  3:04                     ` Mulyadi Santosa
2013-04-02  6:19                       ` Kumar amit mehta
2013-04-02 13:40                         ` Mulyadi Santosa

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=20130321061657.GA2795@gmail.com \
    --to=gmate.amit@gmail.com \
    --cc=kernelnewbies@lists.kernelnewbies.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).