lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <201502181307.07802@pali>
Date:	Wed, 18 Feb 2015 13:07:07 +0100
From:	Pali Rohár <pali.rohar@...il.com>
To:	Ivaylo Dimitrov <ivo.g.dimitrov.75@...il.com>
Cc:	balbi@...com, "Greg Kroah-Hartman" <gregkh@...uxfoundation.org>,
	linux-usb@...r.kernel.org, linux-kernel@...r.kernel.org,
	Pavel Machek <pavel@....cz>,
	Sebastian Reichel <sre@...nel.org>,
	Aaro Koskinen <aaro.koskinen@....fi>
Subject: Re: [PATCH] usb: gadget: nokia: Add mass storage driver to g_nokia

On Saturday 07 February 2015 19:33:53 Ivaylo Dimitrov wrote:
> Hi,
> 
> On  7.02.2015 20:01, Ivaylo Dimitrov wrote:
> > On  2.02.2015 21:14, Felipe Balbi wrote:
> >> On Mon, Feb 02, 2015 at 08:07:51PM +0100, Pali Rohár wrote:
> >>> On Monday 02 February 2015 20:01:11 Felipe Balbi wrote:
> >>>> Hi,
> >>>> 
> >>>> On Mon, Feb 02, 2015 at 07:58:59PM +0100, Pali Rohár 
wrote:
> >>>>> On Monday 02 February 2015 19:54:58 Felipe Balbi wrote:
> >>>>>> Hi,
> >>>>>> 
> >>>>>> On Sat, Jan 31, 2015 at 10:53:30AM +0100, Pali Rohár 
wrote:
> >>>>>>> This patch adds removable mass storage support to
> >>>>>>> g_nokia gadget (for N900). It means that at runtime
> >>>>>>> block device can be exported or unexported. So it does
> >>>>>>> not export anything by default and thus allows to use
> >>>>>>> MyDocs partition as before...
> >>>>>>> 
> >>>>>>> Signed-off-by: Pali Rohár <pali.rohar@...il.com>
> >>>>>> 
> >>>>>> thanks, but no thanks. Build your own using configfs.
> >>>>> 
> >>>>> But it needs some userspace interaction right?
> >>>>> Then its not possible for nfsboot.
> >>>> 
> >>>> oh, right... you're using nfsboot through g_nokia. Hmm,
> >>>> sounds like you need initramfs.
> >>> 
> >>> Also compiling usb gadgets as external .ko modules is
> >>> broken. So I cannot use configfs, when I compile g_nokia
> >>> even if I use initramfs...
> >> 
> >> yeah, there are people working on that and some patches
> >> already flying around for it. Meanwhile, you can make it
> >> built-in and use initramfs to add mass_storage through
> >> configfs to g_nokia, no issues.
> > 
> > Bellow is the bactrace of the crash when g_nokia is
> > modprobed. Any hint on where to look for is appreciated.
> > 
> > <0>[   33.751983] Kernel panic - not syncing: Fatal
> > exception ÿÿT!19\00]\00]<6>[   59.570159] bq2415x-charger
> > 2-006b: automode enabled <1>[   59.597534] [bf286014]
> > *pgd=8eda8811, *pte=00000000, *ppte=00000000 <6>[  
> > 59.609405] bq2415x-charger 2-006b: driver registered <0>[  
> > 59.640472] Internal error: Oops: 80000007 [#1] PREEMPT ARM
> > <4>[   59.650421] Modules linked in: ipv6(+)
> > bq2415x_charger(+) g_mass_storage usb_f_mass_storage
> > libcomposite configfs uinput adp1653 ad5820 et8ek8 smiaregs
> > hsi_char radio_platform_si4713 joydev omap_ssi_port
> > wl1251_spi wl1251 rx51_battery mac80211 isp1704_charger
> > smc91x mii cfg80211 si4713 v4l2_common crc7 videodev
> > tsc2005 media tsl2563 twl4030_vibra ff_memless
> > lis3lv02d_i2c lis3lv02d omap_ssi input_polldev hsi
> > twl4030_wdt omap_wdt rtc_twl leds_lp5523 leds_lp55xx_common
> > <4>[   59.715332] CPU: 0 PID: 13 Comm: kworker/0:1 Not
> > tainted 3.19.0-rc5+ #2
> > <4>[   59.726501] Hardware name: Nokia RX-51 board
> > <4>[   59.735168] Workqueue: events usb_gadget_work
> > <4>[   59.743896] task: cf8ab900 ti: cf992000 task.ti:
> > cf992000 <4>[   59.753692] PC is at 0xbf286014
> > <4>[   59.761108] LR is at
> > try_get_usb_function_instance+0x90/0x9c [libcomposite]
> > <4>[   59.772613] pc : [<bf286014>]    lr : [<bf2640c8>]   
> > psr: 80000113 <4>[   59.772613] sp : cf993e50  ip :
> > 0000001c  fp : 00000000 <4>[   59.793060] r10: 00000000  r9
> > : 00000000  r8 : cfcad600 <4>[   59.802581] r7 : cedaab80 
> > r6 : 00000000  r5 : bf28444c  r4 : cedaab80
> > <4>[   59.813476] r3 : cedd8f38  r2 : 00000001  r1 :
> > 00000000  r0 : cedd8f04
> > <4>[   59.824310] Flags: Nzcv  IRQs on  FIQs on  Mode SVC_32
> >  ISA ARM Segment kernel
> > <4>[   59.836090] Control: 10c5387d  Table: 8e970019  DAC:
> > 00000015 <0>[   59.846252] Process kworker/0:1 (pid: 13,
> > stack limit = 0xcf992238) <0>[   59.857086] Stack:
> > (0xcf993e50 to 0xcf994000) <0>[   59.865814] 3e40:         
> >                            c03fb2d8 bf266e68 cf1fdf00
> > c015d0dc
> > <0>[   59.878723] 3e60: 92000000 00001000 00000000 c015d8d8
> > 00001000 00000000 c03fb2d8 bf266e68
> > <0>[   59.891693] 3e80: 00000000 00000001 00000000 c00f58f8
> > cf801c80 cedaab80 cf03b0b8 cedaac00
> > <0>[   59.904663] 3ea0: bf284424 c015d980 00000000 bf266e68
> > 00000000 cedaab80 bf28444c 00000000
> > <0>[   59.917572] 3ec0: cf03b0b8 cfcad600 00000000 bf263dd8
> > cf03b0b8 bf28444c cf03b0b8 cf1fea00
> > <0>[   59.930450] 3ee0: c0620cd8 bf28444c c0609868 cfcad600
> > 00000000 00000000 00000000 c02c5478
> > <0>[   59.943420] 3f00: bf284470 c0620cd8 c0606ff8 c02c5f54
> > cf98d080 bf284470 c0606ff8 c0047288
> > <0>[   59.956390] 3f20: cf98d080 bf284470 00000001 cf98d080
> > c0606ff8 c0607008 c0609868 cf98d098
> > <0>[   59.969360] 3f40: 00000008 00000000 00000000 c00477ec
> > cf98a580 00000000 cf98d080 c00474c4
> > <0>[   59.982330] 3f60: 00000000 00000000 00000000 c004b148
> > 22000000 00000000 11880000 cf98d080
> > <0>[   59.995208] 3f80: 00000000 cf993f84 cf993f84 00000000
> > cf993f90 cf993f90 cf993fac cf98a580
> > <0>[   60.008026] 3fa0: c004b07c 00000000 00000000 c000e058
> > 00000000 00000000 00000000 00000000
> > <0>[   60.020782] 3fc0: 00000000 00000000 00000000 00000000
> > 00000000 00000000 00000000 00000000
> > <0>[   60.033355] 3fe0: 00000000 00000000 00000000 00000000
> > 00000013 00000000 40000500 04000401
> > <4>[   60.045867] [<bf2640c8>]
> > (try_get_usb_function_instance [libcomposite]) from
> > [<c015d0dc>] (__kernfs_create_file+0x7c/0xa0) <4>[  
> > 60.065155] [<c015d0dc>] (__kernfs_create_file) from
> > [<c015d8d8>] (sysfs_add_file_mode_ns+0x134/0x1ac)
> > <4>[   60.082977] [<c015d8d8>] (sysfs_add_file_mode_ns) from
> > [<c015d980>] (sysfs_create_file_ns+0x30/0x44)
> > <4>[   60.100952] [<c015d980>] (sysfs_create_file_ns) from
> > [<cedaab80>] (0xcedaab80)
> > <0>[   60.112884] Code: bad PC value
> > <6>[   60.210144] NET: Registered protocol family 10
> > <6>[   60.671600] bq27x00-battery 2-0055: support ver. 1.2.0
> > enabled <6>[   60.832885] bq27x00-battery 2-0055: battery
> > is not calibrated! ignoring capacity values
> > <6>[   63.788269] Adding 786428k swap on /dev/mmcblk0p3. 
> > Priority:-1 extents:1 across:786428k SS
> > <5>[   64.057617] random: nonblocking pool is initialized
> > <6>[   64.554016] NET: Registered protocol family 35
> > <4>[   65.667510] ---[ end trace 85b8d26ec312a8c1 ]---
> > 
> > 
> > Regards,
> > Ivo
> 
> Removing __init from nokia_bind declaration makes g_nokia
> working again. I guess someone who knows better than me that
> sections magic should take it from here.
> 
> Ivo

No, it is not working on my devices. kernel does not crash, but 
usb communication does not work. all usb networking packets are 
lost.

-- 
Pali Rohár
pali.rohar@...il.com

Download attachment "signature.asc " of type "application/pgp-signature" (199 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