Re: svn commit: r335402 - head/sbin/veriexecctl
In message , Conrad Meyer writes: > On Tue, Jun 19, 2018 at 6:08 PM, Stephen J. Kiernan wrot > e: > > Author: stevek > > Date: Wed Jun 20 01:08:54 2018 > > New Revision: 335402 > > URL: https://svnweb.freebsd.org/changeset/base/335402 > > > > Log: > > This application (veriexecctl) handles reading a fingerprints file > > Hi, > > This patchset needed design and code review prior to commit. It > appears to have serious problems. > > First and foremost: nothing is actually signed, anywhere. The > veriexecctl tool parses and tells the kernel to trust a file input. > But if we don't trust other files on the filesystem, why do we trust > that one? There is no embedded signature mechanism proving the hash > list file is trustworthy. > > As a corollary to the above, the name "signature file" is used > repeatedly in the code, which is misleading. The file contains hashes > (digests), not signatures (MACs). The file itself is unsigned. > Nothing about this has signatures. > > There's absolutely no reason to use sha1 or ripemd in new designs. > These should be removed. > > The patchset is littered with style issues. One fairly obvious issue > is mixed indentation styles â some files vary between space and tab > indentation from line to line. > > Please revert this patchset. It's not ready. > > Some suggestions for a second attempt: > > - Maybe use HMACs instead of raw hashes > - Maybe sign the source-of-trust file > - Fix the style issues > - Fix the compiler warnings at 6 - i386 format issues, build failures in multiple places -- Cheers, Cy Schubert FreeBSD 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"
Re: svn commit: r335402 - head/sbin/veriexecctl
I forgot to mention that the kernel code also introduces severe performance problems due to really pessimal data structures, small IO sizes, and problematic locking. Again: please revert and proceed through a round or two of design review. Thank you, Conrad On Tue, Jun 19, 2018 at 8:33 PM, Conrad Meyer wrote: > On Tue, Jun 19, 2018 at 6:08 PM, Stephen J. Kiernan > wrote: >> Author: stevek >> Date: Wed Jun 20 01:08:54 2018 >> New Revision: 335402 >> URL: https://svnweb.freebsd.org/changeset/base/335402 >> >> Log: >> This application (veriexecctl) handles reading a fingerprints file > > Hi, > > This patchset needed design and code review prior to commit. It > appears to have serious problems. > > First and foremost: nothing is actually signed, anywhere. The > veriexecctl tool parses and tells the kernel to trust a file input. > But if we don't trust other files on the filesystem, why do we trust > that one? There is no embedded signature mechanism proving the hash > list file is trustworthy. > > As a corollary to the above, the name "signature file" is used > repeatedly in the code, which is misleading. The file contains hashes > (digests), not signatures (MACs). The file itself is unsigned. > Nothing about this has signatures. > > There's absolutely no reason to use sha1 or ripemd in new designs. > These should be removed. > > The patchset is littered with style issues. One fairly obvious issue > is mixed indentation styles — some files vary between space and tab > indentation from line to line. > > Please revert this patchset. It's not ready. > > Some suggestions for a second attempt: > > - Maybe use HMACs instead of raw hashes > - Maybe sign the source-of-trust file > - Fix the style issues > - Fix the compiler warnings at 6 > > Thank you, > Conrad ___ 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: r335402 - head/sbin/veriexecctl
On Tue, Jun 19, 2018 at 6:08 PM, Stephen J. Kiernan wrote: > Author: stevek > Date: Wed Jun 20 01:08:54 2018 > New Revision: 335402 > URL: https://svnweb.freebsd.org/changeset/base/335402 > > Log: > This application (veriexecctl) handles reading a fingerprints file Hi, This patchset needed design and code review prior to commit. It appears to have serious problems. First and foremost: nothing is actually signed, anywhere. The veriexecctl tool parses and tells the kernel to trust a file input. But if we don't trust other files on the filesystem, why do we trust that one? There is no embedded signature mechanism proving the hash list file is trustworthy. As a corollary to the above, the name "signature file" is used repeatedly in the code, which is misleading. The file contains hashes (digests), not signatures (MACs). The file itself is unsigned. Nothing about this has signatures. There's absolutely no reason to use sha1 or ripemd in new designs. These should be removed. The patchset is littered with style issues. One fairly obvious issue is mixed indentation styles — some files vary between space and tab indentation from line to line. Please revert this patchset. It's not ready. Some suggestions for a second attempt: - Maybe use HMACs instead of raw hashes - Maybe sign the source-of-trust file - Fix the style issues - Fix the compiler warnings at 6 Thank you, Conrad ___ 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: r335404 - head/usr.bin/sort
Author: kevans Date: Wed Jun 20 03:31:19 2018 New Revision: 335404 URL: https://svnweb.freebsd.org/changeset/base/335404 Log: sort(1): Fix -m when only implicit stdin is used for input Observe: printf "a\nb\nc\n" > /tmp/foo # Next command results in no output cat /tmp/foo | sort -m # Next command results in proper output cat /tmp/foo | sort -m - # Also works: sort -m /tmp/foo Some const'ification was done to simplify the actual solution of adding "-" explicitly to the file list if we didn't have any file arguments left over. PR: 190099 MFC after:1 week Modified: head/usr.bin/sort/file.c head/usr.bin/sort/file.h head/usr.bin/sort/sort.c Modified: head/usr.bin/sort/file.c == --- head/usr.bin/sort/file.cWed Jun 20 03:10:49 2018(r335403) +++ head/usr.bin/sort/file.cWed Jun 20 03:31:19 2018(r335404) @@ -227,7 +227,7 @@ file_list_init(struct file_list *fl, bool tmp) * Add a file name to the list */ void -file_list_add(struct file_list *fl, char *fn, bool allocate) +file_list_add(struct file_list *fl, const char *fn, bool allocate) { if (fl && fn) { @@ -1115,7 +1115,7 @@ file_headers_merge(size_t fnum, struct file_header **f * stdout. */ static void -merge_files_array(size_t argc, char **argv, const char *fn_out) +merge_files_array(size_t argc, const char **argv, const char *fn_out) { if (argv && fn_out) { Modified: head/usr.bin/sort/file.h == --- head/usr.bin/sort/file.hWed Jun 20 03:10:49 2018(r335403) +++ head/usr.bin/sort/file.hWed Jun 20 03:31:19 2018(r335404) @@ -66,7 +66,7 @@ struct file_reader; */ struct file_list { - char**fns; + const char **fns; size_t count; size_t sz; bool tmp; @@ -108,7 +108,7 @@ char *new_tmp_file_name(void); void tmp_file_atexit(const char *tmp_file); void file_list_init(struct file_list *fl, bool tmp); -void file_list_add(struct file_list *fl, char *fn, bool allocate); +void file_list_add(struct file_list *fl, const char *fn, bool allocate); void file_list_populate(struct file_list *fl, int argc, char **argv, bool allocate); void file_list_clean(struct file_list *fl); Modified: head/usr.bin/sort/sort.c == --- head/usr.bin/sort/sort.cWed Jun 20 03:10:49 2018(r335403) +++ head/usr.bin/sort/sort.cWed Jun 20 03:31:19 2018(r335404) @@ -1299,7 +1299,11 @@ main(int argc, char **argv) struct file_list fl; file_list_init(, false); - file_list_populate(, argc, argv, true); + /* No file arguments remaining means "read from stdin." */ + if (argc == 0) + file_list_add(, "-", true); + else + file_list_populate(, argc, argv, true); merge_files(, outfile); file_list_clean(); } ___ 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: r335403 - in head/usr.bin/sort: . tests
On Tue, Jun 19, 2018 at 10:10 PM, Kyle Evans wrote: > Author: kevans > Date: Wed Jun 20 03:10:49 2018 > New Revision: 335403 > URL: https://svnweb.freebsd.org/changeset/base/335403 > > Log: > sort(1): Add bits to allow easy checking against NetBSD tests > > I'm looking at sort(1) failures, for better or worse. > In the past four minutes, I've learned that this isn't a sustainable long-term idea due to major differences between NetBSD sort(1) and ours. I'll look to adding FreeBSD tests and not using the NetBSD tests, but will use theirs as a baseline where it makes sense for the time being. ___ 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: r335403 - in head/usr.bin/sort: . tests
Author: kevans Date: Wed Jun 20 03:10:49 2018 New Revision: 335403 URL: https://svnweb.freebsd.org/changeset/base/335403 Log: sort(1): Add bits to allow easy checking against NetBSD tests I'm looking at sort(1) failures, for better or worse. Added: head/usr.bin/sort/tests/ head/usr.bin/sort/tests/Makefile (contents, props changed) Modified: head/usr.bin/sort/Makefile Modified: head/usr.bin/sort/Makefile == --- head/usr.bin/sort/Makefile Wed Jun 20 01:08:54 2018(r335402) +++ head/usr.bin/sort/Makefile Wed Jun 20 03:10:49 2018(r335403) @@ -32,4 +32,7 @@ CFLAGS+= -DWITHOUT_NLS MAN_SUB+= -e 's|%%NLS%%|\.\\"|g' .endif +#HAS_TESTS= +#SUBDIR.${MK_TESTS}+= tests + .include Added: head/usr.bin/sort/tests/Makefile == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.bin/sort/tests/MakefileWed Jun 20 03:10:49 2018 (r335403) @@ -0,0 +1,14 @@ +# $FreeBSD$ + +PACKAGE= tests + +NETBSD_ATF_TESTS_SH= sort_test + +${PACKAGE}FILES+= d_any_char_dflag_out.txt +${PACKAGE}FILES+= d_any_char_fflag_out.txt +${PACKAGE}FILES+= d_any_char_iflag_out.txt +${PACKAGE}FILES+= d_any_char_in.txt + +.include + +.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"
Re: svn commit: r335402 - head/sbin/veriexecctl
On 19 June 2018 at 18:08, Stephen J. Kiernan wrote: > Added: head/sbin/veriexecctl/Makefile > == > --- /dev/null 00:00:00 1970 (empty, because file is newly added) > +++ head/sbin/veriexecctl/Makefile Wed Jun 20 01:08:54 2018 > (r335402) > @@ -0,0 +1,11 @@ > +# $FreeBSD$ > + > +PROG= veriexecctl > +MAN= veriexecctl.8 > +SRCS= veriexecctl_parse.y veriexecctl_conf.l veriexecctl.c > + > +WARNS?=3 Why are we introducing new code with lower-than-6 warnings ? -- Eitan Adler ___ 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: r335399: . . . head/sys/security/mac_veriexec/ . . . breaks ci.freebsg.org builds of FreeBSD-head-{armv6,ar,m7,i386,mips,powerpc,powerpcspe}-build
Stephen J. Kiernan stevek at FreeBSD.org Wed Jun 20 00:41:33 UTC 2018 Author: stevek Date: Wed Jun 20 00:41:30 2018 New Revision: 335399 URL: https://svnweb.freebsd.org/changeset/base/335399 Log: MAC/veriexec implements a verified execution environment using the MAC framework. . . . But the logs on ci.freebsd.prg show for -r335399 and later for FreeBSD-head-{armv6,ar,m7,i386,mips,powerpc,powerpcspe}-build messages like: --- all_subdir_mac_veriexec --- cc1: warnings being treated as errors /usr/src/sys/security/mac_veriexec/veriexec_fingerprint.c: In function 'identify_error': /usr/src/sys/security/mac_veriexec/veriexec_fingerprint.c:115: warning: format '%lu' expects type 'long unsigned int', but argument 5 has type 'dev_t' [-Wformat] /usr/src/sys/security/mac_veriexec/veriexec_fingerprint.c:115: warning: format '%lu' expects type 'long unsigned int', but argument 6 has type 'ino_t' [-Wformat] . . . --- all_subdir_mac_veriexec --- *** [veriexec_fingerprint.o] Error code 1 And, as a result, those builds fail on ci.freebsd.org . Basically the 32-bit architectures fail and the 64-bit ones do not (for the same code). I've not checked the later *veriex* related check-ins: -r335400 -r335401 -r335402 for possible similar problems. === Mark Millard marklmi at yahoo.com ( dsl-only.net went away in early 2018-Mar) ___ 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: r335402 - head/sbin/veriexecctl
Author: stevek Date: Wed Jun 20 01:08:54 2018 New Revision: 335402 URL: https://svnweb.freebsd.org/changeset/base/335402 Log: This application (veriexecctl) handles reading a fingerprints file containing paths, fingerprints, and optional option flags which in turn get pushed into the MAC/veriexec meta-data store via the veriexec device. The format of the fingerprints file is as follows: path type fingerprint options The type of fingerprint supported depends on what MAC/veriexec fingerprint modules have been loaded into the system. The veriexecctl application is able to determine which ones are available by consulting the security.mac.veriexec.algorithms sysctl. The following options are currently supported in MAC/veriexec and by the veriexecctl application: indirect If this option is set then the executable cannot be invoked directly, it can only be used as an interpreter in shell scripts. file Indicates that the fingerprint is associated with a file, not an executable. Files have their fingerprints verified during open(2) and are automatically made read only. This option may be used to verify shared libraries have not been tampered with. no_ptrace If this option is set then the executable cannot be traced with the ptrace(2) process tracing and debugging call. trusted If this option is set then the executable is allowed to write to the mem(4) devices. By default, when verified execution is enforced, no process is allowed to write to the mem(4) devices. The options are not case sensitive. Reviewed by: jtl, wblock Obtained from:Juniper Networks, Inc. Differential Revision:https://reviews.freebsd.org/D8575 Added: head/sbin/veriexecctl/ head/sbin/veriexecctl/Makefile (contents, props changed) head/sbin/veriexecctl/veriexecctl.8 (contents, props changed) head/sbin/veriexecctl/veriexecctl.c (contents, props changed) head/sbin/veriexecctl/veriexecctl_conf.l (contents, props changed) head/sbin/veriexecctl/veriexecctl_parse.y (contents, props changed) Added: head/sbin/veriexecctl/Makefile == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sbin/veriexecctl/Makefile Wed Jun 20 01:08:54 2018 (r335402) @@ -0,0 +1,11 @@ +# $FreeBSD$ + +PROG= veriexecctl +MAN= veriexecctl.8 +SRCS= veriexecctl_parse.y veriexecctl_conf.l veriexecctl.c + +WARNS?=3 + +LIBADD=l + +.include Added: head/sbin/veriexecctl/veriexecctl.8 == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sbin/veriexecctl/veriexecctl.8 Wed Jun 20 01:08:54 2018 (r335402) @@ -0,0 +1,121 @@ +.\" $NetBSD: veriexecctl.8,v 1.5 2004/03/06 23:40:13 wiz Exp $ +.\" +.\" Copyright (c) 1999 +.\"Brett Lymn - bl...@baea.com.au, brett_l...@yahoo.com.au +.\" +.\" This code is donated to The NetBSD Foundation by the author. +.\" +.\" 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. +.\" 3. The name of the Author may not be used to endorse or promote +.\"products derived from this software without specific prior written +.\"permission. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 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 June 19, 2018 +.Dt VERIEXECCTL 8 +.Os +.Sh NAME +.Nm veriexecctl +.Nd load verified exec fingerprints +.Sh SYNOPSIS +.Nm +.Ar fingerprints +.Sh DESCRIPTION +The +.Nm +command loads an in-kernel metadata store of the fingerprints +given in the +.Ar fingerprints +file. +The kernel can then calculate the fingerprint of programs at time of +execution or files that are opened with +.Dv O_VERIFY +and verify
svn commit: r335401 - head/lib/libveriexec
Author: stevek Date: Wed Jun 20 00:55:18 2018 New Revision: 335401 URL: https://svnweb.freebsd.org/changeset/base/335401 Log: This library allows for user space applications to check file descriptors or paths to see if they can be verified by MAC/veriexec. Reviewed by: jtl, wblock Obtained from:Juniper Networks, Inc. Differential Revision:https://reviews.freebsd.org/D8562 Added: head/lib/libveriexec/ head/lib/libveriexec/Makefile (contents, props changed) head/lib/libveriexec/libveriexec.h (contents, props changed) head/lib/libveriexec/veriexec.3 (contents, props changed) head/lib/libveriexec/veriexec_check.c (contents, props changed) Added: head/lib/libveriexec/Makefile == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/libveriexec/Makefile Wed Jun 20 00:55:18 2018 (r335401) @@ -0,0 +1,14 @@ +# $FreeBSD$ + +.include + +LIB= veriexec +MAN= veriexec.3 +INCS= libveriexec.h + +WARNS?=2 + +SRCS= veriexec_check.c + +.include + Added: head/lib/libveriexec/libveriexec.h == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/libveriexec/libveriexec.h Wed Jun 20 00:55:18 2018 (r335401) @@ -0,0 +1,37 @@ +/* + * $FreeBSD$ + * + * Copyright (c) 2011, 2012, 2013, 2015, Juniper Networks, Inc. + * 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 ``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 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. + */ + +#ifndef __LIBVERIEXEC_H__ +#define __LIBVERIEXEC_H__ + +intveriexec_check_fd_mode(int, unsigned int); +intveriexec_check_path_mode(const char *, unsigned int); +intveriexec_check_fd(int); +intveriexec_check_path(const char *); + +#endif /* __LIBVERIEXEC_H__ */ Added: head/lib/libveriexec/veriexec.3 == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/libveriexec/veriexec.3 Wed Jun 20 00:55:18 2018 (r335401) @@ -0,0 +1,65 @@ +.\" Copyright (c) 2018, Juniper Networks, Inc. +.\" 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 June 19, 2018 +.Dt VERIEXEC 3 +.Os +.Sh NAME +.Nm veriexec_check_fd , +.Nm veriexec_check_path +.Nd Verified execution routines +.Sh LIBRARY +.Lb
Re: svn commit: r335278 - head/bin/pwd
On Tue, Jun 19, 2018 at 5:56 PM, Eitan Adler wrote: > On 19 June 2018 at 12:57, Pedro Giffuni wrote: > > > > > > On 19/06/2018 11:25, John Baldwin wrote: > >> > >> On 6/18/18 10:26 PM, Eitan Adler wrote: > >>> > >>> On 18 June 2018 at 10:57, John Baldwin wrote: > > On 6/16/18 10:14 PM, Eitan Adler wrote: > > > > Author: eadler > > Date: Sun Jun 17 05:14:50 2018 > > New Revision: 335278 > > URL: https://svnweb.freebsd.org/changeset/base/335278 > > > > Log: > >pwd: mark usage as dead > > You keep committing changes like this and ignoring e-mails about them. > >>> > >>> I replied both the first time and this time. I may have > >>> (accidentally?) ignored similar emails though. The question I have is > >>> other than the mild code churn what's the harm? > >> > >> It adds clutter. Also, fixing the tool means you fix all the places at > >> once rather than slowly adding workarounds one by one. > >> > What broken compiler are you using that doesn't properly inherit > __dead2 > from the call to exit()? > >>> > >>> In this case, scan-build50 was getting annoyed. > >> > >> Does scan-build from LLVM 6.0 handle this correctly? If so, I'd say to > >> just mark this warning as broken (and thus ignore it) for scan-build50 > >> just as we ignore certain warnings from GCC 4.2.1 because they are > >> broken-as-implemented. > >> > > FWIW, clang's scan-build is made to even more false positives and general > > noise than the regular compiler warnings. > > It is better to just ignore it unless it finds something real. > > I don't consider this a real harm, but I'll try and remember to ignore > these in the future. We're in danger of being nibbled to death by ducks by these sorts of things. We need to choose carefully where we annotate to accommodate the competing needs of simplicity and automated tools providing assistance in boosting our code quality. So this one may or may not matter. But it's not just this one change that we have to look at... Warner ___ 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: r335400 - in head/sys: dev/veriexec modules modules/veriexec
Author: stevek Date: Wed Jun 20 00:48:46 2018 New Revision: 335400 URL: https://svnweb.freebsd.org/changeset/base/335400 Log: Device for user space to interface with MAC/veriexec. The veriexec device features the following ioctl commands: VERIEXEC_ACTIVE Activate veriexec functionality VERIEXEC_DEBUG_ON Enable debugging mode and increment or set the debug level VERIEXEC_DEBUG_OFF Disable debugging mode VERIEXEC_ENFORCE Enforce veriexec fingerprinting (and acitvate if not already) VERIEXEC_GETSTATE Get current veriexec state VERIEXEC_LOCK Lock changes to veriexec meta-data store VERIEXEC_LOAD Load veriexec fingerprint if secure level is not raised (and passes the checks for VERIEXEC_SIGNED_LOAD) VERIEXEC_SIGNED_LOAD Load veriexec fingerprints from loader that supports signed manifest (and thus we can be more lenient about secure level being raised.) Fingerprints can be loaded if the meta-data store is not locked. Also securelevel must not have been raised or some fingerprints must have already been loaded, otherwise it would be dangerous to allow loading. (Note: this assumes that the fingerprints in the meta-data store at least cover the fingerprint loader.) Reviewed by: jtl Obtained from:Juniper Networks, Inc. Differential Revision:https://reviews.freebsd.org/D8561 Added: head/sys/dev/veriexec/ head/sys/dev/veriexec/veriexec_ioctl.h (contents, props changed) head/sys/dev/veriexec/verified_exec.c (contents, props changed) head/sys/modules/veriexec/ head/sys/modules/veriexec/Makefile (contents, props changed) Modified: head/sys/modules/Makefile Added: head/sys/dev/veriexec/veriexec_ioctl.h == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/dev/veriexec/veriexec_ioctl.h Wed Jun 20 00:48:46 2018 (r335400) @@ -0,0 +1,60 @@ +/* + * $FreeBSD$ + * + * Copyright (c) 2011-2013, 2015, Juniper Networks, Inc. + * 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 ``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 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. + */ + +/* + * + * Definitions for the Verified Executables kernel function. + * + */ +#ifndef _DEV_VERIEXEC_VERIEXEC_IOCTL_H +#define _DEV_VERIEXEC_VERIEXEC_IOCTL_H + +#include +#include + +#defineVERIEXEC_FPTYPELEN 16 + +struct verified_exec_params { + unsigned char flags; + char fp_type[VERIEXEC_FPTYPELEN]; /* type of fingerprint */ + char file[MAXPATHLEN]; + unsigned char fingerprint[MAXFINGERPRINTLEN]; +}; + +#define VERIEXEC_LOAD _IOW('S', 0x1, struct verified_exec_params) +#define VERIEXEC_ACTIVE_IO('S', 0x2) /* start checking */ +#define VERIEXEC_ENFORCE _IO('S', 0x3) /* fail exec */ +#define VERIEXEC_LOCK _IO('S', 0x4) /* don't allow new sigs */ +#define VERIEXEC_DEBUG_ON _IOWR('S', 0x5, int) /* set/get debug level */ +#define VERIEXEC_DEBUG_OFF _IO('S', 0x6) /* reset debug */ +#define VERIEXEC_GETSTATE _IOR('S', 0x7, int) /* get state */ +#define VERIEXEC_SIGNED_LOAD _IOW('S', 0x8, struct verified_exec_params) + +#define_PATH_DEV_VERIEXEC _PATH_DEV "veriexec" + +#endif Added: head/sys/dev/veriexec/verified_exec.c == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/dev/veriexec/verified_exec.c Wed Jun 20 00:48:46 2018 (r335400) @@ -0,0 +1,224 @@ +/* + * $FreeBSD$ + * + * Copyright (c) 2011-2013, 2015, Juniper Networks, Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + *
svn commit: r335399 - in head/sys: conf modules modules/mac_veriexec modules/mac_veriexec_rmd160 modules/mac_veriexec_sha1 modules/mac_veriexec_sha256 modules/mac_veriexec_sha384 modules/mac_veriex...
Author: stevek Date: Wed Jun 20 00:41:30 2018 New Revision: 335399 URL: https://svnweb.freebsd.org/changeset/base/335399 Log: MAC/veriexec implements a verified execution environment using the MAC framework. The code is organized into a few distinct pieces: * The meta-data store (in veriexec_metadata.c) which maps a file system identifier, file identifier, and generation key tuple to veriexec meta-data record. * Fingerprint management (in veriexec_fingerprint.c) which deals with calculating the cryptographic hash for a file and verifying it. It also manages the loadable fingerprint modules. * MAC policy implementation (in mac_veriexec.c) which implements the following MAC methods: mpo_init Initializes the veriexec state, meta-data store, fingerprint modules, and registers mount and unmount EVENTHANDLERs mpo_syscall Implements the following per-policy system calls: MAC_VERIEXEC_CHECK_FD_SYSCALL Check a file descriptor to see if the referenced file has a valid fingerprint. MAC_VERIEXEC_CHECK_PATH_SYSCALL Check a path to see if the referenced file has a valid fingerprint. mpo_kld_check_load Check if loading a kld is allowed. This checks if the referenced vnode has a valid fingerprint. mpo_mount_destroy_label Clears the veriexec slot data in a mount point label. mpo_mount_init_label Initializes the veriexec slot data in a mount point label. The file system identifier is saved in the veriexec slot data. mpo_priv_check Check if a process is allowed to write to /dev/kmem and /dev/mem devices. If a process is flagged as trusted, it is allowed to write. mpo_proc_check_debug Check if a process is allowed to be debugged. If a process is not flagged with VERIEXEC_NOTRACE, then debugging is allowed. mpo_vnode_check_exec Check is an exectuable is allowed to run. If veriexec is not enforcing or the executable has a valid fingerprint, then it is allowed to run. NOTE: veriexec will complain about mismatched fingerprints if it is active, regardless of the state of the enforcement. mpo_vnode_check_open Check is a file is allowed to be opened. If verification was not requested, veriexec is not enforcing, or the file has a valid fingerprint, then veriexec will allow the file to be opened. mpo_vnode_copy_label Copies the veriexec slot data from one label to another. mpo_vnode_destroy_label Clears the veriexec slot data in a vnode label. mpo_vnode_init_label Initializes the veriexec slot data in a vnode label. The fingerprint status for the file is stored in the veriexec slot data. * Some sysctls, under security.mac.veriexec, for setting debug level, fetching the current state in a human-readable form, and dumping the fingerprint database are implemented. * The MAC policy implementation source file also contains some utility functions. * A set of fingerprint modules for the following cryptographic hash algorithms: RIPEMD-160, SHA1, SHA2-256, SHA2-384, SHA2-512 * Loadable module builds for MAC/veriexec and fingerprint modules. WARNING: Using veriexec with NFS (or other network-based) file systems is not recommended as one cannot guarantee the integrity of the files served, nor the uniqueness of file system identifiers which are used as key in the meta-data store. Reviewed by: ian, jtl Obtained from:Juniper Networks, Inc. Differential Revision:https://reviews.freebsd.org/D8554 Added: head/sys/modules/mac_veriexec/ head/sys/modules/mac_veriexec/Makefile (contents, props changed) head/sys/modules/mac_veriexec_rmd160/ head/sys/modules/mac_veriexec_rmd160/Makefile (contents, props changed) head/sys/modules/mac_veriexec_sha1/ head/sys/modules/mac_veriexec_sha1/Makefile (contents, props changed) head/sys/modules/mac_veriexec_sha256/ head/sys/modules/mac_veriexec_sha256/Makefile (contents, props changed) head/sys/modules/mac_veriexec_sha384/ head/sys/modules/mac_veriexec_sha384/Makefile (contents, props changed) head/sys/modules/mac_veriexec_sha512/ head/sys/modules/mac_veriexec_sha512/Makefile (contents, props changed) head/sys/security/mac_veriexec/ head/sys/security/mac_veriexec/mac_veriexec.c (contents, props changed) head/sys/security/mac_veriexec/mac_veriexec.h (contents, props changed) head/sys/security/mac_veriexec/mac_veriexec_internal.h (contents, props changed) head/sys/security/mac_veriexec/mac_veriexec_rmd160.c (contents, props changed) head/sys/security/mac_veriexec/mac_veriexec_sha1.c (contents, props changed) head/sys/security/mac_veriexec/mac_veriexec_sha256.c (contents, props changed) head/sys/security/mac_veriexec/mac_veriexec_sha384.c (contents, props changed) head/sys/security/mac_veriexec/mac_veriexec_sha512.c
Re: svn commit: r335276 - in head/stand/i386: gptboot zfsboot
On 2018-06-17 07:32, Eugene Grosbein wrote: > 17.06.2018 10:18, Allan Jude wrote: > >> Author: allanjude >> Date: Sun Jun 17 03:18:56 2018 >> New Revision: 335276 >> URL: https://svnweb.freebsd.org/changeset/base/335276 >> >> Log: >> gptboot, zfsboot, gptzfsboot: Enable the video and serial consoles early >> >> Normally the serial console is not enabled until /boot.config is read and >> we know how the serial console should be configured. Initialize the >> consoles early in 'dual' mode (serial & keyboard) with a default serial >> rate of 115200. Then serial is re-initialized once the disk is decrypted >> and the /boot.config file can be read. >> >> This allows the GELIBoot passphrase to be provided via the serial console. >> >> PR:221526 >> Requested by: many >> Reviewed by: imp >> Sponsored by: Klara Systems >> Differential Revision: https://reviews.freebsd.org/D15862 > > I had several cases when booting FreeBSD/amd64 with motherboard having no > serial ports > hang hard early at boot unless I rebuilt boot media configuring it to NOT try > accessing > missing serial ports. I even could reproduce that with VirtualBox machine > configured > with no serial ports (not same as existing bug inactive serial port). > > Should there be some way to disable this serial ports configuration at > compile time? > > > I think what we'll do it compile it both ways, and use the non-serial one by default, because it is safer. Then you can just use 'gptboot-serial' if you want serial support. This will likely make Warner a bit sad, since we are just finally getting around to reducing the number of different bootcode files. -- 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"
Re: svn commit: r335276 - in head/stand/i386: gptboot zfsboot
On 2018-06-19 16:30, O. Hartmann wrote: > Am Sun, 17 Jun 2018 03:18:57 + (UTC) > Allan Jude schrieb: > >> Author: allanjude >> Date: Sun Jun 17 03:18:56 2018 >> New Revision: 335276 >> URL: https://svnweb.freebsd.org/changeset/base/335276 > >> Log: >> gptboot, zfsboot, gptzfsboot: Enable the video and serial consoles early > >> Normally the serial console is not enabled until /boot.config is read and >> we know how the serial console should be configured. Initialize the >> consoles early in 'dual' mode (serial & keyboard) with a default serial >> rate of 115200. Then serial is re-initialized once the disk is decrypted >> and the /boot.config file can be read. > >> This allows the GELIBoot passphrase to be provided via the serial console. > >> PR:221526 >> Requested by: many >> Reviewed by: imp >> Sponsored by: Klara Systems >> Differential Revision: https://reviews.freebsd.org/D15862 > >> Modified: >> head/stand/i386/gptboot/gptboot.c >> head/stand/i386/zfsboot/zfsboot.c > > > This commit breaks booting off GPT partition (using NanoBSD, as Iposted > mistakenly to > commit r335254, see there). > Having CURRENT applied to a SD card for usage on a PCEngines APU 2C4, the > boot process > dies immediately showing "Booting from harddisk". r335275 boots well. > > I have reverted this commit in r335398. As I mentioned in that commit, it will likely come back as an optional feature in the near future. -- Allan Jude signature.asc Description: OpenPGP digital signature
svn commit: r335398 - in head/stand/i386: gptboot zfsboot
Author: allanjude Date: Wed Jun 20 00:14:54 2018 New Revision: 335398 URL: https://svnweb.freebsd.org/changeset/base/335398 Log: Revert r335276 This was causing issues for people booting. I will likely bring this back as an optional feature, similar to boot0sio, like gptboot-serial or something. PR: 221526 Reported by: O. Hartmann , Thomas Laus Modified: head/stand/i386/gptboot/gptboot.c head/stand/i386/zfsboot/zfsboot.c Modified: head/stand/i386/gptboot/gptboot.c == --- head/stand/i386/gptboot/gptboot.c Wed Jun 20 00:13:09 2018 (r335397) +++ head/stand/i386/gptboot/gptboot.c Wed Jun 20 00:14:54 2018 (r335398) @@ -285,16 +285,6 @@ main(void) bootinfo.bi_memsizes_valid++; bootinfo.bi_bios_dev = dsk.drive; - /* -* Initialize the serial console early with a modern default of 115200. -* Later, we'll read PATH_DOTCONFIG and reconfigure serial according -* to the configuration provided. -*/ - opts = OPT_SET(RBX_DUAL); - ioctrl = (IO_SERIAL|IO_KEYBOARD); - if (sio_init(115200) != 0) - ioctrl &= ~IO_SERIAL; - #ifdef LOADER_GELI_SUPPORT geli_init(); #endif Modified: head/stand/i386/zfsboot/zfsboot.c == --- head/stand/i386/zfsboot/zfsboot.c Wed Jun 20 00:13:09 2018 (r335397) +++ head/stand/i386/zfsboot/zfsboot.c Wed Jun 20 00:14:54 2018 (r335398) @@ -693,16 +693,6 @@ main(void) } setheap(heap_next, heap_end); -/* - * Initialize the serial console early with a modern default of 115200. - * Later, we'll read PATH_DOTCONFIG and reconfigure serial according - * to the configuration provided. - */ -opts = OPT_SET(RBX_DUAL); -ioctrl = (IO_SERIAL|IO_KEYBOARD); -if (sio_init(115200) != 0) - ioctrl &= ~IO_SERIAL; - dsk = malloc(sizeof(struct dsk)); dsk->drive = *(uint8_t *)PTOV(ARGS); dsk->type = dsk->drive & DRV_HARD ? TYPE_AD : TYPE_FD; ___ 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: r335397 - in head/usr.bin: primes uniq
Author: oshogbo Date: Wed Jun 20 00:13:09 2018 New Revision: 335397 URL: https://svnweb.freebsd.org/changeset/base/335397 Log: Use capsicum helpers to cache NLS data. Modified: head/usr.bin/primes/primes.c head/usr.bin/uniq/uniq.c Modified: head/usr.bin/primes/primes.c == --- head/usr.bin/primes/primes.cTue Jun 19 23:57:12 2018 (r335396) +++ head/usr.bin/primes/primes.cWed Jun 20 00:13:09 2018 (r335397) @@ -101,9 +101,7 @@ main(int argc, char *argv[]) int ch; char *p; - /* Cache NLS data, for strerror, for err(3), before cap_enter. */ - (void)catopen("libc", NL_CAT_LOCALE); - + caph_cache_catpages(); if (caph_enter() < 0) err(1, "cap_enter"); Modified: head/usr.bin/uniq/uniq.c == --- head/usr.bin/uniq/uniq.cTue Jun 19 23:57:12 2018(r335396) +++ head/usr.bin/uniq/uniq.cWed Jun 20 00:13:09 2018(r335397) @@ -87,17 +87,6 @@ static wchar_t *skip(wchar_t *); static void obsolete(char *[]); static void usage(void); -static void -strerror_init(void) -{ - - /* -* Cache NLS data before entering capability mode. -* XXXPJD: There should be strerror_init() and strsignal_init() in libc. -*/ - (void)catopen("libc", NL_CAT_LOCALE); -} - int main (int argc, char *argv[]) { @@ -177,7 +166,7 @@ main (int argc, char *argv[]) } } - strerror_init(); + caph_cache_catpages(); if (caph_enter() < 0) err(1, "unable to enter capability mode"); ___ 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: r335396 - head
Author: bdrewery Date: Tue Jun 19 23:57:12 2018 New Revision: 335396 URL: https://svnweb.freebsd.org/changeset/base/335396 Log: TARGET_TRIPLE is needed much earlier now for CROSS_BINUTILS_PREFIX check. This was missed in r335394 since the check became exists(/usr/local) in my testing. X-MFC-With: r335394 MFC after:2 weeks Sponsored by: Dell EMC Modified: head/Makefile.inc1 Modified: head/Makefile.inc1 == --- head/Makefile.inc1 Tue Jun 19 23:43:14 2018(r335395) +++ head/Makefile.inc1 Tue Jun 19 23:57:12 2018(r335396) @@ -190,6 +190,28 @@ compiler-metadata.mk: .PHONY .META @echo ".export ${_COMPILER_METADATA_VARS}" >> ${.TARGET} @echo ".export ${_COMPILER_METADATA_VARS:C,^,X_,}" >> ${.TARGET} +.if ${TARGET} == ${MACHINE} +TARGET_CPUTYPE?=${CPUTYPE} +.else +TARGET_CPUTYPE?= +.endif +.if !empty(TARGET_CPUTYPE) +_TARGET_CPUTYPE=${TARGET_CPUTYPE} +.else +_TARGET_CPUTYPE=dummy +.endif +.if ${TARGET} == "arm" +.if ${TARGET_ARCH:Marmv[67]*} != "" && ${TARGET_CPUTYPE:M*soft*} == "" +TARGET_ABI=gnueabihf +.else +TARGET_ABI=gnueabi +.endif +.endif +MACHINE_ABI?= unknown +MACHINE_TRIPLE?=${MACHINE_ARCH:S/amd64/x86_64/:C/hf$//:S/mipsn32/mips64/}-${MACHINE_ABI}-freebsd12.0 +TARGET_ABI?= unknown +TARGET_TRIPLE?= ${TARGET_ARCH:S/amd64/x86_64/:C/hf$//:S/mipsn32/mips64/}-${TARGET_ABI}-freebsd12.0 + # Handle external binutils. .if defined(CROSS_TOOLCHAIN_PREFIX) CROSS_BINUTILS_PREFIX?=${CROSS_TOOLCHAIN_PREFIX} @@ -440,17 +462,6 @@ _t=${TARGET_ARCH}/${TARGET} .endif .endfor -.if ${TARGET} == ${MACHINE} -TARGET_CPUTYPE?=${CPUTYPE} -.else -TARGET_CPUTYPE?= -.endif - -.if !empty(TARGET_CPUTYPE) -_TARGET_CPUTYPE=${TARGET_CPUTYPE} -.else -_TARGET_CPUTYPE=dummy -.endif _CPUTYPE!= MAKEFLAGS= CPUTYPE=${_TARGET_CPUTYPE} ${MAKE} -f /dev/null \ -m ${.CURDIR}/share/mk MK_AUTO_OBJ=no -V CPUTYPE .if ${_CPUTYPE} != ${_TARGET_CPUTYPE} @@ -634,17 +645,6 @@ BFLAGS+= -B${CROSS_BINUTILS_PREFIX} .if !defined(CROSS_BINUTILS_PREFIX) || !exists(${CROSS_BINUTILS_PREFIX}) BFLAGS+= -B${WORLDTMP}/usr/bin .endif -.if ${TARGET} == "arm" -.if ${TARGET_ARCH:Marmv[67]*} != "" && ${TARGET_CPUTYPE:M*soft*} == "" -TARGET_ABI=gnueabihf -.else -TARGET_ABI=gnueabi -.endif -.endif -MACHINE_ABI?= unknown -MACHINE_TRIPLE?=${MACHINE_ARCH:S/amd64/x86_64/:C/hf$//:S/mipsn32/mips64/}-${MACHINE_ABI}-freebsd12.0 -TARGET_ABI?= unknown -TARGET_TRIPLE?= ${TARGET_ARCH:S/amd64/x86_64/:C/hf$//:S/mipsn32/mips64/}-${TARGET_ABI}-freebsd12.0 .if ${WANT_COMPILER_TYPE} == gcc || \ (defined(X_COMPILER_TYPE) && ${X_COMPILER_TYPE} == gcc) # GCC requires -isystem and -L when using a cross-compiler. --sysroot ___ 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: r335278 - head/bin/pwd
On 19 June 2018 at 12:57, Pedro Giffuni wrote: > > > On 19/06/2018 11:25, John Baldwin wrote: >> >> On 6/18/18 10:26 PM, Eitan Adler wrote: >>> >>> On 18 June 2018 at 10:57, John Baldwin wrote: On 6/16/18 10:14 PM, Eitan Adler wrote: > > Author: eadler > Date: Sun Jun 17 05:14:50 2018 > New Revision: 335278 > URL: https://svnweb.freebsd.org/changeset/base/335278 > > Log: >pwd: mark usage as dead You keep committing changes like this and ignoring e-mails about them. >>> >>> I replied both the first time and this time. I may have >>> (accidentally?) ignored similar emails though. The question I have is >>> other than the mild code churn what's the harm? >> >> It adds clutter. Also, fixing the tool means you fix all the places at >> once rather than slowly adding workarounds one by one. >> What broken compiler are you using that doesn't properly inherit __dead2 from the call to exit()? >>> >>> In this case, scan-build50 was getting annoyed. >> >> Does scan-build from LLVM 6.0 handle this correctly? If so, I'd say to >> just mark this warning as broken (and thus ignore it) for scan-build50 >> just as we ignore certain warnings from GCC 4.2.1 because they are >> broken-as-implemented. >> > FWIW, clang's scan-build is made to even more false positives and general > noise than the regular compiler warnings. > It is better to just ignore it unless it finds something real. I don't consider this a real harm, but I'll try and remember to ignore these in the future. -- Eitan Adler Source, Ports, Doc committer Bugmeister, Ports Security teams ___ 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: r335395 - in head: bin/dd bin/echo bin/sleep bin/uuidgen contrib/dma sbin/decryptcore sbin/dhclient sbin/dumpon sbin/md5 usr.bin/basename usr.bin/cmp usr.bin/col usr.bin/diff usr.bin/di...
Author: oshogbo Date: Tue Jun 19 23:43:14 2018 New Revision: 335395 URL: https://svnweb.freebsd.org/changeset/base/335395 Log: Convert `cap_enter() < 0 && errno != ENOSYS` to `caph_enter() < 0`. No functional change intended. Modified: head/bin/dd/dd.c head/bin/echo/echo.c head/bin/sleep/sleep.c head/bin/uuidgen/uuidgen.c head/contrib/dma/dma-mbox-create.c head/sbin/decryptcore/decryptcore.c head/sbin/dhclient/dhclient.c head/sbin/dumpon/dumpon.c head/sbin/md5/md5.c head/usr.bin/basename/basename.c head/usr.bin/cmp/cmp.c head/usr.bin/col/col.c head/usr.bin/diff/diffreg.c head/usr.bin/diff3/diff3.c head/usr.bin/dirname/dirname.c head/usr.bin/elfdump/elfdump.c head/usr.bin/getopt/getopt.c head/usr.bin/hexdump/display.c head/usr.bin/iconv/iconv.c head/usr.bin/ident/ident.c head/usr.bin/indent/indent.c head/usr.bin/jot/jot.c head/usr.bin/kdump/kdump.c head/usr.bin/ktrdump/ktrdump.c head/usr.bin/lam/lam.c head/usr.bin/last/last.c head/usr.bin/locate/bigram/locate.bigram.c head/usr.bin/logname/logname.c head/usr.bin/ministat/ministat.c head/usr.bin/pom/pom.c head/usr.bin/primes/primes.c head/usr.bin/printenv/printenv.c head/usr.bin/rwho/rwho.c head/usr.bin/tee/tee.c head/usr.bin/tr/tr.c head/usr.bin/uniq/uniq.c head/usr.bin/units/units.c head/usr.bin/write/write.c head/usr.bin/yes/yes.c head/usr.sbin/bhyve/bhyverun.c head/usr.sbin/rwhod/rwhod.c Modified: head/bin/dd/dd.c == --- head/bin/dd/dd.cTue Jun 19 23:40:42 2018(r335394) +++ head/bin/dd/dd.cTue Jun 19 23:43:14 2018(r335395) @@ -98,7 +98,7 @@ main(int argc __unused, char *argv[]) setup(); caph_cache_catpages(); - if (cap_enter() == -1 && errno != ENOSYS) + if (caph_enter() < 0) err(1, "unable to enter capability mode"); (void)signal(SIGINFO, siginfo_handler); Modified: head/bin/echo/echo.c == --- head/bin/echo/echo.cTue Jun 19 23:40:42 2018(r335394) +++ head/bin/echo/echo.cTue Jun 19 23:43:14 2018(r335395) @@ -82,7 +82,7 @@ main(int argc, char *argv[]) char newline[] = "\n"; char *progname = argv[0]; - if (caph_limit_stdio() < 0 || (cap_enter() < 0 && errno != ENOSYS)) + if (caph_limit_stdio() < 0 || caph_enter() < 0) err(1, "capsicum"); /* This utility may NOT do getopt(3) option parsing. */ Modified: head/bin/sleep/sleep.c == --- head/bin/sleep/sleep.c Tue Jun 19 23:40:42 2018(r335394) +++ head/bin/sleep/sleep.c Tue Jun 19 23:43:14 2018(r335395) @@ -70,7 +70,7 @@ main(int argc, char *argv[]) time_t original; char buf[2]; - if (caph_limit_stdio() < 0 || (cap_enter() < 0 && errno != ENOSYS)) + if (caph_limit_stdio() < 0 || caph_enter() < 0) err(1, "capsicum"); if (argc != 2) Modified: head/bin/uuidgen/uuidgen.c == --- head/bin/uuidgen/uuidgen.c Tue Jun 19 23:40:42 2018(r335394) +++ head/bin/uuidgen/uuidgen.c Tue Jun 19 23:43:14 2018(r335395) @@ -86,7 +86,7 @@ main(int argc, char *argv[]) caph_cache_catpages(); if (caph_limit_stdio() < 0) err(1, "Unable to limit stdio"); - if (cap_enter() < 0 && errno != ENOSYS) + if (caph_enter() < 0) err(1, "Unable to enter capability mode"); if (count == -1) Modified: head/contrib/dma/dma-mbox-create.c == --- head/contrib/dma/dma-mbox-create.c Tue Jun 19 23:40:42 2018 (r335394) +++ head/contrib/dma/dma-mbox-create.c Tue Jun 19 23:43:14 2018 (r335395) @@ -166,7 +166,7 @@ main(int argc, char **argv) err(EX_OSERR, "can't limit maildirfd rights"); /* Enter Capsicum capability sandbox */ - if (cap_enter() < 0 && errno != ENOSYS) + if (caph_enter() < 0) err(EX_OSERR, "cap_enter"); #endif Modified: head/sbin/decryptcore/decryptcore.c == --- head/sbin/decryptcore/decryptcore.c Tue Jun 19 23:40:42 2018 (r335394) +++ head/sbin/decryptcore/decryptcore.c Tue Jun 19 23:43:14 2018 (r335395) @@ -35,6 +35,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include #include @@ -167,7 +168,7 @@ decrypt(int ofd, const char *privkeyfile, const char * goto failed; } - if (cap_enter() < 0 && errno != ENOSYS) { + if (caph_enter() < 0) { pjdlog_errno(LOG_ERR, "Unable to enter capability mode");
svn commit: r335394 - head
Author: bdrewery Date: Tue Jun 19 23:40:42 2018 New Revision: 335394 URL: https://svnweb.freebsd.org/changeset/base/335394 Log: Fix detection for binutils bootstrap package. The path was changed recently in the port to be the full target triple. MFC after:2 weeks Sponsored by: Dell EMC Modified: head/Makefile.inc1 Modified: head/Makefile.inc1 == --- head/Makefile.inc1 Tue Jun 19 23:40:39 2018(r335393) +++ head/Makefile.inc1 Tue Jun 19 23:40:42 2018(r335394) @@ -202,7 +202,7 @@ CROSS_BINUTILS_PREFIX?=${CROSS_TOOLCHAIN_PREFIX} .if !empty(BROKEN_OPTIONS:MBINUTILS_BOOTSTRAP) && \ ${MK_LLD_BOOTSTRAP} == "no" && \ !defined(CROSS_BINUTILS_PREFIX) -CROSS_BINUTILS_PREFIX=/usr/local/${TARGET_ARCH}-freebsd/bin/ +CROSS_BINUTILS_PREFIX=/usr/local/${TARGET_TRIPLE}/bin/ .if !exists(${CROSS_BINUTILS_PREFIX}) .error In-tree binutils does not support the ${TARGET_ARCH} architecture. Install the ${TARGET_ARCH}-binutils port or package or set CROSS_BINUTILS_PREFIX. .endif @@ -641,6 +641,10 @@ TARGET_ABI=gnueabihf TARGET_ABI=gnueabi .endif .endif +MACHINE_ABI?= unknown +MACHINE_TRIPLE?=${MACHINE_ARCH:S/amd64/x86_64/:C/hf$//:S/mipsn32/mips64/}-${MACHINE_ABI}-freebsd12.0 +TARGET_ABI?= unknown +TARGET_TRIPLE?= ${TARGET_ARCH:S/amd64/x86_64/:C/hf$//:S/mipsn32/mips64/}-${TARGET_ABI}-freebsd12.0 .if ${WANT_COMPILER_TYPE} == gcc || \ (defined(X_COMPILER_TYPE) && ${X_COMPILER_TYPE} == gcc) # GCC requires -isystem and -L when using a cross-compiler. --sysroot @@ -658,10 +662,6 @@ XCXXFLAGS+=-isystem ${WORLDTMP}/usr/include/c++/v1 -s .endif .elif ${WANT_COMPILER_TYPE} == clang || \ (defined(X_COMPILER_TYPE) && ${X_COMPILER_TYPE} == clang) -MACHINE_ABI?= unknown -MACHINE_TRIPLE?=${MACHINE_ARCH:S/amd64/x86_64/:C/hf$//:S/mipsn32/mips64/}-${MACHINE_ABI}-freebsd12.0 -TARGET_ABI?= unknown -TARGET_TRIPLE?= ${TARGET_ARCH:S/amd64/x86_64/:C/hf$//:S/mipsn32/mips64/}-${TARGET_ABI}-freebsd12.0 XCFLAGS+= -target ${TARGET_TRIPLE} .endif XCFLAGS+= --sysroot=${WORLDTMP} ___ 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: r335392 - head
Author: bdrewery Date: Tue Jun 19 23:40:36 2018 New Revision: 335392 URL: https://svnweb.freebsd.org/changeset/base/335392 Log: SYSTEM_COMPILER: Should use X_ vars for comparing wanted version. It is XCC used during the build of target binaries that replaces the bootstrap compiler. Also slightly tweak style. MFC after:2 weeks Sponsored by: Dell EMC Modified: head/Makefile.inc1 Modified: head/Makefile.inc1 == --- head/Makefile.inc1 Tue Jun 19 23:39:55 2018(r335391) +++ head/Makefile.inc1 Tue Jun 19 23:40:36 2018(r335392) @@ -138,10 +138,10 @@ WANT_COMPILER_VERSION!= \ .if ${MK_SYSTEM_COMPILER} == "yes" && \ (${MK_CLANG_BOOTSTRAP} == "yes" || ${MK_GCC_BOOTSTRAP} == "yes") && \ !make(showconfig) && !make(xdev*) && \ -${WANT_COMPILER_TYPE} == ${COMPILER_TYPE} && \ -(${COMPILER_TYPE} == "clang" || ${TARGET_ARCH} == ${MACHINE_ARCH}) && \ -${COMPILER_VERSION} == ${WANT_COMPILER_VERSION} && \ -${COMPILER_FREEBSD_VERSION} == ${WANT_COMPILER_FREEBSD_VERSION} +${X_COMPILER_TYPE} == ${WANT_COMPILER_TYPE} && \ +(${X_COMPILER_TYPE} == "clang" || ${TARGET_ARCH} == ${MACHINE_ARCH}) && \ +${X_COMPILER_VERSION} == ${WANT_COMPILER_VERSION} && \ +${X_COMPILER_FREEBSD_VERSION} == ${WANT_COMPILER_FREEBSD_VERSION} # Everything matches, disable the bootstrap compiler. MK_CLANG_BOOTSTRAP=no MK_GCC_BOOTSTRAP= no ___ 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: r335393 - head
Author: bdrewery Date: Tue Jun 19 23:40:39 2018 New Revision: 335393 URL: https://svnweb.freebsd.org/changeset/base/335393 Log: Let CROSS_BINUTILS_PREFIX work without a trailing slash. Reported by: jhb MFC after:2 weeks Sponsored by: Dell EMC Modified: head/Makefile.inc1 Modified: head/Makefile.inc1 == --- head/Makefile.inc1 Tue Jun 19 23:40:36 2018(r335392) +++ head/Makefile.inc1 Tue Jun 19 23:40:39 2018(r335393) @@ -211,8 +211,8 @@ CROSS_BINUTILS_PREFIX=/usr/local/${TARGET_ARCH}-freebs XBINUTILS= AS AR LD NM OBJCOPY RANLIB SIZE STRINGS .for BINUTIL in ${XBINUTILS} .if defined(CROSS_BINUTILS_PREFIX) && \ -exists(${CROSS_BINUTILS_PREFIX}${${BINUTIL}}) -X${BINUTIL}?= ${CROSS_BINUTILS_PREFIX}${${BINUTIL}} +exists(${CROSS_BINUTILS_PREFIX}/${${BINUTIL}}) +X${BINUTIL}?= ${CROSS_BINUTILS_PREFIX:C,/*$,,}/${${BINUTIL}} .else X${BINUTIL}?= ${${BINUTIL}} .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: r335391 - head
Author: bdrewery Date: Tue Jun 19 23:39:55 2018 New Revision: 335391 URL: https://svnweb.freebsd.org/changeset/base/335391 Log: Fix X_COMPILER_* and X_LINKER_* not being passed to installworld environment. This could lead to 'sh: head: not found' warnings which were a symptom of running 'ld --version' during installworld. This was only happening with XCC or XLD set. It is intended that cc and ld do not run during installworld. The metadata for these are already stored in compiler-metadata.mk added in r316794. This also removes redundant CROSSENV additions that were for WITH_SYSTEM_COMPILER, WITHOUT_CROSS_COMPILER, and WITHOUT_TOOLCHAIN which all don't have a cc or ld in their PATH during install. Reported by: Mark Millard MFC after:2 weeks Sponsored by: Dell EMC Modified: head/Makefile.inc1 Modified: head/Makefile.inc1 == --- head/Makefile.inc1 Tue Jun 19 23:30:55 2018(r335390) +++ head/Makefile.inc1 Tue Jun 19 23:39:55 2018(r335391) @@ -169,22 +169,6 @@ test-system-compiler: .PHONY .info SYSTEM_COMPILER: Determined that CC=${CC} matches the source tree. Not bootstrapping a cross-compiler. .endif -# For installworld need to ensure that the looked-up compiler metadata is -# passed along rather than trying to run cc from the restricted -# STRICTTMPPATH. -.if ${MK_CLANG_BOOTSTRAP} == "no" && ${MK_GCC_BOOTSTRAP} == "no" -.if !defined(X_COMPILER_TYPE) -CROSSENV+= COMPILER_VERSION=${COMPILER_VERSION} \ - COMPILER_TYPE=${COMPILER_TYPE} \ - COMPILER_FEATURES="${COMPILER_FEATURES}" \ - COMPILER_FREEBSD_VERSION=${COMPILER_FREEBSD_VERSION} -.else -CROSSENV+= COMPILER_VERSION=${X_COMPILER_VERSION} \ - COMPILER_FEATURES="${X_COMPILER_FEATURES}" \ - COMPILER_TYPE=${X_COMPILER_TYPE} \ - COMPILER_FREEBSD_VERSION=${X_COMPILER_FREEBSD_VERSION} -.endif -.endif # Store some compiler metadata for use in installworld where we don't # want to invoke CC at all. _COMPILER_METADATA_VARS= COMPILER_VERSION \ @@ -201,8 +185,10 @@ compiler-metadata.mk: .PHONY .META @echo "_LOADED_COMPILER_METADATA=t" >> ${.TARGET} .for v in ${_COMPILER_METADATA_VARS} @echo "${v}=${${v}}" >> ${.TARGET} + @echo "X_${v}=${X_${v}}" >> ${.TARGET} .endfor @echo ".export ${_COMPILER_METADATA_VARS}" >> ${.TARGET} + @echo ".export ${_COMPILER_METADATA_VARS:C,^,X_,}" >> ${.TARGET} # Handle external binutils. .if defined(CROSS_TOOLCHAIN_PREFIX) ___ 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: r335390 - head/usr.bin/top
Author: eadler Date: Tue Jun 19 23:30:55 2018 New Revision: 335390 URL: https://svnweb.freebsd.org/changeset/base/335390 Log: top(1): fix top -mio Modified: head/usr.bin/top/machine.c Modified: head/usr.bin/top/machine.c == --- head/usr.bin/top/machine.c Tue Jun 19 22:19:42 2018(r335389) +++ head/usr.bin/top/machine.c Tue Jun 19 23:30:55 2018(r335390) @@ -455,6 +455,7 @@ format_header(const char *uname_field) case DISP_IO: prehead = io_header; snprintf(Header, sizeof(Header), prehead, + ps.thread_id ? " THR" : "PID", jidlength, ps.jail ? " JID" : "", namelength, namelength, uname_field); break; ___ 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: r335389 - head/lib/libcasper/services/cap_pwd
Author: oshogbo Date: Tue Jun 19 22:19:42 2018 New Revision: 335389 URL: https://svnweb.freebsd.org/changeset/base/335389 Log: Fix typo. Modified: head/lib/libcasper/services/cap_pwd/cap_pwd.3 Modified: head/lib/libcasper/services/cap_pwd/cap_pwd.3 == --- head/lib/libcasper/services/cap_pwd/cap_pwd.3 Tue Jun 19 21:58:04 2018(r335388) +++ head/lib/libcasper/services/cap_pwd/cap_pwd.3 Tue Jun 19 22:19:42 2018(r335389) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd March 18, 2018 +.Dd June 20, 2018 .Dt CAP_PWD 3 .Os .Sh NAME @@ -42,7 +42,7 @@ .Nm cap_pwd_limit_users .Nd "library for password database operations in capability mode" .Sh LIBRARY -.Lb libcap_grp +.Lb libcap_pwd .Sh SYNOPSIS .In libcasper.h .In casper/cap_pwd.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: r335388 - head/tools/tools/git
Author: imp Date: Tue Jun 19 21:58:04 2018 New Revision: 335388 URL: https://svnweb.freebsd.org/changeset/base/335388 Log: Fix typo noticed by pstef@. Modified: head/tools/tools/git/HOWTO Modified: head/tools/tools/git/HOWTO == --- head/tools/tools/git/HOWTO Tue Jun 19 21:26:23 2018(r335387) +++ head/tools/tools/git/HOWTO Tue Jun 19 21:58:04 2018(r335388) @@ -147,7 +147,7 @@ III. git-svn-rebase git-svn-rebase is a script that helps you keep current when using git plus subversion as outline in https://wiki.freebsd.org/GitWorkflow/GitSvn -since it's otherwise a pain to have many branhes active. It will rebase +since it's otherwise a pain to have many branches active. It will rebase those branches that haven't been merged yet. Some tweaking may be needed if you have other, weird branches in your tree (including any stable branches). To run it just cd into the git subversion tree somewhere and ___ 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: r335387 - head/sys/compat/linux
Author: emaste Date: Tue Jun 19 21:26:23 2018 New Revision: 335387 URL: https://svnweb.freebsd.org/changeset/base/335387 Log: linuxulator: handle V3 capget/capset Linux 2.6.26 introduced 64-bit capability sets. Extend our stub implementation to handle both 32- and 64-bit. (We still report no capabilities in capget, and disallow any in capset.) Reviewed by: chuck Sponsored by: Turing Robotic Industries Inc. Differential Revision:https://reviews.freebsd.org/D15887 Modified: head/sys/compat/linux/linux_misc.c Modified: head/sys/compat/linux/linux_misc.c == --- head/sys/compat/linux/linux_misc.c Tue Jun 19 21:07:25 2018 (r335386) +++ head/sys/compat/linux/linux_misc.c Tue Jun 19 21:26:23 2018 (r335387) @@ -1867,7 +1867,9 @@ linux_exit_group(struct thread *td, struct linux_exit_ /* NOTREACHED */ } -#define _LINUX_CAPABILITY_VERSION 0x19980330 +#define _LINUX_CAPABILITY_VERSION_1 0x19980330 +#define _LINUX_CAPABILITY_VERSION_2 0x20071026 +#define _LINUX_CAPABILITY_VERSION_3 0x20080522 struct l_user_cap_header { l_int version; @@ -1881,27 +1883,35 @@ struct l_user_cap_data { }; int -linux_capget(struct thread *td, struct linux_capget_args *args) +linux_capget(struct thread *td, struct linux_capget_args *uap) { struct l_user_cap_header luch; - struct l_user_cap_data lucd; - int error; + struct l_user_cap_data lucd[2]; + int error, u32s; - if (args->hdrp == NULL) + if (uap->hdrp == NULL) return (EFAULT); - error = copyin(args->hdrp, , sizeof(luch)); + error = copyin(uap->hdrp, , sizeof(luch)); if (error != 0) return (error); - if (luch.version != _LINUX_CAPABILITY_VERSION) { + switch (luch.version) { + case _LINUX_CAPABILITY_VERSION_1: + u32s = 1; + break; + case _LINUX_CAPABILITY_VERSION_2: + case _LINUX_CAPABILITY_VERSION_3: + u32s = 2; + break; + default: #ifdef DEBUG if (ldebug(capget)) printf(LMSG("invalid capget capability version 0x%x"), luch.version); #endif - luch.version = _LINUX_CAPABILITY_VERSION; - error = copyout(, args->hdrp, sizeof(luch)); + luch.version = _LINUX_CAPABILITY_VERSION_1; + error = copyout(, uap->hdrp, sizeof(luch)); if (error) return (error); return (EINVAL); @@ -1910,42 +1920,50 @@ linux_capget(struct thread *td, struct linux_capget_ar if (luch.pid) return (EPERM); - if (args->datap) { + if (uap->datap) { /* * The current implementation doesn't support setting * a capability (it's essentially a stub) so indicate * that no capabilities are currently set or available * to request. */ - bzero (, sizeof(lucd)); - error = copyout(, args->datap, sizeof(lucd)); + memset(, 0, u32s * sizeof(lucd[0])); + error = copyout(, uap->datap, u32s * sizeof(lucd[0])); } return (error); } int -linux_capset(struct thread *td, struct linux_capset_args *args) +linux_capset(struct thread *td, struct linux_capset_args *uap) { struct l_user_cap_header luch; - struct l_user_cap_data lucd; - int error; + struct l_user_cap_data lucd[2]; + int error, i, u32s; - if (args->hdrp == NULL || args->datap == NULL) + if (uap->hdrp == NULL || uap->datap == NULL) return (EFAULT); - error = copyin(args->hdrp, , sizeof(luch)); + error = copyin(uap->hdrp, , sizeof(luch)); if (error != 0) return (error); - if (luch.version != _LINUX_CAPABILITY_VERSION) { + switch (luch.version) { + case _LINUX_CAPABILITY_VERSION_1: + u32s = 1; + break; + case _LINUX_CAPABILITY_VERSION_2: + case _LINUX_CAPABILITY_VERSION_3: + u32s = 2; + break; + default: #ifdef DEBUG if (ldebug(capset)) printf(LMSG("invalid capset capability version 0x%x"), luch.version); #endif - luch.version = _LINUX_CAPABILITY_VERSION; - error = copyout(, args->hdrp, sizeof(luch)); + luch.version = _LINUX_CAPABILITY_VERSION_1; + error = copyout(, uap->hdrp, sizeof(luch)); if (error) return (error); return (EINVAL); @@ -1954,18 +1972,21 @@ linux_capset(struct thread *td, struct linux_capset_ar if (luch.pid) return (EPERM); -
svn commit: r335386 - in head: share/examples tools/build/mk usr.sbin
Author: sbruno Date: Tue Jun 19 21:07:25 2018 New Revision: 335386 URL: https://svnweb.freebsd.org/changeset/base/335386 Log: MK_EFI - Add uefisign and friends to this knob and ensure that we don't try to build them if MK_OPENSSL is unset. Reviewed by: emaste imp kevans Sponsored by: Limelight Networks Differential Revision:https://reviews.freebsd.org/D15211 Modified: head/share/examples/Makefile head/tools/build/mk/OptionalObsoleteFiles.inc head/usr.sbin/Makefile Modified: head/share/examples/Makefile == --- head/share/examples/MakefileTue Jun 19 20:32:43 2018 (r335385) +++ head/share/examples/MakefileTue Jun 19 21:07:25 2018 (r335386) @@ -31,7 +31,6 @@ LDIRS=BSD_daemon \ ses \ scsi_target \ sunrpc \ - uefisign \ ypldap @@ -343,8 +342,11 @@ SE_SUNRPC_SORT= \ sort.x \ sort_proc.c +.if ${MK_EFI} != "no" +LDIRS+=uefisign SE_DIRS+= uefisign SE_UEFISIGN= uefikeys +.endif SE_DIRS+= ypldap SE_YPLDAP= ypldap.conf Modified: head/tools/build/mk/OptionalObsoleteFiles.inc == --- head/tools/build/mk/OptionalObsoleteFiles.inc Tue Jun 19 20:32:43 2018(r335385) +++ head/tools/build/mk/OptionalObsoleteFiles.inc Tue Jun 19 21:07:25 2018(r335386) @@ -1614,6 +1614,14 @@ OLD_DIRS+=usr/share/bsdconfig/timezone OLD_DIRS+=usr/share/bsdconfig/usermgmt .endif +.if ${MK_EFI} == no +OLD_FILES+=usr/sbin/efibootmgr +OLD_FILES+=usr/sbin/efidp +OLD_FILES+=usr/sbin/efivar +OLD_FILES+=usr/sbin/uefisign +OLD_FILES+=usr/share/examples/uefisign/uefikeys +.endif + .if ${MK_FMTREE} == no OLD_FILES+=usr/sbin/fmtree OLD_FILES+=usr/share/man/man8/fmtree.8.gz Modified: head/usr.sbin/Makefile == --- head/usr.sbin/Makefile Tue Jun 19 20:32:43 2018(r335385) +++ head/usr.sbin/Makefile Tue Jun 19 21:07:25 2018(r335386) @@ -92,7 +92,6 @@ SUBDIR= adduser \ traceroute \ trpt \ tzsetup \ - uefisign \ ugidfw \ vigr \ vipw \ @@ -126,6 +125,9 @@ SUBDIR.${MK_CTM}+= ctm SUBDIR.${MK_CXGBETOOL}+= cxgbetool SUBDIR.${MK_DIALOG}+= bsdconfig SUBDIR.${MK_EFI}+= efivar efidp efibootmgr +.if ${MK_OPENSSL} != "no" +SUBDIR.${MK_EFI}+= uefisign +.endif SUBDIR.${MK_FLOPPY}+= fdcontrol SUBDIR.${MK_FLOPPY}+= fdformat SUBDIR.${MK_FLOPPY}+= fdread ___ 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: r335276 - in head/stand/i386: gptboot zfsboot
-BEGIN PGP SIGNED MESSAGE- Hash: SHA512 Am Sun, 17 Jun 2018 03:18:57 + (UTC) Allan Jude schrieb: > Author: allanjude > Date: Sun Jun 17 03:18:56 2018 > New Revision: 335276 > URL: https://svnweb.freebsd.org/changeset/base/335276 > > Log: > gptboot, zfsboot, gptzfsboot: Enable the video and serial consoles early > > Normally the serial console is not enabled until /boot.config is read and > we know how the serial console should be configured. Initialize the > consoles early in 'dual' mode (serial & keyboard) with a default serial > rate of 115200. Then serial is re-initialized once the disk is decrypted > and the /boot.config file can be read. > > This allows the GELIBoot passphrase to be provided via the serial console. > > PR: 221526 > Requested by: many > Reviewed by:imp > Sponsored by: Klara Systems > Differential Revision: https://reviews.freebsd.org/D15862 > > Modified: > head/stand/i386/gptboot/gptboot.c > head/stand/i386/zfsboot/zfsboot.c > > Modified: head/stand/i386/gptboot/gptboot.c > == > --- head/stand/i386/gptboot/gptboot.c Sun Jun 17 03:10:25 2018 > (r335275) > +++ head/stand/i386/gptboot/gptboot.c Sun Jun 17 03:18:56 2018 > (r335276) > @@ -285,6 +285,16 @@ main(void) > bootinfo.bi_memsizes_valid++; > bootinfo.bi_bios_dev = dsk.drive; > > + /* > + * Initialize the serial console early with a modern default of 115200. > + * Later, we'll read PATH_DOTCONFIG and reconfigure serial according > + * to the configuration provided. > + */ > + opts = OPT_SET(RBX_DUAL); > + ioctrl = (IO_SERIAL|IO_KEYBOARD); > + if (sio_init(115200) != 0) > + ioctrl &= ~IO_SERIAL; > + > #ifdef LOADER_GELI_SUPPORT > geli_init(); > #endif > > Modified: head/stand/i386/zfsboot/zfsboot.c > == > --- head/stand/i386/zfsboot/zfsboot.c Sun Jun 17 03:10:25 2018 > (r335275) > +++ head/stand/i386/zfsboot/zfsboot.c Sun Jun 17 03:18:56 2018 > (r335276) > @@ -693,6 +693,16 @@ main(void) > } > setheap(heap_next, heap_end); > > +/* > + * Initialize the serial console early with a modern default of 115200. > + * Later, we'll read PATH_DOTCONFIG and reconfigure serial according > + * to the configuration provided. > + */ > +opts = OPT_SET(RBX_DUAL); > +ioctrl = (IO_SERIAL|IO_KEYBOARD); > +if (sio_init(115200) != 0) > + ioctrl &= ~IO_SERIAL; > + > dsk = malloc(sizeof(struct dsk)); > dsk->drive = *(uint8_t *)PTOV(ARGS); > dsk->type = dsk->drive & DRV_HARD ? TYPE_AD : TYPE_FD; > ___ > 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" This commit breaks booting off GPT partition (using NanoBSD, as Iposted mistakenly to commit r335254, see there). Having CURRENT applied to a SD card for usage on a PCEngines APU 2C4, the boot process dies immediately showing "Booting from harddisk". r335275 boots well. - -- O. Hartmann Ich widerspreche der Nutzung oder Übermittlung meiner Daten für Werbezwecke oder für die Markt- oder Meinungsforschung (§ 28 Abs. 4 BDSG). -BEGIN PGP SIGNATURE- iLUEARMKAB0WIQQZVZMzAtwC2T/86TrS528fyFhYlAUCWyloHQAKCRDS528fyFhY lLOLAgCcjWzTgedHN1tUalrIV/TNsnmo4vVhr1MuPMNvzeKp8VCsebl8yDaIMwnf GOQ2aLxBl7tqp+XWQTt8yLDLlj9/Af0XvKkWiFkf4BOLRpKqbClew2gYJRSdMR+6 RMXE77Js4wQslzSXiidHcweIDmiPrlo4JysjPdQdzAAjCn+J3YU9 =LpXy -END PGP SIGNATURE- ___ 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: r335379 - head/sys/contrib/libnv
> Author: sbruno > Date: Tue Jun 19 18:09:15 2018 > New Revision: 335379 > URL: https://svnweb.freebsd.org/changeset/base/335379 > > Log: > Set prev to NULL so its garaunteed to have a value of some kind and > gcc doesn't explode. Feel free to fix this correctly or whatever for > gcc builds. > > This *should* quiesce tinderbox after r335347 for the gcc builds. > > Modified: > head/sys/contrib/libnv/nvpair.c > > Modified: head/sys/contrib/libnv/nvpair.c > == > --- head/sys/contrib/libnv/nvpair.c Tue Jun 19 17:41:46 2018 > (r335378) > +++ head/sys/contrib/libnv/nvpair.c Tue Jun 19 18:09:15 2018 > (r335379) > @@ -1979,7 +1979,7 @@ int > nvpair_append_nvlist_array(nvpair_t *nvp, const nvlist_t *value) > { > nvpair_t *tmpnvp; > - nvlist_t *nvl, *prev; > + nvlist_t *nvl, *prev = NULL; Please please please mark these so that people *can* at some time know that this was 1) done to quiet some compiler, and 2) fix it properly so all things are quiet about it. - nvlist_t *nvl, *prev; + nvlist_t *nvl; + nvlist_t *prev = NULL; /* Quiet gcc foo.bar XXX */ > int flags; > Or even less intrusive would of been to put this one line add in leaving the declarations untouched. I think this would be the prefered mothod for these types of things. + *prev = NULL; /* Quiet gcc foo.bar XXX */ > NVPAIR_ASSERT(nvp); > Thanks, -- Rod Grimes rgri...@freebsd.org ___ 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: r335384 - head/sys/cam/mmc
Author: kibab Date: Tue Jun 19 20:02:03 2018 New Revision: 335384 URL: https://svnweb.freebsd.org/changeset/base/335384 Log: Fix setting RCA for MMC cards Unlike SD cards, that publish RCA in response to CMD3, MMC cards expect the host to set RCA itself. Since we don't support multiple MMC cards on the bus, just assign a static RCA of 2 to the attached MMC card. Approved by: imp (mentor) Differential Revision:https://reviews.freebsd.org/D13063 Modified: head/sys/cam/mmc/mmc.h head/sys/cam/mmc/mmc_xpt.c Modified: head/sys/cam/mmc/mmc.h == --- head/sys/cam/mmc/mmc.h Tue Jun 19 19:27:37 2018(r335383) +++ head/sys/cam/mmc/mmc.h Tue Jun 19 20:02:03 2018(r335384) @@ -94,4 +94,12 @@ struct mmc_params { uint8_t sdio_func_count; } __packed; +/* + * Only one MMC card on bus is supported now. + * If we ever want to support multiple MMC cards on the same bus, + * mmc_xpt needs to be extended to issue new RCAs based on number + * of already probed cards. Furthermore, retuning and high-speed + * settings should also take all cards into account. + */ +#define MMC_PROPOSED_RCA2 #endif Modified: head/sys/cam/mmc/mmc_xpt.c == --- head/sys/cam/mmc/mmc_xpt.c Tue Jun 19 19:27:37 2018(r335383) +++ head/sys/cam/mmc/mmc_xpt.c Tue Jun 19 20:02:03 2018(r335384) @@ -98,7 +98,8 @@ typedef enum { PROBE_GET_CID, PROBE_GET_CSD, PROBE_SEND_RELATIVE_ADDR, -PROBE_SELECT_CARD, + PROBE_MMC_SET_RELATIVE_ADDR, + PROBE_SELECT_CARD, PROBE_DONE, PROBE_INVALID } probe_action; @@ -114,6 +115,7 @@ static char *probe_action_text[] = { "PROBE_GET_CID", "PROBE_GET_CSD", "PROBE_SEND_RELATIVE_ADDR", + "PROBE_MMC_SET_RELATIVE_ADDR", "PROBE_SELECT_CARD", "PROBE_DONE", "PROBE_INVALID" @@ -702,7 +704,6 @@ mmcprobe_start(struct cam_periph *periph, union ccb *s mmcio->cmd.flags = MMC_RSP_R2 | MMC_CMD_BCR; mmcio->stop.opcode = 0; break; - case PROBE_SEND_RELATIVE_ADDR: init_standard_ccb(start_ccb, XPT_MMC_IO); mmcio->cmd.opcode = SD_SEND_RELATIVE_ADDR; @@ -710,6 +711,13 @@ mmcprobe_start(struct cam_periph *periph, union ccb *s mmcio->cmd.flags = MMC_RSP_R6 | MMC_CMD_BCR; mmcio->stop.opcode = 0; break; + case PROBE_MMC_SET_RELATIVE_ADDR: + init_standard_ccb(start_ccb, XPT_MMC_IO); + mmcio->cmd.opcode = MMC_SET_RELATIVE_ADDR; + mmcio->cmd.arg = MMC_PROPOSED_RCA << 16; + mmcio->cmd.flags = MMC_RSP_R1 | MMC_CMD_AC; + mmcio->stop.opcode = 0; + break; case PROBE_SELECT_CARD: init_standard_ccb(start_ccb, XPT_MMC_IO); mmcio->cmd.opcode = MMC_SELECT_CARD; @@ -985,7 +993,10 @@ mmcprobe_done(struct cam_periph *periph, union ccb *do mmcp->card_cid[1], mmcp->card_cid[2], mmcp->card_cid[3])); -PROBE_SET_ACTION(softc, PROBE_SEND_RELATIVE_ADDR); + if (mmcp->card_features & CARD_FEATURE_MMC) + PROBE_SET_ACTION(softc, PROBE_MMC_SET_RELATIVE_ADDR); + else + PROBE_SET_ACTION(softc, PROBE_SEND_RELATIVE_ADDR); break; } case PROBE_SEND_RELATIVE_ADDR: { @@ -1010,6 +1021,18 @@ mmcprobe_done(struct cam_periph *periph, union ccb *do PROBE_SET_ACTION(softc, PROBE_SELECT_CARD); break; } + case PROBE_MMC_SET_RELATIVE_ADDR: + mmcio = _ccb->mmcio; + err = mmcio->cmd.error; + if (err != MMC_ERR_NONE) { + CAM_DEBUG(done_ccb->ccb_h.path, CAM_DEBUG_PROBE, + ("PROBE_MMC_SET_RELATIVE_ADDR: error %d\n", err)); + PROBE_SET_ACTION(softc, PROBE_INVALID); + break; + } + path->device->mmc_ident_data.card_rca = MMC_PROPOSED_RCA; + PROBE_SET_ACTION(softc, PROBE_GET_CSD); + break; case PROBE_GET_CSD: { mmcio = _ccb->mmcio; err = mmcio->cmd.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"
Re: svn commit: r335278 - head/bin/pwd
On 19/06/2018 11:25, John Baldwin wrote: On 6/18/18 10:26 PM, Eitan Adler wrote: On 18 June 2018 at 10:57, John Baldwin wrote: On 6/16/18 10:14 PM, Eitan Adler wrote: Author: eadler Date: Sun Jun 17 05:14:50 2018 New Revision: 335278 URL: https://svnweb.freebsd.org/changeset/base/335278 Log: pwd: mark usage as dead You keep committing changes like this and ignoring e-mails about them. I replied both the first time and this time. I may have (accidentally?) ignored similar emails though. The question I have is other than the mild code churn what's the harm? It adds clutter. Also, fixing the tool means you fix all the places at once rather than slowly adding workarounds one by one. What broken compiler are you using that doesn't properly inherit __dead2 from the call to exit()? In this case, scan-build50 was getting annoyed. Does scan-build from LLVM 6.0 handle this correctly? If so, I'd say to just mark this warning as broken (and thus ignore it) for scan-build50 just as we ignore certain warnings from GCC 4.2.1 because they are broken-as-implemented. FWIW, clang's scan-build is made to even more false positives and general noise than the regular compiler warnings. It is better to just ignore it unless it finds something real. Pedro. ___ 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: r335383 - head/share/man/man8
Author: feld (ports committer) Date: Tue Jun 19 19:27:37 2018 New Revision: 335383 URL: https://svnweb.freebsd.org/changeset/base/335383 Log: Document the new ${name}_env_file feature Approved by: bcr MFH: 3 days Differential Revision:https://reviews.freebsd.org/D15578 Modified: head/share/man/man8/rc.subr.8 Modified: head/share/man/man8/rc.subr.8 == --- head/share/man/man8/rc.subr.8 Tue Jun 19 18:43:02 2018 (r335382) +++ head/share/man/man8/rc.subr.8 Tue Jun 19 19:27:37 2018 (r335383) @@ -29,7 +29,7 @@ .\" .\" $FreeBSD$ .\" -.Dd April 3, 2018 +.Dd June 19, 2018 .Dt RC.SUBR 8 .Os .Sh NAME @@ -554,6 +554,13 @@ with. This will be passed as arguments to the .Xr env 1 utility. +.It Va ${name}_env_file +A file to source for environmental variables to run +.Va command +with. +Note that all the variables which are being assigned in this file are going +to be exported into the environment of +.Va command . .It Va ${name}_fib FIB .Pa Routing Table ___ 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: r335382 - head/sys/contrib/libnv
Author: lwhsu (ports committer) Date: Tue Jun 19 18:43:02 2018 New Revision: 335382 URL: https://svnweb.freebsd.org/changeset/base/335382 Log: Really fix the style. Approved by: oshogbo Sponsored by: The FreeBSD Foundation Modified: head/sys/contrib/libnv/nvpair.c Modified: head/sys/contrib/libnv/nvpair.c == --- head/sys/contrib/libnv/nvpair.c Tue Jun 19 18:32:06 2018 (r335381) +++ head/sys/contrib/libnv/nvpair.c Tue Jun 19 18:43:02 2018 (r335382) @@ -1979,7 +1979,7 @@ int nvpair_append_nvlist_array(nvpair_t *nvp, const nvlist_t *value) { nvpair_t *tmpnvp; - nvlist_t *nvl, *prev = NULL; + nvlist_t *nvl, *prev; int flags; NVPAIR_ASSERT(nvp); ___ 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: r335381 - head/usr.bin/top
Author: asomers Date: Tue Jun 19 18:32:06 2018 New Revision: 335381 URL: https://svnweb.freebsd.org/changeset/base/335381 Log: top(1): Fix Coverity warning Don't call strerror on negative errnos Reported by: Coverity CID: 976708 Reviewed by: eadler Differential Revision:https://reviews.freebsd.org/D15909 Modified: head/usr.bin/top/commands.c Modified: head/usr.bin/top/commands.c == --- head/usr.bin/top/commands.c Tue Jun 19 18:25:43 2018(r335380) +++ head/usr.bin/top/commands.c Tue Jun 19 18:32:06 2018(r335381) @@ -242,7 +242,7 @@ err_string(void) errp = &(errs[cnt++]); if (errp->errnum != currerr) { - if (currerr != -1) + if (currerr >= 0) { if ((stringlen = str_adderr(string, stringlen, currerr)) < 2) { ___ 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: r335380 - head/sys/contrib/libnv
Author: lwhsu (ports committer) Date: Tue Jun 19 18:25:43 2018 New Revision: 335380 URL: https://svnweb.freebsd.org/changeset/base/335380 Log: style(9) fix, I was also going to silence gcc. Approved by: emaste, oshogbo Sponsored by: The FreeBSD Foundation Modified: head/sys/contrib/libnv/nvpair.c Modified: head/sys/contrib/libnv/nvpair.c == --- head/sys/contrib/libnv/nvpair.c Tue Jun 19 18:09:15 2018 (r335379) +++ head/sys/contrib/libnv/nvpair.c Tue Jun 19 18:25:43 2018 (r335380) @@ -1997,6 +1997,7 @@ nvpair_append_nvlist_array(nvpair_t *nvp, const nvlist nvlist_set_flags(nvl, flags); tmpnvp = NULL; + prev = NULL; if (nvp->nvp_nitems > 0) { nvlist_t **nvls = (void *)(uintptr_t)nvp->nvp_data; ___ 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: r335379 - head/sys/contrib/libnv
Author: sbruno Date: Tue Jun 19 18:09:15 2018 New Revision: 335379 URL: https://svnweb.freebsd.org/changeset/base/335379 Log: Set prev to NULL so its garaunteed to have a value of some kind and gcc doesn't explode. Feel free to fix this correctly or whatever for gcc builds. This *should* quiesce tinderbox after r335347 for the gcc builds. Modified: head/sys/contrib/libnv/nvpair.c Modified: head/sys/contrib/libnv/nvpair.c == --- head/sys/contrib/libnv/nvpair.c Tue Jun 19 17:41:46 2018 (r335378) +++ head/sys/contrib/libnv/nvpair.c Tue Jun 19 18:09:15 2018 (r335379) @@ -1979,7 +1979,7 @@ int nvpair_append_nvlist_array(nvpair_t *nvp, const nvlist_t *value) { nvpair_t *tmpnvp; - nvlist_t *nvl, *prev; + nvlist_t *nvl, *prev = NULL; int flags; NVPAIR_ASSERT(nvp); ___ 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: r335378 - head/tests/sys/audit
Author: asomers Date: Tue Jun 19 17:41:46 2018 New Revision: 335378 URL: https://svnweb.freebsd.org/changeset/base/335378 Log: audit(4): add tests for sendmsg, recvmsg, shutdown, and sendfile Submitted by: aniketp MFC after:2 weeks Sponsored by: Google, Inc. (GSoC 2018) Differential Revision:https://reviews.freebsd.org/D15895 Modified: head/tests/sys/audit/network.c Modified: head/tests/sys/audit/network.c == --- head/tests/sys/audit/network.c Tue Jun 19 17:30:11 2018 (r335377) +++ head/tests/sys/audit/network.c Tue Jun 19 17:41:46 2018 (r335378) @@ -27,31 +27,65 @@ #include #include +#include +#include #include #include #include #include +#include #include "utils.h" -#define MAX_DATA 1024 +#define MAX_DATA 128 #define SERVER_PATH "server" +static pid_t pid; +static mode_t mode = 0777; static int sockfd, sockfd2, connectfd; static ssize_t data_bytes; +static socklen_t len = sizeof(struct sockaddr_un); +static struct iovec io1, io2; static struct pollfd fds[1]; static struct sockaddr_un server; -static char extregex[80]; +static struct msghdr sendbuf, recvbuf; +static char extregex[MAX_DATA]; static char data[MAX_DATA]; -static socklen_t len = sizeof(struct sockaddr_un); static char msgbuff[MAX_DATA] = "This message does not exist"; static const char *auclass = "nt"; +static const char *path = "fileforaudit"; static const char *nosupregex = "return,failure : Address family " "not supported by protocol family"; static const char *invalregex = "return,failure : Bad file descriptor"; /* + * Initialize iovec structure to be used as a field of struct msghdr + */ +static void +init_iov(struct iovec *io, char msgbuf[], int datalen) +{ + io->iov_base = msgbuf; + io->iov_len = datalen; +} + +/* + * Initialize msghdr structure for communication via datagram sockets + */ +static void +init_msghdr(struct msghdr *hdrbuf, struct iovec *io, struct sockaddr_un *addr) +{ + socklen_t length; + + bzero(hdrbuf, sizeof(*hdrbuf)); + length = (socklen_t)sizeof(struct sockaddr_un); + hdrbuf->msg_name = addr; + hdrbuf->msg_namelen = length; + hdrbuf->msg_iov = io; + hdrbuf->msg_iovlen = 1; +} + +/* * Variadic function to close socket descriptors */ static void @@ -648,7 +682,6 @@ ATF_TC_BODY(recv_success, tc) /* Receive data once connectfd is ready for reading */ FILE *pipefd = setup(fds, auclass); - //ATF_REQUIRE(check_readfs(connectfd) != 0); ATF_REQUIRE((data_bytes = recv(connectfd, data, MAX_DATA, 0)) != 0); /* Audit record must contain connectfd and data_bytes */ @@ -808,6 +841,253 @@ ATF_TC_CLEANUP(recvfrom_failure, tc) } +ATF_TC_WITH_CLEANUP(sendmsg_success); +ATF_TC_HEAD(sendmsg_success, tc) +{ + atf_tc_set_md_var(tc, "descr", "Tests the audit of a successful " + "recvmsg(2) call"); +} + +ATF_TC_BODY(sendmsg_success, tc) +{ + assign_address(); + /* Create a datagram server socket & bind to UNIX address family */ + ATF_REQUIRE((sockfd = socket(PF_UNIX, SOCK_DGRAM, 0)) != -1); + ATF_REQUIRE_EQ(0, bind(sockfd, (struct sockaddr *), len)); + + /* Message buffer to be sent to the server */ + init_iov(, msgbuff, sizeof(msgbuff)); + init_msghdr(, , ); + + /* Set up UDP client to communicate with the server */ + ATF_REQUIRE((sockfd2 = socket(PF_UNIX, SOCK_DGRAM, 0)) != -1); + + /* Send a sample message to the specified client address */ + FILE *pipefd = setup(fds, auclass); + ATF_REQUIRE((data_bytes = sendmsg(sockfd2, , 0)) != -1); + + /* Audit record must contain sockfd2 and data_bytes */ + snprintf(extregex, sizeof(extregex), + "sendmsg.*0x%x.*return,success,%zd", sockfd2, data_bytes); + check_audit(fds, extregex, pipefd); + + /* Close all socket descriptors */ + close_sockets(2, sockfd, sockfd2); +} + +ATF_TC_CLEANUP(sendmsg_success, tc) +{ + cleanup(); +} + + +ATF_TC_WITH_CLEANUP(sendmsg_failure); +ATF_TC_HEAD(sendmsg_failure, tc) +{ + atf_tc_set_md_var(tc, "descr", "Tests the audit of an unsuccessful " + "sendmsg(2) call"); +} + +ATF_TC_BODY(sendmsg_failure, tc) +{ + snprintf(extregex, sizeof(extregex), + "sendmsg.*return,failure : Bad address"); + FILE *pipefd = setup(fds, auclass); + ATF_REQUIRE_EQ(-1, sendmsg(-1, NULL, 0)); + check_audit(fds, extregex, pipefd); +} + +ATF_TC_CLEANUP(sendmsg_failure, tc) +{ + cleanup(); +} + + +ATF_TC_WITH_CLEANUP(recvmsg_success); +ATF_TC_HEAD(recvmsg_success, tc) +{ + atf_tc_set_md_var(tc, "descr", "Tests the audit of a successful " + "recvmsg(2) call"); +} + +ATF_TC_BODY(recvmsg_success, tc) +{
Re: svn commit: r335377 - head/usr.bin/ar
> Author: emaste > Date: Tue Jun 19 17:30:11 2018 > New Revision: 335377 > URL: https://svnweb.freebsd.org/changeset/base/335377 > > Log: > usr.bin/ar: remove incorrect SPDX tags > > Three ar files have a non-standard variation of the BSD license, so > remove their SPDX tags. > > Sponsored by: The FreeBSD Foundation > > Modified: > head/usr.bin/ar/ar.c > head/usr.bin/ar/read.c > head/usr.bin/ar/util.c > > Modified: head/usr.bin/ar/ar.c > == > --- head/usr.bin/ar/ar.c Tue Jun 19 17:28:05 2018(r335376) > +++ head/usr.bin/ar/ar.c Tue Jun 19 17:30:11 2018(r335377) > @@ -1,6 +1,4 @@ > /*- > - * SPDX-License-Identifier: BSD-3-Clause > - * Does it make since to put some comment here to keep these from coming back in the future? Thanks, Rod > * Copyright (c) 2007 Kai Wang > * Copyright (c) 2007 Tim Kientzle > * Copyright (c) 2007 Joseph Koshy > > Modified: head/usr.bin/ar/read.c > == > --- head/usr.bin/ar/read.cTue Jun 19 17:28:05 2018(r335376) > +++ head/usr.bin/ar/read.cTue Jun 19 17:30:11 2018(r335377) > @@ -1,6 +1,4 @@ > /*- > - * SPDX-License-Identifier: BSD-2-Clause-FreeBSD > - * > * Copyright (c) 2007 Kai Wang > * Copyright (c) 2007 Tim Kientzle > * All rights reserved. > > Modified: head/usr.bin/ar/util.c > == > --- head/usr.bin/ar/util.cTue Jun 19 17:28:05 2018(r335376) > +++ head/usr.bin/ar/util.cTue Jun 19 17:30:11 2018(r335377) > @@ -1,6 +1,4 @@ > /*- > - * SPDX-License-Identifier: BSD-2-Clause-FreeBSD > - * > * Copyright (c) 2003-2007 Tim Kientzle > * All rights reserved. > * > > -- Rod Grimes rgri...@freebsd.org ___ 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: r335377 - head/usr.bin/ar
Author: emaste Date: Tue Jun 19 17:30:11 2018 New Revision: 335377 URL: https://svnweb.freebsd.org/changeset/base/335377 Log: usr.bin/ar: remove incorrect SPDX tags Three ar files have a non-standard variation of the BSD license, so remove their SPDX tags. Sponsored by: The FreeBSD Foundation Modified: head/usr.bin/ar/ar.c head/usr.bin/ar/read.c head/usr.bin/ar/util.c Modified: head/usr.bin/ar/ar.c == --- head/usr.bin/ar/ar.cTue Jun 19 17:28:05 2018(r335376) +++ head/usr.bin/ar/ar.cTue Jun 19 17:30:11 2018(r335377) @@ -1,6 +1,4 @@ /*- - * SPDX-License-Identifier: BSD-3-Clause - * * Copyright (c) 2007 Kai Wang * Copyright (c) 2007 Tim Kientzle * Copyright (c) 2007 Joseph Koshy Modified: head/usr.bin/ar/read.c == --- head/usr.bin/ar/read.c Tue Jun 19 17:28:05 2018(r335376) +++ head/usr.bin/ar/read.c Tue Jun 19 17:30:11 2018(r335377) @@ -1,6 +1,4 @@ /*- - * SPDX-License-Identifier: BSD-2-Clause-FreeBSD - * * Copyright (c) 2007 Kai Wang * Copyright (c) 2007 Tim Kientzle * All rights reserved. Modified: head/usr.bin/ar/util.c == --- head/usr.bin/ar/util.c Tue Jun 19 17:28:05 2018(r335376) +++ head/usr.bin/ar/util.c Tue Jun 19 17:30:11 2018(r335377) @@ -1,6 +1,4 @@ /*- - * SPDX-License-Identifier: BSD-2-Clause-FreeBSD - * * Copyright (c) 2003-2007 Tim Kientzle * All rights reserved. * ___ 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: r335376 - head/usr.bin/ar
Author: emaste Date: Tue Jun 19 17:28:05 2018 New Revision: 335376 URL: https://svnweb.freebsd.org/changeset/base/335376 Log: usr.bin/ar: use standard 2-Clause FreeBSD license Many licenses on ar files contained small variations from the standard FreeBSD license text. To avoid license proliferation switch to the usual standard 2-clause FreeBSD license for those files where I have obtained permission from all of the listed copyright holders. Approved by: jkoshy, kaiw Differential Revision:https://reviews.freebsd.org/D14561 Modified: head/usr.bin/ar/acplex.l head/usr.bin/ar/acpyacc.y head/usr.bin/ar/ar.h head/usr.bin/ar/write.c Modified: head/usr.bin/ar/acplex.l == --- head/usr.bin/ar/acplex.lTue Jun 19 17:11:53 2018(r335375) +++ head/usr.bin/ar/acplex.lTue Jun 19 17:28:05 2018(r335376) @@ -9,22 +9,22 @@ * 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 - *in this position and unchanged. + *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(S) ``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(S) 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. + * 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. */ #include Modified: head/usr.bin/ar/acpyacc.y == --- head/usr.bin/ar/acpyacc.y Tue Jun 19 17:11:53 2018(r335375) +++ head/usr.bin/ar/acpyacc.y Tue Jun 19 17:28:05 2018(r335376) @@ -9,22 +9,22 @@ * 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 - *in this position and unchanged. + *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(S) ``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(S) 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. + * 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,
svn commit: r335374 - head/tests/sys/audit
Author: asomers Date: Tue Jun 19 16:55:39 2018 New Revision: 335374 URL: https://svnweb.freebsd.org/changeset/base/335374 Log: audit(4): add tests for utimes(2) and friends, mprotect, and undelete Includes utimes(2), futimes(2), lutimes(2), futimesat(2), mprotect(2), and undelete(2). undelete, for now, is tested only in failure mode. Submitted by: aniketp MFC after:2 weeks Sponsored by: Google, Inc. (GSoC 2018) Differential Revision:https://reviews.freebsd.org/D15893 Modified: head/tests/sys/audit/file-attribute-modify.c Modified: head/tests/sys/audit/file-attribute-modify.c == --- head/tests/sys/audit/file-attribute-modify.cTue Jun 19 16:14:23 2018(r335373) +++ head/tests/sys/audit/file-attribute-modify.cTue Jun 19 16:55:39 2018(r335374) @@ -28,10 +28,13 @@ #include #include #include +#include #include +#include #include #include +#include #include #include "utils.h" @@ -689,6 +692,257 @@ ATF_TC_CLEANUP(lchflags_failure, tc) } +ATF_TC_WITH_CLEANUP(utimes_success); +ATF_TC_HEAD(utimes_success, tc) +{ + atf_tc_set_md_var(tc, "descr", "Tests the audit of a successful " + "utimes(2) call"); +} + +ATF_TC_BODY(utimes_success, tc) +{ + /* File needs to exist to call utimes(2) */ + ATF_REQUIRE((filedesc = open(path, O_CREAT, mode)) != -1); + FILE *pipefd = setup(fds, auclass); + ATF_REQUIRE_EQ(0, utimes(path, NULL)); + check_audit(fds, successreg, pipefd); + close(filedesc); +} + +ATF_TC_CLEANUP(utimes_success, tc) +{ + cleanup(); +} + + +ATF_TC_WITH_CLEANUP(utimes_failure); +ATF_TC_HEAD(utimes_failure, tc) +{ + atf_tc_set_md_var(tc, "descr", "Tests the audit of an unsuccessful " + "utimes(2) call"); +} + +ATF_TC_BODY(utimes_failure, tc) +{ + FILE *pipefd = setup(fds, auclass); + /* Failure reason: file does not exist */ + ATF_REQUIRE_EQ(-1, utimes(errpath, NULL)); + check_audit(fds, failurereg, pipefd); +} + +ATF_TC_CLEANUP(utimes_failure, tc) +{ + cleanup(); +} + + +ATF_TC_WITH_CLEANUP(futimes_success); +ATF_TC_HEAD(futimes_success, tc) +{ + atf_tc_set_md_var(tc, "descr", "Tests the audit of a successful " + "futimes(2) call"); +} + +ATF_TC_BODY(futimes_success, tc) +{ + pid = getpid(); + snprintf(extregex, sizeof(extregex), "futimes.*%d.*ret.*success", pid); + + /* File needs to exist to call futimes(2) */ + ATF_REQUIRE((filedesc = open(path, O_CREAT, mode)) != -1); + FILE *pipefd = setup(fds, auclass); + ATF_REQUIRE_EQ(0, futimes(filedesc, NULL)); + check_audit(fds, extregex, pipefd); + close(filedesc); +} + +ATF_TC_CLEANUP(futimes_success, tc) +{ + cleanup(); +} + + +ATF_TC_WITH_CLEANUP(futimes_failure); +ATF_TC_HEAD(futimes_failure, tc) +{ + atf_tc_set_md_var(tc, "descr", "Tests the audit of an unsuccessful " + "futimes(2) call"); +} + +ATF_TC_BODY(futimes_failure, tc) +{ + const char *regex = "futimes.*return,failure : Bad file descriptor"; + FILE *pipefd = setup(fds, auclass); + /* Failure reason: Invalid file descriptor */ + ATF_REQUIRE_EQ(-1, futimes(-1, NULL)); + check_audit(fds, regex, pipefd); +} + +ATF_TC_CLEANUP(futimes_failure, tc) +{ + cleanup(); +} + + +ATF_TC_WITH_CLEANUP(lutimes_success); +ATF_TC_HEAD(lutimes_success, tc) +{ + atf_tc_set_md_var(tc, "descr", "Tests the audit of a successful " + "lutimes(2) call"); +} + +ATF_TC_BODY(lutimes_success, tc) +{ + /* Symbolic link needs to exist to call lutimes(2) */ + ATF_REQUIRE_EQ(0, symlink("symlink", path)); + FILE *pipefd = setup(fds, auclass); + ATF_REQUIRE_EQ(0, lutimes(path, NULL)); + check_audit(fds, successreg, pipefd); +} + +ATF_TC_CLEANUP(lutimes_success, tc) +{ + cleanup(); +} + + +ATF_TC_WITH_CLEANUP(lutimes_failure); +ATF_TC_HEAD(lutimes_failure, tc) +{ + atf_tc_set_md_var(tc, "descr", "Tests the audit of an unsuccessful " + "lutimes(2) call"); +} + +ATF_TC_BODY(lutimes_failure, tc) +{ + FILE *pipefd = setup(fds, auclass); + /* Failure reason: symbolic link does not exist */ + ATF_REQUIRE_EQ(-1, lutimes(errpath, NULL)); + check_audit(fds, failurereg, pipefd); +} + +ATF_TC_CLEANUP(lutimes_failure, tc) +{ + cleanup(); +} + + +ATF_TC_WITH_CLEANUP(futimesat_success); +ATF_TC_HEAD(futimesat_success, tc) +{ + atf_tc_set_md_var(tc, "descr", "Tests the audit of a successful " + "futimesat(2) call"); +} + +ATF_TC_BODY(futimesat_success, tc) +{ + /* File needs to exist to call futimesat(2) */ + ATF_REQUIRE((filedesc = open(path,
RE: svn commit: r335244 - head
I have a script that invokes buildworld/kernel, installworld/kernel, then proceeds to update jails if the jails are not in use. I passed the wrong argument to my script. I hastily did control-r to find my last command and hit enter without thinking (being rushed as usual). I assumed I used the correct arguments. My assumption was incorrect. Sloppiness on my part. My script takes a snapshot of /usr/src and /usr/obj (whatever dataset they reside in), svn up, buildworld/kernel, install*, mergemaster if requested, then finally deletes the snapshots (depending on arguments). The return code specifies whether poudeiere updates or not. I was rushing out the door that evening, so I figured I could squeeze in a build by the time I got home. I specified to my script to build and install only the kernel but the poudeiere invocation that followed wasn't aware that I had invoked the previous script to only build and install the kernel. Not enough care for details that evening on my part. When I got home to discover the install failure I had forgotten that I passed an argument to the script to build/install only the kernel. Not a big deal, just need to be more careful next time. --- Sent using a tiny phone keyboard. Apologies for any typos and autocorrect. Also, this old phone only supports top post. Apologies. Cy Schubert or The need of the many outweighs the greed of the few. --- -Original Message- From: Bryan Drewery Sent: 19/06/2018 08:57 To: Cy Schubert Cc: src-committ...@freebsd.org; svn-src-...@freebsd.org; svn-src-head@freebsd.org Subject: Re: svn commit: r335244 - head On 6/15/2018 10:02 PM, Cy Schubert wrote: > In message <201806160436.w5g4axks039...@slippy.cwsent.com>, Cy Schubert > writes: >> In message <201806160035.w5g0zjfd066...@repo.freebsd.org>, Bryan >> Drewery writes >> : >>> Author: bdrewery >>> Date: Sat Jun 16 00:35:19 2018 >>> New Revision: 335244 >>> URL: https://svnweb.freebsd.org/changeset/base/335244 >>> >>> Log: >>> Assert that a build is done before an install. >>> >>> This should also catch cases where the wrong MAKEOBJDIRPREFIX is used for >>> install. >>> >>> MFC after:2 weeks >>> Sponsored by: Dell EMC >>> >>> Modified: >>> head/Makefile.inc1 >>> >>> Modified: head/Makefile.inc1 >>> === >> == >>> = >>> --- head/Makefile.inc1 Fri Jun 15 23:42:22 2018(r335243) >>> +++ head/Makefile.inc1 Sat Jun 16 00:35:19 2018(r335244) >>> @@ -89,7 +89,10 @@ MK_GCC_BOOTSTRAP=no >>> .if make(installworld) || make(install) || make(distributeworld) || \ >>> make(stageworld) >>> .-include "${OBJTOP}/compiler-metadata.mk" >>> +.if !defined(_LOADED_COMPILER_METADATA) >>> +.error A build is required first. You may have the wrong MAKEOBJDIRPREFIX >> s >>> et. >>> .endif >>> +.endif >>> >>> # Pull in COMPILER_TYPE and COMPILER_FREEBSD_VERSION early. Pull it from t >> he >>> # tree to be friendlier to foreign OS builds. It's safe to do so unconditi >> on >>> ally >>> @@ -195,6 +198,7 @@ compiler-metadata.mk: .PHONY .META >>> @: > ${.TARGET} >>> @echo ".info Using cached compiler metadata from build at $$(hostname) >>> on $$(date)" \ >>> > ${.TARGET} >>> + @echo "_LOADED_COMPILER_METADATA=t" >> ${.TARGET} >>> .for v in ${_COMPILER_METADATA_VARS} >>> @echo "${v}=${${v}}" >> ${.TARGET} >>> .endfor >>> >> >> Another data point: This also broke the following: >> >> cwsys# poudriere jail -c -m src=/opt/src/svn-current -j HEADi386 -a i386 >> [00:00:00] Creating HEADi386 fs at /poudriere/amd64/jails/HEADi386... >> done >> [00:00:01] Copying /opt/src/svn-current to /poudriere/amd64/jails/HEADi3 >> 86/usr/src... done >> [00:06:01] Starting make installworld >> --- installworld --- >> make[1]: "/export/obj/opt/src/svn-current/i386.i386/compiler-metadata.mk >> " line 1: Using cached compiler metadata from build at cwsys on Fri Jun >> 15 18:39:46 PDT 2018 >> make[1]: "/opt/src/svn-current/Makefile.inc1" line 93: A build is >> required first. You may have the wrong MAKEOBJDIRPREFIX set. >> *** [installworld] Error code 1 >> >> make: stopped in /opt/src/svn-current >> 1 error >> >> make: stopped in /opt/src/svn-current >> [00:06:01] Error: Failed to 'make installworld' >> [00:06:01] Error while creating jail, cleaning up. >> [00:06:01] Removing HEADi386 jail... done >> [00:06:03] Cleaning HEADi386 data... done >> cwsys# > > Nevermind. I found it. Stupid error on my part. > > I'm curious what you did? Did you svn update after a buildworld and then tried installworld? That would fail 1 time here but not again in the future. (Thinking outloud now, I could probably reuse the vcsversion code in newvers.sh to record the build revision during buildworld and check it matches at installworld time, but the assumes the same vcs tool is on the install machine so it probably wouldn't work.) I'm happy to see it may have caught
Re: svn commit: r335278 - head/bin/pwd
On 6/18/18 10:26 PM, Eitan Adler wrote: > On 18 June 2018 at 10:57, John Baldwin wrote: >> On 6/16/18 10:14 PM, Eitan Adler wrote: >>> Author: eadler >>> Date: Sun Jun 17 05:14:50 2018 >>> New Revision: 335278 >>> URL: https://svnweb.freebsd.org/changeset/base/335278 >>> >>> Log: >>> pwd: mark usage as dead >> >> You keep committing changes like this and ignoring e-mails about them. > > I replied both the first time and this time. I may have > (accidentally?) ignored similar emails though. The question I have is > other than the mild code churn what's the harm? It adds clutter. Also, fixing the tool means you fix all the places at once rather than slowly adding workarounds one by one. >> What broken compiler are you using that doesn't properly inherit __dead2 >> from the call to exit()? > > In this case, scan-build50 was getting annoyed. Does scan-build from LLVM 6.0 handle this correctly? If so, I'd say to just mark this warning as broken (and thus ignore it) for scan-build50 just as we ignore certain warnings from GCC 4.2.1 because they are broken-as-implemented. -- John Baldwin ___ 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: r335373 - in head/sys: arm/arm arm64/arm64
Author: andrew Date: Tue Jun 19 16:14:23 2018 New Revision: 335373 URL: https://svnweb.freebsd.org/changeset/base/335373 Log: Move common GIC interrupt numbers to the common header. These are the same across the GICv2 and GICv3 drivers so we only need a single copy of them. Sponsored by: Turing Robotic Industries Modified: head/sys/arm/arm/gic.h head/sys/arm/arm/gic_common.h head/sys/arm64/arm64/gic_v3_reg.h Modified: head/sys/arm/arm/gic.h == --- head/sys/arm/arm/gic.h Tue Jun 19 15:55:21 2018(r335372) +++ head/sys/arm/arm/gic.h Tue Jun 19 16:14:23 2018(r335373) @@ -39,12 +39,6 @@ #ifndef _ARM_GIC_H_ #define _ARM_GIC_H_ -#defineGIC_FIRST_SGI0 /* Irqs 0-15 are SGIs/IPIs. */ -#defineGIC_LAST_SGI15 -#defineGIC_FIRST_PPI 16 /* Irqs 16-31 are private (per */ -#defineGIC_LAST_PPI31 /* core) peripheral interrupts. */ -#defineGIC_FIRST_SPI 32 /* Irqs 32+ are shared peripherals. */ - #ifdef INTRNG struct arm_gic_range { uint64_t bus; Modified: head/sys/arm/arm/gic_common.h == --- head/sys/arm/arm/gic_common.h Tue Jun 19 15:55:21 2018 (r335372) +++ head/sys/arm/arm/gic_common.h Tue Jun 19 16:14:23 2018 (r335373) @@ -44,6 +44,15 @@ __BUS_ACCESSOR(gic, hw_rev, GIC, HW_REV, u_int); __BUS_ACCESSOR(gic, bus, GIC, BUS, u_int); +/* Software Generated Interrupts */ +#defineGIC_FIRST_SGI0 /* Irqs 0-15 are SGIs/IPIs. */ +#defineGIC_LAST_SGI15 +/* Private Peripheral Interrupts */ +#defineGIC_FIRST_PPI 16 /* Irqs 16-31 are private (per */ +#defineGIC_LAST_PPI31 /* core) peripheral interrupts. */ +/* Shared Peripheral Interrupts */ +#defineGIC_FIRST_SPI 32 /* Irqs 32+ are shared peripherals. */ + /* Common register values */ #defineGICD_CTLR 0x /* v1 ICDDCR */ #defineGICD_TYPER 0x0004 /* v1 ICDICTR */ Modified: head/sys/arm64/arm64/gic_v3_reg.h == --- head/sys/arm64/arm64/gic_v3_reg.h Tue Jun 19 15:55:21 2018 (r335372) +++ head/sys/arm64/arm64/gic_v3_reg.h Tue Jun 19 16:14:23 2018 (r335373) @@ -44,14 +44,7 @@ /* Upper value is determined by LPI max priority */ #defineGIC_PRIORITY_MIN(0xFCUL) -/* Numbers for software generated interrupts */ -#defineGIC_FIRST_SGI (0) -#defineGIC_LAST_SGI(15) -/* Numbers for private peripheral interrupts */ -#defineGIC_FIRST_PPI (16) -#defineGIC_LAST_PPI(31) -/* Numbers for spared peripheral interrupts */ -#defineGIC_FIRST_SPI (32) +/* Numbers for shared peripheral interrupts */ #defineGIC_LAST_SPI(1019) /* Numbers for local peripheral interrupts */ #defineGIC_FIRST_LPI (8192) ___ 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: r335244 - head
On 6/15/2018 10:02 PM, Cy Schubert wrote: > In message <201806160436.w5g4axks039...@slippy.cwsent.com>, Cy Schubert > writes: >> In message <201806160035.w5g0zjfd066...@repo.freebsd.org>, Bryan >> Drewery writes >> : >>> Author: bdrewery >>> Date: Sat Jun 16 00:35:19 2018 >>> New Revision: 335244 >>> URL: https://svnweb.freebsd.org/changeset/base/335244 >>> >>> Log: >>> Assert that a build is done before an install. >>> >>> This should also catch cases where the wrong MAKEOBJDIRPREFIX is used for >>> install. >>> >>> MFC after:2 weeks >>> Sponsored by: Dell EMC >>> >>> Modified: >>> head/Makefile.inc1 >>> >>> Modified: head/Makefile.inc1 >>> === >> == >>> = >>> --- head/Makefile.inc1 Fri Jun 15 23:42:22 2018(r335243) >>> +++ head/Makefile.inc1 Sat Jun 16 00:35:19 2018(r335244) >>> @@ -89,7 +89,10 @@ MK_GCC_BOOTSTRAP=no >>> .if make(installworld) || make(install) || make(distributeworld) || \ >>> make(stageworld) >>> .-include "${OBJTOP}/compiler-metadata.mk" >>> +.if !defined(_LOADED_COMPILER_METADATA) >>> +.error A build is required first. You may have the wrong MAKEOBJDIRPREFIX >> s >>> et. >>> .endif >>> +.endif >>> >>> # Pull in COMPILER_TYPE and COMPILER_FREEBSD_VERSION early. Pull it from t >> he >>> # tree to be friendlier to foreign OS builds. It's safe to do so unconditi >> on >>> ally >>> @@ -195,6 +198,7 @@ compiler-metadata.mk: .PHONY .META >>> @: > ${.TARGET} >>> @echo ".info Using cached compiler metadata from build at $$(hostname) >>> on $$(date)" \ >>> > ${.TARGET} >>> + @echo "_LOADED_COMPILER_METADATA=t" >> ${.TARGET} >>> .for v in ${_COMPILER_METADATA_VARS} >>> @echo "${v}=${${v}}" >> ${.TARGET} >>> .endfor >>> >> >> Another data point: This also broke the following: >> >> cwsys# poudriere jail -c -m src=/opt/src/svn-current -j HEADi386 -a i386 >> [00:00:00] Creating HEADi386 fs at /poudriere/amd64/jails/HEADi386... >> done >> [00:00:01] Copying /opt/src/svn-current to /poudriere/amd64/jails/HEADi3 >> 86/usr/src... done >> [00:06:01] Starting make installworld >> --- installworld --- >> make[1]: "/export/obj/opt/src/svn-current/i386.i386/compiler-metadata.mk >> " line 1: Using cached compiler metadata from build at cwsys on Fri Jun >> 15 18:39:46 PDT 2018 >> make[1]: "/opt/src/svn-current/Makefile.inc1" line 93: A build is >> required first. You may have the wrong MAKEOBJDIRPREFIX set. >> *** [installworld] Error code 1 >> >> make: stopped in /opt/src/svn-current >> 1 error >> >> make: stopped in /opt/src/svn-current >> [00:06:01] Error: Failed to 'make installworld' >> [00:06:01] Error while creating jail, cleaning up. >> [00:06:01] Removing HEADi386 jail... done >> [00:06:03] Cleaning HEADi386 data... done >> cwsys# > > Nevermind. I found it. Stupid error on my part. > > I'm curious what you did? Did you svn update after a buildworld and then tried installworld? That would fail 1 time here but not again in the future. (Thinking outloud now, I could probably reuse the vcsversion code in newvers.sh to record the build revision during buildworld and check it matches at installworld time, but the assumes the same vcs tool is on the install machine so it probably wouldn't work.) I'm happy to see it may have caught a subtle mistake for you. -- Regards, Bryan Drewery signature.asc Description: OpenPGP digital signature
svn commit: r335372 - head/sys/dev/ixl
Author: sbruno Date: Tue Jun 19 15:55:21 2018 New Revision: 335372 URL: https://svnweb.freebsd.org/changeset/base/335372 Log: Remove "diff" line indicator. Next to see if this code works or not. Submitted by: mmacy Sponsored by: Limelight Networks Modified: head/sys/dev/ixl/ixlvc.c Modified: head/sys/dev/ixl/ixlvc.c == --- head/sys/dev/ixl/ixlvc.cTue Jun 19 15:05:31 2018(r335371) +++ head/sys/dev/ixl/ixlvc.cTue Jun 19 15:55:21 2018(r335372) @@ -386,9 +386,9 @@ ixlv_configure_queues(struct ixlv_sc *sc) { device_tdev = sc->dev; struct ixl_vsi *vsi = >vsi; -+ if_softc_ctx_t scctx = iflib_get_softc_ctx(vsi->ctx); -+ struct ixl_tx_queue *tx_que = vsi->tx_queues; -+ struct ixl_rx_queue *rx_que = vsi->rx_queues; + if_softc_ctx_t scctx = iflib_get_softc_ctx(vsi->ctx); + struct ixl_tx_queue *tx_que = vsi->tx_queues; + struct ixl_rx_queue *rx_que = vsi->rx_queues; struct tx_ring *txr; struct rx_ring *rxr; int len, pairs; @@ -396,9 +396,9 @@ ixlv_configure_queues(struct ixlv_sc *sc) struct virtchnl_vsi_queue_config_info *vqci; struct virtchnl_queue_pair_info *vqpi; -+ /* XXX: Linux PF driver wants matching ids in each tx/rx struct, so both TX/RX -+ * queues of a pair need to be configured */ -+ pairs = max(vsi->num_tx_queues, vsi->num_rx_queues); + /* XXX: Linux PF driver wants matching ids in each tx/rx struct, so both TX/RX +* queues of a pair need to be configured */ + pairs = max(vsi->num_tx_queues, vsi->num_rx_queues); len = sizeof(struct virtchnl_vsi_queue_config_info) + (sizeof(struct virtchnl_queue_pair_info) * pairs); vqci = malloc(len, M_DEVBUF, M_NOWAIT | M_ZERO); @@ -413,24 +413,24 @@ ixlv_configure_queues(struct ixlv_sc *sc) /* Size check is not needed here - HW max is 16 queue pairs, and we * can fit info for 31 of them into the AQ buffer before it overflows. */ -+ for (int i = 0; i < pairs; i++, tx_que++, rx_que++, vqpi++) { -+ txr = _que->txr; -+ rxr = _que->rxr; -+ + for (int i = 0; i < pairs; i++, tx_que++, rx_que++, vqpi++) { + txr = _que->txr; + rxr = _que->rxr; + vqpi->txq.vsi_id = vqci->vsi_id; vqpi->txq.queue_id = i; -+ vqpi->txq.ring_len = scctx->isc_ntxd[0]; -+ vqpi->txq.dma_ring_addr = txr->tx_paddr; + vqpi->txq.ring_len = scctx->isc_ntxd[0]; + vqpi->txq.dma_ring_addr = txr->tx_paddr; /* Enable Head writeback */ vqpi->txq.headwb_enabled = 0; vqpi->txq.dma_headwb_addr = 0; vqpi->rxq.vsi_id = vqci->vsi_id; vqpi->rxq.queue_id = i; -+ vqpi->rxq.ring_len = scctx->isc_nrxd[0]; -+ vqpi->rxq.dma_ring_addr = rxr->rx_paddr; -+ vqpi->rxq.max_pkt_size = scctx->isc_max_frame_size; -+ // TODO: Get this value from iflib, somehow + vqpi->rxq.ring_len = scctx->isc_nrxd[0]; + vqpi->rxq.dma_ring_addr = rxr->rx_paddr; + vqpi->rxq.max_pkt_size = scctx->isc_max_frame_size; + // TODO: Get this value from iflib, somehow vqpi->rxq.databuffer_size = rxr->mbuf_sz; vqpi->rxq.splithdr_enabled = 0; } @@ -451,8 +451,8 @@ ixlv_enable_queues(struct ixlv_sc *sc) struct virtchnl_queue_select vqs; vqs.vsi_id = sc->vsi_res->vsi_id; -+ /* XXX: In Linux PF, as long as neither of these is 0, -+ * every queue in VF VSI is enabled. */ + /* XXX: In Linux PF, as long as neither of these is 0, +* every queue in VF VSI is enabled. */ vqs.tx_queues = (1 << sc->vsi_res->num_queue_pairs) - 1; vqs.rx_queues = vqs.tx_queues; ixlv_send_pf_msg(sc, VIRTCHNL_OP_ENABLE_QUEUES, @@ -470,8 +470,8 @@ ixlv_disable_queues(struct ixlv_sc *sc) struct virtchnl_queue_select vqs; vqs.vsi_id = sc->vsi_res->vsi_id; -+ /* XXX: In Linux PF, as long as neither of these is 0, -+ * every queue in VF VSI is disabled. */ + /* XXX: In Linux PF, as long as neither of these is 0, +* every queue in VF VSI is disabled. */ vqs.tx_queues = (1 << sc->vsi_res->num_queue_pairs) - 1; vqs.rx_queues = vqs.tx_queues; ixlv_send_pf_msg(sc, VIRTCHNL_OP_DISABLE_QUEUES, @@ -490,29 +490,29 @@ ixlv_map_queues(struct ixlv_sc *sc) struct virtchnl_irq_map_info *vm; int i, q, len; struct ixl_vsi *vsi = >vsi; -+ struct ixl_rx_queue *rx_que = vsi->rx_queues; -+ if_softc_ctx_t scctx = vsi->shared; -+ device_t
svn commit: r335371 - head/stand/lua
Author: kevans Date: Tue Jun 19 15:05:31 2018 New Revision: 335371 URL: https://svnweb.freebsd.org/changeset/base/335371 Log: lualoader: Correct kernel_options handling `kernel_options` were being passed as flags to load, rather than to the kernel being loaded. This is the kernel_options counterpart to r335009. Modified: head/stand/lua/config.lua Modified: head/stand/lua/config.lua == --- head/stand/lua/config.lua Tue Jun 19 14:46:59 2018(r335370) +++ head/stand/lua/config.lua Tue Jun 19 15:05:31 2018(r335371) @@ -425,8 +425,8 @@ function config.loadKernel(other_kernel) local function tryLoad(names) for name in names:gmatch("([^;]+)%s*;?") do - local r = loader.perform("load " .. flags .. - " " .. name) + local r = loader.perform("load " .. name .. +" " .. flags) if r == 0 then return name end ___ 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: r335370 - head/contrib/llvm/projects/libunwind/src
Author: br Date: Tue Jun 19 14:46:59 2018 New Revision: 335370 URL: https://svnweb.freebsd.org/changeset/base/335370 Log: o Implement unw_getcontext() o Restore floating-point registers in jumpto() These are required to native cross build GCC and GDB (both do require libc++ and libunwind). These are not tested. Sponsored by: DARPA, AFRL Modified: head/contrib/llvm/projects/libunwind/src/UnwindRegistersRestore.S head/contrib/llvm/projects/libunwind/src/UnwindRegistersSave.S Modified: head/contrib/llvm/projects/libunwind/src/UnwindRegistersRestore.S == --- head/contrib/llvm/projects/libunwind/src/UnwindRegistersRestore.S Tue Jun 19 13:28:02 2018(r335369) +++ head/contrib/llvm/projects/libunwind/src/UnwindRegistersRestore.S Tue Jun 19 14:46:59 2018(r335370) @@ -488,6 +488,41 @@ DEFINE_LIBUNWIND_PRIVATE_FUNCTION(_ZN9libunwind14Regis // .p2align 2 DEFINE_LIBUNWIND_PRIVATE_FUNCTION(_ZN9libunwind15Registers_riscv6jumptoEv) +#ifdef __riscv_float_abi_double + fldf0, (8 * 32 + 8 * 0)(a0) + fldf1, (8 * 32 + 8 * 1)(a0) + fldf2, (8 * 32 + 8 * 2)(a0) + fldf3, (8 * 32 + 8 * 3)(a0) + fldf4, (8 * 32 + 8 * 4)(a0) + fldf5, (8 * 32 + 8 * 5)(a0) + fldf6, (8 * 32 + 8 * 6)(a0) + fldf7, (8 * 32 + 8 * 7)(a0) + fldf8, (8 * 32 + 8 * 8)(a0) + fldf9, (8 * 32 + 8 * 9)(a0) + fldf10, (8 * 32 + 8 * 10)(a0) + fldf11, (8 * 32 + 8 * 11)(a0) + fldf12, (8 * 32 + 8 * 12)(a0) + fldf13, (8 * 32 + 8 * 13)(a0) + fldf14, (8 * 32 + 8 * 14)(a0) + fldf15, (8 * 32 + 8 * 15)(a0) + fldf16, (8 * 32 + 8 * 16)(a0) + fldf17, (8 * 32 + 8 * 17)(a0) + fldf18, (8 * 32 + 8 * 18)(a0) + fldf19, (8 * 32 + 8 * 19)(a0) + fldf20, (8 * 32 + 8 * 20)(a0) + fldf21, (8 * 32 + 8 * 21)(a0) + fldf22, (8 * 32 + 8 * 22)(a0) + fldf23, (8 * 32 + 8 * 23)(a0) + fldf24, (8 * 32 + 8 * 24)(a0) + fldf25, (8 * 32 + 8 * 25)(a0) + fldf26, (8 * 32 + 8 * 26)(a0) + fldf27, (8 * 32 + 8 * 27)(a0) + fldf28, (8 * 32 + 8 * 28)(a0) + fldf29, (8 * 32 + 8 * 29)(a0) + fldf30, (8 * 32 + 8 * 30)(a0) + fldf31, (8 * 32 + 8 * 31)(a0) +#endif + // x0 is zero ldx1, (8 * 1)(a0) ldx2, (8 * 2)(a0) @@ -521,8 +556,6 @@ DEFINE_LIBUNWIND_PRIVATE_FUNCTION(_ZN9libunwind15Regis ldx30, (8 * 30)(a0) ldx31, (8 * 31)(a0) ldx10, (8 * 10)(a0) // restore a0 - - /* RISCVTODO: restore FPU registers */ ret // jump to ra Modified: head/contrib/llvm/projects/libunwind/src/UnwindRegistersSave.S == --- head/contrib/llvm/projects/libunwind/src/UnwindRegistersSave.S Tue Jun 19 13:28:02 2018(r335369) +++ head/contrib/llvm/projects/libunwind/src/UnwindRegistersSave.S Tue Jun 19 14:46:59 2018(r335370) @@ -665,8 +665,83 @@ DEFINE_LIBUNWIND_FUNCTION(unw_getcontext) #elif defined(__riscv) -/* RISCVTODO */ +# +# extern int unw_getcontext(unw_context_t* thread_state) +# +# On entry: +# thread_state pointer is in a0 +# +DEFINE_LIBUNWIND_FUNCTION(unw_getcontext) + // x0 is zero + sdx1, (8 * 1)(a0) + sdx2, (8 * 2)(a0) + sdx3, (8 * 3)(a0) + sdx4, (8 * 4)(a0) + sdx5, (8 * 5)(a0) + sdx6, (8 * 6)(a0) + sdx7, (8 * 7)(a0) + sdx8, (8 * 8)(a0) + sdx9, (8 * 9)(a0) + sdx10, (8 * 10)(a0) + sdx11, (8 * 11)(a0) + sdx12, (8 * 12)(a0) + sdx13, (8 * 13)(a0) + sdx14, (8 * 14)(a0) + sdx15, (8 * 15)(a0) + sdx16, (8 * 16)(a0) + sdx17, (8 * 17)(a0) + sdx18, (8 * 18)(a0) + sdx19, (8 * 19)(a0) + sdx20, (8 * 20)(a0) + sdx21, (8 * 21)(a0) + sdx22, (8 * 22)(a0) + sdx23, (8 * 23)(a0) + sdx24, (8 * 24)(a0) + sdx25, (8 * 25)(a0) + sdx26, (8 * 26)(a0) + sdx27, (8 * 27)(a0) + sdx28, (8 * 28)(a0) + sdx29, (8 * 29)(a0) + sdx30, (8 * 30)(a0) + sdx31, (8 * 31)(a0) +#ifdef __riscv_float_abi_double + fsdf0, (8 * 32 + 8 * 0)(a0) + fsdf1, (8 * 32 + 8 * 1)(a0) + fsdf2, (8 * 32 + 8 * 2)(a0) + fsdf3, (8 * 32 + 8 * 3)(a0) + fsdf4, (8 * 32 + 8 * 4)(a0) + fsdf5, (8 * 32 + 8 * 5)(a0) + fsdf6, (8 * 32 + 8 * 6)(a0) + fsdf7, (8 * 32 + 8 * 7)(a0) + fsdf8, (8 * 32 + 8 * 8)(a0) + fsdf9, (8 * 32 + 8 * 9)(a0) + fsdf10, (8 * 32 + 8 * 10)(a0) + fsdf11, (8 * 32 + 8 * 11)(a0) + fsdf12, (8 * 32 + 8 * 12)(a0) + fsdf13, (8 * 32 + 8 * 13)(a0) + fsdf14, (8 * 32 + 8 * 14)(a0) + fsdf15, (8 * 32 + 8 * 15)(a0) + fsdf16, (8 * 32 + 8 * 16)(a0) + fsdf17, (8 * 32 + 8 * 17)(a0) + fsdf18, (8 * 32 + 8 * 18)(a0) + fsdf19, (8 * 32 + 8 * 19)(a0) + fsdf20, (8 * 32 + 8 * 20)(a0) + fsdf21, (8 * 32 + 8 * 21)(a0) + fsdf22, (8 * 32 + 8 * 22)(a0) + fsdf23, (8 * 32 + 8 * 23)(a0) + fsd
svn commit: r335369 - head/share/mk
Author: br Date: Tue Jun 19 13:28:02 2018 New Revision: 335369 URL: https://svnweb.freebsd.org/changeset/base/335369 Log: Don't use TARGET_ARCH in this file, use MACHINE_ARCH instead. TARGET_ARCH is not defined when building ports/packages. Sponsored by: DARPA, AFRL Modified: head/share/mk/bsd.cpu.mk Modified: head/share/mk/bsd.cpu.mk == --- head/share/mk/bsd.cpu.mkTue Jun 19 12:16:19 2018(r335368) +++ head/share/mk/bsd.cpu.mkTue Jun 19 13:28:02 2018(r335369) @@ -366,7 +366,7 @@ CFLAGS += -mcpu=8540 -Wa,-me500 -mspe=yes -mabi=spe -m .endif .if ${MACHINE_CPUARCH} == "riscv" -.if ${TARGET_ARCH:Mriscv*sf} +.if ${MACHINE_ARCH:Mriscv*sf} CFLAGS += -march=rv64imac -mabi=lp64 ACFLAGS += -march=rv64imac -mabi=lp64 .else ___ 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: r335368 - head/share/misc
Author: pi (ports committer) Date: Tue Jun 19 12:16:19 2018 New Revision: 335368 URL: https://svnweb.freebsd.org/changeset/base/335368 Log: share/misc/organization.dot: updates - add krion, philip to postmaster@ - remove trhodes from donations@, email bounces Approved by: remko Modified: head/share/misc/organization.dot Modified: head/share/misc/organization.dot == --- head/share/misc/organization.dotTue Jun 19 11:28:50 2018 (r335367) +++ head/share/misc/organization.dotTue Jun 19 12:16:19 2018 (r335368) @@ -48,13 +48,13 @@ clusteradm [label="Cluster Administrators\nclusteradm@ dnsadm [label="DNS Administrators\ndns...@freebsd.org\nbillf, dg, ps,\nkensmith, peter"] mirroradmin [label="FTP/WWW Mirror Site Coordinators\nmirror-ad...@freebsd.org\nkuriyama, kensmith"] perforceadmin [label="Perforce Repository Administrators\nperforce-ad...@freebsd.org\nscottl, kensmith, gordon,\nrwatson, peter, dhw"] -postmaster [label="Postmaster Team\npostmas...@freebsd.org\ndhw, ler, pi, rea, remko, zi"] +postmaster [label="Postmaster Team\npostmas...@freebsd.org\ndhw, krion, ler, philip, pi, rea, remko, zi"] refadm [label="Reference Systems Administrators\nref...@freebsd.org\njake, billf, markm, simon,\nobrien, ps, kensmith,\npeter, dhw"] webmaster [label="Webmaster Team\nwebmas...@freebsd.org\ngjb, wblock, blackend,\ngabor, hrs, wosch"] # Misc hats go here alphabetically sorted -donations [label="Donations Team\ndonati...@freebsd.org\nwilko, gahr, pgolluci,\nobrien, trhodes, ds,\nrwatson"] +donations [label="Donations Team\ndonati...@freebsd.org\nwilko, gahr, pgolluci,\nobrien, ds,\nrwatson"] marketing [label="Marketing Team\nmarket...@freebsd.org\nSteven Beedle, Denise Ebery, deb,\njkoshy, dru, mwlucas, imp,\nKris Moore, murray, mattt,\nJeremy C. Reed, rwatson"] vendorrelations [label="Vendor Relations\nvendor-relati...@freebsd.org\ncore, FreeBSD Foundation"] ___ 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: r335367 - head/sys/cam/mmc
Author: kibab Date: Tue Jun 19 11:28:50 2018 New Revision: 335367 URL: https://svnweb.freebsd.org/changeset/base/335367 Log: Don't try to turn power down MMC bus if it is already down Regulator framework doens't like turning off already turned off regulators, so we get panic on AllWinner boards. Approved by: imp (mentor) Differential Revision:https://reviews.freebsd.org/D15890 Modified: head/sys/cam/mmc/mmc_xpt.c Modified: head/sys/cam/mmc/mmc_xpt.c == --- head/sys/cam/mmc/mmc_xpt.c Tue Jun 19 11:25:40 2018(r335366) +++ head/sys/cam/mmc/mmc_xpt.c Tue Jun 19 11:28:50 2018(r335367) @@ -574,14 +574,16 @@ mmcprobe_start(struct cam_periph *periph, union ccb *s /* FALLTHROUGH */ case PROBE_IDENTIFY: xpt_path_inq(_ccb->cpi, periph->path); - CAM_DEBUG(start_ccb->ccb_h.path, CAM_DEBUG_PROBE, ("Start with PROBE_RESET\n")); - init_standard_ccb(start_ccb, XPT_SET_TRAN_SETTINGS); - cts->ios.power_mode = power_off; - cts->ios_valid = MMC_PM; + init_standard_ccb(start_ccb, XPT_GET_TRAN_SETTINGS); xpt_action(start_ccb); - mtx_sleep(periph, p_mtx, 0, "mmcios", 100); - + if (cts->ios.power_mode != power_off) { + init_standard_ccb(start_ccb, XPT_SET_TRAN_SETTINGS); + cts->ios.power_mode = power_off; + cts->ios_valid = MMC_PM; + xpt_action(start_ccb); + mtx_sleep(periph, p_mtx, 0, "mmcios", 100); + } /* mmc_power_up */ /* Get the host OCR */ init_standard_ccb(start_ccb, XPT_GET_TRAN_SETTINGS); ___ 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: r335366 - head/sys/cam/mmc
Author: kibab Date: Tue Jun 19 11:25:40 2018 New Revision: 335366 URL: https://svnweb.freebsd.org/changeset/base/335366 Log: Correctly define rawscr so initializing it doesn't result in overwriting memory. We need 8 bytes of storage for rawscr. Approved by: imp (mentor) Differential Revision:https://reviews.freebsd.org/D15889 Modified: head/sys/cam/mmc/mmc_da.c Modified: head/sys/cam/mmc/mmc_da.c == --- head/sys/cam/mmc/mmc_da.c Tue Jun 19 11:23:48 2018(r335365) +++ head/sys/cam/mmc/mmc_da.c Tue Jun 19 11:25:40 2018(r335366) @@ -818,6 +818,7 @@ mmc_app_get_scr(struct cam_periph *periph, union ccb * struct mmc_data d; memset(, 0, sizeof(cmd)); + memset(, 0, sizeof(d)); memset(rawscr, 0, 8); cmd.opcode = ACMD_SEND_SCR; @@ -1296,13 +1297,13 @@ sdda_start_init(void *context, union ccb *start_ccb) /* Find out if the card supports High speed timing */ if (mmcp->card_features & CARD_FEATURE_SD20) { /* Get and decode SCR */ - uint32_t rawscr; + uint32_t rawscr[2]; uint8_t res[64]; - if (mmc_app_get_scr(periph, start_ccb, )) { + if (mmc_app_get_scr(periph, start_ccb, rawscr)) { CAM_DEBUG(periph->path, CAM_DEBUG_PERIPH, ("Cannot get SCR\n")); goto finish_hs_tests; } - mmc_app_decode_scr(, >scr); + mmc_app_decode_scr(rawscr, >scr); if ((softc->scr.sda_vsn >= 1) && (softc->csd.ccc & (1<<10))) { mmc_sd_switch(periph, start_ccb, SD_SWITCH_MODE_CHECK, ___ 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: r335365 - head/sys/cam/mmc
Author: kibab Date: Tue Jun 19 11:23:48 2018 New Revision: 335365 URL: https://svnweb.freebsd.org/changeset/base/335365 Log: Set MMC_DATA_MULTI flag when doing multi-block transfers Lower layers (MMC / SDHCI controller drivers) may make certain decisions based on the presence of this flag. The fact that sdhci.c doesn't look at this flag is another problem that should be fixed separately. Found when adding MMCCAM support to AllWinner MMC controller driver where the presence of this flag actually matters. Approved by: imp (mentor) Differential Revision:https://reviews.freebsd.org/D15888 Modified: head/sys/cam/mmc/mmc_da.c Modified: head/sys/cam/mmc/mmc_da.c == --- head/sys/cam/mmc/mmc_da.c Tue Jun 19 11:20:28 2018(r335364) +++ head/sys/cam/mmc/mmc_da.c Tue Jun 19 11:23:48 2018(r335365) @@ -1778,6 +1778,7 @@ sddastart(struct cam_periph *periph, union ccb *start_ mmcio->cmd.data->flags = (bp->bio_cmd == BIO_READ ? MMC_DATA_READ : MMC_DATA_WRITE); /* Direct h/w to issue CMD12 upon completion */ if (count > 1) { + mmcio->cmd.data->flags |= MMC_DATA_MULTI; mmcio->stop.opcode = MMC_STOP_TRANSMISSION; mmcio->stop.flags = MMC_RSP_R1B | MMC_CMD_AC; mmcio->stop.arg = 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: r335364 - head/sys/netinet/tcp_stacks
Author: rrs Date: Tue Jun 19 11:20:28 2018 New Revision: 335364 URL: https://svnweb.freebsd.org/changeset/base/335364 Log: Make sure that the t_peakrate_thr is not compiled in by default until NF can upstream it. Reviewed by: and suggested lstewart Sponsored by: Netflix Inc. Modified: head/sys/netinet/tcp_stacks/rack.c Modified: head/sys/netinet/tcp_stacks/rack.c == --- head/sys/netinet/tcp_stacks/rack.c Tue Jun 19 11:06:36 2018 (r335363) +++ head/sys/netinet/tcp_stacks/rack.c Tue Jun 19 11:20:28 2018 (r335364) @@ -1206,7 +1206,7 @@ rack_ack_received(struct tcpcb *tp, struct tcp_rack *r tp->t_stats_gput_prev); tp->t_flags &= ~TF_GPUTINPROG; tp->t_stats_gput_prev = gput; - +#ifdef NETFLIX_CWV if (tp->t_maxpeakrate) { /* * We update t_peakrate_thr. This gives us roughly @@ -1214,6 +1214,7 @@ rack_ack_received(struct tcpcb *tp, struct tcp_rack *r */ tcp_update_peakrate_thr(tp); } +#endif } #endif if (tp->snd_cwnd > tp->snd_ssthresh) { @@ -1267,11 +1268,11 @@ rack_ack_received(struct tcpcb *tp, struct tcp_rack *r tcp_newcwv_update_pipeack(tp, data); } } -#endif /* we enforce max peak rate if it is set. */ if (tp->t_peakrate_thr && tp->snd_cwnd > tp->t_peakrate_thr) { tp->snd_cwnd = tp->t_peakrate_thr; } +#endif } static void ___ 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: r335362 - head/sys/net
Author: ae Date: Tue Jun 19 10:34:45 2018 New Revision: 335362 URL: https://svnweb.freebsd.org/changeset/base/335362 Log: Move BPFIF_* macro definitions into .c file, where struct bpf_if is declared. They are only used in this file and there is no need to export them via bpfdesc.h. Modified: head/sys/net/bpf.c head/sys/net/bpfdesc.h Modified: head/sys/net/bpf.c == --- head/sys/net/bpf.c Tue Jun 19 05:28:14 2018(r335361) +++ head/sys/net/bpf.c Tue Jun 19 10:34:45 2018(r335362) @@ -117,6 +117,11 @@ struct bpf_if { CTASSERT(offsetof(struct bpf_if, bif_ext) == 0); +#define BPFIF_RLOCK(bif) rw_rlock(&(bif)->bif_lock) +#define BPFIF_RUNLOCK(bif) rw_runlock(&(bif)->bif_lock) +#define BPFIF_WLOCK(bif) rw_wlock(&(bif)->bif_lock) +#define BPFIF_WUNLOCK(bif) rw_wunlock(&(bif)->bif_lock) + #if defined(DEV_BPF) || defined(NETGRAPH_BPF) #define PRINET 26 /* interruptible */ Modified: head/sys/net/bpfdesc.h == --- head/sys/net/bpfdesc.h Tue Jun 19 05:28:14 2018(r335361) +++ head/sys/net/bpfdesc.h Tue Jun 19 10:34:45 2018(r335362) @@ -152,11 +152,6 @@ struct xbpf_d { u_int64_t bd_spare[4]; }; -#define BPFIF_RLOCK(bif) rw_rlock(&(bif)->bif_lock) -#define BPFIF_RUNLOCK(bif) rw_runlock(&(bif)->bif_lock) -#define BPFIF_WLOCK(bif) rw_wlock(&(bif)->bif_lock) -#define BPFIF_WUNLOCK(bif) rw_wunlock(&(bif)->bif_lock) - #define BPFIF_FLAG_DYING 1 /* Reject new bpf consumers */ #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"