kernelnewbies.kernelnewbies.org archive mirror
 help / color / mirror / Atom feed
* kernel build error
@ 2013-03-17 15:28 Kumar amit mehta
  2013-03-18  4:21 ` Mulyadi Santosa
  0 siblings, 1 reply; 19+ messages in thread
From: Kumar amit mehta @ 2013-03-17 15:28 UTC (permalink / raw)
  To: kernelnewbies

I'm facing a kernel build issue with the latest kernel on my machine. It seem
like a configuration issue, and I haven't been able to resolve it for sometime,
hence need your help. The error message is as below:

<error snip>
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!
<error snip>

The subroutine "copy_from_user_overflow" is defined in lib/usercopy.c, and the
'Makefile' in the lib directory looks something like this:
<snip from lib/Makefile>
lib-$(CONFIG_ARCH_HAS_DEBUG_STRICT_USER_COPY_CHECKS) += usercopy.o
<snip from lib/Makefile>

I think that this config option should be a built-in ('y') and I see that this 
config option is indeed set to 'y' in the .config file.
<snip from .config>
amit at ubuntu:~/linux-next/linux-next$ grep
CONFIG_ARCH_HAS_DEBUG_STRICT_USER_COPY_CHECKS .config
CONFIG_ARCH_HAS_DEBUG_STRICT_USER_COPY_CHECKS=y
<snip from .config>

So what am I missing here ?

Some information about my git tree:
amit at ubuntu:~/linux-next/linux-next$ git remote show origin
* remote origin
  Fetch URL: git://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git

amit at ubuntu:~/linux-next/linux-next$ git tag -l next-*|tail -n 1
next-20130314 <--- latest tag

amit@ubuntu:~/linux-next/linux-next$ git branch
* 15-March <--- --  branch based on the latest tag
  22-Feb-13

-Amit

^ permalink raw reply	[flat|nested] 19+ messages in thread

* kernel build error
  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
  0 siblings, 1 reply; 19+ messages in thread
From: Mulyadi Santosa @ 2013-03-18  4:21 UTC (permalink / raw)
  To: kernelnewbies

On 3/17/13, Kumar amit mehta <gmate.amit@gmail.com> wrote:
> I'm facing a kernel build issue with the latest kernel on my machine. It
> seem
> like a configuration issue, and I haven't been able to resolve it for
> sometime,
> hence need your help. The error message is as below:
>
> <error snip>
> 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!
> <error snip>

Looks like a .h (header) file is missing on those files (icn, pktgen
etc). A header that defines copy_from_user_overflow() for sure.

Maybe grep can help.

-- 
regards,

Mulyadi Santosa
Freelance Linux trainer and consultant

blog: the-hydra.blogspot.com
training: mulyaditraining.blogspot.com

^ permalink raw reply	[flat|nested] 19+ messages in thread

* kernel build error
  2013-03-18  4:21 ` Mulyadi Santosa
@ 2013-03-19  5:28   ` Kumar amit mehta
  2013-03-19 14:43     ` Mulyadi Santosa
  0 siblings, 1 reply; 19+ messages in thread
From: Kumar amit mehta @ 2013-03-19  5:28 UTC (permalink / raw)
  To: kernelnewbies

On Mon, Mar 18, 2013 at 11:21:52AM +0700, Mulyadi Santosa wrote:
> On 3/17/13, Kumar amit mehta <gmate.amit@gmail.com> wrote:
> > I'm facing a kernel build issue with the latest kernel on my machine. It
> > seem
> > like a configuration issue, and I haven't been able to resolve it for
> > sometime,
> > hence need your help. The error message is as below:
> >
> > <error snip>
> > 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!
> > <error snip>
> 
> Looks like a .h (header) file is missing on those files (icn, pktgen
> etc). A header that defines copy_from_user_overflow() for sure.
> 
> Maybe grep can help.
>

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)
lib/usercopy.c:EXPORT_SYMBOL(copy_from_user_overflow);

I've been happily building kernel for previous releases and this issue seem to
have creeped up recently, therefore I looked into the changelogs and found that
recently there has been some modification in the arch/x86/Kconfig
$ git blame --since=3.weeks -- arch/x86/Kconfig 
7cb72f24 (Stephen Boyd     2013-03-10 21:55:49 +1100   23)      select
ARCH_HAS_DEBUG_STRICT_USER_COPY_CHECKS  <-- gives me some pointer

$ git log 7cb72f24 
<snip>
To simplify the rewording, consolidate the text into lib/Kconfig.debug and
modify it there to be more explicit about when you should say N to this
config.
........

