Re: mmotm 2013-03-01-15-50 uploaded (strict user copy)

2013-03-14 Thread Randy Dunlap
On 03/14/13 10:48, Stephen Boyd wrote:
> On 03/01/13 19:42, Stephen Boyd wrote:
>> On 03/01/13 19:00, Randy Dunlap wrote:
>>> on i386:
>>>
>>> ERROR: "copy_from_user_overflow" [fs/binfmt_misc.ko] undefined!
>>>
>>> which I don't understand.
>>> lib/usercopy.o is built and building binfmt_misc.c says:
>>>
>>>   CC [M]  fs/binfmt_misc.o
>>> In file included from arch/x86/include/asm/uaccess.h:537:0,
>>>  from include/linux/uaccess.h:5,
>>>  from include/linux/highmem.h:8,
>>>  from include/linux/pagemap.h:10,
>>>  from fs/binfmt_misc.c:27:
>>> arch/x86/include/asm/uaccess_32.h: In function 'parse_command.part.1':
>>> arch/x86/include/asm/uaccess_32.h:211:26: warning: call to 
>>> 'copy_from_user_overflow' declared with attribute warning: copy_from_user() 
>>> buffer size is not provably correct [enabled by default]
>> Hm.. That's because it's part of lib and not obj, right?
>>
>> diff --git a/lib/Makefile b/lib/Makefile
>> index 59fabd0..4c55104 100644
>> --- a/lib/Makefile
>> +++ b/lib/Makefile
>> @@ -15,7 +15,7 @@ lib-y := ctype.o string.o vsprintf.o cmdline.o \
>>  is_single_threaded.o plist.o decompress.o kobject_uevent.o \
>>  earlycpio.o percpu-refcount.o
>>  
>> -lib-$(CONFIG_ARCH_HAS_DEBUG_STRICT_USER_COPY_CHECKS) += usercopy.o
>> +obj-$(CONFIG_ARCH_HAS_DEBUG_STRICT_USER_COPY_CHECKS) += usercopy.o
>>  lib-$(CONFIG_MMU) += ioremap.o
>>  lib-$(CONFIG_SMP) += cpumask.o
>>  
>>
> 
> Andrew, can you squash this into "Kconfig: consolidate
> CONFIG_DEBUG_STRICT_USER_COPY_CHECKS"?
> 

Acked-by: Randy Dunlap 

Thanks.


-- 
~Randy
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: mmotm 2013-03-01-15-50 uploaded (strict user copy)

2013-03-14 Thread Stephen Boyd
On 03/01/13 19:42, Stephen Boyd wrote:
> On 03/01/13 19:00, Randy Dunlap wrote:
>> on i386:
>>
>> ERROR: "copy_from_user_overflow" [fs/binfmt_misc.ko] undefined!
>>
>> which I don't understand.
>> lib/usercopy.o is built and building binfmt_misc.c says:
>>
>>   CC [M]  fs/binfmt_misc.o
>> In file included from arch/x86/include/asm/uaccess.h:537:0,
>>  from include/linux/uaccess.h:5,
>>  from include/linux/highmem.h:8,
>>  from include/linux/pagemap.h:10,
>>  from fs/binfmt_misc.c:27:
>> arch/x86/include/asm/uaccess_32.h: In function 'parse_command.part.1':
>> arch/x86/include/asm/uaccess_32.h:211:26: warning: call to 
>> 'copy_from_user_overflow' declared with attribute warning: copy_from_user() 
>> buffer size is not provably correct [enabled by default]
> Hm.. That's because it's part of lib and not obj, right?
>
> diff --git a/lib/Makefile b/lib/Makefile
> index 59fabd0..4c55104 100644
> --- a/lib/Makefile
> +++ b/lib/Makefile
> @@ -15,7 +15,7 @@ lib-y := ctype.o string.o vsprintf.o cmdline.o \
>  is_single_threaded.o plist.o decompress.o kobject_uevent.o \
>  earlycpio.o percpu-refcount.o
>  
> -lib-$(CONFIG_ARCH_HAS_DEBUG_STRICT_USER_COPY_CHECKS) += usercopy.o
> +obj-$(CONFIG_ARCH_HAS_DEBUG_STRICT_USER_COPY_CHECKS) += usercopy.o
>  lib-$(CONFIG_MMU) += ioremap.o
>  lib-$(CONFIG_SMP) += cpumask.o
>  
>

Andrew, can you squash this into "Kconfig: consolidate
CONFIG_DEBUG_STRICT_USER_COPY_CHECKS"?

-- 
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
hosted by The Linux Foundation

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: mmotm 2013-03-01-15-50 uploaded (strict user copy)

