svn commit: r305957 - head/usr.bin/soelim
Author: ngie Date: Mon Sep 19 03:02:43 2016 New Revision: 305957 URL: https://svnweb.freebsd.org/changeset/base/305957 Log: Fix typo introduced in r305949 with the stable/10 bootstrapping logic The header is sys/capability.h, not sys/capabilities.h X-MFC with: r305949 Pointyhat to: bapt Reported by: allanjude, Jenkins Sponsored by: Dell EMC Isilon Modified: head/usr.bin/soelim/soelim.c Modified: head/usr.bin/soelim/soelim.c == --- head/usr.bin/soelim/soelim.cMon Sep 19 02:25:30 2016 (r305956) +++ head/usr.bin/soelim/soelim.cMon Sep 19 03:02:43 2016 (r305957) @@ -31,7 +31,7 @@ __FBSDID("$FreeBSD$"); #if __FreeBSD_version > 1001510 #include #else -#include +#include #endif #include ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r305956 - head/lib/libc/sys
Author: badger Date: Mon Sep 19 02:25:30 2016 New Revision: 305956 URL: https://svnweb.freebsd.org/changeset/base/305956 Log: Add manpage for rctl_* system calls Reviewed by: trasz, wblock Approved by: kib (mentor) MFC after:3 days Sponsored by: Dell Technologies Differential Revision:https://reviews.freebsd.org/D7877 Added: head/lib/libc/sys/rctl_add_rule.2 (contents, props changed) Modified: head/lib/libc/sys/Makefile.inc Modified: head/lib/libc/sys/Makefile.inc == --- head/lib/libc/sys/Makefile.inc Sun Sep 18 22:03:26 2016 (r305955) +++ head/lib/libc/sys/Makefile.inc Mon Sep 19 02:25:30 2016 (r305956) @@ -260,6 +260,7 @@ MAN+= abort2.2 \ pselect.2 \ ptrace.2 \ quotactl.2 \ + rctl_add_rule.2 \ read.2 \ readlink.2 \ reboot.2 \ @@ -423,6 +424,10 @@ MLINKS+=pdfork.2 pdgetpid.2\ pdfork.2 pdwait4.2 MLINKS+=pipe.2 pipe2.2 MLINKS+=poll.2 ppoll.2 +MLINKS+=rctl_add_rule.2 rctl_get_limits.2 \ + rctl_add_rule.2 rctl_get_racct.2 \ + rctl_add_rule.2 rctl_get_rules.2 \ + rctl_add_rule.2 rctl_remove_rule.2 MLINKS+=read.2 pread.2 \ read.2 preadv.2 \ read.2 readv.2 Added: head/lib/libc/sys/rctl_add_rule.2 == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/libc/sys/rctl_add_rule.2 Mon Sep 19 02:25:30 2016 (r305956) @@ -0,0 +1,220 @@ +.\" Copyright (c) 2016 Eric Badger +.\" All rights reserved. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\"notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\"notice, this list of conditions and the following disclaimer in the +.\"documentation and/or other materials provided with the distribution. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +.\" SUCH DAMAGE. +.\" +.\" $FreeBSD$ +.\" +.Dd September 14, 2016 +.Dt RCTL_ADD_RULE 2 +.Os +.Sh NAME +.Nm rctl_add_rule, +.Nm rctl_get_limits +.Nm rctl_get_racct, +.Nm rctl_get_rules, +.Nm rctl_remove_rule +.Nd manipulate and query the resource limits database +.Sh LIBRARY +.Lb libc +.Sh SYNOPSIS +.In sys/rctl.h +.Ft int +.Fo rctl_add_rule +.Fa "const char *inbufp" "size_t inbuflen" "char *outbufp" "size_t outbuflen" +.Fc +.Ft int +.Fo rctl_get_limits +.Fa "const char *inbufp" "size_t inbuflen" "char *outbufp" "size_t outbuflen" +.Fc +.Ft int +.Fo rctl_get_racct +.Fa "const char *inbufp" "size_t inbuflen" "char *outbufp" "size_t outbuflen" +.Fc +.Ft int +.Fo rctl_get_rules +.Fa "const char *inbufp" "size_t inbuflen" "char *outbufp" "size_t outbuflen" +.Fc +.Ft int +.Fo rctl_remove_rule +.Fa "const char *inbufp" "size_t inbuflen" "char *outbufp" "size_t outbuflen" +.Fc +.Sh DESCRIPTION +These system calls are used to manipulate and query the resource limits +database. +For all functions, +.Fa inbuflen +refers to the length of the buffer pointed to by +.Fa inbufp +and +.Fa outbuflen +refers to the length of the buffer pointed to by +.Fa outbufp . +.Pp +The +.Fn rctl_add_rule +function adds the rule pointed to by +.Fa inbufp +to the resource limits database. +The +.Fa outbufp +and +.Fa outbuflen +arguments are unused. +Rule format is as described in +.Xr rctl 8 , +with exceptions noted in the +.Sx RULES AND FILTERS +section. +.Pp +The +.Fn rctl_get_limits +function returns in +.Fa outbufp +a comma-separated list of rules that apply to the process that +matches the filter specified in +.Fa inbufp . +This includes rules with a subject of the process itself as well as rules +with a different subject (such as user or loginclass) that apply to the +process. +.Pp +The +.Fn rctl_get_racct +function returns resource usage information for a given subject. +The subject is specified by passing a filter in +.Fa inbufp . +Filter syntax is as described in +.Xr rctl 8 , +with exceptions noted in the
Re: svn commit: r305949 - head/usr.bin/soelim
On 2016-09-18 15:16, Baptiste Daroussin wrote: > Author: bapt > Date: Sun Sep 18 19:16:48 2016 > New Revision: 305949 > URL: https://svnweb.freebsd.org/changeset/base/305949 > > Log: > Simplify the fix for bootstrap tools > > building head is not supported from prior to stable/10 where sys/capsicum.h > was > named sys/capabilities.h > > Reported by:kib > > Modified: > head/usr.bin/soelim/soelim.c > > Modified: head/usr.bin/soelim/soelim.c > == > --- head/usr.bin/soelim/soelim.c Sun Sep 18 18:49:18 2016 > (r305948) > +++ head/usr.bin/soelim/soelim.c Sun Sep 18 19:16:48 2016 > (r305949) > @@ -30,6 +30,8 @@ __FBSDID("$FreeBSD$"); > #include > #if __FreeBSD_version > 1001510 > #include > +#else > +#include I am pretty sure this is spelled: sys/capability.h > #endif > #include > > @@ -163,10 +165,8 @@ main(int argc, char **argv) > int ret = 0; > int flags = 0; > char cwd[MAXPATHLEN]; > -#if __FreeBSD_version > 1001510 > unsigned long cmd; > cap_rights_t rights; > -#endif > > includes = sl_init(); > if (getcwd(cwd, sizeof(cwd)) != NULL) > @@ -200,7 +200,6 @@ main(int argc, char **argv) > rootfd = open("/", O_DIRECTORY | O_RDONLY); > if (rootfd == -1) > err(EXIT_FAILURE, "unable to open '/'"); > -#if __FreeBSD_version > 1001510 > cap_rights_init(, CAP_READ, CAP_FSTAT, CAP_IOCTL); > /* >* EBADF in case stdin is closed by the caller > @@ -227,7 +226,6 @@ main(int argc, char **argv) > > if (cap_enter() < 0 && errno != ENOSYS) > err(EXIT_FAILURE, "unable to enter capability mode"); > -#endif > > if (argc == 0) > ret = soelim_file(rootfd, stdin, flags); > -- Allan Jude ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r305955 - head/sys/compat/freebsd32
Author: kib Date: Sun Sep 18 22:03:26 2016 New Revision: 305955 URL: https://svnweb.freebsd.org/changeset/base/305955 Log: Regen. Modified: head/sys/compat/freebsd32/freebsd32_proto.h head/sys/compat/freebsd32/freebsd32_syscall.h head/sys/compat/freebsd32/freebsd32_syscalls.c head/sys/compat/freebsd32/freebsd32_sysent.c head/sys/compat/freebsd32/freebsd32_systrace_args.c Modified: head/sys/compat/freebsd32/freebsd32_proto.h == --- head/sys/compat/freebsd32/freebsd32_proto.h Sun Sep 18 22:03:07 2016 (r305954) +++ head/sys/compat/freebsd32/freebsd32_proto.h Sun Sep 18 22:03:26 2016 (r305955) @@ -3,7 +3,7 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: head/sys/compat/freebsd32/syscalls.master 304395 2016-08-18 10:50:40Z gnn + * created from FreeBSD: head/sys/compat/freebsd32/syscalls.master 305954 2016-09-18 22:03:07Z kib */ #ifndef _FREEBSD32_SYSPROTO_H_ @@ -578,9 +578,6 @@ struct freebsd32_shmctl_args { char cmd_l_[PADL_(int)]; int cmd; char cmd_r_[PADR_(int)]; char buf_l_[PADL_(struct shmid_ds32 *)]; struct shmid_ds32 * buf; char buf_r_[PADR_(struct shmid_ds32 *)]; }; -struct freebsd32_cap_enter_args { - register_t dummy; -}; struct freebsd32_pselect_args { char nd_l_[PADL_(int)]; int nd; char nd_r_[PADR_(int)]; char in_l_[PADL_(fd_set *)]; fd_set * in; char in_r_[PADR_(fd_set *)]; @@ -798,7 +795,6 @@ int freebsd32_jail_set(struct thread *, intfreebsd32_semctl(struct thread *, struct freebsd32_semctl_args *); intfreebsd32_msgctl(struct thread *, struct freebsd32_msgctl_args *); intfreebsd32_shmctl(struct thread *, struct freebsd32_shmctl_args *); -intfreebsd32_cap_enter(struct thread *, struct freebsd32_cap_enter_args *); intfreebsd32_pselect(struct thread *, struct freebsd32_pselect_args *); #ifdef PAD64_REQUIRED intfreebsd32_posix_fallocate(struct thread *, struct freebsd32_posix_fallocate_args *); @@ -1258,7 +1254,6 @@ int freebsd10_freebsd32_pipe(struct thre #defineFREEBSD32_SYS_AUE_freebsd32_semctl AUE_SEMCTL #defineFREEBSD32_SYS_AUE_freebsd32_msgctl AUE_MSGCTL #defineFREEBSD32_SYS_AUE_freebsd32_shmctl AUE_SHMCTL -#defineFREEBSD32_SYS_AUE_freebsd32_cap_enter AUE_CAP_ENTER #defineFREEBSD32_SYS_AUE_freebsd32_pselect AUE_SELECT #defineFREEBSD32_SYS_AUE_freebsd32_posix_fallocate AUE_NULL #defineFREEBSD32_SYS_AUE_freebsd32_posix_fadvise AUE_NULL Modified: head/sys/compat/freebsd32/freebsd32_syscall.h == --- head/sys/compat/freebsd32/freebsd32_syscall.h Sun Sep 18 22:03:07 2016(r305954) +++ head/sys/compat/freebsd32/freebsd32_syscall.h Sun Sep 18 22:03:26 2016(r305955) @@ -3,7 +3,7 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: head/sys/compat/freebsd32/syscalls.master 304395 2016-08-18 10:50:40Z gnn + * created from FreeBSD: head/sys/compat/freebsd32/syscalls.master 305954 2016-09-18 22:03:07Z kib */ #defineFREEBSD32_SYS_syscall 0 @@ -420,7 +420,7 @@ #defineFREEBSD32_SYS_lpathconf 513 /* 514 is obsolete cap_new */ #defineFREEBSD32_SYS___cap_rights_get 515 -#defineFREEBSD32_SYS_freebsd32_cap_enter 516 +#defineFREEBSD32_SYS_cap_enter 516 #defineFREEBSD32_SYS_cap_getmode 517 #defineFREEBSD32_SYS_pdfork518 #defineFREEBSD32_SYS_pdkill519 Modified: head/sys/compat/freebsd32/freebsd32_syscalls.c == --- head/sys/compat/freebsd32/freebsd32_syscalls.c Sun Sep 18 22:03:07 2016(r305954) +++ head/sys/compat/freebsd32/freebsd32_syscalls.c Sun Sep 18 22:03:26 2016(r305955) @@ -3,7 +3,7 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: head/sys/compat/freebsd32/syscalls.master 304395 2016-08-18 10:50:40Z gnn + * created from FreeBSD: head/sys/compat/freebsd32/syscalls.master 305954 2016-09-18 22:03:07Z kib */ const char *freebsd32_syscallnames[] = { @@ -539,7 +539,7 @@ const char *freebsd32_syscallnames[] = { "lpathconf",/* 513 = lpathconf */ "obs_cap_new", /* 514 = obsolete cap_new */ "__cap_rights_get", /* 515 = __cap_rights_get */ - "freebsd32_cap_enter", /* 516 = freebsd32_cap_enter */ + "cap_enter",/* 516 = cap_enter */ "cap_getmode", /* 517 = cap_getmode */ "pdfork", /* 518 = pdfork */ "pdkill", /* 519 = pdkill
svn commit: r305954 - head/sys/compat/freebsd32
Author: kib Date: Sun Sep 18 22:03:07 2016 New Revision: 305954 URL: https://svnweb.freebsd.org/changeset/base/305954 Log: Add compat32 support for capsicum. Reviewed by: bapt, emaste Sponsored by: The FreeBSD Foundation MFC after:2 weeks Differential revision:https://reviews.freebsd.org/D7942 Added: head/sys/compat/freebsd32/capabilities.conf - copied, changed from r305950, head/sys/kern/capabilities.conf Modified: head/sys/compat/freebsd32/Makefile head/sys/compat/freebsd32/freebsd32_capability.c head/sys/compat/freebsd32/syscalls.master Modified: head/sys/compat/freebsd32/Makefile == --- head/sys/compat/freebsd32/Makefile Sun Sep 18 21:28:09 2016 (r305953) +++ head/sys/compat/freebsd32/Makefile Sun Sep 18 22:03:07 2016 (r305954) @@ -8,7 +8,7 @@ all: sysent: freebsd32_sysent.c freebsd32_syscall.h freebsd32_proto.h freebsd32_systrace_args.c freebsd32_sysent.c freebsd32_syscalls.c freebsd32_syscall.h freebsd32_proto.h freebsd32_systrace_args.c : \ - ../../kern/makesyscalls.sh syscalls.master syscalls.conf + ../../kern/makesyscalls.sh syscalls.master syscalls.conf capabilities.conf sh ../../kern/makesyscalls.sh syscalls.master syscalls.conf clean: Copied and modified: head/sys/compat/freebsd32/capabilities.conf (from r305950, head/sys/kern/capabilities.conf) == --- head/sys/kern/capabilities.conf Sun Sep 18 20:00:17 2016 (r305950, copy source) +++ head/sys/compat/freebsd32/capabilities.conf Sun Sep 18 22:03:07 2016 (r305954) @@ -1,10 +1,14 @@ ## ## Copyright (c) 2008-2010 Robert N. M. Watson +## Copyright (c) 2016 The FreeBSD Foundation ## All rights reserved. ## ## This software was developed at the University of Cambridge Computer ## Laboratory with support from a grant from Google, Inc. ## +## Portions of this software were developed by Konstantin Belousov +## under sponsorship from the FreeBSD Foundation. +## ## Redistribution and use in source and binary forms, with or without ## modification, are permitted provided that the following conditions ## are met: @@ -26,20 +30,14 @@ ## OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF ## SUCH DAMAGE. ## -## List of system calls enabled in capability mode, one name per line. -## -## Notes: -## - sys_exit(2), abort2(2) and close(2) are very important. -## - Sorted alphabetically, please keep it that way. +## List of system calls enabled in freebsd32 capability mode, one name +## per line. See the original list in the sys/kern/capabilities.conf. +## Position of the compat syscall in this file must be identical to +## the master, to facilitate comparision and diagnostic. ## ## $FreeBSD$ ## -## -## Allow ACL and MAC label operations by file descriptor, subject to -## capability rights. Allow MAC label operations on the current process but -## we will need to scope __mac_get_pid(2). -## __acl_aclcheck_fd __acl_delete_fd __acl_get_fd @@ -49,249 +47,82 @@ __mac_get_fd __mac_get_proc __mac_set_fd __mac_set_proc - -## -## Allow sysctl(2) as we scope internal to the call; this is a global -## namespace, but there are several critical sysctls required for almost -## anything to run, such as hw.pagesize. For now that policy lives in the -## kernel for performance and simplicity, but perhaps it could move to a -## proxying daemon in userspace. -## -__sysctl - -## -## Allow umtx operations as these are scoped by address space. -## -## XXRW: Need to check this very carefully. -## -_umtx_op - -## -## Allow process termination using abort2(2). -## +freebsd32_sysctl +freebsd32_umtx_op abort2 - -## -## Allow accept(2) since it doesn't manipulate namespaces directly, rather -## relies on existing bindings on a socket, subject to capability rights. -## accept accept4 - -## -## Allow AIO operations by file descriptor, subject to capability rights. -## aio_cancel -aio_error +freebsd32_aio_error aio_fsync -aio_read -aio_return -aio_suspend -aio_waitcomplete -aio_write - -## -## audit(2) is a global operation, submitting to the global trail, but it is -## controlled by privilege, and it might be useful to be able to submit -## records from sandboxes. For now, disallow, but we may want to think about -## providing some sort of proxy service for this. -## +freebsd32_aio_read +freebsd32_aio_return +freebsd32_aio_suspend +freebsd32_aio_waitcomplete +freebsd32_aio_write #audit - -## -## Allow bindat(2). -## bindat - -## -## Allow capability mode and capability system calls. -## cap_enter cap_fcntls_get cap_fcntls_limit cap_getmode -cap_ioctls_get -cap_ioctls_limit +freebsd32_cap_ioctls_get +freebsd32_cap_ioctls_limit __cap_rights_get cap_rights_limit - -## -## Allow read-only clock operations. -## -clock_getres -clock_gettime - -## -## Always allow file
svn commit: r305953 - in head/sys: dev/bhnd mips/broadcom
Author: landonf Date: Sun Sep 18 21:28:09 2016 New Revision: 305953 URL: https://svnweb.freebsd.org/changeset/base/305953 Log: Split bcm_mipscore.c into bcm_bmips (BMIPS32/BMIPS3300) and bcm_mips74k drivers. The BMIPS32/BMIPS3300 cores use a register layout distinct from the MIPS74K core, and are only found on siba(4) devices. Reviewed by: mizhka Approved by: adrian (mentor) Differential Revision:https://reviews.freebsd.org/D7791 Added: head/sys/mips/broadcom/bcm_bmips.c (contents, props changed) head/sys/mips/broadcom/bcm_bmips_exts.h - copied, changed from r305952, head/sys/mips/broadcom/bcm_mips_exts.h head/sys/mips/broadcom/bcm_bmipsreg.h (contents, props changed) head/sys/mips/broadcom/bcm_mips74k.c - copied, changed from r305952, head/sys/mips/broadcom/bcm_mipscore.c head/sys/mips/broadcom/bcm_mips74kreg.h - copied, changed from r305952, head/sys/mips/broadcom/bcm_mipscore.h Deleted: head/sys/mips/broadcom/bcm_mips_exts.h head/sys/mips/broadcom/bcm_mipscore.c head/sys/mips/broadcom/bcm_mipscore.h Modified: head/sys/dev/bhnd/bhnd_subr.c head/sys/mips/broadcom/bcm_machdep.c head/sys/mips/broadcom/files.broadcom Modified: head/sys/dev/bhnd/bhnd_subr.c == --- head/sys/dev/bhnd/bhnd_subr.c Sun Sep 18 20:47:55 2016 (r305952) +++ head/sys/dev/bhnd/bhnd_subr.c Sun Sep 18 21:28:09 2016 (r305953) @@ -68,7 +68,7 @@ static const struct bhnd_core_desc { BHND_CDESC(BCM, SRAM, RAM,"SRAM"), BHND_CDESC(BCM, SDRAM, RAM,"SDRAM"), BHND_CDESC(BCM, PCI,PCI,"PCI Bridge"), - BHND_CDESC(BCM, MIPS, CPU,"MIPS Core"), + BHND_CDESC(BCM, MIPS, CPU,"BMIPS CPU"), BHND_CDESC(BCM, ENET, ENET_MAC, "Fast Ethernet MAC"), BHND_CDESC(BCM, CODEC, OTHER, "V.90 Modem Codec"), BHND_CDESC(BCM, USB,USB_DUAL, "USB 1.1 Device/Host Controller"), @@ -85,7 +85,7 @@ static const struct bhnd_core_desc { BHND_CDESC(BCM, APHY, WLAN_PHY, "802.11a PHY"), BHND_CDESC(BCM, BPHY, WLAN_PHY, "802.11b PHY"), BHND_CDESC(BCM, GPHY, WLAN_PHY, "802.11g PHY"), - BHND_CDESC(BCM, MIPS33, CPU,"MIPS3302 Core"), + BHND_CDESC(BCM, MIPS33, CPU,"BMIPS33 CPU"), BHND_CDESC(BCM, USB11H, USB_HOST, "USB 1.1 Host Controller"), BHND_CDESC(BCM, USB11D, USB_DEV,"USB 1.1 Device Controller"), BHND_CDESC(BCM, USB20H, USB_HOST, "USB 2.0 Host Controller"), Added: head/sys/mips/broadcom/bcm_bmips.c == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/mips/broadcom/bcm_bmips.c Sun Sep 18 21:28:09 2016 (r305953) @@ -0,0 +1,123 @@ +/*- + * Copyright (c) 2016 Landon Fuller+ * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + *notice, this list of conditions and the following disclaimer, + *without modification. + * 2. Redistributions in binary form must reproduce at minimum a disclaimer + *similar to the "NO WARRANTY" disclaimer below ("Disclaimer") and any + *redistribution must be conditioned upon including a substantially + *similar Disclaimer requirement for further binary redistribution. + * + * NO WARRANTY + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF NONINFRINGEMENT, MERCHANTIBILITY + * AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL + * THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, + * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF + * THE POSSIBILITY OF SUCH DAMAGES. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include + +#include +#include +#include + +#include + +#include "bcm_bmipsreg.h" + +/* + * BMIPS32 and BMIPS3300 core driver. + * + * These cores are only found on siba(4) chipsets, allowing + * us to assume the availability of siba interrupt registers. + */ + +static const struct
svn commit: r305951 - head/usr.bin/elfdump
Author: emaste Date: Sun Sep 18 20:23:26 2016 New Revision: 305951 URL: https://svnweb.freebsd.org/changeset/base/305951 Log: elfdump: adjust stdout/stderr capabilities stdio uses fstat and the TIOCGETA ioctl. Also collapse the cap_rights_limit and new cap_ioctls_limit calls into one if statement. Errors here are not actionable by the user and distinguishing stdout from stderr doesn't really have value. Reported by: kib Reviewed by: allanjude, bapt MFC after:1 week Sponsored by: The FreeBSD Foundation Differential Revision:https://reviews.freebsd.org/D7944 Modified: head/usr.bin/elfdump/elfdump.c Modified: head/usr.bin/elfdump/elfdump.c == --- head/usr.bin/elfdump/elfdump.c Sun Sep 18 20:00:17 2016 (r305950) +++ head/usr.bin/elfdump/elfdump.c Sun Sep 18 20:23:26 2016 (r305951) @@ -44,6 +44,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #defineED_DYN (1<<0) @@ -504,6 +505,7 @@ main(int ac, char **av) u_int64_t name; u_int64_t type; struct stat sb; + unsigned long cmd; u_int flags; Elf32_Ehdr *e; void *p; @@ -572,11 +574,13 @@ main(int ac, char **av) if (cap_rights_limit(fd, ) < 0 && errno != ENOSYS) err(1, "unable to limit rights for %s", *av); close(STDIN_FILENO); - cap_rights_init(, CAP_WRITE); - if (cap_rights_limit(STDOUT_FILENO, ) < 0 && errno != ENOSYS) - err(1, "unable to limit rights for stdout"); - if (cap_rights_limit(STDERR_FILENO, ) < 0 && errno != ENOSYS) - err(1, "unable to limit rights for stderr"); + cap_rights_init(, CAP_FSTAT, CAP_IOCTL, CAP_WRITE); + cmd = TIOCGETA; /* required by isatty(3) in printf(3) */ + if ((cap_rights_limit(STDOUT_FILENO, ) < 0 && errno != ENOSYS) || + (cap_ioctls_limit(STDOUT_FILENO, , 1) < 0 && errno != ENOSYS) || + (cap_rights_limit(STDERR_FILENO, ) < 0 && errno != ENOSYS) || + (cap_ioctls_limit(STDERR_FILENO, , 1) < 0 && errno != ENOSYS)) + err(1, "unable to limit rights for stdout/stderr"); if (cap_enter() < 0 && errno != ENOSYS) err(1, "unable to enter capability mode"); e = mmap(NULL, sb.st_size, PROT_READ, MAP_SHARED, fd, 0); ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r305949 - head/usr.bin/soelim
Author: bapt Date: Sun Sep 18 19:16:48 2016 New Revision: 305949 URL: https://svnweb.freebsd.org/changeset/base/305949 Log: Simplify the fix for bootstrap tools building head is not supported from prior to stable/10 where sys/capsicum.h was named sys/capabilities.h Reported by: kib Modified: head/usr.bin/soelim/soelim.c Modified: head/usr.bin/soelim/soelim.c == --- head/usr.bin/soelim/soelim.cSun Sep 18 18:49:18 2016 (r305948) +++ head/usr.bin/soelim/soelim.cSun Sep 18 19:16:48 2016 (r305949) @@ -30,6 +30,8 @@ __FBSDID("$FreeBSD$"); #include #if __FreeBSD_version > 1001510 #include +#else +#include #endif #include @@ -163,10 +165,8 @@ main(int argc, char **argv) int ret = 0; int flags = 0; char cwd[MAXPATHLEN]; -#if __FreeBSD_version > 1001510 unsigned long cmd; cap_rights_t rights; -#endif includes = sl_init(); if (getcwd(cwd, sizeof(cwd)) != NULL) @@ -200,7 +200,6 @@ main(int argc, char **argv) rootfd = open("/", O_DIRECTORY | O_RDONLY); if (rootfd == -1) err(EXIT_FAILURE, "unable to open '/'"); -#if __FreeBSD_version > 1001510 cap_rights_init(, CAP_READ, CAP_FSTAT, CAP_IOCTL); /* * EBADF in case stdin is closed by the caller @@ -227,7 +226,6 @@ main(int argc, char **argv) if (cap_enter() < 0 && errno != ENOSYS) err(EXIT_FAILURE, "unable to enter capability mode"); -#endif if (argc == 0) ret = soelim_file(rootfd, stdin, flags); ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r305948 - head/usr.bin/soelim
Author: bapt Date: Sun Sep 18 18:49:18 2016 New Revision: 305948 URL: https://svnweb.freebsd.org/changeset/base/305948 Log: Fix building as bootstrap tools on pre-capsicum.h systems Modified: head/usr.bin/soelim/soelim.c Modified: head/usr.bin/soelim/soelim.c == --- head/usr.bin/soelim/soelim.cSun Sep 18 18:40:27 2016 (r305947) +++ head/usr.bin/soelim/soelim.cSun Sep 18 18:49:18 2016 (r305948) @@ -27,7 +27,10 @@ #include __FBSDID("$FreeBSD$"); +#include +#if __FreeBSD_version > 1001510 #include +#endif #include #include @@ -159,9 +162,11 @@ main(int argc, char **argv) int ch, i, rootfd; int ret = 0; int flags = 0; - unsigned long cmd; char cwd[MAXPATHLEN]; +#if __FreeBSD_version > 1001510 + unsigned long cmd; cap_rights_t rights; +#endif includes = sl_init(); if (getcwd(cwd, sizeof(cwd)) != NULL) @@ -192,6 +197,10 @@ main(int argc, char **argv) argc -= optind; argv += optind; + rootfd = open("/", O_DIRECTORY | O_RDONLY); + if (rootfd == -1) + err(EXIT_FAILURE, "unable to open '/'"); +#if __FreeBSD_version > 1001510 cap_rights_init(, CAP_READ, CAP_FSTAT, CAP_IOCTL); /* * EBADF in case stdin is closed by the caller @@ -204,9 +213,6 @@ main(int argc, char **argv) err(EXIT_FAILURE, "unable to limit rights for stdout"); if (cap_rights_limit(STDERR_FILENO, ) < 0 && errno != ENOSYS) err(EXIT_FAILURE, "unable to limit rights for stderr"); - rootfd = open("/", O_DIRECTORY | O_RDONLY); - if (rootfd == -1) - err(EXIT_FAILURE, "unable to open '/'"); cap_rights_init(, CAP_READ, CAP_LOOKUP, CAP_FSTAT, CAP_FCNTL); if (cap_rights_limit(rootfd, ) < 0 && errno != ENOSYS) err(EXIT_FAILURE, "unable to limit rights"); @@ -221,6 +227,7 @@ main(int argc, char **argv) if (cap_enter() < 0 && errno != ENOSYS) err(EXIT_FAILURE, "unable to enter capability mode"); +#endif if (argc == 0) ret = soelim_file(rootfd, stdin, flags); ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r305947 - head/sys/boot/efi/include
Author: kib Date: Sun Sep 18 18:40:27 2016 New Revision: 305947 URL: https://svnweb.freebsd.org/changeset/base/305947 Log: Add comment for the closing guard. Requested by: tsoome MFC after:1 week Modified: head/sys/boot/efi/include/efilib.h Modified: head/sys/boot/efi/include/efilib.h == --- head/sys/boot/efi/include/efilib.h Sun Sep 18 18:27:28 2016 (r305946) +++ head/sys/boot/efi/include/efilib.h Sun Sep 18 18:40:27 2016 (r305947) @@ -65,4 +65,4 @@ EFI_STATUS main(int argc, CHAR16 *argv[] void exit(EFI_STATUS status); void delay(int usecs); -#endif +#endif /* _LOADER_EFILIB_H */ ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r305946 - head
Author: bapt Date: Sun Sep 18 18:27:28 2016 New Revision: 305946 URL: https://svnweb.freebsd.org/changeset/base/305946 Log: Sperify that users can find rcs and rcs57 in ports Reported by: cy Modified: head/UPDATING Modified: head/UPDATING == --- head/UPDATING Sun Sep 18 18:03:06 2016(r305945) +++ head/UPDATING Sun Sep 18 18:27:28 2016(r305946) @@ -34,6 +34,9 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 12 20160918: GNU rcs has been turned off by default. It can (temporarily) be built again by adding WITH_RCS knob in src.conf. + Otherwise, GNU rcs is available from packages: + - rcs: Latest GPLv3 GNU rcs version. + - rcs57: Copy of the latest version of GNU rcs (GPLv2) from base. 20160918: The backup_uses_rcs functionality has been removed from rc.subr. ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r305930 - head/usr.sbin/freebsd-update
In message <201609181448.u8iemsnm060...@repo.freebsd.org>, Baptiste Daroussin w rites: > Author: bapt > Date: Sun Sep 18 14:48:28 2016 > New Revision: 305930 > URL: https://svnweb.freebsd.org/changeset/base/305930 > > Log: > In preparation for removal of GNU rcs, replace merge(1) usage with direct > diff3(1) usage When we do finally remove GNU RCS from base we should update UPDATING to say that ports/devel/rcs57 is 100% compatible with RCS presently in base/. ports/devel/rcs is not 100% compatible. Ports that depend on RCS should use devel/rcs57 (unless of course a base/rcs port is planned). -- Cheers, Cy SchubertFreeBSD UNIX: Web: http://www.FreeBSD.org The need of the many outweighs the greed of the few. ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r305945 - head/usr.bin/soelim
Author: bapt Date: Sun Sep 18 18:03:06 2016 New Revision: 305945 URL: https://svnweb.freebsd.org/changeset/base/305945 Log: Better error checking if getcwd fails: just ignore it and do not try to adding to the list of possible path where to find the files. if fdopen fails, warn and return NULL the rest of the code knows how to deal with it Reported by: oshogbo Modified: head/usr.bin/soelim/soelim.c Modified: head/usr.bin/soelim/soelim.c == --- head/usr.bin/soelim/soelim.cSun Sep 18 17:56:14 2016 (r305944) +++ head/usr.bin/soelim/soelim.cSun Sep 18 18:03:06 2016 (r305945) @@ -68,6 +68,7 @@ relpath(const char *path) static FILE * soelim_fopen(int rootfd, const char *name) { + FILE *f = NULL; char path[PATH_MAX]; size_t i; int fd; @@ -75,8 +76,10 @@ soelim_fopen(int rootfd, const char *nam if (strcmp(name, "-") == 0) return (stdin); - if ((fd = openat(rootfd, relpath(name), O_RDONLY)) != -1) - return (fdopen(fd, "r")); + if ((fd = openat(rootfd, relpath(name), O_RDONLY)) != -1) { + f = fdopen(fd, "r"); + goto out; + } if (*name == '/') { warn("can't open '%s'", name); @@ -86,13 +89,17 @@ soelim_fopen(int rootfd, const char *nam for (i = 0; i < includes->sl_cur; i++) { snprintf(path, sizeof(path), "%s/%s", includes->sl_str[i], name); - if ((fd = openat(rootfd, relpath(path), O_RDONLY)) != -1) - return (fdopen(fd, "r")); + if ((fd = openat(rootfd, relpath(path), O_RDONLY)) != -1) { + f = fdopen(fd, "r"); + break; + } } - warn("can't open '%s'", name); +out: + if (f == NULL) + warn("can't open '%s'", name); - return (NULL); + return (f); } static int @@ -157,7 +164,9 @@ main(int argc, char **argv) cap_rights_t rights; includes = sl_init(); - sl_add(includes, getcwd(cwd, sizeof(cwd))); + if (getcwd(cwd, sizeof(cwd)) != NULL) + sl_add(includes, cwd); + if (includes == NULL) err(EXIT_FAILURE, "sl_init()"); @@ -196,6 +205,8 @@ main(int argc, char **argv) if (cap_rights_limit(STDERR_FILENO, ) < 0 && errno != ENOSYS) err(EXIT_FAILURE, "unable to limit rights for stderr"); rootfd = open("/", O_DIRECTORY | O_RDONLY); + if (rootfd == -1) + err(EXIT_FAILURE, "unable to open '/'"); cap_rights_init(, CAP_READ, CAP_LOOKUP, CAP_FSTAT, CAP_FCNTL); if (cap_rights_limit(rootfd, ) < 0 && errno != ENOSYS) err(EXIT_FAILURE, "unable to limit rights"); ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r305944 - head/usr.bin/soelim
Author: bapt Date: Sun Sep 18 17:56:14 2016 New Revision: 305944 URL: https://svnweb.freebsd.org/changeset/base/305944 Log: style(9) fix Reported by: oshogbo Modified: head/usr.bin/soelim/soelim.c Modified: head/usr.bin/soelim/soelim.c == --- head/usr.bin/soelim/soelim.cSun Sep 18 17:41:16 2016 (r305943) +++ head/usr.bin/soelim/soelim.cSun Sep 18 17:56:14 2016 (r305944) @@ -58,6 +58,7 @@ usage(void) static const char * relpath(const char *path) { + while (*path == '/' && *path != '\0') path++; ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r305943 - head/sys/boot/efi/loader/arch/amd64
Author: kib Date: Sun Sep 18 17:41:16 2016 New Revision: 305943 URL: https://svnweb.freebsd.org/changeset/base/305943 Log: Utilize pmap.h names for constants and types used to construct EFI trampoline page table. Also do some style cleanup. Reviewed by: imp Sponsored by: The FreeBSD Foundation MFC after:1 week Differential revision:https://reviews.freebsd.org/D7934 Modified: head/sys/boot/efi/loader/arch/amd64/elf64_freebsd.c Modified: head/sys/boot/efi/loader/arch/amd64/elf64_freebsd.c == --- head/sys/boot/efi/loader/arch/amd64/elf64_freebsd.c Sun Sep 18 17:38:02 2016(r305942) +++ head/sys/boot/efi/loader/arch/amd64/elf64_freebsd.c Sun Sep 18 17:41:16 2016(r305943) @@ -35,6 +35,8 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include +#include #include #include @@ -57,8 +59,14 @@ extern int bi_load(char *args, vm_offset static int elf64_exec(struct preloaded_file *amp); static int elf64_obj_exec(struct preloaded_file *amp); -static struct file_format amd64_elf = { elf64_loadfile, elf64_exec }; -static struct file_format amd64_elf_obj = { elf64_obj_loadfile, elf64_obj_exec }; +static struct file_format amd64_elf = { + .l_load = elf64_loadfile, + .l_exec = elf64_exec, +}; +static struct file_format amd64_elf_obj = { + .l_load = elf64_obj_loadfile, + .l_exec = elf64_obj_exec, +}; struct file_format *file_formats[] = { _elf, @@ -66,21 +74,12 @@ struct file_format *file_formats[] = { NULL }; -#define PG_V0x001 -#define PG_RW 0x002 -#define PG_U0x004 -#define PG_PS 0x080 - -typedef u_int64_t p4_entry_t; -typedef u_int64_t p3_entry_t; -typedef u_int64_t p2_entry_t; -static p4_entry_t *PT4; -static p3_entry_t *PT3; -static p2_entry_t *PT2; +static pml4_entry_t *PT4; +static pdp_entry_t *PT3; +static pd_entry_t *PT2; static void (*trampoline)(uint64_t stack, void *copy_finish, uint64_t kernend, - uint64_t modulep, p4_entry_t *pagetable, - uint64_t entry); +uint64_t modulep, pml4_entry_t *pagetable, uint64_t entry); extern uintptr_t amd64_tramp; extern uint32_t amd64_tramp_size; @@ -157,7 +156,7 @@ elf64_exec(struct preloaded_file *fp) bcopy((void *)_tramp, (void *)trampcode, amd64_tramp_size); trampoline = (void *)trampcode; - PT4 = (p4_entry_t *)0x4000; + PT4 = (pml4_entry_t *)0x4000; err = BS->AllocatePages(AllocateMaxAddress, EfiLoaderData, 3, (EFI_PHYSICAL_ADDRESS *)); bzero(PT4, 3 * EFI_PAGE_SIZE); @@ -172,11 +171,11 @@ elf64_exec(struct preloaded_file *fp) */ for (i = 0; i < 512; i++) { /* Each slot of the L4 pages points to the same L3 page. */ - PT4[i] = (p4_entry_t)PT3; + PT4[i] = (pml4_entry_t)PT3; PT4[i] |= PG_V | PG_RW | PG_U; /* Each slot of the L3 pages points to the same L2 page. */ - PT3[i] = (p3_entry_t)PT2; + PT3[i] = (pdp_entry_t)PT2; PT3[i] |= PG_V | PG_RW | PG_U; /* The L2 page slots are mapped with 2MB pages for 1GB. */ @@ -204,5 +203,6 @@ elf64_exec(struct preloaded_file *fp) static int elf64_obj_exec(struct preloaded_file *fp) { + return (EFTYPE); } ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r305942 - in head: sbin/sysctl sys/amd64/amd64 sys/arm/arm sys/arm64/arm64 sys/sys
Author: kib Date: Sun Sep 18 17:38:02 2016 New Revision: 305942 URL: https://svnweb.freebsd.org/changeset/base/305942 Log: Consolidate four efi_next_descriptor() definitions. Sponsored by: The FreeBSD Foundation MFC after:1 week Modified: head/sbin/sysctl/sysctl.c head/sys/amd64/amd64/machdep.c head/sys/arm/arm/machdep.c head/sys/arm64/arm64/machdep.c head/sys/sys/efi.h Modified: head/sbin/sysctl/sysctl.c == --- head/sbin/sysctl/sysctl.c Sun Sep 18 17:35:24 2016(r305941) +++ head/sbin/sysctl/sysctl.c Sun Sep 18 17:38:02 2016(r305942) @@ -637,9 +637,6 @@ S_vmtotal(size_t l2, void *p) } #ifdef __amd64__ -#define efi_next_descriptor(ptr, size) \ - ((struct efi_md *)(((uint8_t *) ptr) + size)) - static int S_efi_map(size_t l2, void *p) { Modified: head/sys/amd64/amd64/machdep.c == --- head/sys/amd64/amd64/machdep.c Sun Sep 18 17:35:24 2016 (r305941) +++ head/sys/amd64/amd64/machdep.c Sun Sep 18 17:38:02 2016 (r305942) @@ -1056,9 +1056,6 @@ bios_add_smap_entries(struct bios_smap * } } -#define efi_next_descriptor(ptr, size) \ - ((struct efi_md *)(((uint8_t *) ptr) + size)) - static void add_efi_map_entries(struct efi_map_header *efihdr, vm_paddr_t *physmap, int *physmap_idx) Modified: head/sys/arm/arm/machdep.c == --- head/sys/arm/arm/machdep.c Sun Sep 18 17:35:24 2016(r305941) +++ head/sys/arm/arm/machdep.c Sun Sep 18 17:38:02 2016(r305942) @@ -1398,9 +1398,6 @@ set_stackptrs(int cpu) #endif #ifdef EFI -#define efi_next_descriptor(ptr, size) \ - ((struct efi_md *)(((uint8_t *) ptr) + size)) - static void add_efi_map_entries(struct efi_map_header *efihdr, struct mem_region *mr, int *mrcnt) Modified: head/sys/arm64/arm64/machdep.c == --- head/sys/arm64/arm64/machdep.c Sun Sep 18 17:35:24 2016 (r305941) +++ head/sys/arm64/arm64/machdep.c Sun Sep 18 17:38:02 2016 (r305942) @@ -699,9 +699,6 @@ add_fdt_mem_regions(struct mem_region *m } #endif -#define efi_next_descriptor(ptr, size) \ - ((struct efi_md *)(((uint8_t *) ptr) + size)) - static void add_efi_map_entries(struct efi_map_header *efihdr, vm_paddr_t *physmap, u_int *physmap_idxp) Modified: head/sys/sys/efi.h == --- head/sys/sys/efi.h Sun Sep 18 17:35:24 2016(r305941) +++ head/sys/sys/efi.h Sun Sep 18 17:38:02 2016(r305942) @@ -90,6 +90,9 @@ struct efi_md { #defineEFI_MD_ATTR_RT 0x8000UL }; +#define efi_next_descriptor(ptr, size) \ +((struct efi_md *)(((uint8_t *)(ptr)) + (size))) + struct efi_tm { uint16_ttm_year;/* 1998 - 20XX */ uint8_t tm_mon; /* 1 - 12 */ ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r305941 - head/sys/boot/efi/include
Author: kib Date: Sun Sep 18 17:35:24 2016 New Revision: 305941 URL: https://svnweb.freebsd.org/changeset/base/305941 Log: Add double-inclusion protection. Sponsored by: The FreeBSD Foundation MFC after:1 week Modified: head/sys/boot/efi/include/efilib.h Modified: head/sys/boot/efi/include/efilib.h == --- head/sys/boot/efi/include/efilib.h Sun Sep 18 17:35:17 2016 (r305940) +++ head/sys/boot/efi/include/efilib.h Sun Sep 18 17:35:24 2016 (r305941) @@ -27,6 +27,9 @@ * $FreeBSD$ */ +#ifndef _LOADER_EFILIB_H +#define_LOADER_EFILIB_H + #include extern EFI_HANDLE IH; @@ -61,3 +64,5 @@ void efi_time_fini(void); EFI_STATUS main(int argc, CHAR16 *argv[]); void exit(EFI_STATUS status); void delay(int usecs); + +#endif ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r305940 - head/sys/netpfil/ipfw
Author: ae Date: Sun Sep 18 17:35:17 2016 New Revision: 305940 URL: https://svnweb.freebsd.org/changeset/base/305940 Log: Move opcode rewriter init and destroy handlers into non-VENT code. PR: 212576,212649,212077 Submitted by: John Zielinski MFC after:1 week Modified: head/sys/netpfil/ipfw/ip_fw2.c Modified: head/sys/netpfil/ipfw/ip_fw2.c == --- head/sys/netpfil/ipfw/ip_fw2.c Sun Sep 18 17:33:49 2016 (r305939) +++ head/sys/netpfil/ipfw/ip_fw2.c Sun Sep 18 17:35:17 2016 (r305940) @@ -2710,6 +2710,7 @@ ipfw_init(void) default_fw_tables = IPFW_TABLES_MAX; ipfw_init_sopt_handler(); + ipfw_init_obj_rewriter(); ipfw_iface_init(); return (error); } @@ -2723,6 +2724,7 @@ ipfw_destroy(void) ipfw_iface_destroy(); ipfw_destroy_sopt_handler(); + ipfw_destroy_obj_rewriter(); printf("IP firewall unloaded\n"); } @@ -2757,7 +2759,6 @@ vnet_ipfw_init(const void *unused) /* Init shared services hash table */ ipfw_init_srv(chain); - ipfw_init_obj_rewriter(); ipfw_init_counters(); /* insert the default rule and create the initial map */ chain->n_rules = 1; @@ -2862,7 +2863,6 @@ vnet_ipfw_uninit(const void *unused) IPFW_LOCK_DESTROY(chain); ipfw_dyn_uninit(1); /* free the remaining parts */ ipfw_destroy_counters(); - ipfw_destroy_obj_rewriter(); ipfw_bpf_uninit(last); return (0); } ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r305939 - head/sys/amd64/amd64
Author: kib Date: Sun Sep 18 17:33:49 2016 New Revision: 305939 URL: https://svnweb.freebsd.org/changeset/base/305939 Log: Remove trailing space. Sponsored by: The FreeBSD Foundation MFC after:3 days Modified: head/sys/amd64/amd64/machdep.c Modified: head/sys/amd64/amd64/machdep.c == --- head/sys/amd64/amd64/machdep.c Sun Sep 18 17:23:53 2016 (r305938) +++ head/sys/amd64/amd64/machdep.c Sun Sep 18 17:33:49 2016 (r305939) @@ -1091,7 +1091,7 @@ add_efi_map_entries(struct efi_map_heade * Boot Services API. */ efisz = (sizeof(struct efi_map_header) + 0xf) & ~0xf; - map = (struct efi_md *)((uint8_t *)efihdr + efisz); + map = (struct efi_md *)((uint8_t *)efihdr + efisz); if (efihdr->descriptor_size == 0) return; ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r305938 - head/sys/contrib/cloudabi
Author: ed Date: Sun Sep 18 17:23:53 2016 New Revision: 305938 URL: https://svnweb.freebsd.org/changeset/base/305938 Log: Fix badly computed register/stack offset of system call output arguments. Bugs in the Python code used to generate this vDSO caused us to miscompute the register numbers/stack offsets at which addresses of the system call output arguments were stored. Together with some other patches, this vDSO allows us to make all of the cloudlibc unit tests pass. Obtained from:https://github.com/NuxiNL/cloudabi Modified: head/sys/contrib/cloudabi/cloudabi_vdso_armv6.S Modified: head/sys/contrib/cloudabi/cloudabi_vdso_armv6.S == --- head/sys/contrib/cloudabi/cloudabi_vdso_armv6.S Sun Sep 18 16:34:40 2016(r305937) +++ head/sys/contrib/cloudabi/cloudabi_vdso_armv6.S Sun Sep 18 17:23:53 2016(r305938) @@ -48,11 +48,10 @@ ENTRY(cloudabi_sys_clock_res_get) END(cloudabi_sys_clock_res_get) ENTRY(cloudabi_sys_clock_time_get) - str r3, [sp, #-4] mov ip, #1 swi 0 - ldr r2, [sp, #-4] bcs 1f + ldr r2, [sp, #0] str r0, [r2, 0] str r1, [r2, 4] mov r0, $0 @@ -227,7 +226,7 @@ ENTRY(cloudabi_sys_file_open) mov ip, #21 swi 0 bcs 1f - ldr r2, [sp, #12] + ldr r2, [sp, #8] str r0, [r2] mov r0, $0 1: @@ -249,7 +248,7 @@ ENTRY(cloudabi_sys_file_readlink) mov ip, #23 swi 0 bcs 1f - ldr r2, [sp, #8] + ldr r2, [sp, #4] str r0, [r2] mov r0, $0 1: @@ -367,7 +366,7 @@ ENTRY(cloudabi_sys_poll_fd) mov ip, #40 swi 0 bcs 1f - ldr r2, [sp, #12] + ldr r2, [sp, #8] str r0, [r2] mov r0, $0 1: ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r305937 - head/usr.bin/tee
Author: bapt Date: Sun Sep 18 16:34:40 2016 New Revision: 305937 URL: https://svnweb.freebsd.org/changeset/base/305937 Log: Capsicum-ize tee(1) Reviewed by: allanjude Differential Revision:https://reviews.freebsd.org/D7940 Modified: head/usr.bin/tee/tee.c Modified: head/usr.bin/tee/tee.c == --- head/usr.bin/tee/tee.c Sun Sep 18 16:25:41 2016(r305936) +++ head/usr.bin/tee/tee.c Sun Sep 18 16:34:40 2016(r305937) @@ -41,14 +41,18 @@ static const char rcsid[] = "$FreeBSD$"; #endif /* not lint */ -#include +#include #include +#include + #include +#include #include #include #include #include #include +#include #include typedef struct _list { @@ -69,6 +73,8 @@ main(int argc, char *argv[]) char *bp; int append, ch, exitval; char *buf; + cap_rights_t rights; + unsigned long cmd; #defineBSIZE (8 * 1024) append = 0; @@ -90,6 +96,16 @@ main(int argc, char *argv[]) if ((buf = malloc(BSIZE)) == NULL) err(1, "malloc"); + cap_rights_init(, CAP_READ, CAP_FSTAT); + if (cap_rights_limit(STDIN_FILENO, ) < 0 && errno != ENOSYS) + err(EXIT_FAILURE, "unable to limit rights for stdin"); + cap_rights_init(, CAP_WRITE, CAP_FSTAT, CAP_IOCTL); + if (cap_rights_limit(STDERR_FILENO, ) < 0 && errno != ENOSYS) + err(EXIT_FAILURE, "unable to limit rights for stderr"); + cmd = TIOCGETA; + if (cap_ioctls_limit(STDERR_FILENO, , 1) < 0 && errno != ENOSYS) + err(EXIT_FAILURE, "unable to limit ioctls for stderr"); + add(STDOUT_FILENO, "stdout"); for (exitval = 0; *argv; ++argv) @@ -100,6 +116,8 @@ main(int argc, char *argv[]) } else add(fd, *argv); + if (cap_enter() < 0 && errno != ENOSYS) + err(EXIT_FAILURE, "unable to enter capability mode"); while ((rval = read(STDIN_FILENO, buf, BSIZE)) > 0) for (p = head; p; p = p->next) { n = rval; @@ -129,6 +147,21 @@ static void add(int fd, const char *name) { LIST *p; + cap_rights_t rights; + unsigned long cmd; + + if (fd == STDOUT_FILENO) + cap_rights_init(, CAP_WRITE, CAP_FSTAT, CAP_IOCTL); + else + cap_rights_init(, CAP_WRITE, CAP_FSTAT); + if (cap_rights_limit(fd, ) < 0 && errno != ENOSYS) + err(EXIT_FAILURE, "unable to limit rights"); + + if (fd == STDOUT_FILENO) { + cmd = TIOCGETA; + if (cap_ioctls_limit(fd, , 1) < 0 && errno != ENOSYS) + err(EXIT_FAILURE, "unable to limit ioctls for stdout"); + } if ((p = malloc(sizeof(LIST))) == NULL) err(1, "malloc"); ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r305936 - head/usr.bin/soelim
Author: bapt Date: Sun Sep 18 16:25:41 2016 New Revision: 305936 URL: https://svnweb.freebsd.org/changeset/base/305936 Log: Capsicum-ize soelim(1). As a trick to be able to access all files passed in arguments (readonly) within the sandbox we first open the root directory, then consider all files as relative to this file descriptor. This might be improved once casper add supports for filesystem. MFC after:1 month Reviewed by: allanjude Differential Revision:https://reviews.freebsd.org/D7936 Modified: head/usr.bin/soelim/soelim.c Modified: head/usr.bin/soelim/soelim.c == --- head/usr.bin/soelim/soelim.cSun Sep 18 15:55:57 2016 (r305935) +++ head/usr.bin/soelim/soelim.cSun Sep 18 16:25:41 2016 (r305936) @@ -27,15 +27,19 @@ #include __FBSDID("$FreeBSD$"); +#include #include #include #include +#include +#include #include #include #include #include #include +#include #include #define C_OPTION 0x1 @@ -51,18 +55,27 @@ usage(void) exit(EXIT_FAILURE); } +static const char * +relpath(const char *path) +{ + while (*path == '/' && *path != '\0') + path++; + + return (path); +} + static FILE * -soelim_fopen(const char *name) +soelim_fopen(int rootfd, const char *name) { - FILE *f; char path[PATH_MAX]; size_t i; + int fd; if (strcmp(name, "-") == 0) return (stdin); - if ((f = fopen(name, "r")) != NULL) - return (f); + if ((fd = openat(rootfd, relpath(name), O_RDONLY)) != -1) + return (fdopen(fd, "r")); if (*name == '/') { warn("can't open '%s'", name); @@ -72,17 +85,17 @@ soelim_fopen(const char *name) for (i = 0; i < includes->sl_cur; i++) { snprintf(path, sizeof(path), "%s/%s", includes->sl_str[i], name); - if ((f = fopen(path, "r")) != NULL) - return (f); + if ((fd = openat(rootfd, relpath(path), O_RDONLY)) != -1) + return (fdopen(fd, "r")); } warn("can't open '%s'", name); - return (f); + return (NULL); } static int -soelim_file(FILE *f, int flag) +soelim_file(int rootfd, FILE *f, int flag) { char *line = NULL; char *walk, *cp; @@ -118,7 +131,7 @@ soelim_file(FILE *f, int flag) printf("%s", line); continue; } - if (soelim_file(soelim_fopen(walk), flag) == 1) { + if (soelim_file(rootfd, soelim_fopen(rootfd, walk), flag) == 1) { free(line); return (1); } @@ -135,11 +148,15 @@ soelim_file(FILE *f, int flag) int main(int argc, char **argv) { - int ch, i; + int ch, i, rootfd; int ret = 0; int flags = 0; + unsigned long cmd; + char cwd[MAXPATHLEN]; + cap_rights_t rights; includes = sl_init(); + sl_add(includes, getcwd(cwd, sizeof(cwd))); if (includes == NULL) err(EXIT_FAILURE, "sl_init()"); @@ -165,13 +182,42 @@ main(int argc, char **argv) argc -= optind; argv += optind; + cap_rights_init(, CAP_READ, CAP_FSTAT, CAP_IOCTL); + /* +* EBADF in case stdin is closed by the caller +*/ + if (cap_rights_limit(STDIN_FILENO, ) < 0 && errno != ENOSYS + && errno != EBADF) + err(EXIT_FAILURE, "unable to limit rights for stdin"); + cap_rights_init(, CAP_WRITE, CAP_FSTAT, CAP_IOCTL); + if (cap_rights_limit(STDOUT_FILENO, ) < 0 && errno != ENOSYS) + err(EXIT_FAILURE, "unable to limit rights for stdout"); + if (cap_rights_limit(STDERR_FILENO, ) < 0 && errno != ENOSYS) + err(EXIT_FAILURE, "unable to limit rights for stderr"); + rootfd = open("/", O_DIRECTORY | O_RDONLY); + cap_rights_init(, CAP_READ, CAP_LOOKUP, CAP_FSTAT, CAP_FCNTL); + if (cap_rights_limit(rootfd, ) < 0 && errno != ENOSYS) + err(EXIT_FAILURE, "unable to limit rights"); + + cmd = TIOCGETA; + if (cap_ioctls_limit(STDOUT_FILENO, , 1) < 0 && errno != ENOSYS) + err(EXIT_FAILURE, "unable to limit ioctls for stdout"); + if (cap_ioctls_limit(STDERR_FILENO, , 1) < 0 && errno != ENOSYS) + err(EXIT_FAILURE, "unable to limit ioctls for stderr"); + if (cap_ioctls_limit(STDIN_FILENO, , 1) < 0 && errno != ENOSYS) + err(EXIT_FAILURE, "unable to limit ioctls for stdin"); + + if (cap_enter() < 0 && errno != ENOSYS) + err(EXIT_FAILURE, "unable to enter capability mode"); + if (argc == 0) - ret = soelim_file(stdin, flags); + ret = soelim_file(rootfd, stdin, flags);
svn commit: r305935 - head
Author: bapt Date: Sun Sep 18 15:55:57 2016 New Revision: 305935 URL: https://svnweb.freebsd.org/changeset/base/305935 Log: Use the proper word Reported by: danfe Modified: head/UPDATING Modified: head/UPDATING == --- head/UPDATING Sun Sep 18 15:51:34 2016(r305934) +++ head/UPDATING Sun Sep 18 15:55:57 2016(r305935) @@ -32,7 +32,7 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 12 "ln -s 'abort:false,junk:false' /etc/malloc.conf".) 20160918: - GNU rcs has been turned off by default. It can (temporary) be built + GNU rcs has been turned off by default. It can (temporarily) be built again by adding WITH_RCS knob in src.conf. 20160918: ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r305934 - head
Author: bapt Date: Sun Sep 18 15:51:34 2016 New Revision: 305934 URL: https://svnweb.freebsd.org/changeset/base/305934 Log: Apparently we are supposed to use 2 spaces after full stop Reported by: danfe Modified: head/UPDATING Modified: head/UPDATING == --- head/UPDATING Sun Sep 18 15:40:36 2016(r305933) +++ head/UPDATING Sun Sep 18 15:51:34 2016(r305934) @@ -32,7 +32,7 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 12 "ln -s 'abort:false,junk:false' /etc/malloc.conf".) 20160918: - GNU rcs has been turned off by default. It can (temporary) be built + GNU rcs has been turned off by default. It can (temporary) be built again by adding WITH_RCS knob in src.conf. 20160918: ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r305933 - head/share/man/man5
Author: bapt Date: Sun Sep 18 15:40:36 2016 New Revision: 305933 URL: https://svnweb.freebsd.org/changeset/base/305933 Log: Modify manually given makeman is broken due to errors in share/mk/* Modified: head/share/man/man5/src.conf.5 Modified: head/share/man/man5/src.conf.5 == --- head/share/man/man5/src.conf.5 Sun Sep 18 15:06:28 2016 (r305932) +++ head/share/man/man5/src.conf.5 Sun Sep 18 15:40:36 2016 (r305933) @@ -1,7 +1,7 @@ .\" DO NOT EDIT-- this file is automatically generated. .\" from FreeBSD: head/tools/build/options/makeman 292283 2015-12-15 18:42:30Z bdrewery .\" $FreeBSD$ -.Dd August 23, 2016 +.Dd September 18, 2016 .Dt SRC.CONF 5 .Os .Sh NAME @@ -1319,11 +1319,10 @@ This includes .Xr rlogin 1 , .Xr rsh 1 , etc. -.It Va WITHOUT_RCS -.\" from FreeBSD: head/tools/build/options/WITHOUT_RCS 275138 2014-11-26 20:43:09Z gjb -Set to not build -.Xr rcs 1 , -.Xr etcupdate 8 , +.It Va WITH_RCS +.\" from FreeBSD: head/tools/build/options/WITH_RCS 305931 2016-09-18 15:01:11Z bapt +Set to build +.Xr rcs 1 and related utilities. .It Va WITHOUT_RESCUE .\" from FreeBSD: head/tools/build/options/WITHOUT_RESCUE 156932 2006-03-21 07:50:50Z ru ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r305932 - head/share/mk
Author: bapt Date: Sun Sep 18 15:06:28 2016 New Revision: 305932 URL: https://svnweb.freebsd.org/changeset/base/305932 Log: Remove cruft that accidently crept in r305931 Modified: head/share/mk/src.libnames.mk Modified: head/share/mk/src.libnames.mk == --- head/share/mk/src.libnames.mk Sun Sep 18 15:01:11 2016 (r305931) +++ head/share/mk/src.libnames.mk Sun Sep 18 15:06:28 2016 (r305932) @@ -490,8 +490,8 @@ LIBDIALOGDIR= ${OBJTOP}/gnu/lib/libdialo LIBGCOVDIR=${OBJTOP}/gnu/lib/libgcov LIBGOMPDIR=${OBJTOP}/gnu/lib/libgomp LIBGNUREGEXDIR=${OBJTOP}/gnu/lib/libregex -LIBSSPDIR= ${OBJTOP}/lib/libssp -LIBSSP_NONSHAREDDIR= ${OBJTOP}/lib/libssp/libssp_nonshared +LIBSSPDIR= ${OBJTOP}/gnu/lib/libssp +LIBSSP_NONSHAREDDIR= ${OBJTOP}/gnu/lib/libssp/libssp_nonshared LIBSUPCPLUSPLUSDIR=${OBJTOP}/gnu/lib/libsupc++ LIBASN1DIR=${OBJTOP}/kerberos5/lib/libasn1 LIBGSSAPI_KRB5DIR= ${OBJTOP}/kerberos5/lib/libgssapi_krb5 ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r305931 - in head: . share/mk tools/build/options
Author: bapt Date: Sun Sep 18 15:01:11 2016 New Revision: 305931 URL: https://svnweb.freebsd.org/changeset/base/305931 Log: Disable GNU rcs by default All remaining tools using rcs has been switched to directly use diff3(1): - etcupdate(8) - freebsd-update(8) Note that the ident(1) tool is been already replaced long ago with a BSD licensed version, as such it remains installed. GNU rcs is still available from ports: - rcs: newer GPLv3 version - rcs57: the latest version from base (GPLv2) Added: head/tools/build/options/WITH_RCS - copied, changed from r305930, head/tools/build/options/WITHOUT_RCS Deleted: head/tools/build/options/WITHOUT_RCS Modified: head/UPDATING head/share/mk/src.libnames.mk head/share/mk/src.opts.mk Modified: head/UPDATING == --- head/UPDATING Sun Sep 18 14:48:28 2016(r305930) +++ head/UPDATING Sun Sep 18 15:01:11 2016(r305931) @@ -32,6 +32,10 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 12 "ln -s 'abort:false,junk:false' /etc/malloc.conf".) 20160918: + GNU rcs has been turned off by default. It can (temporary) be built + again by adding WITH_RCS knob in src.conf. + +20160918: The backup_uses_rcs functionality has been removed from rc.subr. 20160908: Modified: head/share/mk/src.libnames.mk == --- head/share/mk/src.libnames.mk Sun Sep 18 14:48:28 2016 (r305930) +++ head/share/mk/src.libnames.mk Sun Sep 18 15:01:11 2016 (r305931) @@ -490,8 +490,8 @@ LIBDIALOGDIR= ${OBJTOP}/gnu/lib/libdialo LIBGCOVDIR=${OBJTOP}/gnu/lib/libgcov LIBGOMPDIR=${OBJTOP}/gnu/lib/libgomp LIBGNUREGEXDIR=${OBJTOP}/gnu/lib/libregex -LIBSSPDIR= ${OBJTOP}/gnu/lib/libssp -LIBSSP_NONSHAREDDIR= ${OBJTOP}/gnu/lib/libssp/libssp_nonshared +LIBSSPDIR= ${OBJTOP}/lib/libssp +LIBSSP_NONSHAREDDIR= ${OBJTOP}/lib/libssp/libssp_nonshared LIBSUPCPLUSPLUSDIR=${OBJTOP}/gnu/lib/libsupc++ LIBASN1DIR=${OBJTOP}/kerberos5/lib/libasn1 LIBGSSAPI_KRB5DIR= ${OBJTOP}/kerberos5/lib/libgssapi_krb5 Modified: head/share/mk/src.opts.mk == --- head/share/mk/src.opts.mk Sun Sep 18 14:48:28 2016(r305930) +++ head/share/mk/src.opts.mk Sun Sep 18 15:01:11 2016(r305931) @@ -147,7 +147,6 @@ __DEFAULT_YES_OPTIONS = \ RADIUS_SUPPORT \ RCMDS \ RBOOTD \ -RCS \ RESCUE \ ROUTED \ SENDMAIL \ @@ -187,6 +186,7 @@ __DEFAULT_NO_OPTIONS = \ NAND \ OFED \ OPENLDAP \ +RCS \ SHARED_TOOLCHAIN \ SORT_THREADS \ SVN \ Copied and modified: head/tools/build/options/WITH_RCS (from r305930, head/tools/build/options/WITHOUT_RCS) == --- head/tools/build/options/WITHOUT_RCSSun Sep 18 14:48:28 2016 (r305930, copy source) +++ head/tools/build/options/WITH_RCS Sun Sep 18 15:01:11 2016 (r305931) @@ -1,5 +1,4 @@ .\" $FreeBSD$ -Set to not build -.Xr rcs 1 , -.Xr etcupdate 8 , +Set to build +.Xr rcs 1 and related utilities. ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r305930 - head/usr.sbin/freebsd-update
Author: bapt Date: Sun Sep 18 14:48:28 2016 New Revision: 305930 URL: https://svnweb.freebsd.org/changeset/base/305930 Log: In preparation for removal of GNU rcs, replace merge(1) usage with direct diff3(1) usage Modified: head/usr.sbin/freebsd-update/freebsd-update.sh Modified: head/usr.sbin/freebsd-update/freebsd-update.sh == --- head/usr.sbin/freebsd-update/freebsd-update.sh Sun Sep 18 12:49:23 2016(r305929) +++ head/usr.sbin/freebsd-update/freebsd-update.sh Sun Sep 18 14:48:28 2016(r305930) @@ -2380,7 +2380,7 @@ upgrade_merge () { cp merge/old/${F} merge/new/${F} ;; *) - if ! merge -p -L "current version" \ + if ! diff3 -E -m -L "current version" \ -L "${OLDRELNUM}" -L "${RELNUM}"\ merge/old/${F} \ merge/${OLDRELNUM}/${F} \ ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r305929 - in head: . etc share/man/man8
Author: bapt Date: Sun Sep 18 12:49:23 2016 New Revision: 305929 URL: https://svnweb.freebsd.org/changeset/base/305929 Log: Remove backup_uses_rcs from rc.subr In preparation for the removal of GNU rcs from base, remove the backup_uses_rcs functionality from the rc.subr backup_file feature. This functionnality was off by default Reviewed by: wblock Differential Revision:https://reviews.freebsd.org/D7883 Modified: head/UPDATING head/etc/rc.subr head/share/man/man8/rc.subr.8 Modified: head/UPDATING == --- head/UPDATING Sun Sep 18 11:36:54 2016(r305928) +++ head/UPDATING Sun Sep 18 12:49:23 2016(r305929) @@ -31,6 +31,9 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 12 disable the most expensive debugging functionality run "ln -s 'abort:false,junk:false' /etc/malloc.conf".) +20160918: + The backup_uses_rcs functionality has been removed from rc.subr. + 20160908: The queue(3) debugging macro, QUEUE_MACRO_DEBUG, has been split into two separate components, QUEUE_MACRO_DEBUG_TRACE and Modified: head/etc/rc.subr == --- head/etc/rc.subrSun Sep 18 11:36:54 2016(r305928) +++ head/etc/rc.subrSun Sep 18 12:49:23 2016(r305929) @@ -1532,28 +1532,20 @@ debug() # # backup_file action file cur backup # Make a backup copy of `file' into `cur', and save the previous -# version of `cur' as `backup' or use rcs for archiving. -# -# This routine checks the value of the backup_uses_rcs variable, -# which can be either YES or NO. +# version of `cur' as `backup'. # # The `action' keyword can be one of the following: # # add `file' is now being backed up (and is possibly # being reentered into the backups system). `cur' -# is created and RCS files, if necessary, are -# created as well. +# is created. # # update `file' has changed and needs to be backed up. -# If `cur' exists, it is copied to to `back' or -# checked into RCS (if the repository file is old), -# and then `file' is copied to `cur'. Another RCS -# check in done here if RCS is being used. +# If `cur' exists, it is copied to to `back' +# and then `file' is copied to `cur'. # # remove `file' is no longer being tracked by the backups -# system. If RCS is not being used, `cur' is moved -# to `back', otherwise an empty file is checked in, -# and then `cur' is removed. +# system. `cur' is moved `back'. # # backup_file() @@ -1563,56 +1555,18 @@ backup_file() _cur=$3 _back=$4 - if checkyesno backup_uses_rcs; then - _msg0="backup archive" - _msg1="update" - - # ensure that history file is not locked - if [ -f $_cur,v ]; then - rcs -q -u -U -M $_cur - fi - - # ensure after switching to rcs that the - # current backup is not lost + case $_action in + add|update) if [ -f $_cur ]; then - # no archive, or current newer than archive - if [ ! -f $_cur,v -o $_cur -nt $_cur,v ]; then - ci -q -f -u -t-"$_msg0" -m"$_msg1" $_cur - rcs -q -kb -U $_cur - co -q -f -u $_cur - fi + cp -p $_cur $_back fi - - case $_action in - add|update) - cp -p $_file $_cur - ci -q -f -u -t-"$_msg0" -m"$_msg1" $_cur - rcs -q -kb -U $_cur - co -q -f -u $_cur - chown root:wheel $_cur $_cur,v - ;; - remove) - cp /dev/null $_cur - ci -q -f -u -t-"$_msg0" -m"$_msg1" $_cur - rcs -q -kb -U $_cur - chown root:wheel $_cur $_cur,v - rm $_cur - ;; - esac - else - case $_action in - add|update) - if [ -f $_cur ]; then - cp -p $_cur $_back - fi - cp -p $_file $_cur - chown root:wheel $_cur - ;; - remove) -
svn commit: r305928 - in head/sys: arm/cloudabi32 conf contrib/cloudabi
Author: ed Date: Sun Sep 18 11:36:54 2016 New Revision: 305928 URL: https://svnweb.freebsd.org/changeset/base/305928 Log: Add very preliminary support for CloudABI for ARMv6. In order to make CloudABI work on ARMv6, start off by copying over the sysvec for ARM64 and adjust it to use 32-bit registers. Also add code for fetching arguments from the stack if needed, as there are fewer register than on ARM64. Also import the vDSO that is needed to invoke system calls. This vDSO uses the intra procedure call register (ip) to store the system call number. This is a bit simpler than what native FreeBSD does, as FreeBSD uses r7, while preserving the original r7 into ip. This sysvec seems to be complete enough to start CloudABI processes. These processes are capable of linking in the vDSO and are therefore capable of executing (most?) system calls successfully. Unfortunately, the biggest show stopper is still that TLS is completely broken: - The linker used by CloudABI, LLD, still has troubles with some of the relocations needed for TLS. See LLVM bug 30218 for more details. - Whereas FreeBSD uses the tpidruro register for TLS, for CloudABI I want to make use of tpidrurw, so that userspace can modify the base address directly. This is needed for efficient emulation. Unfortunately, this register doesn't seem to be preserved across context switches yet. Obtained from:https://github.com/NuxiNL/cloudabi (the vDSO) Added: head/sys/arm/cloudabi32/ head/sys/arm/cloudabi32/cloudabi32_sysvec.c - copied, changed from r305926, head/sys/arm64/cloudabi64/cloudabi64_sysvec.c head/sys/contrib/cloudabi/cloudabi_vdso_armv6.S (contents, props changed) Modified: head/sys/conf/files.arm Copied and modified: head/sys/arm/cloudabi32/cloudabi32_sysvec.c (from r305926, head/sys/arm64/cloudabi64/cloudabi64_sysvec.c) == --- head/sys/arm64/cloudabi64/cloudabi64_sysvec.c Sun Sep 18 08:19:33 2016(r305926, copy source) +++ head/sys/arm/cloudabi32/cloudabi32_sysvec.c Sun Sep 18 11:36:54 2016 (r305928) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2015 Nuxi, https://nuxi.nl/ + * Copyright (c) 2015-2016 Nuxi, https://nuxi.nl/ * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -41,14 +41,14 @@ __FBSDID("$FreeBSD$"); #include -#include -#include +#include +#include -extern const char *cloudabi64_syscallnames[]; -extern struct sysent cloudabi64_sysent[]; +extern const char *cloudabi32_syscallnames[]; +extern struct sysent cloudabi32_sysent[]; static void -cloudabi64_proc_setregs(struct thread *td, struct image_params *imgp, +cloudabi32_proc_setregs(struct thread *td, struct image_params *imgp, unsigned long stack) { struct trapframe *regs; @@ -57,66 +57,74 @@ cloudabi64_proc_setregs(struct thread *t /* * The stack now contains a pointer to the TCB and the auxiliary -* vector. Let x0 point to the auxiliary vector, and set -* tpidr_el0 to the TCB. +* vector. Let r0 point to the auxiliary vector, and set +* tpidrurw to the TCB. */ regs = td->td_frame; - regs->tf_x[0] = td->td_retval[0] = - stack + roundup(sizeof(cloudabi64_tcb_t), sizeof(register_t)); + regs->tf_r0 = td->td_retval[0] = + stack + roundup(sizeof(cloudabi32_tcb_t), sizeof(register_t)); (void)cpu_set_user_tls(td, (void *)stack); } static int -cloudabi64_fetch_syscall_args(struct thread *td, struct syscall_args *sa) +cloudabi32_fetch_syscall_args(struct thread *td, struct syscall_args *sa) { struct trapframe *frame = td->td_frame; - int i; + int error; /* Obtain system call number. */ - sa->code = frame->tf_x[8]; - if (sa->code >= CLOUDABI64_SYS_MAXSYSCALL) + sa->code = frame->tf_r12; + if (sa->code >= CLOUDABI32_SYS_MAXSYSCALL) return (ENOSYS); - sa->callp = _sysent[sa->code]; + sa->callp = _sysent[sa->code]; sa->narg = sa->callp->sy_narg; - /* Fetch system call arguments. */ - for (i = 0; i < MAXARGS; i++) - sa->args[i] = frame->tf_x[i]; + /* Fetch system call arguments from registers and the stack. */ + sa->args[0] = frame->tf_r0; + sa->args[1] = frame->tf_r1; + sa->args[2] = frame->tf_r2; + sa->args[3] = frame->tf_r3; + if (sa->narg > 4) { + error = copyin((void *)td->td_frame->tf_usr_sp, >args[4], + (sa->narg - 4) * sizeof(register_t)); + if (error != 0) + return (error); + } /* Default system call return values. */ td->td_retval[0] = 0; - td->td_retval[1] = frame->tf_x[1]; + td->td_retval[1] = frame->tf_r1;
svn commit: r305927 - head/usr.bin/sdiff
Author: bapt Date: Sun Sep 18 10:06:35 2016 New Revision: 305927 URL: https://svnweb.freebsd.org/changeset/base/305927 Log: Remove reference of z(s)diff which was dropped before importing Modified: head/usr.bin/sdiff/sdiff.c Modified: head/usr.bin/sdiff/sdiff.c == --- head/usr.bin/sdiff/sdiff.c Sun Sep 18 08:19:33 2016(r305926) +++ head/usr.bin/sdiff/sdiff.c Sun Sep 18 10:06:35 2016(r305927) @@ -477,8 +477,8 @@ main(int argc, char **argv) } /* - * When sdiff/zsdiff detects a binary file as input, executes them with - * diff/zdiff to maintain the same behavior as GNU sdiff with binary input. + * When sdiff detects a binary file as input, executes them with + * diff to maintain the same behavior as GNU sdiff with binary input. */ static void binexec(char *diffprog, char *f1, char *f2) ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r305926 - head/sys/dev/hyperv/netvsc
Author: sephe Date: Sun Sep 18 08:19:33 2016 New Revision: 305926 URL: https://svnweb.freebsd.org/changeset/base/305926 Log: hyperv/hn: Add sysctls to dynamic adjust RSS key and indirect table MFC after:1 week Sponsored by: Microsoft Differential Revision:https://reviews.freebsd.org/D7890 Modified: head/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c head/sys/dev/hyperv/netvsc/hv_rndis_filter.c head/sys/dev/hyperv/netvsc/if_hnvar.h head/sys/dev/hyperv/netvsc/ndis.h Modified: head/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c == --- head/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c Sun Sep 18 08:10:40 2016(r305925) +++ head/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c Sun Sep 18 08:19:33 2016(r305926) @@ -325,6 +325,8 @@ static int hn_rx_stat_ulong_sysctl(SYSCT static int hn_tx_stat_ulong_sysctl(SYSCTL_HANDLER_ARGS); static int hn_tx_conf_int_sysctl(SYSCTL_HANDLER_ARGS); static int hn_ndis_version_sysctl(SYSCTL_HANDLER_ARGS); +static int hn_rss_key_sysctl(SYSCTL_HANDLER_ARGS); +static int hn_rss_ind_sysctl(SYSCTL_HANDLER_ARGS); static int hn_check_iplen(const struct mbuf *, int); static int hn_create_tx_ring(struct hn_softc *, int); static void hn_destroy_tx_ring(struct hn_tx_ring *); @@ -391,6 +393,42 @@ hn_get_txswq_depth(const struct hn_tx_ri } static int +hn_rss_reconfig(struct hn_softc *sc) +{ + int error; + + HN_LOCK_ASSERT(sc); + + /* +* Disable RSS first. +* +* NOTE: +* Direct reconfiguration by setting the UNCHG flags does +* _not_ work properly. +*/ + if (bootverbose) + if_printf(sc->hn_ifp, "disable RSS\n"); + error = hn_rndis_conf_rss(sc, NDIS_RSS_FLAG_DISABLE); + if (error) { + if_printf(sc->hn_ifp, "RSS disable failed\n"); + return (error); + } + + /* +* Reenable the RSS w/ the updated RSS key or indirect +* table. +*/ + if (bootverbose) + if_printf(sc->hn_ifp, "reconfig RSS\n"); + error = hn_rndis_conf_rss(sc, NDIS_RSS_FLAG_NONE); + if (error) { + if_printf(sc->hn_ifp, "RSS reconfig failed\n"); + return (error); + } + return (0); +} + +static int hn_ifmedia_upd(struct ifnet *ifp __unused) { @@ -583,6 +621,12 @@ netvsc_attach(device_t dev) SYSCTL_ADD_PROC(ctx, child, OID_AUTO, "ndis_version", CTLTYPE_STRING | CTLFLAG_RD | CTLFLAG_MPSAFE, sc, 0, hn_ndis_version_sysctl, "A", "NDIS version"); + SYSCTL_ADD_PROC(ctx, child, OID_AUTO, "rss_key", + CTLTYPE_OPAQUE | CTLFLAG_RW | CTLFLAG_MPSAFE, sc, 0, + hn_rss_key_sysctl, "IU", "RSS key"); + SYSCTL_ADD_PROC(ctx, child, OID_AUTO, "rss_ind", + CTLTYPE_OPAQUE | CTLFLAG_RW | CTLFLAG_MPSAFE, sc, 0, + hn_rss_ind_sysctl, "IU", "RSS indirect table"); /* * Setup the ifmedia, which has been initialized earlier. @@ -2031,6 +2075,50 @@ hn_ndis_version_sysctl(SYSCTL_HANDLER_AR } static int +hn_rss_key_sysctl(SYSCTL_HANDLER_ARGS) +{ + struct hn_softc *sc = arg1; + int error; + + HN_LOCK(sc); + + error = SYSCTL_OUT(req, sc->hn_rss.rss_key, sizeof(sc->hn_rss.rss_key)); + if (error || req->newptr == NULL) + goto back; + + error = SYSCTL_IN(req, sc->hn_rss.rss_key, sizeof(sc->hn_rss.rss_key)); + if (error) + goto back; + + error = hn_rss_reconfig(sc); +back: + HN_UNLOCK(sc); + return (error); +} + +static int +hn_rss_ind_sysctl(SYSCTL_HANDLER_ARGS) +{ + struct hn_softc *sc = arg1; + int error; + + HN_LOCK(sc); + + error = SYSCTL_OUT(req, sc->hn_rss.rss_ind, sizeof(sc->hn_rss.rss_ind)); + if (error || req->newptr == NULL) + goto back; + + error = SYSCTL_IN(req, sc->hn_rss.rss_ind, sizeof(sc->hn_rss.rss_ind)); + if (error) + goto back; + + error = hn_rss_reconfig(sc); +back: + HN_UNLOCK(sc); + return (error); +} + +static int hn_check_iplen(const struct mbuf *m, int hoff) { const struct ip *ip; @@ -3179,7 +3267,7 @@ hn_synth_attach(struct hn_softc *sc, int rss->rss_ind[i] = i % nchan; } - error = hn_rndis_conf_rss(sc); + error = hn_rndis_conf_rss(sc, NDIS_RSS_FLAG_NONE); if (error) { /* * Failed to configure RSS key or indirect table; only Modified: head/sys/dev/hyperv/netvsc/hv_rndis_filter.c == --- head/sys/dev/hyperv/netvsc/hv_rndis_filter.cSun Sep 18 08:10:40 2016(r305925) +++ head/sys/dev/hyperv/netvsc/hv_rndis_filter.cSun Sep 18 08:19:33 2016(r305926) @@ -837,7 +837,7 @@ hn_rndis_conf_offload(struct hn_softc *s
svn commit: r305925 - head/sys/dev/hyperv/netvsc
Author: sephe Date: Sun Sep 18 08:10:40 2016 New Revision: 305925 URL: https://svnweb.freebsd.org/changeset/base/305925 Log: hyperv/hn: Don't mess up RSS key and indirect table after attachment. MFC after:1 week Sponsored by: Microsoft Differential Revision:https://reviews.freebsd.org/D7889 Modified: head/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c Modified: head/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c == --- head/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c Sun Sep 18 07:47:57 2016(r305924) +++ head/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c Sun Sep 18 08:10:40 2016(r305925) @@ -3159,13 +3159,25 @@ hn_synth_attach(struct hn_softc *sc, int * are allocated. */ - /* Setup default RSS key. */ - memcpy(rss->rss_key, hn_rss_key_default, sizeof(rss->rss_key)); + if (!device_is_attached(sc->hn_dev)) { + /* +* Setup default RSS key and indirect table for the +* attach DEVMETHOD. They can be altered later on, +* so don't mess them up once this interface is attached. +*/ + if (bootverbose) { + if_printf(sc->hn_ifp, "setup default RSS key and " + "indirect table\n"); + } - /* Setup default RSS indirect table. */ - /* TODO: Take ndis_rss_caps.ndis_nind into account. */ - for (i = 0; i < NDIS_HASH_INDCNT; ++i) - rss->rss_ind[i] = i % nchan; + /* Setup default RSS key. */ + memcpy(rss->rss_key, hn_rss_key_default, sizeof(rss->rss_key)); + + /* Setup default RSS indirect table. */ + /* TODO: Take ndis_rss_caps.ndis_nind into account. */ + for (i = 0; i < NDIS_HASH_INDCNT; ++i) + rss->rss_ind[i] = i % nchan; + } error = hn_rndis_conf_rss(sc); if (error) { ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r305924 - head/sys/dev/hyperv/netvsc
Author: sephe Date: Sun Sep 18 07:47:57 2016 New Revision: 305924 URL: https://svnweb.freebsd.org/changeset/base/305924 Log: hyperv/hn: Put debug message under bootverbose MFC after:1 week Sponsored by: Microsoft Differential Revision:https://reviews.freebsd.org/D7875 Modified: head/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c Modified: head/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c == --- head/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c Sun Sep 18 07:37:59 2016(r305923) +++ head/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c Sun Sep 18 07:47:57 2016(r305924) @@ -629,8 +629,10 @@ netvsc_attach(device_t dev) ether_ifattach(ifp, eaddr); - if_printf(ifp, "TSO: %u/%u/%u\n", ifp->if_hw_tsomax, - ifp->if_hw_tsomaxsegcount, ifp->if_hw_tsomaxsegsize); + if (bootverbose) { + if_printf(ifp, "TSO: %u/%u/%u\n", ifp->if_hw_tsomax, + ifp->if_hw_tsomaxsegcount, ifp->if_hw_tsomaxsegsize); + } /* Inform the upper layer about the long frame support. */ ifp->if_hdrlen = sizeof(struct ether_vlan_header); ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r305923 - head/sys/dev/hyperv/netvsc
Author: sephe Date: Sun Sep 18 07:37:59 2016 New Revision: 305923 URL: https://svnweb.freebsd.org/changeset/base/305923 Log: hyperv/hn: Regroup ifnet setup code. While I'm here, add comment along the attach DEVMETHOD. MFC after:1 week Sponsored by: Microsoft Differential Revision:https://reviews.freebsd.org/D7874 Modified: head/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c Modified: head/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c == --- head/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c Sun Sep 18 07:37:00 2016(r305922) +++ head/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c Sun Sep 18 07:37:59 2016(r305923) @@ -456,6 +456,9 @@ netvsc_attach(device_t dev) sc->hn_prichan = vmbus_get_channel(dev); HN_LOCK_INIT(sc); + /* +* Setup taskqueue for transmission. +*/ if (hn_tx_taskq == NULL) { sc->hn_tx_taskq = taskqueue_create("hn_tx", M_WAITOK, taskqueue_thread_enqueue, >hn_tx_taskq); @@ -477,11 +480,22 @@ netvsc_attach(device_t dev) sc->hn_tx_taskq = hn_tx_taskq; } + /* +* Allocate ifnet and setup its name earlier, so that if_printf +* can be used by functions, which will be called after +* ether_ifattach(). +*/ ifp = sc->hn_ifp = if_alloc(IFT_ETHER); ifp->if_softc = sc; if_initname(ifp, device_get_name(dev), device_get_unit(dev)); /* +* Initialize ifmedia earlier so that it can be unconditionally +* destroyed, if error happened later on. +*/ + ifmedia_init(>hn_media, 0, hn_ifmedia_upd, hn_ifmedia_sts); + + /* * Figure out the # of RX rings (ring_cnt) and the # of TX rings * to use (tx_ring_cnt). * @@ -511,6 +525,10 @@ netvsc_attach(device_t dev) */ sc->hn_cpu = atomic_fetchadd_int(_cpu_index, ring_cnt) % mp_ncpus; + /* +* Create enough TX/RX rings, even if only limited number of +* channels can be allocated. +*/ error = hn_create_tx_data(sc, tx_ring_cnt); if (error) goto failed; @@ -533,6 +551,51 @@ netvsc_attach(device_t dev) if (error) goto failed; + error = hn_rndis_get_linkstatus(sc, _status); + if (error) + goto failed; + if (link_status == NDIS_MEDIA_STATE_CONNECTED) + sc->hn_carrier = 1; + + error = hn_rndis_get_eaddr(sc, eaddr); + if (error) + goto failed; + +#if __FreeBSD_version >= 1100099 + if (sc->hn_rx_ring_inuse > 1) { + /* +* Reduce TCP segment aggregation limit for multiple +* RX rings to increase ACK timeliness. +*/ + hn_set_lro_lenlim(sc, HN_LRO_LENLIM_MULTIRX_DEF); + } +#endif + + hn_set_chim_size(sc, sc->hn_chim_szmax); + if (hn_tx_chimney_size > 0 && + hn_tx_chimney_size < sc->hn_chim_szmax) + hn_set_chim_size(sc, hn_tx_chimney_size); + + ctx = device_get_sysctl_ctx(dev); + child = SYSCTL_CHILDREN(device_get_sysctl_tree(dev)); + SYSCTL_ADD_UINT(ctx, child, OID_AUTO, "nvs_version", CTLFLAG_RD, + >hn_nvs_ver, 0, "NVS version"); + SYSCTL_ADD_PROC(ctx, child, OID_AUTO, "ndis_version", + CTLTYPE_STRING | CTLFLAG_RD | CTLFLAG_MPSAFE, sc, 0, + hn_ndis_version_sysctl, "A", "NDIS version"); + + /* +* Setup the ifmedia, which has been initialized earlier. +*/ + ifmedia_add(>hn_media, IFM_ETHER | IFM_AUTO, 0, NULL); + ifmedia_set(>hn_media, IFM_ETHER | IFM_AUTO); + /* XXX ifmedia_set really should do this for us */ + sc->hn_media.ifm_media = sc->hn_media.ifm_cur->ifm_media; + + /* +* Setup the ifnet for this interface. +*/ + ifp->if_flags = IFF_BROADCAST | IFF_SIMPLEX | IFF_MULTICAST; ifp->if_ioctl = hn_ioctl; ifp->if_init = hn_init; @@ -548,15 +611,6 @@ netvsc_attach(device_t dev) ifp->if_qflush = hn_xmit_qflush; } - ifmedia_init(>hn_media, 0, hn_ifmedia_upd, hn_ifmedia_sts); - ifmedia_add(>hn_media, IFM_ETHER | IFM_AUTO, 0, NULL); - ifmedia_set(>hn_media, IFM_ETHER | IFM_AUTO); - /* XXX ifmedia_set really should do this for us */ - sc->hn_media.ifm_media = sc->hn_media.ifm_cur->ifm_media; - - /* -* Tell upper layers that we support full VLAN capability. -*/ ifp->if_capabilities |= IFCAP_VLAN_HWTAGGING | IFCAP_VLAN_MTU | IFCAP_HWCSUM | IFCAP_TSO | IFCAP_LRO; @@ -565,34 +619,14 @@ netvsc_attach(device_t dev) IFCAP_LRO; ifp->if_hwassist = sc->hn_tx_ring[0].hn_csum_assist | CSUM_TSO; -#if __FreeBSD_version >= 1100099 - if (sc->hn_rx_ring_inuse > 1) { -
svn commit: r305922 - head/sys/kern
Author: sephe Date: Sun Sep 18 07:37:00 2016 New Revision: 305922 URL: https://svnweb.freebsd.org/changeset/base/305922 Log: Fix LINT building. Sponsored by: Microsoft Modified: head/sys/kern/kern_lockf.c Modified: head/sys/kern/kern_lockf.c == --- head/sys/kern/kern_lockf.c Sun Sep 18 06:00:07 2016(r305921) +++ head/sys/kern/kern_lockf.c Sun Sep 18 07:37:00 2016(r305922) @@ -83,7 +83,9 @@ __FBSDID("$FreeBSD$"); #ifdef LOCKF_DEBUG #include +#include #include +#include #include static int lockf_debug = 0; /* control debug output */ @@ -2500,7 +2502,7 @@ lf_print(char *tag, struct lockf_entry * if (lock->lf_inode != (struct inode *)0) printf(" in ino %ju on dev <%s>,", (uintmax_t)lock->lf_inode->i_number, - devtoname(lock->lf_inode->i_dev)); + devtoname(ITODEV(lock->lf_inode))); printf(" %s, start %jd, end ", lock->lf_type == F_RDLCK ? "shared" : lock->lf_type == F_WRLCK ? "exclusive" : @@ -2528,7 +2530,7 @@ lf_printlist(char *tag, struct lockf_ent printf("%s: Lock list for ino %ju on dev <%s>:\n", tag, (uintmax_t)lock->lf_inode->i_number, - devtoname(lock->lf_inode->i_dev)); + devtoname(ITODEV(lock->lf_inode))); LIST_FOREACH(lf, >lf_vnode->v_lockf->ls_active, lf_link) { printf("\tlock %p for ",(void *)lf); lf_print_owner(lock->lf_owner); ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r305921 - head/lib/libc/tests/stdio
Author: ngie Date: Sun Sep 18 06:00:07 2016 New Revision: 305921 URL: https://svnweb.freebsd.org/changeset/base/305921 Log: Similar to r305920, remove spurious newlines from ATF_REQUIRE_MSG calls MFC after:1 week Sponsored by: Dell EMC Isilon Modified: head/lib/libc/tests/stdio/open_memstream2_test.c head/lib/libc/tests/stdio/open_wmemstream_test.c Modified: head/lib/libc/tests/stdio/open_memstream2_test.c == --- head/lib/libc/tests/stdio/open_memstream2_test.cSun Sep 18 05:54:13 2016(r305920) +++ head/lib/libc/tests/stdio/open_memstream2_test.cSun Sep 18 06:00:07 2016(r305921) @@ -159,11 +159,11 @@ ATF_TC_BODY(seek_tests, tc) #define SEEK_FAIL(offset, whence, error) do { \ errno = 0; \ ATF_REQUIRE_MSG(fseeko(fp, (offset), (whence)) != 0,\ - "fseeko(%s, %s) did not fail, set pos to %jd\n",\ + "fseeko(%s, %s) did not fail, set pos to %jd", \ __STRING(offset), __STRING(whence), \ (intmax_t)ftello(fp)); \ ATF_REQUIRE_MSG(errno == (error), \ - "fseeko(%s, %s) failed with %d rather than %s\n", \ + "fseeko(%s, %s) failed with %d rather than %s", \ __STRING(offset), __STRING(whence), errno, \ __STRING(error)); \ } while (0) @@ -173,7 +173,7 @@ ATF_TC_BODY(seek_tests, tc) "fseeko(%s, %s) failed: %s",\ __STRING(offset), __STRING(whence), strerror(errno)); \ ATF_REQUIRE_MSG(ftello(fp) == (result), \ - "fseeko(%s, %s) seeked to %jd rather than %s\n",\ + "fseeko(%s, %s) seeked to %jd rather than %s", \ __STRING(offset), __STRING(whence), \ (intmax_t)ftello(fp), __STRING(result));\ } while (0) Modified: head/lib/libc/tests/stdio/open_wmemstream_test.c == --- head/lib/libc/tests/stdio/open_wmemstream_test.cSun Sep 18 05:54:13 2016(r305920) +++ head/lib/libc/tests/stdio/open_wmemstream_test.cSun Sep 18 06:00:07 2016(r305921) @@ -159,11 +159,11 @@ ATF_TC_BODY(seek_tests, tc) #define SEEK_FAIL(offset, whence, error) do { \ errno = 0; \ ATF_REQUIRE_MSG(fseeko(fp, (offset), (whence)) != 0,\ - "fseeko(%s, %s) did not fail, set pos to %jd\n",\ + "fseeko(%s, %s) did not fail, set pos to %jd", \ __STRING(offset), __STRING(whence), \ (intmax_t)ftello(fp)); \ ATF_REQUIRE_MSG(errno == (error), \ - "fseeko(%s, %s) failed with %d rather than %s\n", \ + "fseeko(%s, %s) failed with %d rather than %s", \ __STRING(offset), __STRING(whence), errno, \ __STRING(error)); \ } while (0) @@ -173,7 +173,7 @@ ATF_TC_BODY(seek_tests, tc) "fseeko(%s, %s) failed: %s",\ __STRING(offset), __STRING(whence), strerror(errno)); \ ATF_REQUIRE_MSG(ftello(fp) == (result), \ - "fseeko(%s, %s) seeked to %jd rather than %s\n",\ + "fseeko(%s, %s) seeked to %jd rather than %s", \ __STRING(offset), __STRING(whence), \ (intmax_t)ftello(fp), __STRING(result));\ } while (0) ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"