While we're doing this, remove all the copy_from_user_overflow() code
that's duplicated many times and place it into lib/ so that any
architecture supporting this option can get the function for free.
<snip>

<snip from lib/Kconfig.debug>
config ARCH_HAS_DEBUG_STRICT_USER_COPY_CHECKS
        bool 

config DEBUG_STRICT_USER_COPY_CHECKS
        bool "Strict user copy size checks"
        depends on ARCH_HAS_DEBUG_STRICT_USER_COPY_CHECKS
        depends on DEBUG_KERNEL && !TRACE_BRANCH_PROFILING
        help 
          Enabling this option turns a certain set of sanity checks for user 
          copy operations into compile time failures.

          The copy_from_user() etc checks are there to help test if there
          are sufficient security checks on the length argument of
          the copy operation, by having gcc prove that the argument is
          within bounds.

          If unsure, say N.
<snip from lib/Kconfig.debug>

As I've mentioned before, copy_from_user_overflow is defined and exported in 
lib/usercopy.c and my .config file has
CONFIG_ARCH_HAS_DEBUG_STRICT_USER_COPY_CHECKS set to 'y'
<snip from .config>

amit at ubuntu:~/linux-next/linux-next$ grep
CONFIG_ARCH_HAS_DEBUG_STRICT_USER_COPY_CHECKS .config
CONFIG_ARCH_HAS_DEBUG_STRICT_USER_COPY_CHECKS=y
<snip from .config>

I've not been able to figure out the required header file so far.

Thanks,
Amit

^ permalink raw reply	[flat|nested] 19+ messages in thread

* kernel build error
  2013-03-19  5:28   ` Kumar amit mehta
@ 2013-03-19 14:43     ` Mulyadi Santosa
  2013-03-20  6:56       ` Kumar amit mehta
  0 siblings, 1 reply; 19+ messages in thread
From: Mulyadi Santosa @ 2013-03-19 14:43 UTC (permalink / raw)
  To: kernelnewbies

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
-- 
regards,

Mulyadi Santosa
Freelance Linux trainer and consultant

blog: the-hydra.blogspot.com
training: mulyaditraining.blogspot.com

^ permalink raw reply	[flat|nested] 19+ messages in thread

* kernel build error
  2013-03-19 14:43     ` Mulyadi Santosa
@ 2013-03-20  6:56       ` Kumar amit mehta
  2013-03-20  7:07         ` Kumar amit mehta
  0 siblings, 1 reply; 19+ messages in thread
From: Kumar amit mehta @ 2013-03-20  6:56 UTC (permalink / raw)
  To: kernelnewbies

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. 

-Amit

^ permalink raw reply	[flat|nested] 19+ messages in thread

* kernel build error
  2013-03-20  6:56       ` Kumar amit mehta
@ 2013-03-20  7:07         ` Kumar amit mehta
  2013-03-20  9:48           ` Ben Wu
                             ` (3 more replies)
  0 siblings, 4 replies; 19+ messages in thread
From: Kumar amit mehta @ 2013-03-20  7:07 UTC (permalink / raw)
  To: kernelnewbies

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. 
>

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.

^ permalink raw reply	[flat|nested] 19+ messages in thread

* kernel build error
  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
                             ` (2 subsequent siblings)
  3 siblings, 0 replies; 19+ messages in thread
From: Ben Wu @ 2013-03-20  9:48 UTC (permalink / raw)
  To: kernelnewbies

Dear All:
? I now study power driver in linux source code, but didn't
 find some doc about liux,all the doc was for android, can some help 
me?BTW,how /sys/power interactive with linux kernel??

Many thanks
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20130320/fcd9a78b/attachment.html 

^ permalink raw reply	[flat|nested] 19+ messages in thread

* wake_lock in linux kernel
  2013-03-20  7:07         ` Kumar amit mehta
  2013-03-20  9:48           ` Ben Wu
@ 2013-03-20  9:49           ` 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
  3 siblings, 1 reply; 19+ messages in thread
From: Ben Wu @ 2013-03-20  9:49 UTC (permalink / raw)
  To: kernelnewbies

Dear All:
? I now study power driver in linux source code, but didn't
 find some doc about liux,all the doc was for android, can some help 
me?BTW,how /sys/power interactive with linux kernel??

Many thanks
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20130320/f8d3b29e/attachment.html 

^ permalink raw reply	[flat|nested] 19+ messages in thread