2013-03-14 Thread Stephen Boyd
On 03/01/13 19:42, Stephen Boyd wrote:
 On 03/01/13 19:00, Randy Dunlap wrote:
 on i386:

 ERROR: copy_from_user_overflow [fs/binfmt_misc.ko] undefined!

 which I don't understand.
 lib/usercopy.o is built and building binfmt_misc.c says:

   CC [M]  fs/binfmt_misc.o
 In file included from arch/x86/include/asm/uaccess.h:537:0,
  from include/linux/uaccess.h:5,
  from include/linux/highmem.h:8,
  from include/linux/pagemap.h:10,
  from fs/binfmt_misc.c:27:
 arch/x86/include/asm/uaccess_32.h: In function 'parse_command.part.1':
 arch/x86/include/asm/uaccess_32.h:211:26: warning: call to 
 'copy_from_user_overflow' declared with attribute warning: copy_from_user() 
 buffer size is not provably correct [enabled by default]
 Hm.. That's because it's part of lib and not obj, right?

 diff --git a/lib/Makefile b/lib/Makefile
 index 59fabd0..4c55104 100644
 --- a/lib/Makefile
 +++ b/lib/Makefile
 @@ -15,7 +15,7 @@ lib-y := ctype.o string.o vsprintf.o cmdline.o \
  is_single_threaded.o plist.o decompress.o kobject_uevent.o \
  earlycpio.o percpu-refcount.o
  
 -lib-$(CONFIG_ARCH_HAS_DEBUG_STRICT_USER_COPY_CHECKS) += usercopy.o
 +obj-$(CONFIG_ARCH_HAS_DEBUG_STRICT_USER_COPY_CHECKS) += usercopy.o
  lib-$(CONFIG_MMU) += ioremap.o
  lib-$(CONFIG_SMP) += cpumask.o
  


Andrew, can you squash this into Kconfig: consolidate
CONFIG_DEBUG_STRICT_USER_COPY_CHECKS?

-- 
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
hosted by The Linux Foundation

--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: mmotm 2013-03-01-15-50 uploaded (strict user copy)

2013-03-14 Thread Randy Dunlap
On 03/14/13 10:48, Stephen Boyd wrote:
 On 03/01/13 19:42, Stephen Boyd wrote:
 On 03/01/13 19:00, Randy Dunlap wrote:
 on i386:

 ERROR: copy_from_user_overflow [fs/binfmt_misc.ko] undefined!

 which I don't understand.
 lib/usercopy.o is built and building binfmt_misc.c says:

   CC [M]  fs/binfmt_misc.o
 In file included from arch/x86/include/asm/uaccess.h:537:0,
  from include/linux/uaccess.h:5,
  from include/linux/highmem.h:8,
  from include/linux/pagemap.h:10,
  from fs/binfmt_misc.c:27:
 arch/x86/include/asm/uaccess_32.h: In function 'parse_command.part.1':
 arch/x86/include/asm/uaccess_32.h:211:26: warning: call to 
 'copy_from_user_overflow' declared with attribute warning: copy_from_user() 
 buffer size is not provably correct [enabled by default]
 Hm.. That's because it's part of lib and not obj, right?

 diff --git a/lib/Makefile b/lib/Makefile
 index 59fabd0..4c55104 100644
 --- a/lib/Makefile
 +++ b/lib/Makefile
 @@ -15,7 +15,7 @@ lib-y := ctype.o string.o vsprintf.o cmdline.o \
  is_single_threaded.o plist.o decompress.o kobject_uevent.o \
  earlycpio.o percpu-refcount.o
  
 -lib-$(CONFIG_ARCH_HAS_DEBUG_STRICT_USER_COPY_CHECKS) += usercopy.o
 +obj-$(CONFIG_ARCH_HAS_DEBUG_STRICT_USER_COPY_CHECKS) += usercopy.o
  lib-$(CONFIG_MMU) += ioremap.o
  lib-$(CONFIG_SMP) += cpumask.o
  

 
 Andrew, can you squash this into Kconfig: consolidate
 CONFIG_DEBUG_STRICT_USER_COPY_CHECKS?
 

Acked-by: Randy Dunlap rdun...@infradead.org

Thanks.


-- 
~Randy
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: mmotm 2013-03-01-15-50 uploaded (strict user copy)

2013-03-01 Thread Randy Dunlap
On 03/01/13 20:16, Stephen Boyd wrote:
> On 03/01/13 19:42, Stephen Boyd wrote:
>> On 03/01/13 19:00, Randy Dunlap wrote:
>>> On 03/01/13 15:51, a...@linux-foundation.org wrote:
 The mm-of-the-moment snapshot 2013-03-01-15-50 has been uploaded to

http://www.ozlabs.org/~akpm/mmotm/

>>> on i386:
>>>
>>> ERROR: "copy_from_user_overflow" [fs/binfmt_misc.ko] undefined!
>>>
>>> which I don't understand.
>>> lib/usercopy.o is built and building binfmt_misc.c says:
>>>
>>>   CC [M]  fs/binfmt_misc.o
>>> In file included from arch/x86/include/asm/uaccess.h:537:0,
>>>  from include/linux/uaccess.h:5,
>>>  from include/linux/highmem.h:8,
>>>  from include/linux/pagemap.h:10,
>>>  from fs/binfmt_misc.c:27:
>>> arch/x86/include/asm/uaccess_32.h: In function 'parse_command.part.1':
>>> arch/x86/include/asm/uaccess_32.h:211:26: warning: call to 
>>> 'copy_from_user_overflow' declared with attribute warning: copy_from_user() 
>>> buffer size is not provably correct [enabled by default]
>> Hm.. That's because it's part of lib and not obj, right?

Yes, this fixes the build error.

