Commit Graph

19143 Commits

Author SHA1 Message Date
mckusick
39d99c1186 Correct fsck journal-recovery code to update a cylinder-group
check-hash after making changes to the cylinder group. The problem
was that the journal-recovery code was calling the libufs bwrite()
function instead of the cgput() function. The cgput() function updates
the cylinder-group check-hash before writing the cylinder group.

This change required the additions of the cgget() and cgput() functions
to the libufs API to avoid a gratuitous bcopy of every cylinder group
to be read or written. These new functions have been added to the
libufs manual pages. This was the first opportunity that I have had
to use and document the use of the EDOOFUS error code.

Reviewed by: kib
Reported by: emaste and others
2018-01-17 17:58:24 +00:00
dim
3207b51c93 Pull in r322623 from upstream llvm trunk (by Andrew V. Tischenko):
Allow usage of X86-prefixes as separate instrs.
  Differential Revision: https://reviews.llvm.org/D42102

This should fix parse errors when x86 prefixes (such as 'lock' and
'rep') are followed by various non-mnemonic tokens, e.g. comments, .byte
directives and labels.

PR:		224669,225054
2018-01-17 17:11:55 +00:00
fabient
326b96a88c Fix pmcstat exit from kernel introduced by r325275.
pmcstat request for close will generate a close event.
This event will be in turn received by pmcstat to close the file.

Reviewed by:	kib
Tested by:	pho
MFC after:	1 week
Sponsored by: Stormshield
2018-01-17 16:41:22 +00:00
arichardson
90f63e1c7f libnetbsd: Make the function declaration of efopen() match the definition
In order to crossbuild FreeBSD on Mac/Linux I also need to build libnetbsd
and FILE* is not equal to struct __sFILE on those platforms.

Reviewed By:	brooks, emaste
Approved By:	jhb (mentor)
Differential Revision: https://reviews.freebsd.org/D13305
2018-01-16 21:43:21 +00:00
br
35bb6ca08e Fix bug: increment the value of pmcstat_npmcs instead of moving pointer
to the next int position.

