From owner-svn-src-stable-6@FreeBSD.ORG Mon May 3 19:48:21 2010 Return-Path: Delivered-To: svn-src-stable-6@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id EC98A106566B; Mon, 3 May 2010 19:48:21 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id D0F448FC08; Mon, 3 May 2010 19:48:21 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o43JmLv2075989; Mon, 3 May 2010 19:48:21 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o43JmL5D075986; Mon, 3 May 2010 19:48:21 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201005031948.o43JmL5D075986@svn.freebsd.org> From: Xin LI Date: Mon, 3 May 2010 19:48:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-6@freebsd.org X-SVN-Group: stable-6 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r207582 - stable/6/usr.sbin/daemon X-BeenThere: svn-src-stable-6@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 6-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 03 May 2010 19:48:22 -0000 Author: delphij Date: Mon May 3 19:48:21 2010 New Revision: 207582 URL: http://svn.freebsd.org/changeset/base/207582 Log: MFC r147906-201389, this sync'ed daemon(8) with -HEAD except the WARNS change. The most important change is the newly added privilege dropping feature by trhodes and others. Requested by: glarkin PR: bin/146266 Modified: stable/6/usr.sbin/daemon/daemon.8 stable/6/usr.sbin/daemon/daemon.c Directory Properties: stable/6/usr.sbin/daemon/ (props changed) Modified: stable/6/usr.sbin/daemon/daemon.8 ============================================================================== --- stable/6/usr.sbin/daemon/daemon.8 Mon May 3 19:38:59 2010 (r207581) +++ stable/6/usr.sbin/daemon/daemon.8 Mon May 3 19:48:21 2010 (r207582) @@ -26,7 +26,7 @@ .\" .\" $FreeBSD$ .\" -.Dd August 30, 2001 +.Dd March 19, 2007 .Dt DAEMON 8 .Os .Sh NAME @@ -36,12 +36,14 @@ .Nm .Op Fl cf .Op Fl p Ar pidfile +.Op Fl u Ar user .Ar command arguments ... .Sh DESCRIPTION The .Nm utility detaches itself from the controlling terminal and executes the program specified by its arguments. +Privileges may be lowered to the specified user. .Pp The options are as follows: .Bl -tag -width indent @@ -54,12 +56,14 @@ Redirect standard input, standard output .It Fl p Ar file Write the ID of the created process into the .Ar file -using +using the .Xr pidfile 3 functionality. Note, that the file will be created shortly before the process is actually executed, and will remain after the process exits (although it will be removed if the execution fails). +.It Fl u Ar user +Run the program with the rights of user specified, requires privilege. .El .Sh EXIT STATUS The @@ -77,6 +81,8 @@ standard error unless the .Fl f flag is specified. .Sh SEE ALSO +.Xr setregid 2 , +.Xr setreuid 2 , .Xr daemon 3 , .Xr exec 3 , .Xr pidfile 3 , Modified: stable/6/usr.sbin/daemon/daemon.c ============================================================================== --- stable/6/usr.sbin/daemon/daemon.c Mon May 3 19:38:59 2010 (r207581) +++ stable/6/usr.sbin/daemon/daemon.c Mon May 3 19:48:21 2010 (r207582) @@ -35,24 +35,27 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include +#include #include #include #include +static void restrict_process(const char *); static void usage(void); int main(int argc, char *argv[]) { - struct pidfh *pfh; + struct pidfh *pfh = NULL; int ch, nochdir, noclose, errcode; - const char *pidfile; + const char *pidfile, *user; pid_t otherpid; nochdir = noclose = 1; - pidfile = NULL; - while ((ch = getopt(argc, argv, "-cfp:")) != -1) { + pidfile = user = NULL; + while ((ch = getopt(argc, argv, "-cfp:u:")) != -1) { switch (ch) { case 'c': nochdir = 0; @@ -63,6 +66,9 @@ main(int argc, char *argv[]) case 'p': pidfile = optarg; break; + case 'u': + user = optarg; + break; default: usage(); } @@ -72,6 +78,10 @@ main(int argc, char *argv[]) if (argc == 0) usage(); + + if (user != NULL) + restrict_process(user); + /* * Try to open the pidfile before calling daemon(3), * to be able to report the error intelligently @@ -109,9 +119,23 @@ main(int argc, char *argv[]) } static void +restrict_process(const char *user) +{ + struct passwd *pw = NULL; + + pw = getpwnam(user); + if (pw == NULL) + errx(1, "unknown user: %s", user); + + if (setusercontext(NULL, pw, pw->pw_uid, LOGIN_SETALL) != 0) + errx(1, "failed to set user environment"); +} + +static void usage(void) { (void)fprintf(stderr, - "usage: daemon [-cf] [-p pidfile] command arguments ...\n"); + "usage: daemon [-cf] [-p pidfile] [-u user] command " + "arguments ...\n"); exit(1); } From owner-svn-src-stable-6@FreeBSD.ORG Tue May 4 00:42:03 2010 Return-Path: Delivered-To: svn-src-stable-6@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id DCE83106564A; Tue, 4 May 2010 00:42:03 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id CC2F18FC12; Tue, 4 May 2010 00:42:03 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o440g33t050429; Tue, 4 May 2010 00:42:03 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o440g3ZX050427; Tue, 4 May 2010 00:42:03 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201005040042.o440g3ZX050427@svn.freebsd.org> From: Xin LI Date: Tue, 4 May 2010 00:42:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-6@freebsd.org X-SVN-Group: stable-6 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r207591 - stable/6/sys/dev/ata X-BeenThere: svn-src-stable-6@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 6-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 04 May 2010 00:42:04 -0000 Author: delphij Date: Tue May 4 00:42:03 2010 New Revision: 207591 URL: http://svn.freebsd.org/changeset/base/207591 Log: MFC r195724 (mav): Limit IOCATAREQUEST ioctl data size to controller's maximum I/O size. It fixes kernel panic when requested size is too large (0xffffffff), PR: kern/136726 Modified: stable/6/sys/dev/ata/ata-all.c Directory Properties: stable/6/sys/ (props changed) stable/6/sys/contrib/pf/ (props changed) stable/6/sys/dev/cxgb/ (props changed) Modified: stable/6/sys/dev/ata/ata-all.c ============================================================================== --- stable/6/sys/dev/ata/ata-all.c Mon May 3 22:32:26 2010 (r207590) +++ stable/6/sys/dev/ata/ata-all.c Tue May 4 00:42:03 2010 (r207591) @@ -438,6 +438,7 @@ int ata_device_ioctl(device_t dev, u_long cmd, caddr_t data) { struct ata_device *atadev = device_get_softc(dev); + struct ata_channel *ch = device_get_softc(device_get_parent(dev)); struct ata_ioc_request *ioc_request = (struct ata_ioc_request *)data; struct ata_params *params = (struct ata_params *)data; int *mode = (int *)data; @@ -447,6 +448,10 @@ ata_device_ioctl(device_t dev, u_long cm switch (cmd) { case IOCATAREQUEST: + if (ioc_request->count > + (ch->dma.max_iosize ? ch->dma.max_iosize : DFLTPHYS)) { + return (EFBIG); + } if (!(buf = malloc(ioc_request->count, M_ATA, M_NOWAIT))) { return ENOMEM; } From owner-svn-src-stable-6@FreeBSD.ORG Tue May 4 05:17:11 2010 Return-Path: Delivered-To: svn-src-stable-6@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 81CC9106566B; Tue, 4 May 2010 05:17:11 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id 6F8858FC16; Tue, 4 May 2010 05:17:11 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o445HBX0011039; Tue, 4 May 2010 05:17:11 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o445HB6e011037; Tue, 4 May 2010 05:17:11 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201005040517.o445HB6e011037@svn.freebsd.org> From: Xin LI Date: Tue, 4 May 2010 05:17:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-6@freebsd.org X-SVN-Group: stable-6 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r207597 - stable/6/sys/dev/ata X-BeenThere: svn-src-stable-6@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 6-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 04 May 2010 05:17:11 -0000 Author: delphij Date: Tue May 4 05:17:11 2010 New Revision: 207597 URL: http://svn.freebsd.org/changeset/base/207597 Log: Fixup MFC. I should have done test build before committing this. Pointy hat to: delphij Modified: stable/6/sys/dev/ata/ata-all.c Modified: stable/6/sys/dev/ata/ata-all.c ============================================================================== --- stable/6/sys/dev/ata/ata-all.c Tue May 4 05:14:43 2010 (r207596) +++ stable/6/sys/dev/ata/ata-all.c Tue May 4 05:17:11 2010 (r207597) @@ -449,7 +449,7 @@ ata_device_ioctl(device_t dev, u_long cm switch (cmd) { case IOCATAREQUEST: if (ioc_request->count > - (ch->dma.max_iosize ? ch->dma.max_iosize : DFLTPHYS)) { + (ch->dma->max_iosize ? ch->dma->max_iosize : DFLTPHYS)) { return (EFBIG); } if (!(buf = malloc(ioc_request->count, M_ATA, M_NOWAIT))) { From owner-svn-src-stable-6@FreeBSD.ORG Wed May 5 00:39:50 2010 Return-Path: Delivered-To: svn-src-stable-6@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 6B3741065675; Wed, 5 May 2010 00:39:50 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id 5A3268FC15; Wed, 5 May 2010 00:39:50 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o450doZN090127; Wed, 5 May 2010 00:39:50 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o450doVB090125; Wed, 5 May 2010 00:39:50 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201005050039.o450doVB090125@svn.freebsd.org> From: Xin LI Date: Wed, 5 May 2010 00:39:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-6@freebsd.org X-SVN-Group: stable-6 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r207642 - stable/6/share/mk X-BeenThere: svn-src-stable-6@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 6-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 05 May 2010 00:39:50 -0000 Author: delphij Date: Wed May 5 00:39:50 2010 New Revision: 207642 URL: http://svn.freebsd.org/changeset/base/207642 Log: MFC r206973: When CPUTYPE is defined to any value, on amd64 platform "mmx" is available through MACHINE_CPU, indicating the CPU supports that feature, as done by revision 138685. This changeset adds "mmx" into the default amd64 MACHINE_CPU list when no CPUTYPE is specified to provide consistent behavior. PR: amd64/145593 Submitted by: mm Modified: stable/6/share/mk/bsd.cpu.mk Directory Properties: stable/6/share/mk/ (props changed) Modified: stable/6/share/mk/bsd.cpu.mk ============================================================================== --- stable/6/share/mk/bsd.cpu.mk Wed May 5 00:39:06 2010 (r207641) +++ stable/6/share/mk/bsd.cpu.mk Wed May 5 00:39:50 2010 (r207642) @@ -12,7 +12,7 @@ MACHINE_CPU = i486 _CPUCFLAGS = -mcpu=ev4 -mtune=ev5 MACHINE_CPU = ev4 . elif ${MACHINE_ARCH} == "amd64" -MACHINE_CPU = amd64 sse2 sse +MACHINE_CPU = amd64 sse2 sse mmx . elif ${MACHINE_ARCH} == "ia64" MACHINE_CPU = itanium . elif ${MACHINE_ARCH} == "sparc64" From owner-svn-src-stable-6@FreeBSD.ORG Wed May 5 17:13:54 2010 Return-Path: Delivered-To: svn-src-stable-6@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 80FD71065673; Wed, 5 May 2010 17:13:54 +0000 (UTC) (envelope-from kensmith@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id 706BD8FC14; Wed, 5 May 2010 17:13:54 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o45HDs6d011959; Wed, 5 May 2010 17:13:54 GMT (envelope-from kensmith@svn.freebsd.org) Received: (from kensmith@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o45HDrP7011958; Wed, 5 May 2010 17:13:53 GMT (envelope-from kensmith@svn.freebsd.org) Message-Id: <201005051713.o45HDrP7011958@svn.freebsd.org> From: Ken Smith Date: Wed, 5 May 2010 17:13:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-6@freebsd.org X-SVN-Group: stable-6 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r207667 - in stable/6/release: . scripts X-BeenThere: svn-src-stable-6@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 6-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 05 May 2010 17:13:54 -0000 Author: kensmith Date: Wed May 5 17:13:53 2010 New Revision: 207667 URL: http://svn.freebsd.org/changeset/base/207667 Log: Merge r206423: > Shift the version of perl used by the release build process over to > perl-5.10. This aligns the release build process with the current > default version of perl in the ports tree. Modified: stable/6/release/Makefile stable/6/release/Makefile.inc.docports Directory Properties: stable/6/release/ (props changed) stable/6/release/doc/en_US.ISO8859-1/hardware/ (props changed) stable/6/release/scripts/src-install.sh (props changed) Modified: stable/6/release/Makefile ============================================================================== --- stable/6/release/Makefile Wed May 5 17:01:03 2010 (r207666) +++ stable/6/release/Makefile Wed May 5 17:13:53 2010 (r207667) @@ -140,7 +140,7 @@ NOPORTSATALL= YES # # Doing 'make index' in /usr/ports requires Perl. -MAKEINDEXPORTS= lang/perl5.8 +MAKEINDEXPORTS= lang/perl5.10 # By default, documentation (Handbook, FAQ, etc.) is built for all # the languages. To speed up building, set the DOC_LANG to just # the languages you need. (The language for the release notes is Modified: stable/6/release/Makefile.inc.docports ============================================================================== --- stable/6/release/Makefile.inc.docports Wed May 5 17:01:03 2010 (r207666) +++ stable/6/release/Makefile.inc.docports Wed May 5 17:13:53 2010 (r207667) @@ -81,5 +81,5 @@ MINIMALDOCPORTS+= \ ports/textproc/p5-PodParser .else MINIMALDOCPORTS+= \ - ports/lang/perl5.8 + ports/lang/perl5.10 .endif From owner-svn-src-stable-6@FreeBSD.ORG Wed May 5 22:23:29 2010 Return-Path: Delivered-To: svn-src-stable-6@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 5F010106567B; Wed, 5 May 2010 22:23:29 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id 4DC2D8FC20; Wed, 5 May 2010 22:23:29 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o45MNTSi081526; Wed, 5 May 2010 22:23:29 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o45MNTAv081524; Wed, 5 May 2010 22:23:29 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201005052223.o45MNTAv081524@svn.freebsd.org> From: Jilles Tjoelker Date: Wed, 5 May 2010 22:23:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-6@freebsd.org X-SVN-Group: stable-6 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r207686 - stable/6/lib/libc/gen X-BeenThere: svn-src-stable-6@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 6-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 05 May 2010 22:23:29 -0000 Author: jilles Date: Wed May 5 22:23:29 2010 New Revision: 207686 URL: http://svn.freebsd.org/changeset/base/207686 Log: MFC r206760: getcwd(3): Clarify that EACCES may or may not be checked. POSIX permits but does not require checking access on the current and parent directories. Because various programs do not like it if getcwd(3) fails, it seems best to avoid checking access as much as possible. There are various reports in GNATS about this (search for getcwd). Our getcwd(3) implementation first queries the kernel for the pathname directly, which does not check any permissions but sometimes fails, and then falls back to reading all parent directories for the names. PR: standards/44425 Modified: stable/6/lib/libc/gen/getcwd.3 Directory Properties: stable/6/lib/libc/ (props changed) Modified: stable/6/lib/libc/gen/getcwd.3 ============================================================================== --- stable/6/lib/libc/gen/getcwd.3 Wed May 5 22:19:52 2010 (r207685) +++ stable/6/lib/libc/gen/getcwd.3 Wed May 5 22:23:29 2010 (r207686) @@ -32,7 +32,7 @@ .\" @(#)getcwd.3 8.2 (Berkeley) 12/11/93 .\" $FreeBSD$ .\" -.Dd November 24, 1997 +.Dd April 17, 2010 .Dt GETCWD 3 .Os .Sh NAME @@ -112,8 +112,6 @@ The function will fail if: .Bl -tag -width Er -.It Bq Er EACCES -Read or search permission was denied for a component of the pathname. .It Bq Er EINVAL The .Fa size @@ -128,6 +126,16 @@ The argument is greater than zero but smaller than the length of the pathname plus 1. .El +.Pp +The +.Fn getcwd +function +may fail if: +.Bl -tag -width Er +.It Bq Er EACCES +Read or search permission was denied for a component of the pathname. +This is only checked in limited cases, depending on implementation details. +.El .Sh SEE ALSO .Xr chdir 2 , .Xr fchdir 2 , From owner-svn-src-stable-6@FreeBSD.ORG Sat May 8 13:21:23 2010 Return-Path: Delivered-To: svn-src-stable-6@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 41B561065670; Sat, 8 May 2010 13:21:23 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id 2FF718FC15; Sat, 8 May 2010 13:21:23 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o48DLN1s025911; Sat, 8 May 2010 13:21:23 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o48DLNSM025906; Sat, 8 May 2010 13:21:23 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201005081321.o48DLNSM025906@svn.freebsd.org> From: Warner Losh Date: Sat, 8 May 2010 13:21:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-6@freebsd.org X-SVN-Group: stable-6 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r207776 - in stable/6/gnu/usr.bin/gdb: . gdbserver X-BeenThere: svn-src-stable-6@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 6-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 08 May 2010 13:21:23 -0000 Author: imp Date: Sat May 8 13:21:22 2010 New Revision: 207776 URL: http://svn.freebsd.org/changeset/base/207776 Log: Merge gdbserver support for arm from head (r185023). Added: stable/6/gnu/usr.bin/gdb/gdbserver/fbsd-arm-low.c - copied unchanged from r185023, head/gnu/usr.bin/gdb/gdbserver/fbsd-arm-low.c stable/6/gnu/usr.bin/gdb/gdbserver/reg-arm.c - copied unchanged from r185023, head/gnu/usr.bin/gdb/gdbserver/reg-arm.c Modified: stable/6/gnu/usr.bin/gdb/Makefile stable/6/gnu/usr.bin/gdb/gdbserver/Makefile Directory Properties: stable/6/gnu/usr.bin/gdb/ (props changed) stable/6/gnu/usr.bin/gdb/kgdb/ (props changed) Modified: stable/6/gnu/usr.bin/gdb/Makefile ============================================================================== --- stable/6/gnu/usr.bin/gdb/Makefile Sat May 8 13:12:52 2010 (r207775) +++ stable/6/gnu/usr.bin/gdb/Makefile Sat May 8 13:21:22 2010 (r207776) @@ -2,7 +2,7 @@ SUBDIR= doc libgdb gdb gdbtui kgdb -.if ${MACHINE_ARCH} == "i386" +.if ${MACHINE_ARCH} == "i386" || ${MACHINE_ARCH} == "arm" SUBDIR+=gdbserver .endif Modified: stable/6/gnu/usr.bin/gdb/gdbserver/Makefile ============================================================================== --- stable/6/gnu/usr.bin/gdb/gdbserver/Makefile Sat May 8 13:12:52 2010 (r207775) +++ stable/6/gnu/usr.bin/gdb/gdbserver/Makefile Sat May 8 13:21:22 2010 (r207776) @@ -10,9 +10,17 @@ GDBDIR= ${.CURDIR}/../../../../contrib/g PROG= gdbserver -SRCS= i387-fp.c inferiors.c mem-break.c regcache.c remote-utils.c \ - server.c signals.c target.c reg-i386.c utils.c -SRCS+= fbsd-low.c fbsd-i386-low.c +SRCS= inferiors.c mem-break.c regcache.c remote-utils.c \ + server.c signals.c target.c utils.c +SRCS+= fbsd-low.c + +.if ${MACHINE_ARCH} == "i386" +SRCS+= fbsd-i386-low.c i387-fp.c reg-i386.c +.endif + +.if ${MACHINE_ARCH} == "arm" +SRCS+= fbsd-arm-low.c reg-arm.c +.endif #CFLAGS+= -I${.CURDIR}/../arch/${MACHINE_ARCH} CFLAGS+= -I${GDBDIR}/gdb/gdbserver Copied: stable/6/gnu/usr.bin/gdb/gdbserver/fbsd-arm-low.c (from r185023, head/gnu/usr.bin/gdb/gdbserver/fbsd-arm-low.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/6/gnu/usr.bin/gdb/gdbserver/fbsd-arm-low.c Sat May 8 13:21:22 2010 (r207776, copy of r185023, head/gnu/usr.bin/gdb/gdbserver/fbsd-arm-low.c) @@ -0,0 +1,146 @@ +/* FreeBSD/ARM specific low level interface, for the remote server for GDB. + Copyright 1995, 1996, 1998, 1999, 2000, 2001, 2002, 2003, 2004 + Free Software Foundation, Inc. + + This file is part of GDB. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include +__FBSDID("$FreeBSD$"); + +#include "server.h" +#include "fbsd-low.h" + +#ifdef HAVE_SYS_REG_H +#include +#endif + +#include +#include + +#define arm_num_regs 26 + +static int arm_regmap[] = { + 0, 4, 8, 12, 16, 20, 24, 28, + 32, 36, 40, 44, 48, 52, 56, 60, + -1, -1, -1, -1, -1, -1, -1, -1, -1, + 64 +}; + +static int +arm_cannot_store_register (int regno) +{ + return (regno >= arm_num_regs); +} + +static int +arm_cannot_fetch_register (int regno) +{ + return (regno >= arm_num_regs); +} + +extern int debug_threads; + +static CORE_ADDR +arm_get_pc () +{ + unsigned long pc; + collect_register_by_name ("pc", &pc); + if (debug_threads) + fprintf (stderr, "stop pc is %08lx\n", pc); + return pc; +} + +static void +arm_set_pc (CORE_ADDR pc) +{ + unsigned long newpc = pc; + supply_register_by_name ("pc", &newpc); +} + +/* Correct in either endianness. We do not support Thumb yet. */ +static const unsigned long arm_breakpoint = 0xef9f0001; +#define arm_breakpoint_len 4 + +static int +arm_breakpoint_at (CORE_ADDR where) +{ + unsigned long insn; + + (*the_target->read_memory) (where, (char *) &insn, 4); + if (insn == arm_breakpoint) + return 1; + + /* If necessary, recognize more trap instructions here. GDB only uses the + one. */ + return 0; +} + +/* We only place breakpoints in empty marker functions, and thread locking + is outside of the function. So rather than importing software single-step, + we can just run until exit. */ +static CORE_ADDR +arm_reinsert_addr () +{ + unsigned long pc; + collect_register_by_name ("lr", &pc); + return pc; +} + +static void +arm_fill_gregset (void *buf) +{ + int i; + + for (i = 0; i < arm_num_regs; i++) + if (arm_regmap[i] != -1) + collect_register (i, ((char *) buf) + arm_regmap[i]); + +} + +static void +arm_store_gregset (const void *buf) +{ + int i; + + for (i = 0; i < arm_num_regs; i++) + if (arm_regmap[i] != -1) + supply_register (i, ((char *) buf) + arm_regmap[i]); + +} + + +struct regset_info target_regsets[] = { + {PT_GETREGS, PT_SETREGS, sizeof (struct reg), + GENERAL_REGS, + arm_fill_gregset, arm_store_gregset }, + { 0, 0, -1, -1, NULL, NULL } +}; + +struct fbsd_target_ops the_low_target = { + arm_num_regs, + arm_regmap, + arm_cannot_fetch_register, + arm_cannot_store_register, + arm_get_pc, + arm_set_pc, + (const char *) &arm_breakpoint, + arm_breakpoint_len, + arm_reinsert_addr, + 0, + arm_breakpoint_at, +}; Copied: stable/6/gnu/usr.bin/gdb/gdbserver/reg-arm.c (from r185023, head/gnu/usr.bin/gdb/gdbserver/reg-arm.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/6/gnu/usr.bin/gdb/gdbserver/reg-arm.c Sat May 8 13:21:22 2010 (r207776, copy of r185023, head/gnu/usr.bin/gdb/gdbserver/reg-arm.c) @@ -0,0 +1,68 @@ +/* *INDENT-OFF* */ /* THIS FILE IS GENERATED */ + +/* A register protocol for GDB, the GNU debugger. + Copyright 2001, 2002 Free Software Foundation, Inc. + + This file is part of GDB. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +/* This file was created with the aid of ``regdat.sh'' and ``reg-arm.dat''. */ + +#include +__FBSDID("$FreeBSD$"); + +#include "regdef.h" +#include "regcache.h" + +struct reg regs_arm[] = { + { "r0", 0, 32 }, + { "r1", 32, 32 }, + { "r2", 64, 32 }, + { "r3", 96, 32 }, + { "r4", 128, 32 }, + { "r5", 160, 32 }, + { "r6", 192, 32 }, + { "r7", 224, 32 }, + { "r8", 256, 32 }, + { "r9", 288, 32 }, + { "r10", 320, 32 }, + { "r11", 352, 32 }, + { "r12", 384, 32 }, + { "sp", 416, 32 }, + { "lr", 448, 32 }, + { "pc", 480, 32 }, + { "f0", 512, 96 }, + { "f1", 608, 96 }, + { "f2", 704, 96 }, + { "f3", 800, 96 }, + { "f4", 896, 96 }, + { "f5", 992, 96 }, + { "f6", 1088, 96 }, + { "f7", 1184, 96 }, + { "fps", 1280, 32 }, + { "cpsr", 1312, 32 }, +}; + +const char *expedite_regs_arm[] = { "r11", "sp", "pc", 0 }; + +void +init_registers () +{ + set_register_cache (regs_arm, + sizeof (regs_arm) / sizeof (regs_arm[0])); + gdbserver_expedite_regs = expedite_regs_arm; +} From owner-svn-src-stable-6@FreeBSD.ORG Sat May 8 13:41:02 2010 Return-Path: Delivered-To: svn-src-stable-6@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 3439B106566C; Sat, 8 May 2010 13:41:02 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id 23E808FC1A; Sat, 8 May 2010 13:41:02 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o48Df2TO030288; Sat, 8 May 2010 13:41:02 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o48Df2bC030286; Sat, 8 May 2010 13:41:02 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201005081341.o48Df2bC030286@svn.freebsd.org> From: Warner Losh Date: Sat, 8 May 2010 13:41:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-6@freebsd.org X-SVN-Group: stable-6 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r207778 - in stable/6/lib/libthread_db: . arch/arm X-BeenThere: svn-src-stable-6@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 6-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 08 May 2010 13:41:02 -0000 Author: imp Date: Sat May 8 13:41:01 2010 New Revision: 207778 URL: http://svn.freebsd.org/changeset/base/207778 Log: MFC r173703(cognet): Add arm support in libthread_db Added: stable/6/lib/libthread_db/arch/arm/ - copied from r173703, head/lib/libthread_db/arch/arm/ Modified: stable/6/lib/libthread_db/Makefile Directory Properties: stable/6/lib/libthread_db/ (props changed) Modified: stable/6/lib/libthread_db/Makefile ============================================================================== --- stable/6/lib/libthread_db/Makefile Sat May 8 13:23:57 2010 (r207777) +++ stable/6/lib/libthread_db/Makefile Sat May 8 13:41:01 2010 (r207778) @@ -6,7 +6,11 @@ LIB= thread_db SHLIB_MAJOR= 2 SRCS= thread_db.c SRCS+= libpthread_db.c libpthread_md.c +# libc_r not supported on arm +.if ${MACHINE_ARCH} != "arm" && ${MACHINE_ARCH} != "ia64" && \ + ${MACHINE_ARCH} != "poewrpc" && !defined(NO_LIBC_R) SRCS+= libc_r_db.c libc_r_md.c +.endif SRCS+= libthr_db.c INCS= thread_db.h WARNS?= 6 From owner-svn-src-stable-6@FreeBSD.ORG Sat May 8 13:41:58 2010 Return-Path: Delivered-To: svn-src-stable-6@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id C2764106564A; Sat, 8 May 2010 13:41:58 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id B25818FC18; Sat, 8 May 2010 13:41:58 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o48DfwYX030547; Sat, 8 May 2010 13:41:58 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o48DfwMI030545; Sat, 8 May 2010 13:41:58 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201005081341.o48DfwMI030545@svn.freebsd.org> From: Warner Losh Date: Sat, 8 May 2010 13:41:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-6@freebsd.org X-SVN-Group: stable-6 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r207779 - stable/6/lib X-BeenThere: svn-src-stable-6@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 6-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 08 May 2010 13:41:58 -0000 Author: imp Date: Sat May 8 13:41:58 2010 New Revision: 207779 URL: http://svn.freebsd.org/changeset/base/207779 Log: Hand merge in support for compiling libthread_db on arm (from change r173703). Given the large delta between this and head, mergeinfo likely would do more harm than good. Modified: stable/6/lib/Makefile Modified: stable/6/lib/Makefile ============================================================================== --- stable/6/lib/Makefile Sat May 8 13:41:01 2010 (r207778) +++ stable/6/lib/Makefile Sat May 8 13:41:58 2010 (r207779) @@ -101,7 +101,7 @@ _libpthread= libpthread _libthr= libthr .endif -.if ${MACHINE_ARCH} != "arm" && ${MACHINE_ARCH} != "powerpc" +.if ${MACHINE_ARCH} != "powerpc" _libthread_db= libthread_db .endif From owner-svn-src-stable-6@FreeBSD.ORG Sat May 8 13:47:00 2010 Return-Path: Delivered-To: svn-src-stable-6@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 2AF3D1065672; Sat, 8 May 2010 13:47:00 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id 1A9098FC18; Sat, 8 May 2010 13:47:00 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o48DkxHr031734; Sat, 8 May 2010 13:47:00 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o48Dkxpx031732; Sat, 8 May 2010 13:46:59 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201005081346.o48Dkxpx031732@svn.freebsd.org> From: Warner Losh Date: Sat, 8 May 2010 13:46:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-6@freebsd.org X-SVN-Group: stable-6 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r207780 - stable/6/lib/libthread_db/arch/arm X-BeenThere: svn-src-stable-6@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 6-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 08 May 2010 13:47:00 -0000 Author: imp Date: Sat May 8 13:46:59 2010 New Revision: 207780 URL: http://svn.freebsd.org/changeset/base/207780 Log: MFC r181044 (marcel): Cleanup for WARNS 2. Modified: stable/6/lib/libthread_db/arch/arm/libpthread_md.c Modified: stable/6/lib/libthread_db/arch/arm/libpthread_md.c ============================================================================== --- stable/6/lib/libthread_db/arch/arm/libpthread_md.c Sat May 8 13:41:58 2010 (r207779) +++ stable/6/lib/libthread_db/arch/arm/libpthread_md.c Sat May 8 13:46:59 2010 (r207780) @@ -97,7 +97,6 @@ pt_fpreg_to_ucontext(const struct fpreg void pt_ucontext_to_fpreg(const ucontext_t *uc, struct fpreg *r) { - const mcontext_t *mc = &uc->uc_mcontext; /* XXX */ memset(r, 0, sizeof(*r)); @@ -113,4 +112,5 @@ pt_reg_sstep(struct reg *reg, int step) { /* XXX */ + return (0); } From owner-svn-src-stable-6@FreeBSD.ORG Sat May 8 13:48:31 2010 Return-Path: Delivered-To: svn-src-stable-6@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id C600F106567B; Sat, 8 May 2010 13:48:31 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id B58418FC1E; Sat, 8 May 2010 13:48:31 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o48DmVVg032117; Sat, 8 May 2010 13:48:31 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o48DmVtY032115; Sat, 8 May 2010 13:48:31 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201005081348.o48DmVtY032115@svn.freebsd.org> From: Warner Losh Date: Sat, 8 May 2010 13:48:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-6@freebsd.org X-SVN-Group: stable-6 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r207781 - stable/6/lib/libthread_db/arch/arm X-BeenThere: svn-src-stable-6@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 6-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 08 May 2010 13:48:31 -0000 Author: imp Date: Sat May 8 13:48:31 2010 New Revision: 207781 URL: http://svn.freebsd.org/changeset/base/207781 Log: MFC r181059: Cleanup for WARNS 3. Modified: stable/6/lib/libthread_db/arch/arm/libpthread_md.c Directory Properties: stable/6/lib/libthread_db/ (props changed) Modified: stable/6/lib/libthread_db/arch/arm/libpthread_md.c ============================================================================== --- stable/6/lib/libthread_db/arch/arm/libpthread_md.c Sat May 8 13:46:59 2010 (r207780) +++ stable/6/lib/libthread_db/arch/arm/libpthread_md.c Sat May 8 13:48:31 2010 (r207781) @@ -27,9 +27,8 @@ #include __FBSDID("$FreeBSD$"); -#include #include -#include +#include #include #include "libpthread_db.h" From owner-svn-src-stable-6@FreeBSD.ORG Sat May 8 13:49:43 2010 Return-Path: Delivered-To: svn-src-stable-6@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 5D7361065670; Sat, 8 May 2010 13:49:43 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id 4CCD68FC08; Sat, 8 May 2010 13:49:43 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o48Dnh2W032429; Sat, 8 May 2010 13:49:43 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o48DnhFj032427; Sat, 8 May 2010 13:49:43 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201005081349.o48DnhFj032427@svn.freebsd.org> From: Warner Losh Date: Sat, 8 May 2010 13:49:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-6@freebsd.org X-SVN-Group: stable-6 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r207782 - stable/6/lib/libthread_db/arch/arm X-BeenThere: svn-src-stable-6@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 6-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 08 May 2010 13:49:43 -0000 Author: imp Date: Sat May 8 13:49:43 2010 New Revision: 207782 URL: http://svn.freebsd.org/changeset/base/207782 Log: MFC r181341 (marcel): Cleanup for WARNS 6. Modified: stable/6/lib/libthread_db/arch/arm/libpthread_md.c Directory Properties: stable/6/lib/libthread_db/ (props changed) Modified: stable/6/lib/libthread_db/arch/arm/libpthread_md.c ============================================================================== --- stable/6/lib/libthread_db/arch/arm/libpthread_md.c Sat May 8 13:48:31 2010 (r207781) +++ stable/6/lib/libthread_db/arch/arm/libpthread_md.c Sat May 8 13:49:43 2010 (r207782) @@ -85,7 +85,7 @@ pt_ucontext_to_reg(const ucontext_t *uc, } void -pt_fpreg_to_ucontext(const struct fpreg *r, ucontext_t *uc) +pt_fpreg_to_ucontext(const struct fpreg *r __unused, ucontext_t *uc) { mcontext_t *mc = &uc->uc_mcontext; @@ -94,7 +94,7 @@ pt_fpreg_to_ucontext(const struct fpreg } void -pt_ucontext_to_fpreg(const ucontext_t *uc, struct fpreg *r) +pt_ucontext_to_fpreg(const ucontext_t *uc __unused, struct fpreg *r) { /* XXX */ @@ -107,7 +107,7 @@ pt_md_init(void) } int -pt_reg_sstep(struct reg *reg, int step) +pt_reg_sstep(struct reg *reg __unused, int step __unused) { /* XXX */ From owner-svn-src-stable-6@FreeBSD.ORG Sat May 8 14:12:04 2010 Return-Path: Delivered-To: svn-src-stable-6@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id B67361065675; Sat, 8 May 2010 14:12:04 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id A65658FC0C; Sat, 8 May 2010 14:12:04 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o48EC4GK037379; Sat, 8 May 2010 14:12:04 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o48EC4mf037377; Sat, 8 May 2010 14:12:04 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201005081412.o48EC4mf037377@svn.freebsd.org> From: Warner Losh Date: Sat, 8 May 2010 14:12:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-6@freebsd.org X-SVN-Group: stable-6 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r207784 - stable/6/gnu/usr.bin X-BeenThere: svn-src-stable-6@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 6-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 08 May 2010 14:12:04 -0000 Author: imp Date: Sat May 8 14:12:04 2010 New Revision: 207784 URL: http://svn.freebsd.org/changeset/base/207784 Log: gdb compiles and seems to work on arm on stable/6, so enable building it. Modified: stable/6/gnu/usr.bin/Makefile Modified: stable/6/gnu/usr.bin/Makefile ============================================================================== --- stable/6/gnu/usr.bin/Makefile Sat May 8 14:00:01 2010 (r207783) +++ stable/6/gnu/usr.bin/Makefile Sat May 8 14:12:04 2010 (r207784) @@ -21,7 +21,7 @@ SUBDIR= bc \ sort \ texinfo -.if ${MACHINE_ARCH} == "arm" || ${MACHINE_ARCH} == "powerpc" +.if ${MACHINE_ARCH} == "powerpc" NO_GDB= # not yet .endif From owner-svn-src-stable-6@FreeBSD.ORG Sat May 8 22:25:37 2010 Return-Path: Delivered-To: svn-src-stable-6@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 97C7B1065675; Sat, 8 May 2010 22:25:37 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id 874568FC17; Sat, 8 May 2010 22:25:37 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o48MPbJS046543; Sat, 8 May 2010 22:25:37 GMT (envelope-from dougb@svn.freebsd.org) Received: (from dougb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o48MPb4n046541; Sat, 8 May 2010 22:25:37 GMT (envelope-from dougb@svn.freebsd.org) Message-Id: <201005082225.o48MPb4n046541@svn.freebsd.org> From: Doug Barton Date: Sat, 8 May 2010 22:25:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-6@freebsd.org X-SVN-Group: stable-6 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r207804 - stable/6/etc/rc.d X-BeenThere: svn-src-stable-6@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 6-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 08 May 2010 22:25:37 -0000 Author: dougb Date: Sat May 8 22:25:37 2010 New Revision: 207804 URL: http://svn.freebsd.org/changeset/base/207804 Log: MFC 207346: Fix named-checkconf in the situation where named_chroot_autoupdate is NOT set, but named_chrootdir IS set. Remove required_files for named.conf, named-checkconf is enough. Modified: stable/6/etc/rc.d/named Directory Properties: stable/6/etc/ (props changed) Modified: stable/6/etc/rc.d/named ============================================================================== --- stable/6/etc/rc.d/named Sat May 8 22:24:31 2010 (r207803) +++ stable/6/etc/rc.d/named Sat May 8 22:25:37 2010 (r207804) @@ -193,6 +193,13 @@ named_prestart() $confgen_command fi + local checkconf + + checkconf="${command%/named}/named-checkconf" + if ! checkyesno named_chroot_autoupdate && [ -n "$named_chrootdir" ]; then + checkconf="$checkconf -t $named_chrootdir" + fi + # Create a forwarder configuration based on /etc/resolv.conf if checkyesno named_auto_forward; then if [ ! -s /etc/resolv.conf ]; then @@ -202,7 +209,7 @@ named_prestart() [ -s "${named_confdir}/auto_forward.conf" ] && create_file ${named_confdir}/auto_forward.conf - ${command%/named}/named-checkconf $named_conf || + $checkconf $named_conf || err 3 'named-checkconf for $named_conf failed' return fi @@ -264,8 +271,7 @@ named_prestart() create_file ${named_confdir}/auto_forward.conf fi - ${command%/named}/named-checkconf $named_conf || - err 3 'named-checkconf for $named_conf failed' + $checkconf $named_conf || err 3 'named-checkconf for $named_conf failed' } load_rc_config $name @@ -273,7 +279,7 @@ load_rc_config $name # Updating the following variables requires that rc.conf be loaded first # required_dirs="$named_chrootdir" # if it is set, it must exist -required_files="${named_conf:=/etc/namedb/named.conf}" + pidfile="${named_pidfile:-/var/run/named/pid}" named_confdir="${named_chrootdir}${named_conf%/*}"