>> diff --git a/lib/Makefile b/lib/Makefile
>> index 59fabd0..4c55104 100644
>> --- a/lib/Makefile
>> +++ b/lib/Makefile
>> @@ -15,7 +15,7 @@ lib-y := ctype.o string.o vsprintf.o cmdline.o \
>>  is_single_threaded.o plist.o decompress.o kobject_uevent.o \
>>  earlycpio.o percpu-refcount.o
>>  
>> -lib-$(CONFIG_ARCH_HAS_DEBUG_STRICT_USER_COPY_CHECKS) += usercopy.o
>> +obj-$(CONFIG_ARCH_HAS_DEBUG_STRICT_USER_COPY_CHECKS) += usercopy.o
>>  lib-$(CONFIG_MMU) += ioremap.o
>>  lib-$(CONFIG_SMP) += cpumask.o
>>  
>>
> 
> I'm a little confused though because it is lib-y on x86 before my patch.

binfmt_misc is built as a loadable module in my config.
It must be the only user of copy_from_user_overflow() in this config.
I guess that it would also fail prior to your patch, but I haven't
tested it.  Anyway, your patch above is correct and needed.

thanks,
-- 
~Randy
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: mmotm 2013-03-01-15-50 uploaded (strict user copy)

2013-03-01 Thread Stephen Boyd
On 03/01/13 19:42, Stephen Boyd wrote:
> On 03/01/13 19:00, Randy Dunlap wrote:
>> On 03/01/13 15:51, a...@linux-foundation.org wrote:
>>> The mm-of-the-moment snapshot 2013-03-01-15-50 has been uploaded to
>>>
>>>http://www.ozlabs.org/~akpm/mmotm/
>>>
>> on i386:
>>
>> ERROR: "copy_from_user_overflow" [fs/binfmt_misc.ko] undefined!
>>
>> which I don't understand.
>> lib/usercopy.o is built and building binfmt_misc.c says:
>>
>>   CC [M]  fs/binfmt_misc.o
>> In file included from arch/x86/include/asm/uaccess.h:537:0,
>>  from include/linux/uaccess.h:5,
>>  from include/linux/highmem.h:8,
>>  from include/linux/pagemap.h:10,
>>  from fs/binfmt_misc.c:27:
>> arch/x86/include/asm/uaccess_32.h: In function 'parse_command.part.1':
>> arch/x86/include/asm/uaccess_32.h:211:26: warning: call to 
>> 'copy_from_user_overflow' declared with attribute warning: copy_from_user() 
>> buffer size is not provably correct [enabled by default]
> Hm.. That's because it's part of lib and not obj, right?
>
> diff --git a/lib/Makefile b/lib/Makefile
> index 59fabd0..4c55104 100644
> --- a/lib/Makefile
> +++ b/lib/Makefile
> @@ -15,7 +15,7 @@ lib-y := ctype.o string.o vsprintf.o cmdline.o \
>  is_single_threaded.o plist.o decompress.o kobject_uevent.o \
>  earlycpio.o percpu-refcount.o
>  
> -lib-$(CONFIG_ARCH_HAS_DEBUG_STRICT_USER_COPY_CHECKS) += usercopy.o
> +obj-$(CONFIG_ARCH_HAS_DEBUG_STRICT_USER_COPY_CHECKS) += usercopy.o
>  lib-$(CONFIG_MMU) += ioremap.o
>  lib-$(CONFIG_SMP) += cpumask.o
>  
>

I'm a little confused though because it is lib-y on x86 before my patch.

-- 
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
hosted by The Linux Foundation

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: mmotm 2013-03-01-15-50 uploaded (strict user copy)

2013-03-01 Thread Stephen Boyd
On 03/01/13 19:00, Randy Dunlap wrote:
> On 03/01/13 15:51, a...@linux-foundation.org wrote:
>> The mm-of-the-moment snapshot 2013-03-01-15-50 has been uploaded to
>>
>>http://www.ozlabs.org/~akpm/mmotm/
>>
>
> on i386:
>
> ERROR: "copy_from_user_overflow" [fs/binfmt_misc.ko] undefined!
>
> which I don't understand.
> lib/usercopy.o is built and building binfmt_misc.c says:
>
>   CC [M]  fs/binfmt_misc.o
> In file included from arch/x86/include/asm/uaccess.h:537:0,
>  from include/linux/uaccess.h:5,
>  from include/linux/highmem.h:8,
>  from include/linux/pagemap.h:10,
>  from fs/binfmt_misc.c:27:
> arch/x86/include/asm/uaccess_32.h: In function 'parse_command.part.1':
> arch/x86/include/asm/uaccess_32.h:211:26: warning: call to 
> 'copy_from_user_overflow' declared with attribute warning: copy_from_user() 
> buffer size is not provably correct [enabled by default]

Hm.. That's because it's part of lib and not obj, right?

diff --git a/lib/Makefile b/lib/Makefile
index 59fabd0..4c55104 100644
--- a/lib/Makefile
+++ b/lib/Makefile
@@ -15,7 +15,7 @@ lib-y := ctype.o string.o vsprintf.o cmdline.o \
 is_single_threaded.o plist.o decompress.o kobject_uevent.o \
 earlycpio.o percpu-refcount.o
 
