aboutsummaryrefslogtreecommitdiff
path: root/lib/libkvm
Commit message (Collapse)AuthorAgeFilesLines
* MFC 198986:John Baldwin2009-11-171-6/+6
| | | | | | | | 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. Notes: svn path=/stable/6/; revision=199410
* MFC revision 1.32Xin LI2008-02-111-0/+4
| | | | | | | | | | | | date: 2008/01/12 00:54:47; author: delphij; state: Exp; lines: +4 -0 Plug memory leaks that is observed when argbuf or argspc is used in the context. Submitted by: Michal Vranek <michal.vranek seznam cz> PR: bin/118380 Notes: svn path=/stable/6/; revision=176159
* MFC: Restore support for kvm_get_swapinfo(3) on crash dumps.John Baldwin2007-02-211-5/+94
| | | | Notes: svn path=/stable/6/; revision=166873
* MFC: Bring libkvm side of minidumps to 6.x on i386 and amd64.Peter Wemm2006-07-246-2/+31
| | | | | | | Reminded by: emaste Notes: svn path=/stable/6/; revision=160634
* This commit was manufactured by cvs2svn to create branch 'RELENG_6'.cvs2svn2006-06-122-0/+551
| | | | Notes: svn path=/stable/6/; revision=159558
* MFC revision 1.28Christian S.J. Peron2006-01-241-0/+5
| | | | | | | | | date: 2006/01/15 20:30:13; author: csjp; state: Exp; lines: +5 -0 Validate that the supplied file is not empty before trying mmap(2) it and access the pages associated with it. Notes: svn path=/stable/6/; revision=154746
* MFC: Fix fencepost error that made libkvm fail to read crashdumps.Peter Wemm2005-10-262-7/+7
| | | | | | | Approved by: re Notes: svn path=/stable/6/; revision=151680
* Fix the alpha build by using the correct argument types for _kvm_kvatop().Scott Long2005-07-021-1/+1
| | | | | | | | Submitted by: marcel Approved by: re (implicit) Notes: svn path=/head/; revision=147736
* Match _kvm_kvatop to it's prototype in kvm_i386.c. This unbreaksPaul Saab2005-06-301-1/+1
| | | | | | | | | the build. Approved by: re Notes: svn path=/head/; revision=147678
* Support crash dumps > 4GB in size on 32 bit platforms. _kvm_kvatop()Peter Wemm2005-06-299-99/+426
| | | | | | | | | | | | | | | | | | | | | | | | 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 Notes: svn path=/head/; revision=147672
* Set ki_tdev to NODEV rather than NULL.Peter Wemm2005-06-241-1/+1
| | | | | | | Approved by: re Notes: svn path=/head/; revision=147567
* Make kvm(3) aware of ki_jid field.Pawel Jakub Dawidek2005-03-201-1/+17
| | | | | | | | Reviewed by: gad MFC after: 3 days Notes: svn path=/head/; revision=143871
* Dike out unwarranted reference to si_udev.Poul-Henning Kamp2005-03-151-0/+4
| | | | Notes: svn path=/head/; revision=143648
* Sort sections.Ruslan Ermilov2005-01-204-29/+29
| | | | Notes: svn path=/head/; revision=140505
* In preparation to remove U areas, don't refer to p_uarea in libkvm.David Schultz2004-11-201-1/+1
| | | | | | | Reviewed by: arch@ Notes: svn path=/head/; revision=137907
* Remove un-needed call to close(2). The fd that close is beingChristian S.J. Peron2004-11-131-1/+0
| | | | | | | | | called on is invalid and has no use. Reviewed by: smkelly Notes: svn path=/head/; revision=137662
* Document the fact that kvm_getenvv(3) requires procfs to be mountedChristian S.J. Peron2004-11-131-0/+7
| | | | | | | | | on /proc in order to operate correctly. Reviewed by: simon@, wes@ Notes: svn path=/head/; revision=137661
* Belatedly catch up with the dev_t/cdev changes from a few months back.Peter Wemm2004-10-111-1/+11
| | | | | | | | | | Extract the struct cdev pointer and the tty device from inside rather than incorrectly casting the 'struct cdev *' pointer to a 'dev_t' int. Not that this was particularly important since it was only used for reading vmcore files. Notes: svn path=/head/; revision=136402
* - Fix the compile to chase the p_rux changes.John Baldwin2004-10-061-1/+7
| | | | | | | | | | - Add a comment noting that the ru_[us]times values being read aren't actually valid and need to be computed from the raw values. Submitted by: many (1) Notes: svn path=/head/; revision=136195
* Redefine a PTE as a 64-bit integral type instead of a struct ofMarcel Moolenaar2004-09-231-2/+2
| | | | | | | | bit-fields. Unify the PTE defines accordingly and update all uses. Notes: svn path=/head/; revision=135590
* The offset argument to mmap(2) is not a pointer. Use 0 instead of NULL.Marcel Moolenaar2004-09-221-1/+1
| | | | Notes: svn path=/head/; revision=135585
* Refactor a bunch of scheduler code to give basically the same behaviourJulian Elischer2004-09-051-1/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | but with slightly cleaned up interfaces. The KSE structure has become the same as the "per thread scheduler private data" structure. In order to not make the diffs too great one is #defined as the other at this time. The KSE (or td_sched) structure is now allocated per thread and has no allocation code of its own. Concurrency for a KSEGRP is now kept track of via a simple pair of counters rather than using KSE structures as tokens. Since the KSE structure is different in each scheduler, kern_switch.c is now included at the end of each scheduler. Nothing outside the scheduler knows the contents of the KSE (aka td_sched) structure. The fields in the ksegrp structure that are to do with the scheduler's queueing mechanisms are now moved to the kg_sched structure. (per ksegrp scheduler private data structure). In other words how the scheduler queues and keeps track of threads is no-one's business except the scheduler's. This should allow people to write experimental schedulers with completely different internal structuring. A scheduler call sched_set_concurrency(kg, N) has been added that notifies teh scheduler that no more than N threads from that ksegrp should be allowed to be on concurrently scheduled. This is also used to enforce 'fainess' at this time so that a ksegrp with 10000 threads can not swamp a the run queue and force out a process with 1 thread, since the current code will not set the concurrency above NCPU, and both schedulers will not allow more than that many onto the system run queue at a time. Each scheduler should eventualy develop their own methods to do this now that they are effectively separated. Rejig libthr's kernel interface to follow the same code paths as linkse for scope system threads. This has slightly hurt libthr's performance but I will work to recover as much of it as I can. Thread exit code has been cleaned up greatly. exit and exec code now transitions a process back to 'standard non-threaded mode' before taking the next step. Reviewed by: scottl, peter MFC after: 1 week Notes: svn path=/head/; revision=134791
* Expand the license referenced indirectly inline.Warner Losh2004-07-312-6/+40
| | | | Notes: svn path=/head/; revision=132935
* Remove stale code protected by #ifdef sparc. GCC 3.4.x adds sparc toAlexander Kabaev2004-07-281-9/+0
| | | | | | | predefined symbols on all SPARC platforms and FreeBSD follows the crowd. Notes: svn path=/head/; revision=132756
* Mechanically kill hard sentence breaks.Ruslan Ermilov2004-07-027-23/+46
| | | | Notes: svn path=/head/; revision=131504
* Markup, grammar, punctuation.Ruslan Ermilov2004-07-011-14/+14
| | | | Notes: svn path=/head/; revision=131421
* Fix a test of bit-flag "P_SA" by adding parenthesis around the expression.Garance A Drosehn2004-06-231-1/+1
| | | | | | | Submitted by: Cyrille Lefevre Notes: svn path=/head/; revision=130996
* Replace a call to strncpy() with a call to strlcpy()Garance A Drosehn2004-06-231-4/+2
| | | | | | | Submitted by: Cyrille Lefevre Notes: svn path=/head/; revision=130992
* Fill in the some new fields 'struct kinfo_proc', namely ki_childstime,Garance A Drosehn2004-06-191-5/+29
| | | | | | | | | | | | | | | | ki_childutime, and ki_emul. Also uses the timeradd() macro to correct the calculation of ki_childtime. That will correct the value returned when ki_childtime.tv_usec > 1,000,000. This also implements a new KERN_PROC_GID option for kvm_getprocs(). It also implements the KERN_PROC_RGID and KERN_PROC_SESSION options which were added to sys/kern/kern_proc.c revision 1.203. PR: bin/65803 (a very tiny piece of the PR) Submitted by: Cyrille Lefevre Notes: svn path=/head/; revision=130728
* Second half of the dev_t cleanup.Poul-Henning Kamp2004-06-171-1/+1
| | | | | | | | | | | | | | The big lines are: NODEV -> NULL NOUDEV -> NODEV udev_t -> dev_t udev2dev() -> findcdev() Various minor adjustments including handling of userland access to kernel space struct cdev etc. Notes: svn path=/head/; revision=130640
* This library has to change whenever the kernel process structure changes.Julian Elischer2004-06-161-1/+1
| | | | Notes: svn path=/head/; revision=130552
* Avoid assignments to cast expressions.Stefan Farfeleder2004-06-081-3/+3
| | | | | | | | Reviewed by: md5 Approved by: das (mentor) Notes: svn path=/head/; revision=130246
* Implement crashdump decoding for AMD64 as well, now that I have finallyPeter Wemm2004-05-191-28/+63
| | | | | | | got a sample to test against. Notes: svn path=/head/; revision=129452
* Import libkvm MD file for arm.Olivier Houchard2004-05-141-0/+103
| | | | Notes: svn path=/head/; revision=129207
* Fix a warning: compare u_long ps_strings to 0 instead of NULL.Jens Schweikhardt2004-03-281-1/+1
| | | | Notes: svn path=/head/; revision=127518
* Document that kvm_open(3) also accepts "/dev/null" as a specialRuslan Ermilov2004-03-261-4/+15
| | | | | | | | "corefile" argument, to access the running system via sysctl(3) if possible, thus not requring special setgid privileges. Notes: svn path=/head/; revision=127439
* Document that libkvm also uses /dev/kmem, to access KVM.Ruslan Ermilov2004-03-261-3/+7
| | | | Notes: svn path=/head/; revision=127438
* Update man page to reflect additional flag to allow selection of threads.Daniel Eischen2004-02-221-0/+3
| | | | Notes: svn path=/head/; revision=126128
* Teach kvm_getprocs() to recognize a sysctl flag for including threads.Daniel Eischen2004-02-221-5/+8
| | | | Notes: svn path=/head/; revision=126126
* Allow to specify a character special device as a core file.Hidetoshi Shimokawa2003-10-291-21/+18
| | | | | | | | | | | | | | | | | This enable us to use /dev/fwmem* as a core file. e.g. ps -M /dev/fwmem0.0 -N kernel.debug dmesg -M /dev/fwmem0.0 -N kernel.debug gdb -k -c /dev/fwmem0.0 kernel.debug You need to set target EUI64 in hw.firewire.fwmem.eui64_hi/lo before opening the device. On the target arch, (PCI) bus address must be equivalent to physical address. (We cannot use this for sparc64 because of IOMMU.) No objection in: -audit Notes: svn path=/head/; revision=121678
* Fixed some style bugs in the removal of __P(()). Blind removal ofBruce Evans2003-10-131-3/+3
| | | | | | | spaces before __P(()) outdented continuation lines to column 0. Notes: svn path=/head/; revision=121060
* Document KERN_PROC_PROC, update KERN_PROC_ALL description.Tim J. Robbins2003-09-271-2/+4
| | | | Notes: svn path=/head/; revision=120501
* Use the 3-component version of the KERN_PROC_PROC sysctl.Tim J. Robbins2003-09-271-2/+4
| | | | Notes: svn path=/head/; revision=120500
* style.Makefile(5)David E. O'Brien2003-08-181-1/+1
| | | | Notes: svn path=/head/; revision=119071
* Stage 3 of dynamic root support. Make all the libraries needed to runGordon Tetlow2003-08-171-0/+1
| | | | | | | | | binaries in /bin and /sbin installed in /lib. Only the versioned files reside in /lib, the .so symlink continues to live /usr/lib so the toolchain doesn't need to be modified. Notes: svn path=/head/; revision=119017
* Remove unnecssary <vm/swap_pager.h> includes.Poul-Henning Kamp2003-07-313-3/+0
| | | | | | | | These were probably not cleaned up back in whatever murky past these files were split into separate files. Notes: svn path=/head/; revision=118284
* Remove various unused variables, prototypes and local variables.Poul-Henning Kamp2003-07-311-25/+0
| | | | Notes: svn path=/head/; revision=118283
* Disable and lobotomize the kvm image reading swapinfo code, the kernelPoul-Henning Kamp2003-07-311-125/+1
| | | | | | | | | layout is about to change. The sysctl based method still returns correct information. Notes: svn path=/head/; revision=118282
* Retire the SWIF_DUMP_TREE code, this is in the way for a rework ofPoul-Henning Kamp2003-07-312-191/+0
| | | | | | | the swap_pager layout. Notes: svn path=/head/; revision=118280
* Unifdef -UDEBUG_SWAPINFO The kernel data structures are about to change.Poul-Henning Kamp2003-07-311-79/+0
| | | | Notes: svn path=/head/; revision=118276