MFS r352754: Add WITH_PIE knob to build Position Independent ExecutablesMFC r344179: Add WITH_PIE knob to build Position Independent ExecutablesBuilding binaries as PIE allows the executable itse
MFS r352754: Add WITH_PIE knob to build Position Independent ExecutablesMFC r344179: Add WITH_PIE knob to build Position Independent ExecutablesBuilding binaries as PIE allows the executable itself to be loaded at arandom address when ASLR is enabled (not just its shared libraries).With this change PIE objects have a .pieo extension and INTERNALLIBlibraries libXXX_pie.a.MK_PIE is disabled for some kerberos5 tools, Clang, and Subversion, asthey explicitly reference .a libraries in their Makefiles. These canbe addressed on an individual basis later. MK_PIE is also disabled forrtld-elf because it is already position-independent using bespokeMakefile rules.Currently only dynamically linked binaries will be built as PIE.MFC r344181: Fix Makefile conditional after r344179MFC r344182: Use make's :tl instead of checking "no" and "NO"MFC r344189: Fixup bsd.prog.mk after r344182MFC r344211: wlandebug: disable PIE to fix build failurelibifconfig is built as a static-only PRIVATELIB (and there is no _pie.aversion) so disable PIE in libifconfig's consumer.r345489: Fix GNU objdump build under WITH_PIEExplicitly specified bare .a libraries need ${PIE_SUFFIX}.r345490: Apply WITH_PIE changes to other binutils componentsFollowon to r345489, explicitly specified bare .a libraries need${PIE_SUFFIX} (although these still built).r345778: Fix gdb/kgdb build under WITH_PIEExplicitly specified bare .a libraries need ${PIE_SUFFIX}.Approved by: re (gjb)Sponsored by: The FreeBSD Foundation
show more ...
Disable sbrk() use in GNU tools.We're studing the possibility of deprecating sbrk(). To make it easierwe're removing unnecessicary uses in the base system. None of thesetools require sbrk(), bu
Disable sbrk() use in GNU tools.We're studing the possibility of deprecating sbrk(). To make it easierwe're removing unnecessicary uses in the base system. None of thesetools require sbrk(), but they agressively prefer it for no good reason.Reviewed by: andrewApproved by: re (kib)Sponsored by: DARPA, AFRLDifferential Revision: https://reviews.freebsd.org/D16141
i386 4/4G split.The change makes the user and kernel address spaces on i386independent, giving each almost the full 4G of usable virtual addressesexcept for one PDE at top used for trampoline and
i386 4/4G split.The change makes the user and kernel address spaces on i386independent, giving each almost the full 4G of usable virtual addressesexcept for one PDE at top used for trampoline and per-CPU trampolinestacks, and system structures that must be always mapped, namely IDT,GDT, common TSS and LDT, and process-private TSS and LDT if allocated.By using 1:1 mapping for the kernel text and data, it appearedpossible to eliminate assembler part of the locore.S which bootstrapsinitial page table and KPTmap. The code is rewritten in C and movedinto the pmap_cold(). The comment in vmparam.h explains the KVAlayout.There is no PCID mechanism available in protected mode, so eachkernel/user switch forth and back completely flushes the TLB, exceptfor the trampoline PTD region. The TLB invalidations for userspacebecomes trivial, because IPI handlers switch page tables. On the otherhand, context switches no longer need to reload %cr3.copyout(9) was rewritten to use vm_fault_quick_hold(). An issue fornew copyout(9) is compatibility with wiring user buffers around sysctlhandlers. This explains two kind of locks for copyout ptes andaccounting of the vslock() calls. The vm_fault_quick_hold() AKA slowpath, is only tried after the 'fast path' failed, which temporarychanges mapping to the userspace and copies the data to/from smallper-cpu buffer in the trampoline. If a page fault occurs during thecopy, it is short-circuit by exception.s to not even reach C code.The change was motivated by the need to implement the Meltdownmitigation, but instead of KPTI the full split is done. The i386architecture already shows the sizing problems, in particular, it isimpossible to link clang and lld with debugging. I expect that theissues due to the virtual address space limits would only exaggerateand the split gives more liveness to the platform.Tested by: phoDiscussed with: bdeSponsored by: The FreeBSD FoundationMFC after: 1 monthDifferential revision: https://reviews.freebsd.org/D14633
Use the trapframe unwinder for "fast_syscall_common".MFC after: 3 days
Switch to use libedit instead of readline
Remove gdbtui, it was already not installed on every archesonly installed on arm and sparc64.It is the only bits that keeps us having libreadline in baseThe rest of gdb can be switched to libedit
Remove gdbtui, it was already not installed on every archesonly installed on arm and sparc64.It is the only bits that keeps us having libreadline in baseThe rest of gdb can be switched to libedit and will be in anothercommit
Recognize mchk_calltrap as a trapframe generator.Should have been included in r328157.
DIRDEPS_BUILD: Update dependencies.Sponsored by: Dell EMC Isilon
Make _TO_CPUARCH macro for ARCH to CPUARCH conversionsConsolidate all the regular expressions to convert from MACHINE_ARCHto MACHINE_CPUARCH into a variable and use that variable in preferenceto
Make _TO_CPUARCH macro for ARCH to CPUARCH conversionsConsolidate all the regular expressions to convert from MACHINE_ARCHto MACHINE_CPUARCH into a variable and use that variable in preferenceto the almost identical copies in the tree (which should have beenidentical).Differential Revision: https://reviews.freebsd.org/D11986
Add deprecation notices for gdb and kgdb.Even though gdb and kgdb may not be removed for 12.0 on some architectures,the notice is unconditional as these tools will likely be removed at somepoint
Add deprecation notices for gdb and kgdb.Even though gdb and kgdb may not be removed for 12.0 on some architectures,the notice is unconditional as these tools will likely be removed at somepoint in the future when adequate replacements are available (gdb in portsor lldb in base).Reviewed by: emasteMFC after: 3 daysDifferential Revision: https://reviews.freebsd.org/D11477
Add a new GDB_LIBEXEC option to install gdb and kgdb to /usr/libexec.When this option is enabled, only gdb and kgdb are installed to/usr/libexec for use by crashinfo(8). Other bits of GDB such as
Add a new GDB_LIBEXEC option to install gdb and kgdb to /usr/libexec.When this option is enabled, only gdb and kgdb are installed to/usr/libexec for use by crashinfo(8). Other bits of GDB such asgdbserver and gdbtui are not installed. For this option to beeffective, GDB must be enabled.Rework r317094 to re-enable GDB on all platforms but enableGDB_LIBEXEC on platforms for which the GDB in ports is a superset offunctionality.Reviewed by: emaste, kibSuggested by: kibRelnotes: yesDifferential Revision: https://reviews.freebsd.org/D10449
Use SRCTOP/OBJTOP and simplify output using :H instead of "../" for directoryentriesThis simplifies pathing in make/displayed outputMFC after: 1 weekSponsored by: Dell EMC Isilon
Use SRCTOP-relative paths to other directories instead of .CURDIR-relative onesThis simplifies pathing in make/displayed outputMFC after: 3 weeksSponsored by: Dell EMC Isilon
Add full softfloat and hardfloat support for MIPS.This adds new target architectures for hardfloat:mipselhf mipshf mips64elhf mips64hf.Tested in QEMU only.Sponsored by: DARPA, AFRLSponsored b
Add full softfloat and hardfloat support for MIPS.This adds new target architectures for hardfloat:mipselhf mipshf mips64elhf mips64hf.Tested in QEMU only.Sponsored by: DARPA, AFRLSponsored by: HEIF5Differential Revision: https://reviews.freebsd.org/D8376
Create a new MACHINE_ARCH for Freescale PowerPC e500v2Summary:The Freescale e500v2 PowerPC core does not use a standard FPU.Instead, it uses a Signal Processing Engine (SPE)--a DSP-style vector p
Create a new MACHINE_ARCH for Freescale PowerPC e500v2Summary:The Freescale e500v2 PowerPC core does not use a standard FPU.Instead, it uses a Signal Processing Engine (SPE)--a DSP-style vector processorunit, which doubles as a FPU. The PowerPC SPE ABI is incompatible with thestock powerpc ABI, so a new MACHINE_ARCH was created to deal with this.Additionaly, the SPE opcodes overlap with Altivec, so these are mutuallyexclusive. Taking advantage of this fact, a new file, powerpc/booke/spe.c, wascreated with the same function set as in powerpc/powerpc/altivec.c, so itbecomes effectively a drop-in replacement. setjmp/longjmp were modified to savethe upper 32-bits of the now-64-bit GPRs (upper 32-bits are only accessible bythe SPE).Note: This does _not_ support the SPE in the e500v1, as the e500v1 SPE does notsupport double-precision floating point.Also, without a new MACHINE_ARCH it would be impossible to provide binarypackages which utilize the SPE.Additionally, no work has been done to support ports, work is needed for this.This also means no newer gcc can yet be used. However, gcc's powerpc supporthas been refactored which would make adding a powerpcspe-freebsd target veryeasy.Test Plan:This was lightly tested on a RouterBoard RB800 and an AmigaOne A1222(P1022-based) board, compiled against the new ABI. Base system utilities(/bin/sh, /bin/ls, etc) still function appropriately, the system is able to bootmultiuser.Reviewed By: bdrewery, impRelnotes: yesDifferential Revision: https://reviews.freebsd.org/D5683
Revert r302670 and r302671 for now.MACHINE_CPUARCH smells like MACHINE except for arm64/aarch64 whichhas it backwards.
Create one list of replacements for MACHINE_CPUARCH as MACHINE_CPUARCH_SUB.This also adds missing s/aarch64/arm64 to the sys.mk version and alsoadds back armv6hf for universe since it was added to
Create one list of replacements for MACHINE_CPUARCH as MACHINE_CPUARCH_SUB.This also adds missing s/aarch64/arm64 to the sys.mk version and alsoadds back armv6hf for universe since it was added to the sys.mk versionin r300438.MFC after: 3 daysSponsored by: EMC / Isilon Storage DivisionDifferential Revision: https://reviews.freebsd.org/D7159
Make armv6 hard float abi by default. Kill armv6hf.Allow CPUTYPE=soft to build the current soft-float abi libraries.Add UPDATING entry to announce this.Approved by: re@ (gjb)
Add missing function prototypes in KGDBThis fixes the build broken by r298358
Fix KGDB backtrace on ARMModify trapframe decoding to properly analyze trapframe.Provide method for fixup_pc. It happens, that in some kernelfunctions, the GDB stack frame decoder cannot determi
Fix KGDB backtrace on ARMModify trapframe decoding to properly analyze trapframe.Provide method for fixup_pc. It happens, that in some kernelfunctions, the GDB stack frame decoder cannot determine bothfunc name and frame size. This is because these functionseither contain invalid instruction, or their format doesnot match standard schema. Detect that scenarios and movePC accordingly to jump into known function schema, whichGDB is able to parse.Obtained from: SemihalfSponsored by: Juniper NetworksReviewed by: kib, zbbDifferential Revision: https://reviews.freebsd.org/D5976
DIRDEPS_BUILD: Regenerate without local dependencies.These are no longer needed after the recent 'beforebuild: depend' changesand hooking DIRDEPS_BUILD into a subset of FAST_DEPEND which supports
DIRDEPS_BUILD: Regenerate without local dependencies.These are no longer needed after the recent 'beforebuild: depend' changesand hooking DIRDEPS_BUILD into a subset of FAST_DEPEND which supportsskipping 'make depend'.Sponsored by: EMC / Isilon Storage Division
Fix LDADD/DPADD that should be LIBADD.Sponsored by: EMC / Isilon Storage Division
Update dependencies after r291406 added libelf to libkvm.Unfortunately filemon/meta mode tracks all indirect dependencies heresince ld(1) is reading libelf when linking in libkvm. Churn would be
Update dependencies after r291406 added libelf to libkvm.Unfortunately filemon/meta mode tracks all indirect dependencies heresince ld(1) is reading libelf when linking in libkvm. Churn would bereduced if this was able to be limited to direct dependencies.Sponsored by: EMC / Isilon Storage Division
Fix a double-semicolon typo in my libkvm changes.Submitted by: jmallett
Add support to libkvm for reading vmcores from other architectures.- Add a kvaddr_type to represent kernel virtual addresses instead of unsigned long.- Add a struct kvm_nlist which is a stripped
Add support to libkvm for reading vmcores from other architectures.- Add a kvaddr_type to represent kernel virtual addresses instead of unsigned long.- Add a struct kvm_nlist which is a stripped down version of struct nlist that uses kvaddr_t for n_value.- Add a kvm_native() routine that returns true if an open kvm descriptor is for a native kernel and memory image.- Add a kvm_open2() function similar to kvm_openfiles(). It drops the unused 'swapfile' argument and adds a new function pointer argument for a symbol resolving function. Native kernels still use _fdnlist() from libc to resolve symbols if a resolver function is not supplied, but cross kernels require a resolver.- Add a kvm_nlist2() function similar to kvm_nlist() except that it uses struct kvm_nlist instead of struct nlist.- Add a kvm_read2() function similar to kvm_read() except that it uses kvaddr_t instead of unsigned long for the kernel virtual address.- Add a new kvm_arch switch of routines needed by a vmcore backend. Each backend is responsible for implementing kvm_read2() for a given vmcore format.- Use libelf to read headers from ELF kernels and cores (except for powerpc cores).- Add internal helper routines for the common page offset hash table used by the minidump backends.- Port all of the existing kvm backends to implement a kvm_arch switch and to be cross-friendly by using private constants instead of ones that vary by platform (e.g. PAGE_SIZE). Static assertions are present when a given backend is compiled natively to ensure the private constants match the real ones.- Enable all of the existing vmcore backends on all platforms. This means that libkvm on any platform should be able to perform KVA translation and read data from a vmcore of any platform.Tested on: amd64, i386, sparc64 (marius)Differential Revision: https://reviews.freebsd.org/D3341
12345678910>>...14