-lib-$(CONFIG_ARCH_HAS_DEBUG_STRICT_USER_COPY_CHECKS) += usercopy.o
+obj-$(CONFIG_ARCH_HAS_DEBUG_STRICT_USER_COPY_CHECKS) += usercopy.o
 lib-$(CONFIG_MMU) += ioremap.o
 lib-$(CONFIG_SMP) += cpumask.o
 

-- 
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
hosted by The Linux Foundation

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: mmotm 2013-03-01-15-50 uploaded (strict user copy)

2013-03-01 Thread Randy Dunlap
On 03/01/13 15:51, a...@linux-foundation.org wrote:
> The mm-of-the-moment snapshot 2013-03-01-15-50 has been uploaded to
> 
>http://www.ozlabs.org/~akpm/mmotm/
> 


on i386:

ERROR: "copy_from_user_overflow" [fs/binfmt_misc.ko] undefined!

which I don't understand.
lib/usercopy.o is built and building binfmt_misc.c says:

  CC [M]  fs/binfmt_misc.o
In file included from arch/x86/include/asm/uaccess.h:537:0,
 from include/linux/uaccess.h:5,
 from include/linux/highmem.h:8,
 from include/linux/pagemap.h:10,
 from fs/binfmt_misc.c:27:
arch/x86/include/asm/uaccess_32.h: In function 'parse_command.part.1':
arch/x86/include/asm/uaccess_32.h:211:26: warning: call to 
'copy_from_user_overflow' declared with attribute warning: copy_from_user() 
buffer size is not provably correct [enabled by default]



Full randconfig file is attached.

-- 
~Randy
#
# Automatically generated file; DO NOT EDIT.
# Linux/i386 3.8.0-mm1 Kernel Configuration
#
# CONFIG_64BIT is not set
CONFIG_X86_32=y
CONFIG_X86=y
CONFIG_INSTRUCTION_DECODER=y
CONFIG_OUTPUT_FORMAT="elf32-i386"
CONFIG_ARCH_DEFCONFIG="arch/x86/configs/i386_defconfig"
CONFIG_LOCKDEP_SUPPORT=y
CONFIG_STACKTRACE_SUPPORT=y
CONFIG_HAVE_LATENCYTOP_SUPPORT=y
CONFIG_MMU=y
CONFIG_NEED_DMA_MAP_STATE=y
CONFIG_NEED_SG_DMA_LENGTH=y
CONFIG_GENERIC_ISA_DMA=y
CONFIG_GENERIC_BUG=y
CONFIG_GENERIC_HWEIGHT=y
CONFIG_GENERIC_GPIO=y
CONFIG_ARCH_MAY_HAVE_PC_FDC=y
CONFIG_RWSEM_XCHGADD_ALGORITHM=y
CONFIG_GENERIC_CALIBRATE_DELAY=y
CONFIG_ARCH_HAS_CPU_RELAX=y
CONFIG_ARCH_HAS_DEFAULT_IDLE=y
CONFIG_ARCH_HAS_CACHE_LINE_SIZE=y
CONFIG_ARCH_HAS_CPU_AUTOPROBE=y
CONFIG_HAVE_SETUP_PER_CPU_AREA=y
CONFIG_NEED_PER_CPU_EMBED_FIRST_CHUNK=y
CONFIG_NEED_PER_CPU_PAGE_FIRST_CHUNK=y
CONFIG_ARCH_HIBERNATION_POSSIBLE=y
CONFIG_ARCH_SUSPEND_POSSIBLE=y
# CONFIG_ZONE_DMA32 is not set
# CONFIG_AUDIT_ARCH is not set
CONFIG_ARCH_SUPPORTS_OPTIMIZED_INLINING=y
CONFIG_ARCH_SUPPORTS_DEBUG_PAGEALLOC=y
CONFIG_ARCH_HWEIGHT_CFLAGS="-fcall-saved-ecx -fcall-saved-edx"
CONFIG_ARCH_SUPPORTS_UPROBES=y
CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
CONFIG_CONSTRUCTORS=y
CONFIG_IRQ_WORK=y
CONFIG_BUILDTIME_EXTABLE_SORT=y

#
# General setup
#
CONFIG_EXPERIMENTAL=y
CONFIG_BROKEN_ON_SMP=y
CONFIG_INIT_ENV_ARG_LIMIT=32
CONFIG_CROSS_COMPILE=""
CONFIG_LOCALVERSION=""
# CONFIG_LOCALVERSION_AUTO is not set
CONFIG_HAVE_KERNEL_GZIP=y
CONFIG_HAVE_KERNEL_BZIP2=y
CONFIG_HAVE_KERNEL_LZMA=y
CONFIG_HAVE_KERNEL_XZ=y
CONFIG_HAVE_KERNEL_LZO=y
# CONFIG_KERNEL_GZIP is not set
# CONFIG_KERNEL_BZIP2 is not set
# CONFIG_KERNEL_LZMA is not set
CONFIG_KERNEL_XZ=y
# CONFIG_KERNEL_LZO is not set
CONFIG_DEFAULT_HOSTNAME="(none)"
# CONFIG_SWAP is not set
# CONFIG_SYSVIPC is not set
CONFIG_FHANDLE=y
CONFIG_HAVE_GENERIC_HARDIRQS=y

