summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* MFC r307698:ngie2017-05-301-1/+1
| | | | | | r307698 (by lwhsu): - Add required header for fixing `make` in sys/modules/gpio
* MFC r308161:ngie2017-05-301-2/+0
| | | | | | r308161 (by lwhsu): - Fix `make` in sys/modules/bhnd
* MFC r318606:cy2017-05-301-14/+2
| | | | | Refactor & compact struct i6addr_t #ifdef: remove redundant structure definintion when USE_INET6 is false.
* MFC r318588:cy2017-05-301-2/+2
| | | | | | | Fix up two assertions following malloc(). vangyzen@ notified me of the second one. The first one is fixed as well. Reported by: vangyzen@
* MFC r318578:cy2017-05-301-3/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix non-recoverable name resolution failures due to negative cache entries never expiring. This patch honours the negative cache timeout. To test/experience the failure do the following: 1. Edit /etc/ncd.conf to adjust the cache timeouts as follows: positive-time-to-live hosts 30 negative-time-to-live hosts 1 2. Ensure that nsswitch.conf hosts line contains something like: hosts: files cache dns Note that cache must be specified before dns. 3. Start nscd. 4. Run the following command: while true; do nc -z -w 3 www.google.com 80; sleep 5; done 5. While running the command, remove or comment out all nameserver statements in /etc/resolv.conf. After a short while you will notice non-recoverable name rsolution failures. 6. Uncomment or replace all nameserver statements back into /etc/resolv.conf. Take note that name resolution never recovers. To recover nscd must be restarted. This patch fixes this. PR: 207804 Submitted by: Jov <amutu@amutu.com>
* MFC r318745:cy2017-05-301-4/+0
| | | | Remove redundant variable declaration.
* MFC r315368:cy2017-05-3012-16/+17
| | | | | | | | | | | | | | | | | | | | | | calloc() and realloc() modernization. This commit replaces calloc calls, which called calloc() as if it were malloc() by allocating a multiple of objects as a sizeof multiplied by the number of objects. The patch rectifies this by calling calloc() as it was meant to be called. This commit also replaces realloc() with reallocarray() in a similar fashion as above. Instead of calculating the memory to reallocated (changed) by multiplying sizeof by the number of objects, the sizeof and number are passed as separate arguments to reallocarray(), letting reallocarray() do the multiplication instead. Like the calloc() adjustment above, this is approach is cleaner and more elegant than than the previous code. This has been tested on my production firewall and a laptop (also running ipfilter). Submitted by: pfg
* MFC r318006:ngie2017-05-301-4/+2
| | | | style(9): sort headers and remove duplicates
* MFC r312913,r318100,r318107:ngie2017-05-301-94/+247
| | | | | | | | | | | | | | | | | | | | | | | | | | r312913 (by asomers): Improve the aio tests * Add tests for aio_suspend(2). * Add tests for polled completion notification. * Test the full matrix of file descriptor types and completion notification mechanisms. * Don't bother with mkstemp, because ATF runs every test in its own temp dir. * Fix some typos. * Remove extraneous ATF_REQUIRE_KERNEL_MODULE calls. r318100: style(9): move function definition curly braces to column 0 r318107: Remove unused constant (PATH_TEMPLATE) It was made unnecessary in r312913. MFC with: r312913
* MFC r318094,r318098,r318099:ngie2017-05-301-29/+44
| | | | | | | | | | | | | | | | r318094: style(9): clean up trailing whitespace r318098: Refactor ATF_REQUIRE_UNSAFE_AIO and PLAIN_REQUIRE_UNSAFE_AIO This is being done to reduce duplication between the two macros. r318099: Print out when unsafe AIO is enabled to debugging purposes
* MFC r318007,r318008,r318009,r318011:ngie2017-05-303-2/+14
| | | | | | | | | | | | | | | | | | | | | | | r318007: Add intermediary Makefile for compiling all items in the directory r318008: Only compile tests/ if MK_TESTS != no or ALL_MODULES is defined r318009: Add MK_TESTS to kern.opts.mk to support r31800 MFC with: r318008 Pointyhat to: ngie r318011: Mark this Makefile SUBDIR_PARALLEL I inserted the necessary SUBDIR+= .WAIT in the previous commit
* MFC r319015:ngie2017-05-301-2/+1
| | | | Use calloc instead of malloc + memset
* MFC r318010:ngie2017-05-301-6/+6
| | | | style(9): sort headers
* MFC r318591: compress: Add basic tests.jilles2017-05-294-0/+189
|
* MFC r317313:ngie2017-05-291-7/+19
| | | | | | | gctl_test.t: catch errors with the mdcfg directive While here, add a note about certain testcases relying on `count=1024` in the "create" portion.
* MFC r314659,r314676:ngie2017-05-2913-34/+173
| | | | | | | | | | | | | | | | | | | | | | | | | r314659: usr.sbin: normalize paths using SRCTOP-relative paths or :H when possible This simplifies make logic/output r314676: Fix build after r314656 Some of the changes I introduced to use .ALLSRC were correct in spirit, but incorrect in reality -- in particular, ../Makefile.inc hadn't been pulled in via bsd.init.mk (via bsd.lib.mk, bsd.prog.mk), so the value of .ALLSRC (evaluated immediately) was empty. .include bsd.init.mk explicitly so we can be certain that the values used as dependencies in the targets are defined when the target recipe has been evaluated. Reminder: thou shalt separate out separate functional changes before committing them. (YUGE) Pointyhat to: ngie In collaboration with: bdrewery
* MFC r318788:pfg2017-05-291-3/+6
| | | | | | | | bhyvegc_resize: make use of reallocarray(3) for bounds-checking. Also add __FBSDID. Reviewed by: grehan
* MFC r318446:kib2017-05-291-3/+8
| | | | Update my copyright, note The FreeBSD Foundation involvement.
* MFC direct execution mode for rtld.kib2017-05-291-19/+243
| | | | | | | | | | | | | | | | | | | | MFC r318313: Make ld-elf.so.1 directly executable. MFC r318352 (by jonathan): Rename rtld's parse_libdir to parse_integer. MFC r318380: Pretend that there is some security when executing in direct mode. MFC r318431 (by jonathan): Allow rtld direct-exec to take a file descriptor. MFC r318445: Fix style, add static keyword before static function definition. MFC r318739: For ld.so direct execution mode, implement -p option.
* MFC r318312:kib2017-05-291-0/+2
| | | | Fix the AT_EXECFD functionality.
* MFC r318318:kib2017-05-293-5/+10
| | | | | | Ensure that resume path on amd64 only accesses page tables for normal operation after processor is configured to allow all required features.
* MFC r318303:kib2017-05-291-9/+7
| | | | Style.
* MFC r318299:kib2017-05-291-44/+31
| | | | Simplify cleanup on failure in realpath(3).
* MFC r318298:kib2017-05-291-19/+27
| | | | | | Fix several buffer overflows in realpath(3), and other minor issues. PR: 219154
* MFC r318632, r318633:royger2017-05-291-5/+22
| | | | | bsdinstall: mount is not needed for the ZFS install case bsdinstall: do not use distextract in scripted mode
* MFC r314659,r314676:ngie2017-05-2966-121/+122
| | | | | | | | | | | | | | | | | | | | | | | | | r314659: usr.sbin: normalize paths using SRCTOP-relative paths or :H when possible This simplifies make logic/output r314676: Fix build after r314656 Some of the changes I introduced to use .ALLSRC were correct in spirit, but incorrect in reality -- in particular, ../Makefile.inc hadn't been pulled in via bsd.init.mk (via bsd.lib.mk, bsd.prog.mk), so the value of .ALLSRC (evaluated immediately) was empty. .include bsd.init.mk explicitly so we can be certain that the values used as dependencies in the targets are defined when the target recipe has been evaluated. Reminder: thou shalt separate out separate functional changes before committing them. (YUGE) Pointyhat to: ngie In collaboration with: bdrewery
* MFC r315561:ngie2017-05-291-2/+2
| | | | | | | r315561 (by trasz): Bring back the "i". The point is to make it easy to find via "apropos iscsi", along with all the other relevant components.
* MFC r316179,r316180,r316181,r316260:ngie2017-05-292-0/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | r316179 (by cem): t_msgsnd: Use msgsnd()'s msgsz argument correctly to avoid overflow msgsnd's msgsz argument is the size of the message following the 'long' message type. Don't include the message type in the size of the message when invoking msgsnd(2). CID: 1368712 r316180 (by cem): Follow-up to r316179: More of the same CIDs: 1368705, 1368706, 1368707, 1368710 r316181 (by cem): t_msgctl: Fix the same msgsnd() misuse as t_msgsnd msgsnd(2)'s msgsz argument does not describe the full structure, only the message component. CIDs: 1368703, 1368711 r316260: Annotate all changes made in r316178-r316180 with __FreeBSD__ Restore the stock (upstream) code under an #else block, so it's easier for me to visualize and understand the code that needs to be upstreamed.
* MFC r318315:ngie2017-05-291-0/+10
| | | | | | | lib/libc/gen/realpath_test: make check result from getcwd(3) This is being done to avoid dereferencing a NULL pointer via strlcat, obscuring the underlying issue with the getcwd(3) call.
* MFC r308826: zfs: fix up after the removal of PG_CACHED pages in r308691avg2017-05-291-2/+2
| | | | | | | | Now that r308691 has been MFC-ed as a part of r318716, r308826 must be MFC-ed as well. PR: 214629 Reported by: mshirk@daemon-security.com [head], lev [stable/11]
* MFC r318688: "struct ata_params" field "reserved206[2]" actually starts atrpokala2017-05-291-1/+1
| | | | | | offset 20*7*. Sponsored by: Panasas
* MFC r318906:dim2017-05-281-9/+14
| | | | | | | | | | | | | | | | | Pull in r303257 from upstream llvm trunk (by Krzysztof Parzyszek) [PPC] Properly update register save area offsets The variables MinGPR/MinG8R were not updated properly when resetting the offsets, which in the included testcase lead to saving the CR register in the same location as R30. This fixes another issue reported in PR26519. Differential Revision: https://reviews.llvm.org/D33017 Reported by: Mark Millard PR: 206990
* MFC r318860:hselasky2017-05-282-2/+6
| | | | | Declare the "snd_fxdiv_table" once. This shaves around 24Kbytes of binary data from sound.ko and the kernel.
* MFC r315698:ngie2017-05-281-1/+1
| | | | | | libkvm: bump WARNS to 6 after recent commits done to resolve warnings issues Tested with: make tinderbox; clang 4.0.0 (amd64), gcc 4.2.1/6.3.0 (amd64)
* MFC r318872:gjb2017-05-281-0/+5
| | | | | | | Enable DHCP and IPv6 autoconfig on non-cloud VM images. PR: 203653 Sponsored by: The FreeBSD Foundation
* MFC r309412,r316109,r316132:ngie2017-05-2811-24/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | r309412 (by imp): dd is currently a bootstrap tool. It really doesn't have any business being a bootstrap tool. However, for reproducible build output, FreeBSD added dd status=none because it was otherwise difficult to suppress the status information, but retain any errors that might happen. There's no real reason that dd has to be a build tool, other than we use status=none unconditional. Remove dd from a bootstrap tool entirely by only using status=none when available. This may also help efforts to build the system on non-FreeBSD hosts as well. r316109: Don't hardcode input files for stage 1/2 bootloaders; use .ALLSRC instead This is a better pattern to follow when creating the bootloaders and doing the relevant space checks to make sure that the sizes aren't exceeded (and thus, copy-pasting is a bit less error prone). r316132: Parameterize out 7680 (15 * 512) as BOOT2SIZE, similar to sys/boot/i386/zfsboot/... This is being done to make it easier to change in the future--this action might be needed sooner rather than later because of gcc 6.3.0 bailing, stating that there is negative free space left (deficit) in the boot2 bootloader.
* MFC r316131:ngie2017-05-281-27/+27
| | | | | | | | | | | | | | | | | | | Fix up r316081 by using nitems(cam_errbuf) instead of sizeof(cam_errbuf) Part of my original reasoning as far as converting the snprintf calls was to permit switching over from char[] to wchar_t[] in the future, as well as futureproof in case cam_errbuf's size was ever changed. Unfortunately, my approach was bugged because it conflated the number of items with the size of the buffer, instead of the number of elements being a fixed size != 1 byte. Use nitems(..) instead which counts the quantity of items of a specific type, as opposed to an unqualified sizeof(..) (which assumes that the number of characters is equal to the buffer size). Noted by: cem
* MFC r317310,r317316:ngie2017-05-282-18/+15
| | | | | | | | | | | | | | | | | | r317310: Minor style(9) fixups Delete trailing whitespace and sort headers. Leave libgeom.h's placement alone, per reasoning in r317289. r317316: Minor style(9) fixups Delete trailing whitespace and sort headers. Leave libgeom.h's placement alone, per reasoning in r317289.
* MFC r314833rgrimes2017-05-287-18/+18
| | | | | | | | | | | | | | | | | | | | | Convert absolute links to relative links. Style.Makefile(9) has been ignored to produce minimal diffs. MFC r314837 The relative symlink fix causes downstream issues for EMC DELL Isilon so revert the relative symlink fix pending a better solution. Reported by: ngie MFC r315091 Revert r314833 until the problem with INSTALL_RSYMLINKS can be found as it appears to break arm release builds. PR: 217705 Reported by: cyclaero@gmail.com Approved by: grehan (mentor)
* MFC ↵ngie2017-05-273-35/+64
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | r317290,r317291,r317292,r317293,r317294,r317295,r317304,r317306,r317307,r317308,r317309: r317290: Fix -Wimplicit-function-declaration compilation warning by moving libgeom.h #include below the stdio.h #include. gctl_dump(3) needs stdio.h, per reasoning noted in r317289. PR: 218809 r317291: Rename gctl.t to gctl_test.t and test.c to gctl_test_helper.c This is being done to reduce ambiguity and to make the tests more portable in the future to other locations in the source tree. r317292: gctl_test.t: use make to compile gctl_test_helper instead of calling cc directly r317293: gctl_test_helper: apply polish - Staticize variables to fix warnings. - Sprinkle asserts around for calls that can fail - Apply style(9) for main(..) definition. - ANSIify usage(..) definition. r317294: Bump WARNS to 6 per previous commits which fixed warnings Tested with: clang (4.0), gcc (4.2.1, 6.3.0) r317295: The GPT class no longer exists; use the PART class instead r317304: gctl_test_helper: add diagnostic output for parse_retval(..) This will help end-users better diagnose issues with the function. r317306: gctl_test.t: minor tweaks - Declare $count with the `my` scope operator to permit `use strict`. - Add `use strict`. - Use `use warnings` instead of using `-w` in the shebang. - Don't unlink $cmd when done (prevents unnecessary rebuilding). - Improve the error message when running with insufficient permissions, e.g., non-root. r317307: Use verb=delete not verb=remove The `remove` verb hasn't been present in geom_part*(4) for well over a decade, if ever. I couldn't find any references to it in ^/stable/5 at least, which is around the timeframe that this test was written. r317308: gctl_test.t: more tweaks to try and update the code and get it functional (again?) - Make the logfile for $out be built off the basename for $cmd, instead of $cmd. (r317292 broke this assumption). - Rename $mntpt to $mntpt_prefix for clarity, as this variable is a prefix for mountpoints. - Reindent the umount directive block while here to match the rest of the code. r317309: gctl_test.t: improve error reporting with mdcfg and mount directives If the commands had failed previously, it would press on and result in a series of cascading failures. Fail early and continue on to the next case instead of executing additional commands after a previously failed series of steps.
* MFC r319010:ngie2017-05-271-2/+2
| | | | | | | | Fix #if conditional added in r319008 I committed an earlier version of the file by accident This is a no-op on ^/head and ^/stable/11.
* MFC r319008:ngie2017-05-271-0/+5
| | | | | | | | | kvm_geterr_test: Compile out the portions that require kvm_open2(3) on systems that lack the libcall, based on __FreeBSD_version. kvm_open2(3) wasn't made available until r291406, which is in ^/stable/11, but not ^/stable/10. This makes some of kvm_geterr_test available for testing on ^/stable/10.
* MFC r316099:ngie2017-05-279-0/+535
| | | | | | | | | | | | | | | | | | | | | lib/libkvm: start adding basic tests for kvm(3) - kvm_close: add a testcase to verify support for errno = EINVAL / -1 (see D10065) when kd == NULL is provided to the libcall. - kvm_geterr: -- Add a negative testcase for kd == NULL returning "" (see D10022). -- Add two positive testcases: --- test the error case using kvm_write on a O_RDONLY descriptor. --- test the "no error" case using kvm_read(3) and kvm_nlist(3) as helper routines and by injecting a bogus error message via _kvm_err (an internal API) _kvm_err was used as there isn't a formalized way to clear the error output, and because kvm_nlist always returns ENOENT with the NULL terminator today. - kvm_open, kvm_open2: -- Add some basic negative tests for kvm_open(3) and kvm_open2(3). Testing positive cases with a specific `corefile`/`execfile`/`resolver` requires more work and would require user intervention today in order to reliably test this out.
* MFC r318546:ngie2017-05-272-17/+19
| | | | | | | | | | | | | | | sys/fs/tmpfs/vnd_test: make md(4) allocation dynamic The previous logic was flawed in the sense that it assumed that /dev/md3 was always available. This was a caveat I noted in r306038, that I hadn't gotten around to solving before now. Cache the device for the mountpoint after executing mdmfs, then use the cached value in basic_cleanup(..) when unmounting/disconnecting the md(4) device. Apply sed expressions to use reuse logic in the NetBSD code that could also be applied to FreeBSD, just with different tools.
* MFC r317288,r317289:ngie2017-05-271-11/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | r317288: libgeom(3): apply minor polish - Use .Dv when mentioning NULL per mdoc(7). - Reword `g_device_path`, `g_open_by_ident`, and `g_providername`'s descriptions so they're less wordy. - Fix a typo in `g_device_path` (can not -> cannot). Tested with: igor, make manlint r317289: libgeom(3): note that stdio.h is required when referencing gctl_dump(3) gctl_dump(3) is only exposed when stdio.h is #include'd first, per its addition in r112510. The reasoning noted for the conditional "exposure" of the function was to "limit #include pollution". This addresses an issue I found with the documentation when looking at bug 218809, which in turn addresses a -Wimplicit-function-declaration compiler warning in `tools/regression/geom_gpt/test.c` (it uses gctl_dump(3)).
* MFC r318900:bapt2017-05-271-79/+180
| | | | update pci_vendors to 2017.05.25
* MFC r318820:hselasky2017-05-272-7/+7
| | | | | | | | | Increase the allowed maximum number of audio channels from 31 to 127 in the PCM feeder mixer. Without this change a value of 32 channels is treated like zero, due to using a mask of 0x1f, causing a kernel assert when trying to playback bitperfect 32-channel audio. Also update the AWK script which is generating the division tables to handle more than 18 channels. This commit complements r282650.
* MFC r318353:hselasky2017-05-275-25/+61
| | | | | | | | | | | | | | | | | | | | | Avoid use of contiguous memory allocations in busdma when possible. This patch improves the boundary checks in busdma to allow more cases using the regular page based kernel memory allocator. Especially in the case of having a non-zero boundary in the parent DMA tag. For example AMD64 based platforms set the PCI DMA tag boundary to PCI_DMA_BOUNDARY, 4GB, which before this patch caused contiguous memory allocations to be preferred when allocating more than PAGE_SIZE bytes. Even if the required alignment was less than PAGE_SIZE bytes. This patch also fixes the nsegments check for using kmem_alloc_attr() when the maximum segment size is less than PAGE_SIZE bytes. Updated some comments describing the code in question. Differential Revision: https://reviews.freebsd.org/D10645 Reviewed by: kib, jhb, gallatin, scottl Sponsored by: Mellanox Technologies
* MFC r312599 (cem): Add remaining ELF compression definitions and structsemaste2017-05-273-0/+20
| | | | PR: 219417
* MFC r318794, r318795:gjb2017-05-275-10/+10
| | | | | | Update the "first appeared in" version in several manual pages. Sponsored by: The FreeBSD Foundation
OpenPOWER on IntegriCloud