[[!meta copyright="Copyright © 2013, 2014 Free Software Foundation, Inc."]] [[!meta license="""[[!toggle id="license" text="GFDL 1.2+"]][[!toggleable id="license" text="Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license is included in the section entitled [[GNU Free Documentation License|/fdl]]."]]"""]] # IRC, freenode, #hurd, 2013-01-18 youpi: what would you think of adding a debug-related syscall to gnumach so that we have a printf-like tool even in situations where the code can't perform an rpc (i.e. glibc) could be useful indeed I've found myself having a hard time making some printfs from odd places of glibc :) i also suggest we make it unprivileged not enabled by default then otherwise it's an easy DoS well, for now, we don't care much about DoS, but we do care about debugging at least until the very core issues we have are understood and resolved I usually frown on debugging feature being too open me too you would always forget dropping one that's why i didn't suggest it earlier but i'm wasting too much time finding other decently effective ways ## IRC, freenode, #hurd, 2013-01-19 youpi: how about we build this debugging system call in debugging versions only ? i suppose you already use such versions for buildds anyway MACH_DEBUG is always enabled the debugging version only adds --enable-kdb if i'm right check debian/rules that, and -fno-omit-frame-pointer ## IRC, freenode, #hurd, 2013-01-21 youpi: concerning gnumach, i've added a mach_print system call, with one argument (a null terminated string) to -dbg kernels (--enable-kbd) k if it's fine with you, i'll commit it too I'm fine ## IRC, freenode, #hurd, 2013-04-07 see http://www.sceen.net/~rbraun/mach_print/ for an example to use it [[Makefile]], [[mach_print.S]], [[main.c]]. ## IRC, freenode, #hurd, 2013-07-01 braunr: btw, we are missing the symbol in mach/Versions youpi: what symbol ? so the libc-provided RPC stub is not available mach_printf -f it's a system calll not exported s/RPC/system call/ that's expected libc does provide stubs for system calls too yes but not for this one I don't see why we wouldn't want to include it ?! it does it's temporary oh there must be automatic parsing during build sure nice youpi: if we're going to make this system call exported by glibc, i should change its interface first it was meant as a very quick-and-dirty hack and directly accesses the caller's address space without going through a special copy-from-user function not very portable ## IRC, freenode, #hurd, 2013-11-25 can we get the mach_printf function somewhere so that it's easier to use please ? well i'm not comfortable with that y not ? i don't consider mach_print being part of the interface yet ... it's really a debugging call not always available so what, let it fail if it is not ok i should change it first pass a size argument and do a proper copyin cool, thanks :) then we could add that printf function in libshouldbeinlibc i guess that'd be nice, yes hm that would make only hurd servers able to use it though unless we preload it well, i thought it's a staging area for libc ? in theory yes, in practice some functions have been stuck there for ages we'll discuss that with youpi and tschwinge and pinotree