From owner-cvs-all Sun Oct 21 11:40:28 2001 Delivered-To: cvs-all@freebsd.org Received: from peter3.wemm.org (c1315225-a.plstn1.sfba.home.com [24.14.150.180]) by hub.freebsd.org (Postfix) with ESMTP id 6536D37B405; Sun, 21 Oct 2001 11:39:58 -0700 (PDT) Received: from overcee.netplex.com.au (overcee.wemm.org [10.0.0.3]) by peter3.wemm.org (8.11.0/8.11.0) with ESMTP id f9LIdwM24979; Sun, 21 Oct 2001 11:39:58 -0700 (PDT) (envelope-from peter@wemm.org) Received: from wemm.org (localhost [127.0.0.1]) by overcee.netplex.com.au (Postfix) with ESMTP id 24ABB3803; Sun, 21 Oct 2001 11:39:58 -0700 (PDT) (envelope-from peter@wemm.org) X-Mailer: exmh version 2.5 07/13/2001 with nmh-1.0.4 To: Bruce Evans Cc: Brian Somers , cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: Re: cvs commit: src/sys/conf Makefile.i386 In-Reply-To: <20011021190723.I46880-100000@delplex.bde.org> Date: Sun, 21 Oct 2001 11:39:58 -0700 From: Peter Wemm Message-Id: <20011021183958.24ABB3803@overcee.netplex.com.au> Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Bruce Evans wrote: > On Sun, 21 Oct 2001, Peter Wemm wrote: > > > Brian Somers wrote: > > > brian 2001/10/17 06:57:32 PDT > > > > > > Modified files: > > > sys/conf Makefile.i386 > > > Log: > > > Change kern.bootfile when mv'ing the kernel > > ... > > This is incomplete.. > > what if it is the second 'make install'? > > This part is handled by the confusing logic. .. which is broken, because it leaves kern.bootfile pointing to kernel.old, even though it has trashed kernel.old. ie: kern.bootfile is no longer pointing to the booted kernel. > > > Nothing is supposed to be using this sysctl, it's purely informational > > these days, and even then it has only part of the story. The booted kernel > > may not even be reachable (eg: on an EFI filesystem or pulled in via tftp). > > _kvm_open() still uses getbootfile() unconditionally, so it's hard to > tell what uses the sysctl. On a live kernel, the getbootfile() thing should be irrelevant. On a live kernel it shouldn't be used. This is probably out of sync with reality though. > getbootfile() is also used by: > - savecore: doesn't use libkvm or kldsym, so it can only get the symbols > from the kernel file. More fundamentally, it can't save the kernel > file if the kernel file is unreachable. Well, yeah. :-) I dont recall it gracefully dealing with you booting from a different kernel to the one that crashed either. Adding this telepathic "Do What I Mean" mode of operation would probably require the dumpsys procedure to save the kernel path in a known location in the dump so that savecore can check it as well if the current booted kernel version string doesn't match. Anything more than that will be fun to implement. :-) > - syslogd: the name of the kernel file is used as a prefix. If I kept > kernels in the standard place, then I would have complained about the > bloatage of syslogd output caused by renaming the kernel from /kernel > to /boot/${NAME_OF_MY_KERNEL}/kernel It used to print "kernel" always, even when the kernel was /vmunix and on other systems when it is /bsd or /netbsd. I'd much rather that we went back. When syslogd starts up, it could log the value of kern.bootfile and kern.module_path once in the kernel log and just use "kernel:" for identifying kernel originated messages. > - trpt: doesn't use libkvm or kldsym. It apparently never got converted > to use libkvm. This is a bug. > - kgmon: uses libkvm, but bogusly calls getbootfile() itself instead of > asking kvm_openfiles() for the default. This is a bug too.. > Related problems: > - gprof: needs to read the bootfile if used on kernels, since it doesn't > use kldsym. The bootfile name must be specified on the command line > for kernels. I normally use `sysctl -n kern.bootfile` to get it. > > Not-so-related problems: > - kgmon: the change of the default output file name from gmon.out to > .gmon has not reached here, so you have to tell gprof > the gmon filename too. > > Bruce > > > Cheers, -Peter -- Peter Wemm - peter@FreeBSD.org; peter@yahoo-inc.com; peter@netplex.com.au "All of this is for nothing if we don't go to the stars" - JMS/B5 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message