* kernel build error
  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-20 17:32           ` Valdis.Kletnieks at vt.edu
  2013-03-21  6:16           ` Kumar amit mehta
  3 siblings, 0 replies; 19+ messages in thread
From: Valdis.Kletnieks at vt.edu @ 2013-03-20 17:32 UTC (permalink / raw)
  To: kernelnewbies

On Wed, 20 Mar 2013 00:07:57 -0700, Kumar amit mehta said:

> 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.

Or more correctly, you have a kernel actually running in 32-bit mode on
a machine that is 64-bit capable.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 865 bytes
Desc: not available
Url : http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20130320/7abe72e5/attachment.bin 

^ permalink raw reply	[flat|nested] 19+ messages in thread

* wake_lock in linux kernel
  2013-03-20  9:49           ` wake_lock in linux kernel Ben Wu
@ 2013-03-21  4:34             ` Yuva Raj
  0 siblings, 0 replies; 19+ messages in thread
From: Yuva Raj @ 2013-03-21  4:34 UTC (permalink / raw)
  To: kernelnewbies

Hi Ben,

Please find the  below the link to kernel power management related docs.

https://www.kernel.org/doc/Documentation/power/basic-pm-debugging.txt

This will explain about how /sys/power/  can be interactive.

You can  refer /sys/power/pm_test file for  testing the power
management functionality of linux  kernel.

Feel free  to refer all other files in that directory.

Regards,
yuvaraj.A



On Wed, Mar 20, 2013 at 3:19 PM, Ben Wu <crayben@yahoo.cn> wrote:

> Dear All:
>   I now study power driver in linux source code, but didn't find some doc
> about liux,all the doc was for android, can some help me?BTW,how /sys/power
> interactive with linux kernel??
>
> Many thanks
> _______________________________________________
> Kernelnewbies mailing list
> Kernelnewbies at kernelnewbies.org
> http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20130321/08f612c5/attachment.html 

^ permalink raw reply	[flat|nested] 19+ messages in thread

* kernel build error
  2013-03-20  7:07         ` Kumar amit mehta
                             ` (2 preceding siblings ...)
  2013-03-20 17:32           ` kernel build error Valdis.Kletnieks at vt.edu
@ 2013-03-21  6:16           ` Kumar amit mehta
  2013-03-22  3:41             ` Mulyadi Santosa
  3 siblings, 1 reply; 19+ messages in thread
From: Kumar amit mehta @ 2013-03-21  6:16 UTC (permalink / raw)
  To: kernelnewbies

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.

^ permalink raw reply	[flat|nested] 19+ messages in thread

* kernel build error
  2013-03-21  6:16           ` Kumar amit mehta
@ 2013-03-22  3:41             ` Mulyadi Santosa
  2013-03-22 10:17               ` Kumar amit mehta
  0 siblings, 1 reply; 19+ messages in thread
From: Mulyadi Santosa @ 2013-03-22  3:41 UTC (permalink / raw)
  To: kernelnewbies

On Thu, Mar 21, 2013 at 1:16 PM, Kumar amit mehta <gmate.amit@gmail.com> wrote:
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.

maybe it's better if you upload those files somewhere, maybe google
docs and send the link here.


-- 
regards,

Mulyadi Santosa
Freelance Linux trainer and consultant

blog: the-hydra.blogspot.com
training: mulyaditraining.blogspot.com

^ permalink raw reply	[flat|nested] 19+ messages in thread

* kernel build error
  2013-03-22  3:41             ` Mulyadi Santosa
@ 2013-03-22 10:17               ` Kumar amit mehta
  2013-03-24  5:49                 ` Mulyadi Santosa
  0 siblings, 1 reply; 19+ messages in thread
From: Kumar amit mehta @ 2013-03-22 10:17 UTC (permalink / raw)
  To: kernelnewbies

On Fri, Mar 22, 2013 at 10:41:56AM +0700, Mulyadi Santosa wrote:
> On Thu, Mar 21, 2013 at 1:16 PM, Kumar amit mehta <gmate.amit@gmail.com> wrote:
> 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.
> 
> maybe it's better if you upload those files somewhere, maybe google
> docs and send the link here.
> 

I've uploaded the kernel configuration and the screenshot in google drive [1].
With these particular settings, I'm able to build the kernel, but still not able
to boot from it:
$ egrep -i 'pktgen|binfmt_misc|cxt1|isdn' .config
CONFIG_BINFMT_MISC=y
# CONFIG_NET_PKTGEN is not set
# CONFIG_ISDN is not set
# CONFIG_CXT1E1 is not set

Just to be a little more verbose, I've listed below the steps that I follow to
build and boot from the newly built kernel on my ubuntu box:

$ sudo apt-get install build-essential
$ make oldconfig 
$ make -jX all ;;Where X= Number of CPU cores
$ sudo make modules_install install
$ sudo update-grub
$ sudo shutdown -y now

[1] https://docs.google.com/folder/d/0B4un01St9Hdsb18xYU1yaF9ET0U/edit?usp=sharing

Please let me know if you face any problem in accessing these.

-Amit

^ permalink raw reply	[flat|nested] 19+ messages in thread

* kernel build error
  2013-03-22 10:17               ` Kumar amit mehta