#
# IRQ subsystem
#
CONFIG_GENERIC_HARDIRQS=y
CONFIG_GENERIC_IRQ_PROBE=y
CONFIG_GENERIC_IRQ_SHOW=y
CONFIG_IRQ_DOMAIN=y
# CONFIG_IRQ_DOMAIN_DEBUG is not set
CONFIG_IRQ_FORCED_THREADING=y
CONFIG_SPARSE_IRQ=y
CONFIG_CLOCKSOURCE_WATCHDOG=y
CONFIG_ALWAYS_USE_PERSISTENT_CLOCK=y
CONFIG_KTIME_SCALAR=y
CONFIG_GENERIC_CLOCKEVENTS=y
CONFIG_GENERIC_CLOCKEVENTS_BUILD=y
CONFIG_GENERIC_CLOCKEVENTS_BROADCAST=y
CONFIG_GENERIC_CLOCKEVENTS_MIN_ADJUST=y
CONFIG_GENERIC_CMOS_UPDATE=y

#
# Timers subsystem
#
# CONFIG_NO_HZ is not set
# CONFIG_HIGH_RES_TIMERS is not set

#
# CPU/Task time and stats accounting
#
# CONFIG_TICK_CPU_ACCOUNTING is not set
CONFIG_IRQ_TIME_ACCOUNTING=y
CONFIG_BSD_PROCESS_ACCT=y
CONFIG_BSD_PROCESS_ACCT_V3=y

#
# RCU Subsystem
#
CONFIG_TREE_PREEMPT_RCU=y
# CONFIG_TINY_PREEMPT_RCU is not set
CONFIG_PREEMPT_RCU=y
CONFIG_RCU_STALL_COMMON=y
CONFIG_RCU_FANOUT=32
CONFIG_RCU_FANOUT_LEAF=16
# CONFIG_RCU_FANOUT_EXACT is not set
# CONFIG_TREE_RCU_TRACE is not set
CONFIG_RCU_BOOST=y
CONFIG_RCU_BOOST_PRIO=1
CONFIG_RCU_BOOST_DELAY=500
CONFIG_RCU_NOCB_CPU=y
# CONFIG_IKCONFIG is not set
CONFIG_LOG_BUF_SHIFT=17
CONFIG_HAVE_UNSTABLE_SCHED_CLOCK=y
CONFIG_ARCH_SUPPORTS_NUMA_BALANCING=y
CONFIG_ARCH_WANTS_PROT_NUMA_PROT_NONE=y
CONFIG_CGROUPS=y
CONFIG_CGROUP_DEBUG=y
CONFIG_CGROUP_FREEZER=y
CONFIG_CGROUP_DEVICE=y
# CONFIG_CPUSETS is not set
# CONFIG_CGROUP_CPUACCT is not set
CONFIG_RESOURCE_COUNTERS=y
CONFIG_MEMCG=y
CONFIG_MEMCG_KMEM=y
# CONFIG_MEMCG_DEBUG_ASYNC_DESTROY is not set
CONFIG_CGROUP_PERF=y
CONFIG_CGROUP_SCHED=y
CONFIG_FAIR_GROUP_SCHED=y
# CONFIG_CFS_BANDWIDTH is not set
# CONFIG_RT_GROUP_SCHED is not set
CONFIG_BLK_CGROUP=y
# CONFIG_DEBUG_BLK_CGROUP is not set
CONFIG_CHECKPOINT_RESTORE=y
CONFIG_NAMESPACES=y
CONFIG_UTS_NS=y
CONFIG_USER_NS=y
# CONFIG_PID_NS is not set
CONFIG_UIDGID_CONVERTED=y
CONFIG_UIDGID_STRICT_TYPE_CHECKS=y
CONFIG_SCHED_AUTOGROUP=y
CONFIG_MM_OWNER=y
CONFIG_SYSFS_DEPRECATED=y
# CONFIG_SYSFS_DEPRECATED_V2 is not set
# CONFIG_RELAY is not set
# CONFIG_BLK_DEV_INITRD is not set
CONFIG_CC_OPTIMIZE_FOR_SIZE=y
CONFIG_ANON_INODES=y
CONFIG_EXPERT=y
CONFIG_HAVE_UID16=y
CONFIG_UID16=y
CONFIG_SYSCTL_EXCEPTION_TRACE=y
CONFIG_KALLSYMS=y
CONFIG_KALLSYMS_ALL=y

Re: mmotm 2013-03-01-15-50 uploaded (strict user copy)

2013-03-01 Thread Randy Dunlap
On 03/01/13 15:51, a...@linux-foundation.org wrote:
 The mm-of-the-moment snapshot 2013-03-01-15-50 has been uploaded to
 
http://www.ozlabs.org/~akpm/mmotm/
 


on i386:

ERROR: copy_from_user_overflow [fs/binfmt_misc.ko] undefined!

which I don't understand.
lib/usercopy.o is built and building binfmt_misc.c says:

  CC [M]  fs/binfmt_misc.o
