#qi-hardware IRC log for Friday, 2012-06-15

kristianpaulDocScrutinizer05: did you finally get usb host support for N900?01:49
DocScrutinizer05kristianpaul: ???01:57
DocScrutinizer05h-e-n hostmode? since ages01:57
kristianpauleww :)02:00
DocScrutinizer05hm?02:12
Action: DocScrutinizer05 thinks there's something got lost in translation02:13
kristianpaulhe, sorry just found a cheap n900 on local ebay02:17
qi-bot[commit] Adam Wang: he-2row-dip.fpd: based on Werner Almesberger's he10.fpd (master) http://qi-hw.com/p/kicad-libs/e33374c02:20
pabs3DocScrutinizer05: how many N900 do you need??03:02
qi-bot[commit] Adam Wang: mic-ra-dip.fpd: added package of MIC-RA-DIP-${Dia}x${Height} (master) http://qi-hw.com/p/kicad-libs/3a6c44103:14
DocScrutinizer05pabs3: one, but dunno for how long08:38
qi-bot[commit] Adam Wang: tactile-sw-spst-ra-dip.fpd: added package of TACTIL-SW-${TYPE}-RA-${A}-${B} (master) http://qi-hw.com/p/kicad-libs/c456f0808:47
jurtinghttp://venturebeat.com/2012/06/14/ethiopia-skype-illegal/ "necessary to protect against security threats" ...09:03
DocScrutinizer05yeah, and France forbids pgp-encrypted emails afaik09:14
DocScrutinizer05age old saying: "if guns are outlawed, only outlows will have guns"09:14
DocScrutinizer05outlaws*09:14
Aylanever heard about that09:15
DocScrutinizer05applies to security/encryption technology even better than to guns09:15
AylaPGP-encrypted mails are legal here09:15
Aylawhere did you read that?09:15
DocScrutinizer05Ayla: been a long time ago, maybe they planned it and then decided otherwise?09:17
AylaI doubt it, seriously09:18
DocScrutinizer05must've been around the same time they started to mandate for 40% french songs in radio09:18
DocScrutinizer05honestly loong ago, maybe 10 years or sth. Maybe I lack to recall correctly09:21
DocScrutinizer05anyway regarding skype, since USA forced a backdoor into it, it's actually embarrassing to outlaw it - it shows you got no clue about how to handle security stuff on a level like the "grownups" (=USA= ;-P09:26
DocScrutinizer05or the exact opposite ;-P09:27
Aylayeah. I can totally understand why they don't trust Skype09:27
DocScrutinizer05"since US authorities may crack skype, it's not allowed to use it in Ethiopia"09:27
DocScrutinizer05anyway I feel sad about Nokia and all the new casualities09:30
DocScrutinizer05all hopes on Samsung now, for a true open phone09:31
xiangfuwpwrak, the atusb works fine.09:37
xiangfubut everytime it receive message through 'izchat'. there is one kernel message come up:09:38
xiangfunet wpan0: ACK requested, however AACK not supported.09:38
xiangfudo we need fix this?09:39
xiangfuanother thing is . if I send message too fast. like press a then press enter. again and again. there is be :09:39
xiangfu  usb 1-1: atusb_timer09:39
xiangfushows up09:39
qi-bot[commit] Adam Wang: spacer.fpd: added packages of SPACER-$nominal-$disc-$keepout$type (master) http://qi-hw.com/p/kicad-libs/0f8088810:10
wpwrakxiangfu: (work) congratulations !10:43
wpwrakthe ACK requests are not our problem :) the stack doesn't implement then, yet some applications ask for them. and then you get that complaint10:44
wpwrakatusb_timer means that a response from the transceiver was lost (the driver then times out and recovers). that's a little odd.10:46
cladamwwpwrak, if i want to generate *.mod, all i need is to add necessary fpd filename into MODULES of http://projects.qi-hardware.com/index.php/p/kicad-libs/source/tree/master/modules/Makefile ?10:54
xiangfuwpwrak, the izchat works just fine. 10:55
xiangfuwpwrak,(atben --- atusb) the dirtpan not very stable.  compare to my other setup : (atben --- atben)10:56
xiangfuwpwrak, a lot of ping lost or DUP. 10:56
xiangfuthe atben --- atusb once 10 cm distance.10:56
wpwrakyes, atusb has the 1 ms USB delay issue. this causes some trouble with TCP/IP. atben doesn't have such delays.11:17
xiangfuwpwrak, ok. got it.11:24
wpwrakthe atusb problem is that "still unresolved driver issue" i've been mentioning :) basically needs a complete redesign of the way how atusb and kernel communicate11:26
xiangfuwpwrak, the atusb quiet un-stable compare to atBen.12:41
xiangfuI can only run 'ping'. but never success on 'ssh'.12:42
xiangfubut izchat works just fine. without any problem.12:42
xiangfuwpwrak, maybe I try to fix that. but the 'redesign' sound hard to me. :-)12:43
xiangfuevery time the ar71xx OpenWrt boot. it give a kernel oops : http://pastebin.com/12SYPgEC12:45
qi-bot[commit] Xiangfu: nanonote: compile-openwrt-xburst.sh: only send message when success build (master) http://qi-hw.com/p/openwrt-packages/4ae1eb114:38
qi-bot[commit] Xiangfu: new package: urjtag: initial port (master) http://qi-hw.com/p/openwrt-packages/2cc7f1b14:38
qi-bot[commit] Xiangfu: new package: bitcoin: initial port, not finish yet (master) http://qi-hw.com/p/openwrt-packages/785818314:38
kristianpaulinteresting shippenf for HK (Air parcel) took 4 days just to get dispached, and others 5 to arrive, not bad16:43
kristianpaulshipment* from*16:43
wpwrakby steamboat ?16:53
kristianpaulno no16:54
kristianpaulair mail16:55
whitequarkbtw, when I look at this: http://www.adafruit.com/products/88518:19
whitequarkand read that android fully supports these peripherals from 1.5 on almost all devices18:19
whitequarkI think that google is awesomely open18:19
whitequarknot exactly true, but still quite friendly to makers18:19
GNUtoo-desktopyes, also note that you can run your own apps, and that is compatible with gplv3, contrarly to iphone18:20
whitequarkyeah, with iphone you can't even use a single charger for all models of the phone18:22
whitequarkone of biggest and widest tech WTFs18:22
whitequarkalso, arguably the worst use of resistors, ever18:22
viricDo you know if there is UserModeLinux for mips?18:25
viricI imagine usermodelinux is platform dependant :)18:26
whitequarkew18:27
whitequarkeven if there is (I'll look in a sec), it won't run on nn18:27
whitequarktoo small ram18:27
viricI've a fuloong18:28
viricbtrfs people have misaligned access troubles...18:28
viricand I thought maybe I could simply run it with UML18:29
whitequarkhmm18:35
whitequarkfuloong?18:35
whitequarksounds weird18:35
whitequarkbesides which, uml won't fix your unaligned access18:36
whitequark(unless kernel can emulate unaligned access for usermode processes, which I doubt)18:36
whitequarkah ok, seems that it does18:38
whitequarkbut I'd expect it to come with a huge perf penalty18:38
larscit does18:39
larscbut the kernel should actually also fix misasligned access in the kernel18:39
whitequarklarsc: and make you spend a lot of time figuring out why the hell doesn't it work any fast?18:40
whitequarkexceptions shouldn't be used for control flow18:41
whitequarkespecially when there is no explicit control flow at all18:41
larscwhitequark: there is a file in proc which tells you how many unaligend access exceptions you have18:41
whitequarklarsc: but does it give you a backtrace?18:42
lindi-whitequark: you can make it log the IP18:42
lindi-and use systemtap to get backtrace18:42
larscwhitequark: you can disable the emulation in proc18:43
whitequarkah, nice then18:43
whitequarkhttp://lxr.linux.no/linux+v3.4.2/arch/um/18:44
whitequarkno uml for mips18:44
viricwell, you can tweak if you want the kernel to handle the unaligned accesses, or sigbus18:46
viricBut the kernel can't handle unaligned accesses *in the kernel*, right?18:47
viricwhitequark: same for arm I imagine18:47
larscviric: why not?18:47
viriclarsc: I imagined the kernel will have that only for user mode code18:48
larscunless there is a analigned access in the unaligend access exception handler it will work fine ;)18:48
viric:)18:48
larscafaik18:48
viricwhat's the /proc place for that? I Can't find it18:49
whitequarkwell, or if there's something with interrupt priorities18:49
viricI remember it, but I fail now18:49
whitequarkI don't remember mips ISA & exception semantics good enough for that18:49
larsci remember performance issues with openwrt systems where for example ip packets were misaligned, so it should work18:51
viricah18:56
lindi-viric: find /proc |grep alignment18:56
viriclindi-: that's what I run :)18:56
viricnothing18:56
viricmaybe I miss some kernel feature18:56
viricmaybe it moved to /sys18:58
viric?18:58
viricon ARM I have /sys/module/kernel/parameters/alignment18:59
viricah /proc/cpu/alignment18:59
viric(on ARM too, not on mips)18:59
viricCONFIG_ALIGNMENT_TRAP=y19:01
viricat least on arm. Is it there on mips?19:01
viricI fail to find it19:02
larscI think it is always built-in19:03
viricarch/mips/kernel/unaligned.c   ...  but why do I have programs failing with SIGBUS?19:03
larscthere should be files in debugfs where you can change the behaviour19:04
larscunaligned_instructions19:04
viricaren't those counters?19:04
larscand unaligned_action19:04
larscan action can be19:05
larsc    UNALIGNED_ACTION_QUIET,19:05
larsc    UNALIGNED_ACTION_SIGNAL,19:05
larsc    UNALIGNED_ACTION_SHOW,19:05
viricah, action=0 now...19:05
larscwhich should be ACTION_QUIET19:06
viricbut I get sigbus19:06
viric:)19:06
viricmaybe on some instruction not handled by the exception; let's see19:06
viricProgram received signal SIGBUS, Bus error.19:06
viric0x7741334c in WebCore::TimerBase::stop() ()19:06
viric   0x77413348 <+16>:    lw      t9,16496(v0)19:06
viric=> 0x7741334c <+20>:    b       0x77413010 <_ZN7WebCore9TimerBase15setNextFireTimeEd>19:06
larscthat's not a unaligned access i guess19:08
viricwhat can it be?19:08
virict9: 0x7741301019:09
viricv0: 0x77f9749019:09
viric16496+v0   is not aligned... do I understand?19:10
larscif the 16496 is decimal it should be19:11
virichm but I breakpoint there, and it's all fine, until at some point... sigbus there.19:11
viricI don't know what else can cause sigbus.19:12
larsci suppose you did not hot-unplug your ram ;)19:14
viricehem19:18
viricno :)19:18
viricI think in the fuloong world, everyone considers the sigbus an alignment problem19:18
viric http://sprunge.us/YeLL19:20
viricthat's the kernel with _SHOW19:20
viricthere are lots of unaligned access before this that gets sigbus though19:20
viricbut $epc is exactly that.19:21
viricI've to find out status and cause now...19:22
viric[354412.300000] Status: 240044f3    KX SX UX USER EXL IE 19:22
viric[354412.300000] Cause : 9000801419:22
larscif it get's to the show part it shouldn't cause a sigbus19:26
larscgets19:27
viricThe status register says: a) Exception taken in a Branch delay slot. b) Breakpoint exception.19:28
viriclet's see without gcb19:28
viricgdb19:28
viricI meant "the cause register", above.19:29
viricI tried without gdb, and the cause register is equal. branch delay slot, and breakpoint exception.19:29
viric"in a branch delay slot, the EPC register contains the address of the preceding branch instruction"19:31
viricI wish I knew what a 'delay slot' is19:33
larscthe instruction after the branch19:33
larscso i guess we want to see 0x7741335019:34
viricAha...19:35
viric   0x77413350 <+24>:    sdc1    $f13,16(a0)19:36
virica0: 0x730378dc19:36
viricthat's bad alignment, isn't it?19:36
larsc    case sdc1_op:19:36
larsc        /*19:36
larsc         * I herewith declare: this does not happen.  So send SIGBUS.19:36
larsc         */19:36
larsc        goto sigbus;19:36
viricPfa :D19:36
viricTime to write a patch I guess.19:36
viricnice hehe19:36
viricbut it takes knowing mips assembly to write a handler for that..19:37
larscshould userspace ever do a sdc?19:38
viricit's webkit19:38
larscor is that access to the floatingpoint coprocessor?19:38
viricmaybe it's invalid code simply?19:39
viricit has fpu, yes19:39
viricit's listed in the fpu instructions...19:40
larscThe effective address must be naturally aligned. If any of the three least-significant bits19:40
larscof the effective address are non-zero, an Address Error exception occurs.19:40
larscMIPS IV: The low-order 3 bits of the offset field must be zero. If they are not, the result19:40
larscof the instruction is undefined.19:40
viricclear19:40
viricwho to blame? gcc?19:41
larscif in doubt webkit ;)19:41
viricI'll check if there is any fpu instruction there19:41
viricBut it would be nice if the kernel could handle those19:41
viriclarsc: what's that manual you checked?19:44
larscmips-iv.pdf19:45
viric http://sprunge.us/VWYi19:48
viricm_repeatInterval is a double...19:49
viricf13 = 019:50
larscso a gcc bug?19:50
viricso it looks like running the m_repeatInterval = 0;, but that member being at an unaligned position. Weird!19:50
larsccan you do a print ((TimerBase *)(NULL))->m_repeatInterval?19:51
larscaehm19:51
larsccan you do a print &((TimerBase *)(NULL))->m_repeatInterval?19:52
larscin gdb19:52
larscshould probably be 1619:52
alexanderIs it possible to have a SD card hub? So one can have 2 SD cards connected to the nano note.19:53
viricI don't have debug symbols19:53
virichttp://trac.webkit.org/browser/releases/WebKitGTK/webkit-1.4.0/Source/WebCore/platform/Timer.h      this is the class19:53
alexander\help19:54
viric(supper)19:54
larsci suppose for some reason the whole object is not 8bit aligned19:55
viric8byte20:06
larscyes :)20:06
viricok let's try to build it with debug symbols then20:07
larsci would assume that m_repeatInterval is properly aligend inside the object20:09
larscbut the object is not20:10
viricah could be20:10
virichm well, 'a0' was not aligned, but the offset was 16.20:10
larscexactly20:10
viricinteresting20:10
larscdo you have a backtrace of the sigbus?20:15
viricyes20:16
viricwell, I reproduce it in 10 seconds20:16
viric http://sprunge.us/ZVPR20:18
viricumh20:23
viricWebkit has its own allocator20:23
larscand there is no timer->stop() in ~RenderTextControlSingleLine20:24
viricIt's in the destructor of TimerBase20:25
viricI look at JavaScriptCore/wtf/FastMalloc.cpp20:27
viricstatic const size_t kAlignShift = 3;20:27
viricstatic const size_t kAlignment  = 1 << kAlignShift;20:27
larscI'm wondering a bit. The constructor for TimerBase already accesses m_nextFireTIme20:31
virichm20:31
viricmistery20:32
viricmaybe they move objects. They have their own allocator :)20:33
larscyou just found a zero day exploit for webkit ;)20:33
viricIt is even not the latest webkit...20:34
viricand I can't find the 'fastmalloc' thing in the latest. :)20:34
viricwell, thank you for the help20:36
viricI'll try midori (that uses a newer webkit)20:36
viricI'll disassemble the timerbase constructor though20:42
viriclarsc: the constructor does:20:48
viric  90ed18:       fc800008        sd      zero,8(a0)20:48
viric  90ed1c:       fc800010        sd      zero,16(a0)20:48
viricAnd that's handler by the kernel trap20:49
larscah, so it doesn't use floating point instructions20:51
viricit uses floating point instructions20:53
viricbut does not access the coprocessor registers20:53
viricsd vs sdc20:54
viricSo it's a bit of saying... mips64 coprocessors are not really that much supported, given the lack of kernel traps :)20:55
larsc'sd' is just normal memory access, isn't it?20:56
viricah doubleword, yes20:56
viricI thought 'double' :)20:57
viricwhat's that 1:, 2: ... in front of assembly lines?20:59
larsclabels21:01
larscyou'll see for example 'b 1b' which means jump to the first label called '1' before this instruction21:03
larscthere is also b 1f which jumps to the next label called '1'21:03
viricahh21:03
viricthank you21:04
viricI can't understand the trap though.21:06
viricI wanted to understand one of the implemented traps :)21:06
viric.section .fixup,"ax" ...21:06
viricmagic.21:06
larsci don't get it either21:08
larscor maybe i do21:12
viricreally?21:12
viricwhat's STR(PTR) there?21:12
viricah, it fills the exception table entry21:14
larscyes21:15
larscPTR is either .dword or .word depending whether it is a 32bit or 64bit kernel21:15
viricahh21:15
viricall traps have the same code after the first '.section'21:20
viric(in load/store)21:20
larscas far as i understand it, it is used to handle an exception in the fixup code21:22
viricah21:22
larscif there is an exception at address 1b or 2b it will jump to 4b instead21:22
viricthen it will make it res = -EFAULT21:22
viricclear21:22
larsci suppose to emulate a sdc1 you could do a sdc1 to the value variable21:24
larscand then store value at the unaligned address with two stores21:25
viriclarsc: do you want to see my ldwc1 trap? :)21:29
viric http://sprunge.us/BXKM21:30
virichm the last line is wrong I think21:31
viricshould not be '.rt'21:32
viricI bet for         regs->regs[insn.f_format.rd] = value;21:36
larscit shouldn't be modifying regs at all21:38
viricit's ldc121:38
viricldwc1 I mean21:38
larscah right21:38
larscno21:38
larscwait21:38
viricmaybe I need an exception handler for mtc21:39
viricI added one21:40
larscaccording to the spec it should be rt21:40
viricouch, typo21:41
viricI looked at the mtc1 instruction coding :)21:42
larscbut we are writing to a floating point register21:42
viricah yes21:42
viricthen I did it fine21:43
viricit's rd...21:43
viricrt is the source21:43
viricrd (ft in the manual) the destination21:43
virichm no. all wrong. I don't understand regs->regs :)21:44
larscregs are just the normal registers21:44
viricwhere are the floating point then?21:44
larscstruct thread_struct21:45
larscthere is a function called get_fpu_regs21:46
viricand the thread_struct... where can I get it from? a static variable?21:48
larscget_fpu_regs(current) should give you the fpu registers for the process receiving the signal21:52
viricok21:52
larscanyway time to get some sleep21:53
larscgood luck21:54
viric:)21:54
viricthank you a lot21:54
viric        fpuregs = get_fpu_regs(current);21:54
viric        fpuregs[insn.f_format.rd] = value;21:54
whitequarkbtw22:52
whitequarkfor building webkit, esp. the debug version, you'll probably need lots of stuff22:53
whitequarka recent multicore cpu, at least 8g of RAM, 64-bit OS22:53
whitequarkand several hours of CPU time22:53
viric:)22:54
whitequarkmore precise22:54
whitequarkseveral hours of linking time alone22:54
viricdue to the debug info?22:54
whitequarknope22:54
whitequarkI've seen only the release version to build for this time22:54
viricumh my new kernel does not boot. perfect22:54
whitequarkI've no idea how webkit devs debug it22:54
whitequarkit has several millions of symbols22:55
whitequarkyou can get reasonable times on a machine with 64g of RAM and full tree on the ramdisk22:55
whitequarkstill it's exceptionally slow22:55
virichm the release version built fine.22:56
whitequarkoh, and if you turn on lto, it'll link it several hours, then determine that something in webkit prevents it from doing LTO the way it wants to do it22:56
whitequarkand the linker will START OVER.22:56
viricwell, turning lto should be hardcore, yes22:59
viriclet's see the traps!22:59
viricouch. illegal instruction. hell22:59
viricah it's right23:00
viric(my first kernel patch :)23:01
lindi-whitequark: debian builds webkit on real arm hardware, no cross-compiling23:01
lindi-whitequark: for libv8 this actually caught some real bugs too23:02
viricI'm also biulding on real mips hw23:40
virictook a while, but... what to do.23:41
alexandercard23:55
alexanderdoh23:55
--- Sat Jun 16 201200:00

Generated by irclog2html.py 2.9.2 by Marius Gedminas - find it at mg.pov.lt!