@ 2013-03-24  5:49                 ` Mulyadi Santosa
  2013-03-25  5:04                   ` Kumar amit mehta
       [not found]                   ` <20130331044544.GA3291@gmail.com>
  0 siblings, 2 replies; 19+ messages in thread
From: Mulyadi Santosa @ 2013-03-24  5:49 UTC (permalink / raw)
  To: kernelnewbies

On 3/22/13, Kumar amit mehta <gmate.amit@gmail.com> wrote:
> I've uploaded the kernel configuration and the screenshot in google drive
> [1].

ok let's see........... hmmm, stuck during I/O memory mapping?.....
sadly, no further info that explains the reason why it stuck there....

> Just to be a little more verbose, I've listed below the steps that I follow
> to
> build and boot from the newly built kernel on my ubuntu box:
>
> $ sudo apt-get install build-essential
> $ make oldconfig
> $ make -jX all ;;Where X= Number of CPU cores

somewhere I've read that to make sure compilation goes without any
glitches, better run without any -j at all.

> $ sudo make modules_install install

regarding kernel image install, I usually do manual copy to /boot and
adjust Grub config manually.

Then when it comes to modules compilation and installation, usually I do :
sudo make modules
sudo make modules_install


> $ sudo update-grub
> $ sudo shutdown -y now

try not using "quiet" kernel parameter, in case you currently use it.
check /etc/default/grub..... and re run update-grub.

-- 
regards,

Mulyadi Santosa
Freelance Linux trainer and consultant

blog: the-hydra.blogspot.com
training: mulyaditraining.blogspot.com

^ permalink raw reply	[flat|nested] 19+ messages in thread

* kernel build error
  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>
  1 sibling, 1 reply; 19+ messages in thread
From: Kumar amit mehta @ 2013-03-25  5:04 UTC (permalink / raw)
  To: kernelnewbies

On Sun, Mar 24, 2013 at 12:49:55PM +0700, Mulyadi Santosa wrote:
> On 3/22/13, Kumar amit mehta <gmate.amit@gmail.com> wrote:
> > I've uploaded the kernel configuration and the screenshot in google drive
> > [1].
> 
> ok let's see........... hmmm, stuck during I/O memory mapping?.....
> sadly, no further info that explains the reason why it stuck there....
> 
> > Just to be a little more verbose, I've listed below the steps that I follow
> > to
> > build and boot from the newly built kernel on my ubuntu box:
> >
> > $ sudo apt-get install build-essential
> > $ make oldconfig
> > $ make -jX all ;;Where X= Number of CPU cores
> 
> somewhere I've read that to make sure compilation goes without any
> glitches, better run without any -j at all.
> 
> > $ sudo make modules_install install
> 
> regarding kernel image install, I usually do manual copy to /boot and
> adjust Grub config manually.
> 
> Then when it comes to modules compilation and installation, usually I do :
> sudo make modules
> sudo make modules_install
> 
> 
> > $ sudo update-grub
> > $ sudo shutdown -y now
> 
> try not using "quiet" kernel parameter, in case you currently use it.
> check /etc/default/grub..... and re run update-grub.
> 

Thank you so much for your help.
Meanwhile I have updated my workspace with the latest linux-next tree and will
later try out the options that you've mentioned.

-Amit

^ permalink raw reply	[flat|nested] 19+ messages in thread

* kernel build error
  2013-03-25  5:04                   ` Kumar amit mehta
