From owner-freebsd-arch@FreeBSD.ORG Tue Jul 9 21:50:26 2013 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 6280ABE0 for ; Tue, 9 Jul 2013 21:50:26 +0000 (UTC) (envelope-from peter@wemm.org) Received: from mail-vb0-x233.google.com (mail-vb0-x233.google.com [IPv6:2607:f8b0:400c:c02::233]) by mx1.freebsd.org (Postfix) with ESMTP id 223261F14 for ; Tue, 9 Jul 2013 21:50:26 +0000 (UTC) Received: by mail-vb0-f51.google.com with SMTP id x17so4859242vbf.10 for ; Tue, 09 Jul 2013 14:50:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=wemm.org; s=google; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=LfikC9wXtAMYHguI/xPWlIo9OzzgTp72ySFg5xwojKg=; b=UFgNk13LV8hkYaHEFrd9LFoaHjZtGdKf0mOgSBOTh3Uphno83LCE8+icxvmoDILqwx 0texReOLYdFD/bFkM+09wLkSieVKTGQ8BA0u7wYnPo5wMOkJhgR24+w4hoZr1f/KslDo nGPqNXfngut5QRpaQ6lqBdzFepK5pe2jaA8h8= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:x-gm-message-state; bh=LfikC9wXtAMYHguI/xPWlIo9OzzgTp72ySFg5xwojKg=; b=LTS1PBIU74aPxq/h2eSjRhgVn/99V9AZ+hDDGK4YiykqCPRCYNLAZDcsRFnUXPzDsC nt3+YFXCB9yYReN9IbIbQBJeDraxUbbagGG+RuH9YgeC0kBxudVthuXsIz4dZ9P13Z/6 0zxbBa87DI+ehHyjStY5D+pAAu2chpOjDYuoMQNzhm+CxhqlIB2sg9SNij+spxsvAsCo 9R6HQebj3vvBIk7Acfu6OByCkyzLUPubl+SzeNN2HH9sm6GtHur7qu6lzDcAoe4Dcvd7 hyyGGECyVgy9bAQPgjp8Wgt4a0jPTzB7of24/NELtRi+zaL2E7SlWmKm78VemO/PrkMT r2OQ== MIME-Version: 1.0 X-Received: by 10.58.2.137 with SMTP id 9mr17815258veu.50.1373406625603; Tue, 09 Jul 2013 14:50:25 -0700 (PDT) Received: by 10.221.37.198 with HTTP; Tue, 9 Jul 2013 14:50:25 -0700 (PDT) In-Reply-To: <20130709211657.GA86400@stack.nl> References: <20130709185846.GA19508@gmail.com> <20130709211657.GA86400@stack.nl> Date: Tue, 9 Jul 2013 14:50:25 -0700 Message-ID: Subject: Re: ABI change in libkvm (kvm_uread removal) From: Peter Wemm To: Jilles Tjoelker Content-Type: text/plain; charset=ISO-8859-1 X-Gm-Message-State: ALoCoQlsJUoZWf2AaSCjjuI/32LLfXGhLPrPUqQiSHO/M2zsCZ7ueWg8+s0rjBblvn2+U61nJiUt Cc: Mikolaj Golub , Robert Millan , freebsd-arch@freebsd.org X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 Jul 2013 21:50:26 -0000 On Tue, Jul 9, 2013 at 2:16 PM, Jilles Tjoelker 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 ZFS must be the bacon of file systems. "everything's better with ZFS"