Bug was introduced in r324959 ("Extract a set of pmcstat functions and
interfaces to the new internal library -- libpmcstat.")

This fixes pmcstat top mode (-T) operation.
Example: pmcstat -n1 -S clock.hard -T

Reported by:	Peter Holm <peter@holm.cc>
Sponsored by:	DARPA, AFRL
2018-01-16 09:31:01 +00:00
tuexen
b86a65dcd0 Bump date, which I missed in r328014. Thanks to jhb@ for reporting. 2018-01-15 23:12:54 +00:00
tuexen
9db4633471 Add support for decoding the nxt_flags, rcv_flags, and snd_flags of
SCTP level cmsgs.
2018-01-15 20:37:11 +00:00
tuexen
aab0289ab1 Add support for decoding the type of a cmsg. 2018-01-15 10:59:04 +00:00
tuexen
96e66998d9 Simplify table generation. 2018-01-15 08:32:49 +00:00
tuexen
dc1ea661c7 Add a function is decode the sinfo_flags of struct sctp_sndrcvinfo. 2018-01-14 14:27:42 +00:00
tuexen
5c419e6ba6 Add suppor for the supported PR-SCTP policies. 2018-01-14 12:08:41 +00:00
dim
d91380862c Merge ^/head r327886 through r327930. 2018-01-13 17:52:55 +00:00
dim
5473ed2089 Build llvm-extract with -lz, and add a few objects to liblldb, both of
which turn out to be needed when you don't use -ffunction-sections.

Reported by:	Shawn Webb <shawn.webb@hardenedbsd.org>
2018-01-13 13:53:05 +00:00
jhibbits
00a6946205 Replace the PMC class struct copy with an explicit memcpy()
This should be effectively a nop for all archs, but for some reason the codegen
difference on the PowerPC 970 is such that the struct assignment doesn't work
(unless a printf() using one of the elements in the copied struct follows it),
while the memcpy() succeeds.  On all archs the memcpy() should be expanded to an
inline copy, since the copy is bounded to ~16 bytes.

MFC after:	3 weeks
2018-01-13 04:53:04 +00:00
jeff
f375b4dd66 Implement NUMA support in uma(9) and malloc(9). Allocations from specific
domains can be done by the _domain() API variants.  UMA also supports a
first-touch policy via the NUMA zone flag.

The slab layer is now segregated by VM domains and is precise.  It handles
iteration for round-robin directly.  The per-cpu cache layer remains
a mix of domains according to where memory is allocated and freed.  Well
behaved clients can achieve perfect locality with no performance penalty.

The direct domain allocation functions have to visit the slab layer and
so require per-zone locks which come at some expense.

Reviewed by:	Attilio (a slightly older version)
Tested by:	pho
Sponsored by:	Netflix, Dell/EMC Isilon
2018-01-12 23:25:05 +00:00
jeff
94c7af8ca2 Implement 'domainset', a cpuset based NUMA policy mechanism. This allows
userspace to control NUMA policy administratively and programmatically.

Implement domainset based iterators in the page layer.

Remove the now legacy numa_* syscalls.

Cleanup some header polution created by having seq.h in proc.h.

Reviewed by:	markj, kib
Discussed with:	alc
Tested by:	pho
Sponsored by:	Netflix, Dell/EMC Isilon
Differential Revision:	https://reviews.freebsd.org/D13403
2018-01-12 22:48:23 +00:00
dim
b64d96a23d Merge ^/head r327624 through r327885. 2018-01-12 18:23:35 +00:00
oshogbo
214653c9f8 Fix markup. 2018-01-10 02:57:22 +00:00
oshogbo
ffc175f780 Document the DNS Casper service.
Reviewed by:	brueffer@, bcr@
Differential Revision:	https://reviews.freebsd.org/D13762
2018-01-08 09:20:08 +00:00
dim
0f76262754 Merge llvm, clang, lld, lldb, compiler-rt and libc++ release_60 r321788,
update build glue and version numbers.
2018-01-06 23:44:14 +00:00
dim
6a38aa2ea6 Merge ^/head r327341 through r327623. 2018-01-06 16:13:17 +00:00
imp
c92659280b The source strings are from the password database which guarantees
that the data going into it is sane.  Out of an abundance of caution,
limit the string copies to prevent an overflow.

CID: 1019035
2018-01-06 12:46:04 +00:00
oshogbo
e01adbb00f Build service tests with Casper support. 2018-01-05 09:31:41 +00:00
imp
1432862eea Need to convert '/' back to '\' when creating a path. Ideally, this
would be filesystem type dependent, but that's difficult to accomplish
and it's unclear how the UEFI firmware will cope. Be conservative and
make boot loaders cope instead.

Sponsored by: Netflix
2018-01-05 07:09:29 +00:00
imp
6bb28aae18 Set dp to NULL when we free it, and tree a NULL dp as an error
condition. This should prevent a double free. In addition, prevent a
leak by freeing dp each loop and when we're done.

CID: 1383577
Sponsored by: Netflix
2018-01-05 07:09:24 +00:00
oshogbo
6fceb757ff cap_unwrap should return a descriptor but also free the structure. 2018-01-04 08:23:23 +00:00
oshogbo
29ec275f3d Add missing macro in man page.
Reported by:	brueffer@
2018-01-04 04:04:29 +00:00
oshogbo
c7ef54dfa9 Document services which we have in libcasper.
Reviewed by:	bcr@
Differential Revision:	https://reviews.freebsd.org/D13734
2018-01-03 06:22:40 +00:00
delphij
a81d89e137 Remove unused includes. 2018-01-01 08:01:26 +00:00
eadler
d55e4600b3 cacos(3): correct spelling of 'I'
In some cases we had 'i' instead of 'I'.

PR:		195517
Submitted by:	stephen
2017-12-31 00:55:00 +00:00
eadler
c217338d29 isgreater(3): correct description of isunordered macro
PR:		211376
Submitted by:	Duane <parakleta@darkreality.org>
MFC After:	1 week
2017-12-31 00:46:41 +00:00
eadler
332f786adf libc/locale: fix an off-by-one in newlocale
Reported by:	zrj@DragonFlyBSD.org
2017-12-29 14:56:46 +00:00
dim
49c7ad4b12 Merge ^/head r327169 through r327340. 2017-12-29 12:51:26 +00:00
dim
740b3dd5fe Merge llvm, clang, lld, lldb, compiler-rt and libc++ trunk r321545,
update build glue and version numbers, add new intrinsics headers, and
update OptionalObsoleteFiles.inc.
2017-12-29 00:56:15 +00:00
dim
6168e10044 Add one more file to libllvm's SRCS_MIN, since this one is required for
MK_SHARED_TOOLCHAIN=yes.
2017-12-29 00:21:50 +00:00
robak
a9b02c6e96 humanize_number(3): fix math edge case in rounding large numbers
Fix for remainder overflow, when in rare cases adding remainder to divider
exceeded 1 and turned the total to 1000 in final formatting, taking up
the space for the unit character.

The fix continues the division of the original number if the above case
happens -- added the appropriate check to the for loop performing
the division. This lowers the value shown, to make it fit into the buffer
space provided (1.0M for 4+1 character buffer, as used by ls).

Add test case for the reported bug and extend test program to support
providing buffer length (ls -lh uses 5, tests hard-coded 4).

PR:		224498
Submitted by:	Pawel Biernacki <pawel.biernacki@gmail.com>
Reported by:	Masachika Ishizuka <ish@amail.plala.or.jp>
Reviewed by:	cem, kib
Approved by:	cem, kib
MFC after:	1 week
Sponsored by:	Mysterious Code Ltd.
Differential Revision:	D13578
2017-12-28 22:57:34 +00:00
dim
993164fb24 Vendor import of clang trunk r321530:
https://llvm.org/svn/llvm-project/cfe/trunk@321530
2017-12-28 21:23:03 +00:00
imp
f079001a1d Close slave on fork error to prevent pty fd leak.
CID: 978209
2017-12-28 05:33:59 +00:00
eadler
f156130c4f Fix a few more speelling errors
Reviewed by:		bjk
Reviewed by:		jilles (incl formal "accept")
Differential Revision:	https://reviews.freebsd.org/D13650
2017-12-28 01:31:28 +00:00
pfg
73ddbfc6bb SPDX: Small for a license ID tags.
Use parenthesis for grouping as suggested by the spec.
2017-12-27 21:36:37 +00:00
pfg
36c2d09b6b SPDX: Fix some License ID tags for libc. 2017-12-27 21:21:03 +00:00
eadler
ca4bf99dde lib: Fix several typos and minor errors
- duplicate words
- typos
- references to old versions of FreeBSD

Reviewed by:	imp, benno
2017-12-27 03:23:41 +00:00
mckusick
5e717fc60d Missing disk close in libufs. 2017-12-26 23:16:11 +00:00
eadler
f482f2ba91 fsync(3): correctly document return values
In r268924 the behavior of fflush was changed to return success
on read only streams. Document this.

Reported by:	zrj@DragonFlyBSD.org
2017-12-25 19:49:05 +00:00
dim
ec11d4437e Only build tsan and tsan_cxx for amd64, as 32 bit is unsupported. 2017-12-25 13:17:29 +00:00
dim
a452a2c53c Vendor import of clang trunk r321426:
https://llvm.org/svn/llvm-project/cfe/trunk@321426
2017-12-24 14:05:01 +00:00
dim
b38f608980 Merge ^/head r326936 through r327149. 2017-12-24 13:22:57 +00:00
dim
2bcccfe68a Update clang, lld and llvm version numbers for r321414, and update build
glue.
2017-12-24 12:32:55 +00:00
dim
8aebf5a8bf Vendor import of clang trunk r321414:
https://llvm.org/svn/llvm-project/cfe/trunk@321414
2017-12-24 01:00:23 +00:00
dim
ba4e891d87 Next step in updating llvm/clang build glue: make libclang_rt build. 2017-12-23 21:41:32 +00:00