@ 2013-03-25  7:36                     ` Mulyadi Santosa
  0 siblings, 0 replies; 19+ messages in thread
From: Mulyadi Santosa @ 2013-03-25  7:36 UTC (permalink / raw)
  To: kernelnewbies

On 3/25/13, Kumar amit mehta <gmate.amit@gmail.com> wrote:
> Thank you so much for your help.
> Meanwhile I have updated my workspace with the latest linux-next tree and
> will
> later try out the options that you've mentioned.

You welcome.

BTW, (fortunately you already done so), it's better to retest against
latest linux-next tree. because possibly you hit a corner case error.
And also if it's still possible, test against latest stable. That way.
you will get better coverage on what's really going on.

-- 
regards,

Mulyadi Santosa
Freelance Linux trainer and consultant

blog: the-hydra.blogspot.com
training: mulyaditraining.blogspot.com

^ permalink raw reply	[flat|nested] 19+ messages in thread

* kernel build error
       [not found]                   ` <20130331044544.GA3291@gmail.com>
@ 2013-04-02  3:04                     ` Mulyadi Santosa
  2013-04-02  6:19                       ` Kumar amit mehta
  0 siblings, 1 reply; 19+ messages in thread
From: Mulyadi Santosa @ 2013-04-02  3:04 UTC (permalink / raw)
  To: kernelnewbies

On Sun, Mar 31, 2013 at 11:45 AM, Kumar amit mehta <gmate.amit@gmail.com>wrote:

> Unfortunately, still no luck. The build goes fine, but it seems that the
> boot
> process again got stuck at the same place. I'm using the latest linux-next
> tree.
>
> $ git describe
> next-20130328
>
> build procedure:
> $ make oldconfig
> $ make
> $ sudo make modules
> $ sudo make modules_install
> $ sudo make install
> $ sudo update-grub
>
> I believe, there is something very rudimentry that I'm missing in the
> kernel
> configuration file. I've attached the kernel configuration (.config) file
> here. Basically this configuration file is the same as the current running
> kernel(i did 'make oldconfig' above) with some additions(as over the time,
> new
> modules or experimental features would have been added, which I might have
> selected)
>

Could you paste roughly 20-30 lines of boot messages when you hit the hung
point? Kernel config alone usually can't help much

-- 
regards,

Mulyadi Santosa
Freelance Linux trainer and consultant

blog: the-hydra.blogspot.com
training: mulyaditraining.blogspot.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20130402/04f9fc12/attachment.html 

^ permalink raw reply	[flat|nested] 19+ messages in thread

* kernel build error
  2013-04-02  3:04                     ` Mulyadi Santosa
@ 2013-04-02  6:19                       ` Kumar amit mehta
  2013-04-02 13:40                         ` Mulyadi Santosa
  0 siblings, 1 reply; 19+ messages in thread
From: Kumar amit mehta @ 2013-04-02  6:19 UTC (permalink / raw)
  To: kernelnewbies

On Tue, Apr 02, 2013 at 10:04:31AM +0700, Mulyadi Santosa wrote:
> Could you paste roughly 20-30 lines of boot messages when you hit the hung
> point? Kernel config alone usually can't help much

I'm trying this on a Virtual Machine using VMware Player. When the VM boots up,
it throws lots of messages on the console and then gets stuck. I'd like to know,
how I can capture all those console logs till it hits the hung point.

-Amit

^ permalink raw reply	[flat|nested] 19+ messages in thread

* kernel build error
  2013-04-02  6:19                       ` Kumar amit mehta
@ 2013-04-02 13:40                         ` Mulyadi Santosa
  0 siblings, 0 replies; 19+ messages in thread
From: Mulyadi Santosa @ 2013-04-02 13:40 UTC (permalink / raw)
  To: kernelnewbies

On Tue, Apr 2, 2013 at 1:19 PM, Kumar amit mehta <gmate.amit@gmail.com>wrote:

> On Tue, Apr 02, 2013 at 10:04:31AM +0700, Mulyadi Santosa wrote:
> > Could you paste roughly 20-30 lines of boot messages when you hit the
> hung
> > point? Kernel config alone usually can't help much
>
> I'm trying this on a Virtual Machine using VMware Player. When the VM
> boots up,
> it throws lots of messages on the console and then gets stuck. I'd like to
> know,
> how I can capture all those console logs till it hits the hung point.
>
> -Amit
>

Never do such thing on VMWare, but I think Qemu-kvm is more convenient for
such task. You just need to learn how to use its serial console.....or just
use its ncurses display so you simply copy and paste from your terminal
program.

-- 
regards,

Mulyadi Santosa
Freelance Linux trainer and consultant

blog: the-hydra.blogspot.com
training: mulyaditraining.blogspot.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20130402/ef9862dc/attachment.html 

^ permalink raw reply	[flat|nested] 19+ messages in thread

end of thread, other threads:[~2013-04-02 13:40 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
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

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).