ABI change in libkvm (kvm_uread removal)

Peter Wemm peter at wemm.org
Tue Jul 9 21:50:26 UTC 2013


On Tue, Jul 9, 2013 at 2:16 PM, Jilles Tjoelker <jilles at stack.nl> wrote:
> On Tue, Jul 09, 2013 at 09:59:19PM +0300, Mikolaj Golub wrote:
>> On Tue, Jul 09, 2013 at 07:45:59PM +0200, Robert Millan wrote:
>> > In 2011 you removed kvm_uread() from libkvm, in r227839.
>
>> > Was this an intentional ABI change? I notice that kvm.h public header
>> > still has the declaration. Also, the soname was not bumped.
>
>> I think I thought then that kvm_uread() was for internal usage only
>> (it was used by libkvm only for reading process args and env via
>> procfs(5), no other consumers were found in base, no man page). Also
>> reading from procfs(5) did not look like libkvm job, so after the last
>> consumers had been removed, retiring it looked natural. I think I
>> overlooked the declaration in kvm.h and that I might break ABI,
>> otherwise it would have made me think more and ask other people if the
>> removal was ok.
>
>> > Should kvm.h and Makefile be adjusted to reflect the new ABI?
>
>> Suggestions how this should be fixed properly (if possible) are highly
>> appreciated. I will do what people suggest.
>
> I would suggest bringing back kvm_uread() in stable/9 so that the ABI is
> kept. In head, I suggest removing kvm_uread() from the header file and
> bumping the soname. I think MFCing the soname bump will cause more
> annoyance than the removal of kvm_uread() itself.

kvm_uread() was a wrapper around /proc/$pid/mem, which obviously
doesn't work with no procfs.  It's been a while since I've seen a
machine with /proc, it's off by default now, no?

Anyway, all the debuggers (gdb etc) use ptrace.  There really isn't
any known outside consumer to test it with.  We could write some test
cases but that's akin to doing an exam with the answer sheet right
next to you.

We could restore symbol compatability with
kvm_uread(...)
{
   _kvm_err("kd, kd->program, "kvm_uread not implemented");
   return (-1);
}
.. and restore the code later if we can actually find a legitimate
user of it so we can actually test it?

-- 
Peter Wemm - peter at wemm.org; peter at FreeBSD.org; peter at yahoo-inc.com; KI6FJV
UTF-8: So you can \342\200\231 .. for when a ' just won't do
<brueffer> ZFS must be the bacon of file systems. "everything's better with ZFS"


More information about the freebsd-arch mailing list