In file included from arch/x86/include/asm/uaccess.h:537:0,
 from include/linux/uaccess.h:5,
 from include/linux/highmem.h:8,
 from include/linux/pagemap.h:10,
 from fs/binfmt_misc.c:27:
arch/x86/include/asm/uaccess_32.h: In function 'parse_command.part.1':
arch/x86/include/asm/uaccess_32.h:211:26: warning: call to 
'copy_from_user_overflow' declared with attribute warning: copy_from_user() 
buffer size is not provably correct [enabled by default]



Full randconfig file is attached.

-- 
~Randy
#
# Automatically generated file; DO NOT EDIT.
# Linux/i386 3.8.0-mm1 Kernel Configuration
#
# CONFIG_64BIT is not set
CONFIG_X86_32=y
CONFIG_X86=y
CONFIG_INSTRUCTION_DECODER=y
CONFIG_OUTPUT_FORMAT=elf32-i386
CONFIG_ARCH_DEFCONFIG=arch/x86/configs/i386_defconfig
CONFIG_LOCKDEP_SUPPORT=y
CONFIG_STACKTRACE_SUPPORT=y
CONFIG_HAVE_LATENCYTOP_SUPPORT=y
CONFIG_MMU=y
CONFIG_NEED_DMA_MAP_STATE=y
CONFIG_NEED_SG_DMA_LENGTH=y
CONFIG_GENERIC_ISA_DMA=y
CONFIG_GENERIC_BUG=y
CONFIG_GENERIC_HWEIGHT=y
CONFIG_GENERIC_GPIO=y
CONFIG_ARCH_MAY_HAVE_PC_FDC=y
CONFIG_RWSEM_XCHGADD_ALGORITHM=y
CONFIG_GENERIC_CALIBRATE_DELAY=y
CONFIG_ARCH_HAS_CPU_RELAX=y
CONFIG_ARCH_HAS_DEFAULT_IDLE=y
CONFIG_ARCH_HAS_CACHE_LINE_SIZE=y
CONFIG_ARCH_HAS_CPU_AUTOPROBE=y
CONFIG_HAVE_SETUP_PER_CPU_AREA=y
CONFIG_NEED_PER_CPU_EMBED_FIRST_CHUNK=y
CONFIG_NEED_PER_CPU_PAGE_FIRST_CHUNK=y
CONFIG_ARCH_HIBERNATION_POSSIBLE=y
CONFIG_ARCH_SUSPEND_POSSIBLE=y
# CONFIG_ZONE_DMA32 is not set
# CONFIG_AUDIT_ARCH is not set
CONFIG_ARCH_SUPPORTS_OPTIMIZED_INLINING=y
CONFIG_ARCH_SUPPORTS_DEBUG_PAGEALLOC=y
CONFIG_ARCH_HWEIGHT_CFLAGS=-fcall-saved-ecx -fcall-saved-edx
CONFIG_ARCH_SUPPORTS_UPROBES=y
CONFIG_DEFCONFIG_LIST=/lib/modules/$UNAME_RELEASE/.config
CONFIG_CONSTRUCTORS=y
CONFIG_IRQ_WORK=y
CONFIG_BUILDTIME_EXTABLE_SORT=y

#
# General setup
#
CONFIG_EXPERIMENTAL=y
CONFIG_BROKEN_ON_SMP=y
CONFIG_INIT_ENV_ARG_LIMIT=32
CONFIG_CROSS_COMPILE=
CONFIG_LOCALVERSION=
# CONFIG_LOCALVERSION_AUTO is not set
CONFIG_HAVE_KERNEL_GZIP=y
CONFIG_HAVE_KERNEL_BZIP2=y
CONFIG_HAVE_KERNEL_LZMA=y
CONFIG_HAVE_KERNEL_XZ=y
CONFIG_HAVE_KERNEL_LZO=y
# CONFIG_KERNEL_GZIP is not set
# CONFIG_KERNEL_BZIP2 is not set
# CONFIG_KERNEL_LZMA is not set
CONFIG_KERNEL_XZ=y
# CONFIG_KERNEL_LZO is not set
CONFIG_DEFAULT_HOSTNAME=(none)
# CONFIG_SWAP is not set
# CONFIG_SYSVIPC is not set
CONFIG_FHANDLE=y
CONFIG_HAVE_GENERIC_HARDIRQS=y

#
# IRQ subsystem
#
CONFIG_GENERIC_HARDIRQS=y
CONFIG_GENERIC_IRQ_PROBE=y
CONFIG_GENERIC_IRQ_SHOW=y
CONFIG_IRQ_DOMAIN=y
# CONFIG_IRQ_DOMAIN_DEBUG is not set
CONFIG_IRQ_FORCED_THREADING=y
CONFIG_SPARSE_IRQ=y
CONFIG_CLOCKSOURCE_WATCHDOG=y
CONFIG_ALWAYS_USE_PERSISTENT_CLOCK=y
CONFIG_KTIME_SCALAR=y
CONFIG_GENERIC_CLOCKEVENTS=y
CONFIG_GENERIC_CLOCKEVENTS_BUILD=y
CONFIG_GENERIC_CLOCKEVENTS_BROADCAST=y
CONFIG_GENERIC_CLOCKEVENTS_MIN_ADJUST=y
CONFIG_GENERIC_CMOS_UPDATE=y

