#
331722 |
|
29-Mar-2018 |
eadler |
Revert r330897:
This was intended to be a non-functional change. It wasn't. The commit message was thus wrong. In addition it broke arm, and merged crypto related code.
Revert with prejudice.
This revert skips files touched in r316370 since that commit was since MFCed. This revert also skips files that require $FreeBSD$ property changes.
Thank you to those who helped me get out of this mess including but not limited to gonzo, kevans, rgrimes.
Requested by: gjb (re)
|
#
330897 |
|
14-Mar-2018 |
eadler |
Partial merge of the SPDX changes
These changes are incomplete but are making it difficult to determine what other changes can/should be merged.
No objections from: pfg
|
#
316126 |
|
29-Mar-2017 |
ngie |
MFC r315697:
libkvm: fix warning issues post-r291406
- Fix -Wunused warnings with *_native detection handlers by marking `kd` __unused, except with arm/mips, where a slightly more complicated scheme is required to handle the native case vs the non-native case. - Fix -Wmissing-variable-declarations warnings by marking struct kvm_arch objects static.
Tested with: WIP test code (D10024) // kgdb7121 (i386 crash/kernel on amd64)
|
#
302408 |
|
07-Jul-2016 |
gjb |
Copy head@r302406 to stable/11 as part of the 11.0-RELEASE cycle. Prune svn:mergeinfo from the new branch, as nothing has been merged here.
Additional commits post-branch will follow.
Approved by: re (implicit) Sponsored by: The FreeBSD Foundation |
#
298485 |
|
22-Apr-2016 |
ngie |
Fix up pointer issues with lib/libkvm
In particular, - avoid dereferencing NULL pointers - test pointers against NULL, not 0 - test for errout == NULL in the top-level functions (kvm_open, kvm_openfiles, kvm_open2, etc) - Replace a realloc and free on failure with reallocf
Found with: devel/cocchinelle
Differential Revision: https://reviews.freebsd.org/D5954 MFC after: 1 week Reviewed by: jhb Sponsored by: EMC / Isilon Storage Division
|
#
291406 |
|
27-Nov-2015 |
jhb |
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
|
#
291372 |
|
26-Nov-2015 |
jhb |
Remove trailing whitespace.
|
#
268351 |
|
06-Jul-2014 |
marcel |
Remove ia64.
This includes: o All directories named *ia64* o All files named *ia64* o All ia64-specific code guarded by __ia64__ o All ia64-specific makefile logic o Mention of ia64 in comments and documentation
This excludes: o Everything under contrib/ o Everything under crypto/ o sys/xen/interface o sys/sys/elf_common.h
Discussed at: BSDcan
|
#
240301 |
|
10-Sep-2012 |
kevlo |
If the IdlePDPT is not present, PAE is not active
|
#
217744 |
|
23-Jan-2011 |
uqs |
libkvm code janitoring
- make WARNS=6 clean for archs w/o strict alignment requirments - add const, ANSIfy, remove unused vars, cast types for comparison - thanks to differing definitions of VM_MIN_ADDRESS across our archs, we need to trick the compiler to not complain about signedness. We could either fix VM_MIN_ADDRESS to always be a simple integer or make the check conditional on $ARCH.
Closes PRs: kern/42386, kern/83364 Reviewed by: bde
|
#
198986 |
|
06-Nov-2009 |
jhb |
Fix a copy-paste bug when reading data from the last 3 (7 for PAE) bytes of a page mapped by a large page in the kernel.
Submitted by: Dorr H. Clark dclark of engr.scu.edu MFC after: 1 week
|
#
194186 |
|
14-Jun-2009 |
ed |
Fix missing includes of <string.h>, to silence some compiler warnings.
Submitted by: Pawel Worach
|
#
170772 |
|
15-Jun-2007 |
simokawa |
Re-enable raw dump format support on i386 and amd64 for /dev/fwmem.
|
#
165888 |
|
08-Jan-2007 |
imp |
Remove the advertising clause. UCB did this some time ago, but these files were never updated to reflect that.
MFC After: 2 days
|
#
157911 |
|
21-Apr-2006 |
peter |
Teach libkvm how to read minidumps. It turns out that minidumps are far more convenient for libkvm to work with because of the page table block at the beginning. As a result, the MD code is smaller.
libkvm will automatically detect old vs mini dumps on i386 and amd64.
libkvm will handle i386 PAE and non-PAE modes. There is a PAE flag in the i386 minidump header to signal the width of the entries in the page table block.
Other convenient values are also present, such as kernbase and the direct map addresses on amd64.
|
#
151492 |
|
20-Oct-2005 |
peter |
Fix a well duplicated fencepost error that stopped crashdumps being readable on certain random memory configurations. If the libkvm consumer tried to read something that was in the very last pdpe, pde or pte slot, it would bogusly fail.
This is broken in RELENG_6 too.
|
#
147678 |
|
29-Jun-2005 |
ps |
Match _kvm_kvatop to it's prototype in kvm_i386.c. This unbreaks the build.
Approved by: re
|
#
147672 |
|
29-Jun-2005 |
peter |
Support crash dumps > 4GB in size on 32 bit platforms. _kvm_kvatop() returned an lseek offset in a "u_long *" value, which can't express >4GB offsets on 32 bit machines (eg: PAE). Change to "off_t *" for all.
Support ELF crashdumps on i386 and amd64.
Support PAE crashdumps on i386. This is done by auto-detecting the presence of the IdlePDPT which means that PAE is active.
I used Marcel's _kvm_pa2off strategy and ELF header reader for ELF support on amd64. Paul Saab ported the amd64 changes to i386 and we implemented the PAE support from there.
Note that gdb6 in the src tree uses whatever libkvm supports. If you want to debug an old crash dump, you might want to keep an old libkvm.so handy and use LD_PRELOAD or the like. This does not detect the old raw dump format.
Approved by: re
|
#
84768 |
|
10-Oct-2001 |
bde |
Compensate for "Compensate for header dethreading" by backing it out.
|
#
83551 |
|
16-Sep-2001 |
dillon |
Implement __FBSDID()
|
#
82263 |
|
24-Aug-2001 |
peter |
Dynamically adjust to the value of KERNBASE in a crashdump, with a fallback for old kernels without the "kernbase" symbol.
|
#
76176 |
|
01-May-2001 |
markm |
Compensate for header dethreading.
|
#
55127 |
|
27-Dec-1999 |
peter |
Use kldsym(2) to lookup symbol values. This avoids the kvm_mkdb juggling and is module aware. Yes, this means that kvm_nlist(3) will find symbols in loaded modules. The emulation of the nlist struct is pretty crude but seems to work well enough for all the users in the tree that I found.
|
#
28318 |
|
17-Aug-1997 |
tegge |
Copy code from gnu/usr.bin/gdb/gdb/kvm-fbsd.c to deal with 4 MB pages.
|
#
18798 |
|
07-Oct-1996 |
peter |
Implement virtual-to-physical address mapping for the kvm library on dead kernel debugging. The previous code was a "do nothing".
The most obvious side effect of this is that you can now do things like this and reasonably expect them to work: dmesg -M /var/crash/vmcore.3 -N /var/crash/kernel.3 ps -axl -M /var/crash/vmcore.3 -N /var/crash/kernel.3
A good deal of this was lifted from the gdb code to do this, as well as from NetBSD's libkvm (which has completely different VM macros)
|
#
17141 |
|
12-Jul-1996 |
jkh |
General -Wall warning cleanup, part I. Submitted-By: Kent Vander Velden <graphix@iastate.edu>
|
#
15533 |
|
02-May-1996 |
phk |
NBPG -> PAGE_SIZE
|
#
8870 |
|
30-May-1995 |
rgrimes |
Remove trailing whitespace.
|
#
4241 |
|
07-Nov-1994 |
phk |
A semicolon was lost.
|
#
4231 |
|
07-Nov-1994 |
jkh |
From: "gj%pcs.dec.com@inet-gw-1.pa.dec.com" <garyj@rks32.pcs.dec.com> Given the right circumstances, a call to kvm_open can result in a core dump.
The diff belows fixes this (note that this change is already in the NetBSD code). Could somebody apply this?
Gary J. Submitted by: gj
|
#
2029 |
|
11-Aug-1994 |
dg |
Made kvm routines use procfs to get out process data such as argument strings.
|
#
1603 |
|
28-May-1994 |
rgrimes |
Fix kvm_i386.c just enough to make it compile and return lots of errors when called. Noop out swapread in kvm_proc.c as our vm system is different.
|
#
1602 |
|
28-May-1994 |
rgrimes |
This is a COPY of kvm_hp300.c, soon to be patched to sorta work with the i386 port.
|