summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* MFC r283373:dchagin2016-01-092-10/+20
| | | | | | In preparation for switching linuxulator to the use the native 1:1 threads introduce kern_thr_alloc() which will be used later in the linux_clone().
* MFC r283372:dchagin2016-01-092-4/+11
| | | | | | | In preparation for switching linuxulator to the use the native 1:1 threads split sys_thr_exit() up into sys_thr_exit() and kern_thr_exit(). Move Where the second will be used in linux_exit() system call later.
* Regen for r293478.dchagin2016-01-0910-22/+32
|
* MFC r283370:dchagin2016-01-093-4/+16
| | | | | | | | In preparation for switching linuxulator to the use the native 1:1 threads introduce linux_exit() stub instead of sys_exit() call (which terminates process). In the new linuxulator exit() system call terminates the calling thread (not a whole process).
* MFC r283369:dchagin2016-01-092-4/+8
| | | | | In preparation for switching linuxulator to the use the native 1:1 threads print the thread id in addition to the pid in debug messages.
* Bump __FreeBSD_version after utimensat merge made in r293473.dchagin2016-01-091-1/+1
|
* Regen for r293474.dchagin2016-01-0911-12/+174
|
* MFC r277610 (by jillies):dchagin2016-01-0916-7/+712
| | | | Add futimens and utimensat system calls.
* To facillitate an upcoming Linuxulator merging partiallydchagin2016-01-0913-61/+77
| | | | | | | | | | | | | | | | | | | | | | | | | | | | MFC r275121 (by kib). Only merge the syntax changes from r275121, PROC_*LOCK() macros still lock the same proc spinlock. The process spin lock currently has the following distinct uses: - Threads lifetime cycle, in particular, counting of the threads in the process, and interlocking with process mutex and thread lock. The main reason of this is that turnstile locks are after thread locks, so you e.g. cannot unlock blockable mutex (think process mutex) while owning thread lock. - Virtual and profiling itimers, since the timers activation is done from the clock interrupt context. Replace the p_slock by p_itimmtx and PROC_ITIMLOCK(). - Profiling code (profil(2)), for similar reason. Replace the p_slock by p_profmtx and PROC_PROFLOCK(). - Resource usage accounting. Need for the spinlock there is subtle, my understanding is that spinlock blocks context switching for the current thread, which prevents td_runtime and similar fields from changing (updates are done at the mi_switch()). Replace the p_slock by p_statmtx and PROC_STATLOCK(). Discussed with: kib
* MFC r292123: Document mps.enable_ssurpokala2016-01-091-2/+37
| | | | | | | | mps(4) sends StartStopUnit to SATA direct-access devices during shutdown. Document the tunables which control that behavior. Approved by: jhb Sponsored by: Panasas, Inc.
* MFC r291114: popen() requires check for fdopen() failurerpokala2016-01-091-10/+24
| | | | | | | | Move fdopen() up near other resource allocation like malloc(); do proper deallocation on failure later on in the function. Approved by: jhb Sponsored by: Panasas, Inc.
* MFC r279567, r279568: Add and document an option to cause syslogd to runrpokala2016-01-092-6/+21
| | | | | | | | | | in the foreground. This allows a separate process to monitor when and how syslogd exits. That process can then restart syslogd if needed. Approved by: jhb Sponsored by: Panasas, Inc.
* MFC r293055: kbdmap.5: Use current names for ASCII control codes lf, ff, usemaste2016-01-091-4/+10
| | | | | | Refer to the old names nl, np, ns as historical aliases. PR: 205776, 205778
* MFC r292749:kib2016-01-091-1/+3
| | | | | Do not substitute interpeter if the brand interpreter path is different from the interpreter path requested by the binary.
* MFC r293173, r293231:gjb2016-01-091-1/+5
| | | | | | | | | | | | | r293173: Fix path to include .OBJDIR to avoid polluting the source tree during 'make release'. r293231: Add a new target to touch the ${.OBJDIR}/release file, which indicates the 'release' target has run (in order to prevent subsequent invocations that may clobber original build output). Sponsored by: The FreeBSD Foundation
* MFC r293047: Use correct name 'us' for character 31 in keymapsemaste2016-01-099-21/+21
| | | | | | | 'ns' was a historical accident, and kbdcontrol(1) has accepted the correct 'us' as well as 'ns' since r38139. PR: 205776
* MFC 293043jpaetzel2016-01-082-8/+13
| | | | | | | | | | | | | Unset the gss kernel state when gssd exits When gssd exits it leaves the kernel state set by gssd_syscall(). nfsd sees this and waits endlessly in an unkillable state for gssd to come back. If you had acidentally started gssd then stopped it, then started nfsd you'd be in a bad way until you either restarted gssd or rebooted the system. This change fixes that by setting the kernel state to "" when gssd exits.
* MFC r293042:kib2016-01-081-1/+1
| | | | Minor style cleanup.
* MFC r291545: make the number of fasttrap probes and the size of the trace ↵stas2016-01-081-8/+22
| | | | | | points hash table tunable via sysctl or kernel tunables.
* MFC: r292982araujo2016-01-081-5/+2
| | | | | | | | | | | | | Remove unused variable after r292981 to unbreak the build. MFC: r292981 Clean up unused-but-set-variable spotted by gcc-4.9. Reviewed by: ngie Approved by: rodrigc (mentor) Sponsored by: gandi.net Differential Revision: https://reviews.freebsd.org/D4773
* MFC: r292980araujo2016-01-081-2/+0
| | | | | | | | | Clean up unused-but-set-variable spotted by gcc4.9. Reviewed by: ngie Approved by: rodrigc (mentor) Sponsored by: gandi.net Differential Revision: https://reviews.freebsd.org/D4774
* MFC: r292972araujo2016-01-081-4/+17
| | | | | | | | | | | | Wrap using #ifdef 'notyet' those variables and statements not yet implemented to lower the compiler warnings. It fix the case of unused-but-set-variable spotted by gcc4.9. Reviewed by: ngie Approved by: rodrigc (mentor) Sponsored by: gandi.net Differential Revision: https://reviews.freebsd.org/D4775
* MFC: r292971araujo2016-01-081-5/+0
| | | | | | | | | Clean up unused-but-set-variable spotted by gcc-4.9. Reviewed by: ngie Approved by: rodrigc (mentor) Sponsored by: gandi.net Differential Revision: https://reviews.freebsd.org/D4776
* MFC: r292970araujo2016-01-081-2/+1
| | | | | | | | | Clean up unused-but-set-variable spotted by gcc-4.9. Reviewed by: ngie Approved by: rodrigc (mentor) Sponsored by: gandi.net Differential Revision: https://reviews.freebsd.org/D4777
* MFC: r292969araujo2016-01-081-2/+0
| | | | | | | | | Clean up unused-but-set-variable spotted by gcc-4.9. Reviewed by: ngie Approved by: rodrigc (mentor) Sponsored by: gandi.net Differential Revision: https://reviews.freebsd.org/D4778
* MFC r277938 (by hiren): make syncookie_mac() use 'tcp_seq irs' in computing ↵stas2016-01-081-0/+1
| | | | hash.
* MFC r292047: RPC: populate local address for rendezvous transporter.stas2016-01-081-2/+16
|
* MFC r291941:bdrewery2016-01-0713-36/+18
| | | | Replace unneeded manual dependency on header by adding it to SRCS.
* Merge r293282 from head:glebius2016-01-071-4/+5
| | | | | | | | | | | Provide knob NO_INSTALLEXTRAKERNELS. If defined, extra kernels in KERNCONF won't be installed, only the first one would. Turn NO_INSTALLEXTRAKERNELS=yes on stable/10 to preserve original behaviour of not installing additional kernels built. Reported & tested by: Trond Endrestøl <Trond.Endrestol fagskolen.gjovik.no> Reported & tested by: dhw
* MFC r291611:bdrewery2016-01-071-3/+15
| | | | | | Add NO_INSTALLKERNEL to undo the assumption that the first KERNCONF will be installed as "kernel". This is relevant for packaging of the kernel when not wanting a default "kernel.txz".
* MFC r291610:bdrewery2016-01-071-8/+9
| | | | | Allow storing package(world|kernel) tarballs into a different location at PACKAGEDIR.
* MFH r292836:wollman2016-01-071-0/+1
| | | | | | | | | | | in6_if2idlen: treat bridge(4) interfaces like other Ethernet interfaces bridge(4) interfaces have an if_type of IFT_BRIDGE, rather than IFT_ETHER, even though they only support Ethernet-style links. This caused in6_if2idlen to emit an "unknown link type (209)" warning to the console every time it was called. Add IFT_BRIDGE to the case statement in the appropriate place, indicating that it uses the same IPv6 address format as other Ethernet-like interfaces.
* MFC r280808 by andrew: Reorder sys/boot/Makefile for the efi loader moveemaste2016-01-072-4/+4
| | | | | | | | As these will depend on ficl having been built, and are set via bsd.arch.inc.mk we need to place this after ficl. As Makefile.amd64 is now late enough we can add the i386 directory to this.
* MFC r281524 by andrew@: Use MACHINE in the efi loader when it is what we meanemaste2016-01-074-14/+16
| | | | | | | It may not be the same as MACHINE_CPUARCH, it just happened to be the case the architectures this code currently supports. Fixes build failure reported by Oliver Pinter.
* MFC: 292394gnn2016-01-072-14/+21
| | | | | | | | Switch the IPsec related statistics to using the built in sysctl variable set rather than reading from kernel memory. This also makes the -z (zero) flag work correctly Sponsored by: Rubicon Communications, LLC (Netgate)
* MFC r291377: vidfont: with vt(4) omit size from vidcontrol -femaste2016-01-071-5/+13
| | | | | | | | When using syscons, vidfont extracts the font size from the filename passes it to vidcontrol -f. In vt(4) mode the size argument is not required, and some of the fonts in /usr/share/vt/fonts do not have the size in the filename, which caused vidfont to fail. Thus, just omit the size argument in vt(4) mode.
* MFC r291691: newvers: Honour SOURCE_DATE_EPOCH for build reproducibilityemaste2016-01-071-1/+9
| | | | | | | | | | | One reason the kernel does not build reproducibly is that it includes a timestamp in the version string. SOURCE_DATE_EPOCH provides a standard method to address this: it should be set to the last modification time of the source, and build processes use the specified timestamp instead of the "current" date and time. This change uses SOURCE_DATE_EPOCH if it is set; how it gets set needs to be addressed elsewhere.
* MFC r292676:jtl2016-01-071-0/+5
| | | | | Only allow one PT_INTERP ELF program header. This also fixes a potential memory leak for interp_buf.
* MFC r292705: rtld: remove old XXX comment missed in r35529emaste2016-01-071-1/+0
|
* MFC r292440:mjg2016-01-072-1/+3
| | | | | | | | | | | | proc: fix a race which could result in dereference of bad p_pgrp pointer on fork During fork p_starcopy - p_endcopy area of a process is populated with bcopy with only proc lock held. Another forking thread can find such a process and proceed to access p_pgrp included in said area. Fix the problem by moving the field outside. It is being properly assigned later.
* MFC r287649:markj2016-01-0710-262/+113
| | | | | Use a common subroutine to fetch and zero protocol stats instead of duplicating roughly similar code for each protocol.
* loader.efi: combine GetMemoryMap and ExitBootServices and retry on erroremaste2016-01-073-52/+56
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | MFC r292338: UEFI: combine GetMemoryMap and ExitBootServices and retry on error The EFI memory map may change before or during the first ExitBootServices call. In that case ExitBootServices returns an error, and GetMemoryMap and ExitBootServices must be retried. Glue together calls to GetMemoryMap(), ExitBootServices() and storage of (now up-to-date) MODINFOMD_EFI_MAP metadata within a single function. That new function - bi_add_efi_data_and_exit() - uses space previously allocated in bi_load_efi_data() to store the memory map (it will fail if that space is too short). It handles re-calling GetMemoryMap() once to update the map key if necessary. Finally, if ExitBootServices() is successful, it stores the memory map and its header as MODINFOMD_EFI_MAP metadata. ExitBootServices() calls are now done earlier, from within arch- independent bi_load() code. MFC r292442: loader.efi: show EFI error number, not full status value EFI return values set the high bit to indicate an error. The log messages changed here are printed only in the case of an error, so including the error bit is redundant. Also switch to decimal to match the error definitions (in sys/boot/efi/include/efierr.h). MFC r292515: loader.efi: refresh size in GetMemoryMap retry loop If ExitBootServices fails due to a changed efi_mapkey then GetMemoryMap must be called again. In this case it is also possible for the memory map to grow, so repeat the initial GetMemoryMap call to fetch the new size. Also roll bi_add_efi_data_and_exit into bi_load_efi_data as there's no need for it to be a separate function. PR: 202455 Relnotes: Yes Sponsored by: The FreeBSD Foundation
* MFC r281138: SMBIOS support for EFIemaste2016-01-072-1/+16
| | | | Restore smbios support lost in r293297
* Remove old amd64 EFI directoryemaste2016-01-0723-2699/+0
|
* MFC r288372: Use EFI page size constants instead of hardcoding 4096emaste2016-01-071-3/+3
|
* MFC r287934: Increase EFI staging size from 32MB to 48MBemaste2016-01-071-1/+1
| | | | | | | | | The EFI boot loader allocates a single chunk of contiguous memory to hold the kernel, modules, and any other loaded data. This memory block is relocated to the kernel's expected location during the transfer of control from the loader to the kernel. PR: 201679
* MFC r292576: boot1.efi: show EFI error number, not full status valueemaste2016-01-071-3/+6
| | | | | | | EFI return values set the high bit to indicate an error. The log messages changed here are printed only in the case of an error, so including the error bit is redundant. Also switch to decimal to match the error definitions (in sys/boot/efi/include/efierr.h).
* MFC r281000: Move i386/efi files to new home in efi/loader/arch/i386emaste2016-01-078-858/+0
| | | | | | This was not (and still is not) connected to the build, but the EFI loader is in the process of being built for other than amd64 so these files ought to live in their eventual MD location.
* MFC r280950: Move the efi loaders to be under sys/boot/efiemaste2016-01-0724-0/+2698
| | | | | In HEAD this was done to support UEFI on arm64. Merging to stable/10 to facilitate the merging of later UEFI changes.
* MFC SVN revisions 292899,292996,292999-293000.dteske2016-01-071-10/+9
| | | | | | | r292899: Fix stack leak introduced by SVN r97201 r292996: Remove debugging messages added by SVN r187143 r292999: Fix a memory leak r293000: Remove supposition comment
OpenPOWER on IntegriCloud