/srv/irclogs.ubuntu.com/2014/12/05/#ubuntu-desktop.txt

=== mfisch is now known as Guest45087
didrocksgood morning06:46
* didrocks is going to look with a fresh eye why this test is failing06:50
pittididrocks: bonjour!07:04
didrockshey pitti :)07:07
larsugood morning!07:16
didrockshey larsu07:25
larsuhi didrocks! How's it going?07:35
didrockslarsu: it's going, and you, feeling better? :)07:36
larsudidrocks: not really :(07:37
seb128good morning desktopers07:39
seb128hey didrocks larsu07:39
larsuhi seb128 :)07:41
didrocksmorning seb12807:41
willcookeseb128, just upgraded my u8 machine and installed metacity, now u8 session or u7 session will not start :/08:12
willcookemight just be me though08:12
willcookemorning btw :D08:12
larsuhi willcooke!08:14
willcookehey larsu08:15
seb128hey willcooke, what error do you get08:16
willcookeseb128, which log file should I be looking in?08:17
seb128.cache/upstart/gnome-session-Unity.log08:18
seb128that's for unity708:18
seb128what happens at login?08:18
willcookemlankhorst, I just pulled your latest PPA too, just in case that's involved ^^08:18
didrocksmorning willcooke08:18
willcookeseb128, @ login -> type password -> nada08:18
seb128nada like you stay on the greeter?08:19
willcookeyeah - but08:19
willcooke:)08:19
seb128or does the greeter goes away?08:19
willcookeI removed metacity and now I can log in to U708:19
willcookelet me just recheck that08:19
seb128weird08:19
willcookeseb128, I might be wasting your time again08:19
willcooke:)08:19
seb128lol08:20
seb128what you describe is weird for sure08:20
seb128have an extra wm installed shouldn't impact on existing sessions08:20
seb128but maybe there is something in the daily updates or in the ppa you opted in for08:20
willcookedoesnt seem metacity related, unsurprisingly08:21
willcookeok U7 working fine, U8 b0rked08:21
willcookewhere b0rk = greeter stays on the screen08:22
willcookesounds like a Mir issue08:22
willcookemlankhorst, is there any new Mir stuff in your ppa?08:22
willcookeohhh - mlankhorst is off todayu08:22
willcookeit's Friday08:22
willcookeI suspect it's a bleeding edge Mir which is the problem, so panic over08:24
willcooke;)08:24
willcookeDoes anyone *want* to go to MWC?08:25
willcookeand work I mean08:25
willcookenot, ya know, look round08:25
seb128lol08:26
seb128where/when is it and what can we do that is useful there?08:27
seb12824_27 feb in Barcelona?08:27
seb128larsu, I'm running your updated theme, things are better with it ;-)08:28
willcooke2->5 March - http://www.mobileworldcongress.com/08:29
* didrocks puts back swim clothes to the closet :p08:29
larsuseb128: :)08:32
=== mfisch is now known as Guest3214
bregmawillcooke, mlankhorst's PPA definitely has the latest Mir, now with dependencies on new protobuf still stuck in -proposed, so will probably munge your system until that's cleared up (which may have happened by now)11:32
bregmacheck /var/log/lighdm/* for errors11:33
willcookethx bregma11:33
willcookeyup11:35
willcooke[+36.81s] DEBUG: Seat seat0: Creating display server of type mir11:35
willcooke[+36.81s] DEBUG: Using VT 811:35
willcooke[+36.81s] DEBUG: DisplayServer: Logging to /var/log/lightdm/unity-system-compositor.log11:35
willcooke[+36.81s] DEBUG: Launching process 2377: /usr/sbin/unity-system-compositor.sleep --file '/run/lightdm-mir-0' --from-dm-fd 12 --to-dm-fd 21 --vt 8 --enable-hardware-cursor=true11:35
willcooke[+36.81s] DEBUG: DisplayServer: Waiting for system compositor for 60s11:35
willcooke[+36.93s] DEBUG: DisplayServer: Compositor closed communication channel11:35
willcooke[+36.93s] DEBUG: Process 2377 exited with return value 12711:35
willcooke[+36.93s] DEBUG: DisplayServer: Unity system compositor stopped11:35
willcooke[+36.93s] DEBUG: Releasing VT 811:35
willcooke[+36.93s] DEBUG: Seat seat0: Display server stopped11:36
willcookeand then in the u-s-c.log:11:36
willcooke/usr/sbin/unity-system-compositor: relocation error: /usr/lib/x86_64-linux-gnu/libmirplatform.so.4: symbol _ZN3mir7logging3logENS0_8SeverityERKSs, version MIR_COMMON_3 not defined in file libmircommon.so.3 with link time reference11:36
bregmathat nutty Mir and it's totally unstable ABI11:37
willcookeso I'm assuming that libmirplatform 4 doesnt work with libmircommon 311:37
bregmatry adding -proposed to your sources and updating11:37
willcookeoooh11:37
willcookeplan11:37
willcooke!11:37
bregmaI take no responsibility for the result11:37
willcookeha11:38
willcookeif it breaks I'll give up on that for today11:38
bregma(I have -proposed on on my test machine, it was fine yesterday)11:38
willcookedo I need to add it to everything in /etc/apt/sources.list?11:39
willcookemaybe just main?11:39
bregmaI think just main is all you really need for this11:39
bregmaBTW, the Steam client now runs on Unity 8 with the latest PPA build11:40
willcookeO_o11:41
willcookewhaaa!11:41
willcookethat's awesome!  thank you!11:41
willcookebregma, in Xmir right?11:41
bregmayes11:41
* willcooke upgrades to proposed and has some qtmir stuff upgrading11:41
bregmaupdated qtmir is also i the PPA11:42
willcookeahh - and also libmirplatform4 :)11:42
bregmait's depndencies all the way down11:42
* bregma gos to take the dog for a walk11:42
willcookettfn11:42
willcookehrm11:45
willcookeI think libmircommon is still too old11:45
willcookenever mind11:46
willcookeI'll try again later11:46
Sweet5harkprotip of the day: do backups. often.12:11
willcooke:D12:11
Sweet5harkfor some reason my work notebook did a hard reset and didnt boot through after that. I had all the joy of system recovery and expected some data to be lost, with the last full backup 6 months old.12:14
* larsu notes to back up his laptop after lunch12:16
Sweet5harkI had to boot from a LiveCD, mount the encrypted drive (crossing my fingers) and then tell fsck, which already screamed at me that my primary superblock is gone, to just "fix(y)?" 2 bazillion things into the blind on the fs ...12:17
willcookeyikes12:19
Sweet5harkI could do a a full backup then, and even boot -- though I am not sure about the extend of corruption. My syslog for the event is just graced with a huge set of interesting binary characters ...12:19
willcookemeh12:20
willcookebackups are hard and take a long time12:20
willcooke;)12:20
Sweet5harkwillcooke: bullets fear the brave!12:21
=== alan_g is now known as alan_g|lunch
desrtsometimes i feel like i miss out on the best times by not being european13:53
larsueverything's nicer here, not only the time zone13:56
larsuyou shuld consider moving ;)13:56
* larsu knows just the right city for you.......13:56
desrti hope it's not berlin14:02
larsuts14:02
larsutedg: https://bugzilla.gnome.org/show_bug.cgi?id=74115614:02
ubot5`Gnome bug 741156 in gdbus "gdbus: add g_dbus_object_path_{un,}escape" [Normal,New]14:02
seb128hey desrt, happy friday ;-)14:03
desrtseb128: :(14:04
tedglarsu, Cool, I'd add some 16-bit characters to your tests: http://bazaar.launchpad.net/~indicator-applet-developers/pay-service/trunk.15.04/view/head:/tests/dbus-interface-tests.cpp#L26214:05
tedglarsu, That screwed me up once already :-)14:05
desrti hate it already :D14:05
desrtdouble-escaped utf8?  awesome14:05
larsutedg: no. ascii.14:06
tedglarsu, DBus needs ascii, but I dont' think we can assume that as input, no?14:07
=== alan_g|lunch is now known as alan_g
tedglarsu, Ah, also you don't handle the first character can't be a number case.14:08
larsutedg: ya systemd does this as well, but the spec says nothing of the sort14:08
larsutedg: what do you want to encode?14:09
tedglarsu, Hmm, I'm pretty sure Lennart linked me to the place. Let me look.14:09
desrtbtw: if we allow non-ascii in these strings then you either need to decide if you're going to enforce valid utf8 (seems a bad idea) or document that the API is not returning a string but rather a guint8[]14:10
larsudesrt: why is utf8 a bad idea?14:10
larsutedg: http://dbus.freedesktop.org/doc/dbus-specification.html#message-protocol-marshaling-object-path14:11
tedglarsu, Hmm, okay, I can't find it. I can't imagine that I would have done it for consistency with systemd...14:11
desrtbecause if this is encoding filenames for example (which i suspect it is) then enforcing utf8 will cause problems14:11
tedglarsu, The thing I was encoding where payment item ids, which are UTF8 and configured by the application developer. So they could be "magic-potion-35" or what ever that is in Chinese.14:12
larsutedg: ya I was suspecting this as well and I'd argue that this is a bad idea...14:12
tedgWhy not convert to utf8?14:12
larsuutf8 should work by ignorance, no?14:13
tedgI'm not as worried about filesystem names. But it seems in that case you should convert to utf8.14:13
larsuit does byte-wise escaping...14:13
desrtlarsu: sorry about the grumpy review.  you caught me before coffee.14:19
larsudesrt: no worries. This should indeed be >=, not > (but nul isn't a problem because of lazy evaluation)14:25
larsudesrt: as for input, I'd argue the string should be utf8 as per glib convention. Doi you think we need to verify it?14:25
larsudesrt: as I said before, I didn't think anyone but the process that called escape() would call unescape(), hence the critical14:26
desrtyou really need to make that a lot more clear14:29
desrtbecause i might think that i can call that on systemd unit file object paths in order to grok them, for example14:29
larsuwhat else would you want? Taking an error?14:30
larsuif you say this is something that people might want to do, ok14:30
desrtwell, there is a conflict here14:30
desrtwe must choose one property that we want more:14:30
desrt1) canonical encoding (with non-canonical forms rejected)14:31
desrt2) a mapping that always succeeds14:31
desrtyou can't have both14:31
desrt(right now we have neither...)14:31
desrti'd prefer a simple NULL return in the invalid case, though14:31
larsu(2) can never be correct14:32
larsuso ya, (1)14:32
desrtso then return NULL if it's non-canonical14:32
larsuI'd still accept the ambiguous ones like I do now14:32
larsudesrt: this is what the code did before and I changed it ...14:32
larsubut I think you convinced me14:32
desrtmy security spidy-sense is tingling here14:33
desrtthis is the sort of function that somebody somewhere is going to expose to people sending untrusted strings to it14:33
larsuwhat bad can happen?14:33
desrti can imagine a few things14:33
* larsu listens14:34
desrtone is that there is a whole class of attacks where non-equal-but-equivalent encodings can be used to attack systems14:34
desrtwhich is why non-canonical-encoded utf8 is now rejected14:34
desrtthere have been all sorts of issues there in the past...14:34
desrtthe other is that we can cause crashes in the receiving program.... like with your p[2] issue in the patch14:34
larsuthis is never evaluated...14:35
larsuif p[1] is 014:35
larsuand p[0] isn't in the loop14:36
desrtah.  interesting.14:36
larsuso. you want a utf8 check?14:36
desrtno14:37
desrti think i prefer the 'this is not utf8' annotation on the return value14:37
larsuI didn't know that that is convention - if you have an untrusted string, check it before giving it to glib functions14:37
desrtabsolutely14:37
desrtalmost everything in glib assumes that it's getting valid utf814:37
desrta/glib/glib world/14:37
larsuif I return uint8*, won't that break the 99% case?14:38
desrtyou don't actually return guint814:38
desrtyou just annotate that you do14:38
larsuI want to put this into another string-processing function but now need to cast14:38
larsuoh. what?14:38
desrt* Returns: (transfer full) (array zero-terminated=1 length=length) (element-type guint8):14:38
desrtsomething like that14:39
desrtminus the 'length' crap14:39
larsubut then I have the problem in bindings14:39
desrtthat will prevent python from assuming that the string is utf8 and trying to transcode it to unicode14:39
larsui.e., I get a byte in python, not a string14:39
desrtyou'll get a bytestring in python14:39
desrtwhich is what you want....14:39
larsuand then take a byte string in unescape() and return a string?14:40
desrtyes14:40
larsuinteresting14:40
larsuthanks14:40
desrti would be nice if we could use the kdbus transition as a time to relax object path rules14:43
larsudesrt: do I need to annotate that in the same way?14:43
desrtbut i don't think it's really possible :/14:43
desrtlarsu: hm?14:43
larsuthe input parameter to unescape()14:43
desrtyes14:43
desrtwait.  no.14:43
desrtthat will always be a ascii string14:43
desrtyou need to annotate the input to escape() though14:44
desrtin order to allow the wider range of stuff that could be in there14:44
larsuthe input to escape is a utf8 string...14:44
desrtmaybe it's a filename?14:44
larsuit's docuemnted as must be a utf8 string14:44
larsu(now)14:44
larsuhm, I guess I misunderstood you before then14:45
larsuI thought you meant escape() is utf8 -> bytestring and unescape() the other way around14:45
desrtescape() is bytestring -> ascii (with heavy restrictions)14:46
desrtunescape is therefore ascii -> bytestring14:46
larsuand both of those need annotations on both input and return params?14:46
desrtthe ascii is fine as just a gchar*14:47
desrtsince ascii is a subset of utf814:47
larsumakes sense14:47
desrtof course, if you find any characters out of the range of the object path rules (including non-ascii utf8 content) then it should be rejected...14:47
larsuyou just said I don't have to verify utf8-iness14:48
desrton return14:48
desrtthere's no way that an escaped string should have utf8 in it14:48
desrtbut an unescaped string may... or may not...14:48
larsuwhy isn't it enough to escape byte-wise?14:48
desrtit could be anything at all14:48
desrtyou _should_ escape bytewise14:49
larsuthat's what I'm doing..14:49
desrtthere should be absolutely nothing utf8-specific in these functions at all14:49
larsuright. You just said I should reject non-ascii utf8 content14:49
desrti'm just noting that you should reject stuff according to the dbus rules (ie: outside of A-Za-z0-9_ or whatever) and this will automatically exclude non-ascii utf8 content14:49
* larsu is throroughly confused14:49
larsuyes. That's what my plan was14:50
larsu(and what the patch does right now)14:50
larsuall that's missing are the annotations, then14:50
desrtthe patch you posted rejects nothing...14:50
larsuit prints a critical14:51
desrtandthing that's not a _ gets copied straight through...14:51
larsubut ya, we already discussed that I'll change this to returning NULL, like I had before14:51
desrtokay14:51
larsudesrt: I changed it because I checked how systemd does it14:51
desrti think we're just confusing each other at this point -- i'll wait for the patches :)14:51
larsuya, I think so too14:51
larsusorry14:52
=== Guest3214 is now known as mfisch
larsuseb128: I'm having the "can't click inside windows anymore" problem again15:09
larsudesrt: patch updated. Thanks for the feedback15:09
seb128larsu, I don't even understand that bug, what do you mean by "can't click"?15:09
seb128does it happen to all windows?15:10
larsuseb128: yes. No mouse input events are forwarded to any windows.15:10
larsuseb128: mouse input in unity works (panel, dash, ...). Keyboard works everywhere15:10
seb128do you have a touch screen?15:10
seb128does it do on any toolkit?15:11
seb128e.g same issue in firefox?15:11
larsuyes15:20
larsuno touch screen15:20
larsudefinitely in every app15:20
seb128k, no idea about that :-/15:24
larsume neither. It's annoying15:25
larsuthanks tough15:25
larsu*though15:25
seb128np15:29
seb128could be an xorg issue15:30
seb128though that didn't change much15:30
seb128but neither did compiz/unity15:30
desrtlarsu: new patch looks a lot better15:58
desrtstill some nit-picks though :)15:58
larsudesrt: ah very good points. Thanks17:00
larsudesrt: escape() is nullable?17:35
larsuunescape is (and I documented is as such but forgot the (allow-none))17:35
desrti would imagine not17:36
desrtmaybe i botched the review17:36
desrtnope -- look at the review.  the comments are filed inside the docstring for _unscape()17:37
larsudesrt: ah sorry! I misread the escape() in the comment as the header, when it was the explanation17:38
larsudesrt: what's the point of dismissing non-canonical encodings?17:42
desrt"security"17:42
desrtalso consistency17:42
desrtthe gist is thus:17:43
desrtsomeone might resonably assume that string comparison (or building hashtables, or anything else) on escaped strings is equivalent to doing it with the unescaped version17:43
desrtand it ought to be17:43
larsuman, I just cleaned up the loop, now I have two places to return an error from17:43
desrtbut if that assumption is false, someone could exploit it in unexpected ways17:43
larsuthanks for pointing out the hi = lo = 0 one17:43
desrtlarsu: maybe not17:43
desrtyou could add another && to that already-long else if17:43
desrt&& (hi || lo) && !is_ascii((hi<<4)|lo)17:44
larsuand do (hi << 4 | lo) three times?17:44
larsuya...17:44
desrtyour choice17:44
larsuand then again in the append_c17:44
* larsu thinks17:44
desrtbtw: _strictly_ << and | are undefined on signed ints :)17:44
desrt(erm.  maybe that's actually only true for signed ints that contain negative values.  i always forget...)17:45
larsuI know, but then I thought about it and didn't care17:45
desrtfair enough :)17:45
larsuit's true in general, but we know the precise range for those numbers...17:45
larsudesrt: thanks for explainign the non-canonical thing. Makes sense17:46
desrtlarsu: you used to be able to use utf8 to encode ascii characters like '.' and '/'17:47
desrtor strings like "../../" for example17:47
desrtyou might imagine that this resulted in quite some fun17:47
larsuugh..17:47
desrtnow the rule is that you must take the shorest possible form17:48
desrtwhich is ... just sane17:48
desrtbut pretty much everything that handles utf8 in glib-world doesn't do that check17:48
desrtbecause it assumes it to already be valid17:49
* desrt engages in some black pointer magic17:52
desrtlet's hope valgrind doesn't get too upset...17:52
desrt(one of those "i technically shouldn't read from this address but it's impossible for it to crash" cases)17:53
larsudesrt: updated17:56
larsudesrt: don't. Or better: Why???17:56
desrtgvariant alignment requirements17:56
desrtthe problem comes with a message like ('a', 'b', 1234) where 'a' is sent as a memfd17:57
desrtgvariant would encode that like so: 'a \0 'b \0 \4 \3 \2 \1 \2 \4, noting that the int \4\3\2\1 is at an offset that is a multiple of 417:58
desrtbut if we take off the "a\0" from the start (because it's a memfd) then the \4\3\2\1 part now comes aligned at an offset of 2 mod 4 inside of the second message part17:58
desrtso we have to cheat a bit when we allocate the buffer for our copy -- shifting it back two bytes17:59
desrtthe nice bit is that we only ever cheat by 7 bytes maximum and it will always result in a more-aligned pointer (since the kernel does the same thing for us) -- so we cannot possibly crash18:00
desrt...unless we're on a system that has a page size of less than 8 bytes18:00
=== alan_g is now known as alan_g|EOW
desrtlarsu: arghghg. more annotation problems :(18:09
larsudesrt: :( I'll fix those later. gotta run now18:22
desrtlarsu: thanks for all the work so far18:23
desrtand apologies for so many roundtrips18:23

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