#
# Timers subsystem
#
# CONFIG_NO_HZ is not set
# CONFIG_HIGH_RES_TIMERS is not set

#
# CPU/Task time and stats accounting
#
# CONFIG_TICK_CPU_ACCOUNTING is not set
CONFIG_IRQ_TIME_ACCOUNTING=y
CONFIG_BSD_PROCESS_ACCT=y
CONFIG_BSD_PROCESS_ACCT_V3=y

#
# RCU Subsystem
#
CONFIG_TREE_PREEMPT_RCU=y
# CONFIG_TINY_PREEMPT_RCU is not set
CONFIG_PREEMPT_RCU=y
CONFIG_RCU_STALL_COMMON=y
CONFIG_RCU_FANOUT=32
CONFIG_RCU_FANOUT_LEAF=16
# CONFIG_RCU_FANOUT_EXACT is not set
# CONFIG_TREE_RCU_TRACE is not set
CONFIG_RCU_BOOST=y
CONFIG_RCU_BOOST_PRIO=1
CONFIG_RCU_BOOST_DELAY=500
CONFIG_RCU_NOCB_CPU=y
# CONFIG_IKCONFIG is not set
CONFIG_LOG_BUF_SHIFT=17
CONFIG_HAVE_UNSTABLE_SCHED_CLOCK=y
CONFIG_ARCH_SUPPORTS_NUMA_BALANCING=y
CONFIG_ARCH_WANTS_PROT_NUMA_PROT_NONE=y
CONFIG_CGROUPS=y
CONFIG_CGROUP_DEBUG=y
CONFIG_CGROUP_FREEZER=y
CONFIG_CGROUP_DEVICE=y
# CONFIG_CPUSETS is not set
# CONFIG_CGROUP_CPUACCT is not set
CONFIG_RESOURCE_COUNTERS=y
CONFIG_MEMCG=y
CONFIG_MEMCG_KMEM=y
# CONFIG_MEMCG_DEBUG_ASYNC_DESTROY is not set
CONFIG_CGROUP_PERF=y
CONFIG_CGROUP_SCHED=y
CONFIG_FAIR_GROUP_SCHED=y
# CONFIG_CFS_BANDWIDTH is not set
# CONFIG_RT_GROUP_SCHED is not set
CONFIG_BLK_CGROUP=y
# CONFIG_DEBUG_BLK_CGROUP is not set
CONFIG_CHECKPOINT_RESTORE=y
CONFIG_NAMESPACES=y
CONFIG_UTS_NS=y
CONFIG_USER_NS=y
# CONFIG_PID_NS is not set
CONFIG_UIDGID_CONVERTED=y
CONFIG_UIDGID_STRICT_TYPE_CHECKS=y
CONFIG_SCHED_AUTOGROUP=y
CONFIG_MM_OWNER=y
CONFIG_SYSFS_DEPRECATED=y
# CONFIG_SYSFS_DEPRECATED_V2 is not set
# CONFIG_RELAY is not set
# CONFIG_BLK_DEV_INITRD is not set
CONFIG_CC_OPTIMIZE_FOR_SIZE=y
CONFIG_ANON_INODES=y
CONFIG_EXPERT=y
CONFIG_HAVE_UID16=y
CONFIG_UID16=y
CONFIG_SYSCTL_EXCEPTION_TRACE=y
CONFIG_KALLSYMS=y
CONFIG_KALLSYMS_ALL=y
CONFIG_HOTPLUG=y
# CONFIG_PRINTK 

Re: mmotm 2013-03-01-15-50 uploaded (strict user copy)

2013-03-01 Thread Stephen Boyd
On 03/01/13 19:00, Randy Dunlap wrote:
 On 03/01/13 15:51, a...@linux-foundation.org wrote:
 The mm-of-the-moment snapshot 2013-03-01-15-50 has been uploaded to

http://www.ozlabs.org/~akpm/mmotm/


 on i386:

 ERROR: copy_from_user_overflow [fs/binfmt_misc.ko] undefined!

 which I don't understand.
 lib/usercopy.o is built and building binfmt_misc.c says:

   CC [M]  fs/binfmt_misc.o
 In file included from arch/x86/include/asm/uaccess.h:537:0,
  from include/linux/uaccess.h:5,
  from include/linux/highmem.h:8,
  from include/linux/pagemap.h:10,
  from fs/binfmt_misc.c:27:
 arch/x86/include/asm/uaccess_32.h: In function 'parse_command.part.1':
 arch/x86/include/asm/uaccess_32.h:211:26: warning: call to 
 'copy_from_user_overflow' declared with attribute warning: copy_from_user() 
 buffer size is not provably correct [enabled by default]

Hm.. That's because it's part of lib and not obj, right?

diff --git a/lib/Makefile b/lib/Makefile
index 59fabd0..4c55104 100644
--- a/lib/Makefile
+++ b/lib/Makefile
@@ -15,7 +15,7 @@ lib-y := ctype.o string.o vsprintf.o cmdline.o \
 is_single_threaded.o plist.o decompress.o kobject_uevent.o \
 earlycpio.o percpu-refcount.o
 
