Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 9 Jul 2013 14:50:25 -0700
From:      Peter Wemm <peter@wemm.org>
To:        Jilles Tjoelker <jilles@stack.nl>
Cc:        Mikolaj Golub <trociny@freebsd.org>, Robert Millan <rmh@freebsd.org>, freebsd-arch@freebsd.org
Subject:   Re: ABI change in libkvm (kvm_uread removal)
Message-ID:  <CAGE5yCpN8tEAudgfamXSYTkjg6mDorJBME4u9TZHJx3ZXbgPUw@mail.gmail.com>
In-Reply-To: <20130709211657.GA86400@stack.nl>
References:  <CAOfDtXPT-BQt9aqTNYHRK0XdiqKZsPnsO6s9vei=XCpyBvZZ6w@mail.gmail.com> <20130709185846.GA19508@gmail.com> <20130709211657.GA86400@stack.nl>

next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, Jul 9, 2013 at 2:16 PM, Jilles Tjoelker <jilles@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@wemm.org; peter@FreeBSD.org; peter@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"



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAGE5yCpN8tEAudgfamXSYTkjg6mDorJBME4u9TZHJx3ZXbgPUw>