On 05/11/2013 10:47 AM, richard -rw- weinberger wrote:
> On Sat, May 11, 2013 at 10:36 AM, Toralf Förster <toralf.foers...@gmx.de> 
> wrote:
>>
>> Dave,
>>
>> can you pls answer to Richards question:
>>
>>         So, we trigger "if (WARN_ON_ONCE(size > KMALLOC_MAX_SIZE))".
>>         Now I'm wondering what kind of argument string trinity gave to 
>> mount().
>>         How long is it?
> 
> Hehe, it's not that easy.
> We have to find out.
> Can you please add a printk() into copy_mount_string() which prints out
> the string size?
With this change:

diff --git a/fs/namespace.c b/fs/namespace.c
index 7b1ca9b..289211d 100644
--- a/fs/namespace.c
+++ b/fs/namespace.c
@@ -2236,6 +2236,8 @@ int copy_mount_string(const void __user *data, char 
**where)
                return 0;
        }

+       printk(" here: size is %ul\n", (unsigned long)data);
+
        tmp = strndup_user(data, PAGE_SIZE);
        if (IS_ERR(tmp))
                return PTR_ERR(tmp);

> 
> --
> Thanks,
> //richard
> 

I get :

2013-05-11T11:51:00.551+02:00 trinity kernel: Adding 262140k swap on 
/dev/mapper/crypt-swap.  Priority:-1 extents:1 across:262140k FS
2013-05-11T11:51:00.551+02:00 trinity kernel: here: size is 134565664l
2013-05-11T11:51:00.551+02:00 trinity kernel: here: size is 134565632l
2013-05-11T11:51:00.551+02:00 trinity kernel: here: size is 134564296l
2013-05-11T11:51:00.551+02:00 trinity kernel: here: size is 134564312l
2013-05-11T11:51:00.000+02:00 trinity haveged: haveged starting up
2013-05-11T11:51:00.000+02:00 trinity haveged: haveged: Completed tot procedure 
B after 1172535 bytes
2013-05-11T11:51:01.000+02:00 trinity haveged: haveged: Completed tot procedure 
A after 1035716 bytes
2013-05-11T11:51:01.000+02:00 trinity haveged: haveged: version: 1.5; arch: 
x86; vendor: GenuineIntel; cores: 1/1, buffer: 128
2013-05-11T11:51:01.000+02:00 trinity haveged: haveged: d_cache: 32K (000020), 
i_cache: 32K (000020), i_index: 19/40, i_size: 32653/60731
2013-05-11T11:51:01.000+02:00 trinity haveged: haveged: tot tests: BA8, 
continuous tests: B
2013-05-11T11:51:01.000+02:00 trinity dhcpcd[777]: version 5.6.4 starting
2013-05-11T11:51:01.000+02:00 trinity dhcpcd[777]: ipv6_open: Address family 
not supported by protocol
2013-05-11T11:51:01.000+02:00 trinity haveged: haveged: Completed continuous 
procedure B after 1172535 bytes
2013-05-11T11:51:01.000+02:00 trinity dhcpcd[777]: eth0: rebinding lease of 
192.168.1.63
2013-05-11T11:51:01.000+02:00 trinity dhcpcd[777]: eth0: acknowledged 
192.168.1.63 from 192.168.0.254
2013-05-11T11:51:01.000+02:00 trinity dhcpcd[777]: eth0: checking for 
192.168.1.63
2013-05-11T11:51:06.000+02:00 trinity dhcpcd[777]: eth0: leased 192.168.1.63 
for infinity
2013-05-11T11:51:07.000+02:00 trinity dhcpcd[777]: forked to background, child 
pid 811
2013-05-11T11:51:09.000+02:00 trinity cron[855]: (CRON) STARTUP (V5.0)
2013-05-11T11:51:10.097+02:00 trinity kernel: Virtual console 1 assigned device 
'/dev/pts/6'
2013-05-11T11:51:14.000+02:00 trinity sshd[874]: pam_unix(sshd:session): 
session opened for user tfoerste by (uid=0)
2013-05-11T11:51:16.344+02:00 trinity kernel: here: size is 139336544l
2013-05-11T11:51:16.344+02:00 trinity kernel: here: size is 139435704l
2013-05-11T11:51:16.478+02:00 trinity kernel: here: size is 135065600l
2013-05-11T11:51:16.478+02:00 trinity kernel: here: size is 139561704l
2013-05-11T11:51:16.478+02:00 trinity kernel: here: size is 4l
2013-05-11T11:51:16.478+02:00 trinity kernel: ------------[ cut here 
]------------
2013-05-11T11:51:16.478+02:00 trinity kernel: WARNING: at mm/slab_common.c:376 
kmalloc_slab+0x33/0x80()
2013-05-11T11:51:16.478+02:00 trinity kernel: CPU: 0 PID: 880 Comm: 
trinity-child0 Not tainted 3.9.0-12555-g2dbd3ca-dirty #1
2013-05-11T11:51:16.478+02:00 trinity kernel: 40217da8 40217dd4 0807bfca 
083d3e1c 083d85d3 00000178 080e11f3 080e11f3 
2013-05-11T11:51:16.478+02:00 trinity kernel: fffffff2 000000d0 00000004 
40217de4 0807c093 00000009 00000000 40217df8 
2013-05-11T11:51:16.478+02:00 trinity kernel: 080e11f3 083d85d3 00000178 
00000000 40217e1c 080fabfb fffffff2 000000d0 40217d7c:  [<08060cff>] 
show_stack+0xcf/0x100
2013-05-11T11:51:16.478+02:00 trinity kernel: 40217da0:  [<0835d5ca>] 
dump_stack+0x26/0x28
2013-05-11T11:51:16.484+02:00 trinity kernel: 40217db0:  [<0807bfca>] 
warn_slowpath_common+0x5a/0x80
2013-05-11T11:51:16.484+02:00 trinity kernel: 40217dd8:  [<0807c093>] 
warn_slowpath_null+0x23/0x30
2013-05-11T11:51:16.484+02:00 trinity kernel: 40217de8:  [<080e11f3>] 
kmalloc_slab+0x33/0x80
2013-05-11T11:51:16.484+02:00 trinity kernel: 40217dfc:  [<080fabfb>] 
__kmalloc_track_caller+0x1b/0x110
2013-05-11T11:51:16.484+02:00 trinity kernel: 40217e20:  [<080de1a6>] 
memdup_user+0x26/0x70
2013-05-11T11:51:16.484+02:00 trinity kernel: 40217e3c:  [<080de3ae>] 
strndup_user+0x3e/0x60
2013-05-11T11:51:16.484+02:00 trinity kernel: 40217e58:  [<0811dcd0>] 
copy_mount_string+0x40/0x60
2013-05-11T11:51:16.484+02:00 trinity kernel: 40217e70:  [<0811e6f0>] 
SyS_mount+0x30/0xf0
2013-05-11T11:51:16.484+02:00 trinity kernel: 40217eac:  [<08062ac2>] 
handle_syscall+0x82/0xb0
2013-05-11T11:51:16.484+02:00 trinity kernel: 40217ef4:  [<0807519d>] 
userspace+0x46d/0x590
2013-05-11T11:51:16.488+02:00 trinity kernel: 40217fec:  [<0805f7fc>] 
fork_handler+0x6c/0x70
2013-05-11T11:51:16.488+02:00 trinity kernel: 40217ffc:  [<00000000>] 0x0
2013-05-11T11:51:16.488+02:00 trinity kernel: 
2013-05-11T11:51:16.488+02:00 trinity kernel: ---[ end trace 2972c179d5e65541 
]---
2013-05-11T11:51:16.488+02:00 trinity kernel: here: size is 4l
2013-05-11T11:51:16.488+02:00 trinity kernel: here: size is 135041024l
2013-05-11T11:51:16.488+02:00 trinity kernel: here: size is 1l
2013-05-11T11:51:16.488+02:00 trinity kernel: here: size is 135065600l
2013-05-11T11:51:16.488+02:00 trinity kernel: here: size is 139398224l
2013-05-11T11:51:16.526+02:00 trinity kernel: here: size is 135053312l

-- 
MfG/Sincerely
Toralf Förster
pgp finger print: 7B1A 07F4 EC82 0F90 D4C2 8936 872A E508 7DB6 9DA3

------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and 
their applications. This 200-page book is written by three acclaimed 
leaders in the field. The early access version is available now. 
Download your free book today! http://p.sf.net/sfu/neotech_d2d_may
_______________________________________________
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel

Reply via email to