Revision tags: release/14.0.0 |
|
#
95ee2897 |
| 16-Aug-2023 |
Warner Losh <imp@FreeBSD.org> |
sys: Remove $FreeBSD$: two-line .h pattern
Remove /^\s*\*\n \*\s+\$FreeBSD\$$\n/
|
Revision tags: release/13.2.0, release/12.4.0 |
|
#
881c1454 |
| 27-Jun-2022 |
Roger Pau Monné <royger@FreeBSD.org> |
elfnote: place note in a PT_NOTE program header
Some tools (firecraker loader) only check for notes in PT_NOTE program headers, so make sure the notes added using the ELFNOTE macro end up in such he
elfnote: place note in a PT_NOTE program header
Some tools (firecraker loader) only check for notes in PT_NOTE program headers, so make sure the notes added using the ELFNOTE macro end up in such header.
Output from readelf -Wl for and amd64 kernel after the change:
Elf file type is EXEC (Executable file) Entry point 0xffffffff8038a000 There are 11 program headers, starting at offset 64
Program Headers: Type Offset VirtAddr PhysAddr FileSiz MemSiz Flg Align PHDR 0x000040 0xffffffff80200040 0x0000000000200040 0x000268 0x000268 R 0x8 INTERP 0x0002a8 0xffffffff802002a8 0x00000000002002a8 0x00000d 0x00000d R 0x1 [Requesting program interpreter: /red/herring] LOAD 0x000000 0xffffffff80200000 0x0000000000200000 0x189e28 0x189e28 R 0x200000 LOAD 0x18a000 0xffffffff8038a000 0x000000000038a000 0xe447e8 0xe447e8 R E 0x200000 LOAD 0xfce7f0 0xffffffff811ce7f0 0x00000000011ce7f0 0x6b955c 0x6b955c R 0x200000 LOAD 0x1800000 0xffffffff81a00000 0x0000000001a00000 0x000140 0x000140 RW 0x200000 LOAD 0x1801000 0xffffffff81a01000 0x0000000001a01000 0x1c8480 0x5ff000 RW 0x200000 DYNAMIC 0x1800000 0xffffffff81a00000 0x0000000001a00000 0x000140 0x000140 RW 0x8 GNU_RELRO 0x1800000 0xffffffff81a00000 0x0000000001a00000 0x000140 0x000140 R 0x1 GNU_STACK 0x000000 0x0000000000000000 0x0000000000000000 0x000000 0x000000 RW 0 NOTE 0x1687ae0 0xffffffff81887ae0 0x0000000001887ae0 0x0001c0 0x0001c0 R 0x4
Section to Segment mapping: Segment Sections... [...] 10 .note.gnu.build-id .note.Xen
Reported by: cperciva Fixes: 1a9cdd373a6a ('xen: add PV/PVH kernel entry point') Fixes: 93ee134a24fa ('Integrate support for xen in to i386 common code.') Sponsored by: Citrix Systems R&D Reviewed by: emaste Differential revision: https://reviews.freebsd.org/D35611
show more ...
|
Revision tags: release/13.1.0, release/12.3.0, release/13.0.0 |
|
#
aa3ea612 |
| 31-Mar-2021 |
Konstantin Belousov <kib@FreeBSD.org> |
x86: remove gcov kernel support
Reviewed by: jhb Sponsored by: The FreeBSD Foundation Differential revision: https://reviews.freebsd.org/D29529
|
Revision tags: release/12.2.0 |
|
#
ed83a561 |
| 01-Sep-2020 |
Mateusz Guzik <mjg@FreeBSD.org> |
i386: clean up empty lines in .c and .h files
|
Revision tags: release/11.4.0 |
|
#
006269f4 |
| 12-Nov-2019 |
Konstantin Belousov <kib@FreeBSD.org> |
i386: stop guessing the address of the trap frame in ddb backtrace.
Save the address of the trap frame in %ebp on kernel entry. This automatically provides it in struct i386_frame.f_frame to unwind
i386: stop guessing the address of the trap frame in ddb backtrace.
Save the address of the trap frame in %ebp on kernel entry. This automatically provides it in struct i386_frame.f_frame to unwinder.
While there, more accurately handle the terminating frames,
Reviewed by: avg, markj Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D22321
show more ...
|
Revision tags: release/12.1.0, release/11.3.0, release/12.0.0, release/11.2.0 |
|
#
dbe30617 |
| 02-Jun-2018 |
Bruce Evans <bde@FreeBSD.org> |
Fix recent breakages of kernel profiling, mostly on i386 (high resolution kernel profiling remains broken).
memmove() was broken using ALTENTRY(). ALTENTRY() is only different from ENTRY() in the p
Fix recent breakages of kernel profiling, mostly on i386 (high resolution kernel profiling remains broken).
memmove() was broken using ALTENTRY(). ALTENTRY() is only different from ENTRY() in the profiling case, and its use in that case was sort of backwards. The backwardness magically turned memmove() into memcpy() instead of completely breaking it. Only the high resolution parts of profiling itself were broken. Use ordinary ENTRY() for memmove(). Turn bcopy() into a tail call to memmove() to reduce complications. This gives slightly different pessimizations and profiling lossage. The pessimizations are minimized by not using a frame pointer() for bcopy().
Calls to profiling functions from exception trampolines were not relocated. This caused crashes on the first exception. Fix this using function pointers.
Addresses of exception handlers in trampolines were not relocated. This caused unknown offsets in the profiling data. Relocate by abusing setidt_disp as for pmc although this is slower than necessary and requires namespace pollution. pmc seems to be missing some relocations. Stack traces and lots of other things in debuggers need similar relocations.
Most user addresses were misclassified as unknown kernel addresses and then ignored. Treat all unknown addresses as user. Now only user addresses in the kernel text range are significantly misclassified (as known kernel addresses).
The ibrs functions didn't preserve enough registers. This is the only recent breakage on amd64. Although these functions are written in asm, in the profiling case they call profiling functions which are mostly for the C ABI, so they only have to save call-used registers. They also have to save arg and return registers in some cases and actually save them in all cases to reduce complications. They end up saving all registers except %ecx on i386 and %r10 and %r11 on amd64. Saving these is only needed for 1 caller on each of amd64 and i386. Save them there. This is slightly simpler.
Remove saving %ecx in handle_ibrs_exit on i386. Both handle_ibrs_entry and handle_ibrs_exit use %ecx, but only the latter needed to or did save it. But saving it there doesn't work for the profiling case.
amd64 has more automatic saving of the most common scratch registers %rax, %rcx and %rdx (its complications for %r10 are from unusual use of %r10 by SYSCALL). Thus profiling of handle_ibrs_exit_rs() was not broken, and I didn't simplify the saving by moving the saving of these registers from it to the caller.
show more ...
|
#
3ae6b519 |
| 23-May-2018 |
Konstantin Belousov <kib@FreeBSD.org> |
Support IBRS for i386.
Tested by: pho Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D15522
|
#
82a4284d |
| 22-May-2018 |
Konstantin Belousov <kib@FreeBSD.org> |
Use local unique labels inside most often used macros.
Discussed with: bde Sponsored by: The FreeBSD Foundation MFC after: 1 week
|
#
a3c7cd11 |
| 22-May-2018 |
Konstantin Belousov <kib@FreeBSD.org> |
Fix double-load of %cr3 and double-copy of the stack frame for the kernel entry from userspace vm86.
Sponsored by: The FreeBSD Foundation MFC after: 1 week
|
#
a9c53bbb |
| 12-May-2018 |
Konstantin Belousov <kib@FreeBSD.org> |
Kernel entry from vm86 mode, where PCB_VM86CALL pcb flag is not set, is executed on the right stack already. No copy from the entry stack to the kstack must be performed for vm86 bios call code to f
Kernel entry from vm86 mode, where PCB_VM86CALL pcb flag is not set, is executed on the right stack already. No copy from the entry stack to the kstack must be performed for vm86 bios call code to function.
To access the pcb flags on kernel entry, unconditionally switch to kernel address space if vm86 mode is detected.
This fixes very early vm86 bios calls, typically done when boot is performed by boot2 without loader, and kernel falls back to BIOS calls to get SMAP.
Reported by: bde Sponsored by: The FreeBSD Foundation
show more ...
|
#
6652b9d9 |
| 12-May-2018 |
Konstantin Belousov <kib@FreeBSD.org> |
Create a macro for PIC code which loads %cr3 from tramp_idleptd.
Sponsored by: The FreeBSD Foundation
|
#
b2565389 |
| 26-Apr-2018 |
Konstantin Belousov <kib@FreeBSD.org> |
Fix move of the frame to the normal stack for interrupts occuring from the vm86 mode.
Submitted by: jhb
|
#
38858594 |
| 19-Apr-2018 |
Konstantin Belousov <kib@FreeBSD.org> |
Use symbolic constant, explaining the operation.
Sponsored by: The FreeBSD Foundation
|
#
d86c1f0d |
| 13-Apr-2018 |
Konstantin Belousov <kib@FreeBSD.org> |
i386 4/4G split.
The change makes the user and kernel address spaces on i386 independent, giving each almost the full 4G of usable virtual addresses except for one PDE at top used for trampoline and
i386 4/4G split.
The change makes the user and kernel address spaces on i386 independent, giving each almost the full 4G of usable virtual addresses except for one PDE at top used for trampoline and per-CPU trampoline stacks, 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 appeared possible to eliminate assembler part of the locore.S which bootstraps initial page table and KPTmap. The code is rewritten in C and moved into the pmap_cold(). The comment in vmparam.h explains the KVA layout.
There is no PCID mechanism available in protected mode, so each kernel/user switch forth and back completely flushes the TLB, except for the trampoline PTD region. The TLB invalidations for userspace becomes trivial, because IPI handlers switch page tables. On the other hand, context switches no longer need to reload %cr3.
copyout(9) was rewritten to use vm_fault_quick_hold(). An issue for new copyout(9) is compatibility with wiring user buffers around sysctl handlers. This explains two kind of locks for copyout ptes and accounting of the vslock() calls. The vm_fault_quick_hold() AKA slow path, is only tried after the 'fast path' failed, which temporary changes mapping to the userspace and copies the data to/from small per-cpu buffer in the trampoline. If a page fault occurs during the copy, it is short-circuit by exception.s to not even reach C code.
The change was motivated by the need to implement the Meltdown mitigation, but instead of KPTI the full split is done. The i386 architecture already shows the sizing problems, in particular, it is impossible to link clang and lld with debugging. I expect that the issues due to the virtual address space limits would only exaggerate and the split gives more liveness to the platform.
Tested by: pho Discussed with: bde Sponsored by: The FreeBSD Foundation MFC after: 1 month Differential revision: https://reviews.freebsd.org/D14633
show more ...
|
#
82725ba9 |
| 23-Nov-2017 |
Hans Petter Selasky <hselasky@FreeBSD.org> |
Merge ^/head r325999 through r326131.
|
#
51369649 |
| 20-Nov-2017 |
Pedro F. Giffuni <pfg@FreeBSD.org> |
sys: further adoption of SPDX licensing ID tags.
Mainly focus on files that use BSD 3-Clause license.
The Software Package Data Exchange (SPDX) group provides a specification to make it easier for
sys: further adoption of SPDX licensing ID tags.
Mainly focus on files that use BSD 3-Clause license.
The Software Package Data Exchange (SPDX) group provides a specification to make it easier for automated tools to detect and summarize well known opensource licenses. We are gradually adopting the specification, noting that the tags are considered only advisory and do not, in any way, superceed or replace the license texts.
Special thanks to Wind River for providing access to "The Duke of Highlander" tool: an older (2014) run over FreeBSD tree was useful as a starting point.
show more ...
|
#
c2c014f2 |
| 07-Nov-2017 |
Hans Petter Selasky <hselasky@FreeBSD.org> |
Merge ^/head r323559 through r325504.
|
#
6ecfe0c4 |
| 29-Sep-2017 |
Enji Cooper <ngie@FreeBSD.org> |
MFhead@r324095
|
Revision tags: release/10.4.0 |
|
#
053e8ce5 |
| 28-Sep-2017 |
Konstantin Belousov <kib@FreeBSD.org> |
Restore a part of r323722.
Do not return from interrupt using the POP_FRAME;iret instruction sequence, always jump to doreti.
The user segments selectors saved on the stack might become invalid bec
Restore a part of r323722.
Do not return from interrupt using the POP_FRAME;iret instruction sequence, always jump to doreti.
The user segments selectors saved on the stack might become invalid because userspace manipulated LDT in a parallel thread. trap() is aware of such issue, but it is only prepared to handle it at iret and segment registers load operations in doreti path.
Also remove POP_FRAME macro because it is no longer used.
Reviewed by: bde, jhb (as part of r323722) Sponsored by: The FreeBSD Foundation MFC after: 1 week
show more ...
|
Revision tags: release/11.1.0 |
|
#
348238db |
| 01-Mar-2017 |
Dimitry Andric <dim@FreeBSD.org> |
Merge ^/head r314420 through r314481.
|
#
fbbd9655 |
| 01-Mar-2017 |
Warner Losh <imp@FreeBSD.org> |
Renumber copyright clause 4
Renumber cluase 4 to 3, per what everybody else did when BSD granted them permission to remove clause 3. My insistance on keeping the same numbering for legal reasons is
Renumber copyright clause 4
Renumber cluase 4 to 3, per what everybody else did when BSD granted them permission to remove clause 3. My insistance on keeping the same numbering for legal reasons is too pedantic, so give up on that point.
Submitted by: Jan Schaumann <jschauma@stevens.edu> Pull Request: https://github.com/freebsd/freebsd/pull/96
show more ...
|
Revision tags: release/11.0.1, release/11.0.0, release/10.3.0 |
|
#
b626f5a7 |
| 04-Jan-2016 |
Glen Barber <gjb@FreeBSD.org> |
MFH r289384-r293170
Sponsored by: The FreeBSD Foundation
|
#
a5d8944a |
| 19-Nov-2015 |
Navdeep Parhar <np@FreeBSD.org> |
Catch up with head (r291075).
|
#
3c3feed4 |
| 01-Nov-2015 |
Baptiste Daroussin <bapt@FreeBSD.org> |
Merge from head
|
#
35aafbed |
| 29-Oct-2015 |
John Baldwin <jhb@FreeBSD.org> |
Use movw instead of movl (or plain mov) when moving segment registers into memory. This is a nop on clang's assembler, but some assemblers complain if the size suffix is incorrect.
Submitted by: bde
|