-lib-$(CONFIG_ARCH_HAS_DEBUG_STRICT_USER_COPY_CHECKS) += usercopy.o
+obj-$(CONFIG_ARCH_HAS_DEBUG_STRICT_USER_COPY_CHECKS) += usercopy.o
 lib-$(CONFIG_MMU) += ioremap.o
 lib-$(CONFIG_SMP) += cpumask.o
 

-- 
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
hosted by The Linux Foundation

--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: mmotm 2013-03-01-15-50 uploaded (strict user copy)

2013-03-01 Thread Stephen Boyd
On 03/01/13 19:42, Stephen Boyd wrote:
 On 03/01/13 19:00, Randy Dunlap wrote:
 On 03/01/13 15:51, a...@linux-foundation.org wrote:
 The mm-of-the-moment snapshot 2013-03-01-15-50 has been uploaded to

http://www.ozlabs.org/~akpm/mmotm/

 on i386:

 ERROR: copy_from_user_overflow [fs/binfmt_misc.ko] undefined!

 which I don't understand.
 lib/usercopy.o is built and building binfmt_misc.c says:

   CC [M]  fs/binfmt_misc.o
 In file included from arch/x86/include/asm/uaccess.h:537:0,
  from include/linux/uaccess.h:5,
  from include/linux/highmem.h:8,
  from include/linux/pagemap.h:10,
  from fs/binfmt_misc.c:27:
 arch/x86/include/asm/uaccess_32.h: In function 'parse_command.part.1':
 arch/x86/include/asm/uaccess_32.h:211:26: warning: call to 
 'copy_from_user_overflow' declared with attribute warning: copy_from_user() 
 buffer size is not provably correct [enabled by default]
 Hm.. That's because it's part of lib and not obj, right?

 diff --git a/lib/Makefile b/lib/Makefile
 index 59fabd0..4c55104 100644
 --- a/lib/Makefile
 +++ b/lib/Makefile
 @@ -15,7 +15,7 @@ lib-y := ctype.o string.o vsprintf.o cmdline.o \
  is_single_threaded.o plist.o decompress.o kobject_uevent.o \
  earlycpio.o percpu-refcount.o
  
 -lib-$(CONFIG_ARCH_HAS_DEBUG_STRICT_USER_COPY_CHECKS) += usercopy.o
 +obj-$(CONFIG_ARCH_HAS_DEBUG_STRICT_USER_COPY_CHECKS) += usercopy.o
  lib-$(CONFIG_MMU) += ioremap.o
  lib-$(CONFIG_SMP) += cpumask.o
  


I'm a little confused though because it is lib-y on x86 before my patch.

-- 
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
hosted by The Linux Foundation

--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: mmotm 2013-03-01-15-50 uploaded (strict user copy)

2013-03-01 Thread Randy Dunlap
On 03/01/13 20:16, Stephen Boyd wrote:
 On 03/01/13 19:42, Stephen Boyd wrote:
 On 03/01/13 19:00, Randy Dunlap wrote:
 On 03/01/13 15:51, a...@linux-foundation.org wrote:
 The mm-of-the-moment snapshot 2013-03-01-15-50 has been uploaded to

http://www.ozlabs.org/~akpm/mmotm/

 on i386:

 ERROR: copy_from_user_overflow [fs/binfmt_misc.ko] undefined!

 which I don't understand.
 lib/usercopy.o is built and building binfmt_misc.c says:

   CC [M]  fs/binfmt_misc.o
 In file included from arch/x86/include/asm/uaccess.h:537:0,
  from include/linux/uaccess.h:5,
  from include/linux/highmem.h:8,
  from include/linux/pagemap.h:10,
  from fs/binfmt_misc.c:27:
 arch/x86/include/asm/uaccess_32.h: In function 'parse_command.part.1':
 arch/x86/include/asm/uaccess_32.h:211:26: warning: call to 
 'copy_from_user_overflow' declared with attribute warning: copy_from_user() 
 buffer size is not provably correct [enabled by default]
 Hm.. That's because it's part of lib and not obj, right?

Yes, this fixes the build error.

 diff --git a/lib/Makefile b/lib/Makefile
 index 59fabd0..4c55104 100644
 --- a/lib/Makefile
 +++ b/lib/Makefile
 @@ -15,7 +15,7 @@ lib-y := ctype.o string.o vsprintf.o cmdline.o \
  is_single_threaded.o plist.o decompress.o kobject_uevent.o \
  earlycpio.o percpu-refcount.o
  
 -lib-$(CONFIG_ARCH_HAS_DEBUG_STRICT_USER_COPY_CHECKS) += usercopy.o
 +obj-$(CONFIG_ARCH_HAS_DEBUG_STRICT_USER_COPY_CHECKS) += usercopy.o
  lib-$(CONFIG_MMU) += ioremap.o
  lib-$(CONFIG_SMP) += cpumask.o
  

 
 I'm a little confused though because it is lib-y on x86 before my patch.

binfmt_misc is built as a loadable module in my config.
It must be the only user of copy_from_user_overflow() in this config.
I guess that it would also fail prior to your patch, but I haven't
tested it.  Anyway, your patch above is correct and needed.

thanks,
-- 
~Randy
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/