| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
| |
kvm_uread() function, used for reading from /proc/pid/mem, was
removed too. But the function declaration remained in kvm.h
public header and the soname was not bumped.
Remove kvm_uread() from kvm.h and bump the soname.
Reported by: rmh
Discussed on: arch
|
|
|
|
| |
Approved by: bms@
|
|
|
|
| |
MFC after: 1 week
|
|
|
|
| |
MFC after: 1 week
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
o Provide function kvm_counter_u64_fetch() to fetch valut of a counter(9).
Sponsored by: Nginx, Inc.
|
|
|
|
|
|
| |
and don't confuse callers with incorrect return value
MFC after: 9 days
|
|
|
|
|
| |
Reviewed by: jhb
MFC after: 8 days
|
| |
|
|
|
|
|
|
| |
PR: 167734
Submitted by: Nobuyuki Koganemaru (kogane!jp.freebsd.org)
MFC after: 3 days
|
|
|
|
|
|
|
|
|
|
|
|
| |
checking the returned oldlen: when ENOMEM is due to the supplied
buffer being too short the return oldlen is equal to buffer size.
Without this additional check kvm_getprocs() gets stuck in loop if the
returned ENOMEM was due the exceeded memorylocked limit. This is
easily can be observed running `limits -l 1k top'.
Submitted by: Andrey Zonov <andrey zonov org>
MFC after: 1 week
|
|
|
|
|
|
|
|
|
|
| |
requested value was handled incorrectly, and the function retuned NULL
instead of the truncated result.
Fix this and also remove unnecessary check for buf != NULL, which alway
retuns true.
MFC after: 3 days
|
|
|
|
| |
MFC after: 2 weeks
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
o get the physical address and size of the PBVM page table. This
can be found in the bootinfo structure, of which the physical
address is recorded as the ELF entry point.
o translate region 4 virtual addresses to physical addresses using
the PBVM page table.
In _kvm_kvatop() make the distinction between physical address and
core file offset a little clearer to avoid confusion. To further
enhance readability, always store the translated address into pa
so that it's obvious how the translation from va to pa happened.
Approved by: re (blanket)
|
|
|
|
|
|
|
|
|
| |
Provide backward compatibility defines under BURN_BRIDGES.
Suggested by: jhb
Reviewed by: emaste
Sponsored by: Sandvine Incorporated
Approved by: re (kib)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
mask of CPUs, pc_other_cpus and pc_cpumask become highly inefficient.
Remove them and replace their usage with custom pc_cpuid magic (as,
atm, pc_cpumask can be easilly represented by (1 << pc_cpuid) and
pc_other_cpus by (all_cpus & ~(1 << pc_cpuid))).
This change is not targeted for MFC because of struct pcpu members
removal and dependency by cpumask_t retirement.
MD review by: marcel, marius, alc
Tested by: pluknet
MD testing by: marcel, marius, gonzo, andreast
|
|
|
|
| |
correct.
|
|
|
|
|
|
| |
rets.
Requested by: kib
|
|
|
|
|
|
|
|
| |
as long as this does not happen, we need to fix interfaces to userland
in order to not break run-time accesses to the structure.
Reviwed by: kib
Tested by: pluknet
|
| |
|
|
|
|
|
| |
Reported by: Brandon Gooch <jamesbrandongooch@gmail.com>
Pointy hat to: uqs
|
|
|
|
|
| |
This slipped through my testing due to the recent roto-tiling of the
ARCH/TARGET parts that I need to catch up with. Mea culpa.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Fix a long standing bug, where the procs ticks where assumed to be in
us. Instead, read cpu_tick_frequency from the kernel and use the same
logic to convert runtime. This is still too optimistic in that it
assumes cpu_tick_frequency is available and fixed. Since this function
is only called on crashdumps, I think we can live with that. Testing has
shown the values to be correct for different kern.hz inside Virtualbox.
Bump WARNS. Alignment issues on some archs mean this is still at 3.
Reviewed by: bde
|
|
|
|
|
|
|
|
|
|
|
|
| |
- 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
|
|
|
|
|
|
| |
thing with empty quotation macros.
Requested by: Alex Kozlov
|
|
|
|
| |
as a macro, and use it instead of literal strings.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
After KVA space was increased to 512GB on amd64 it became impractical
to use PTEs as entries in the minidump map of dumped pages, because size
of that map alone would already be 1GB.
Instead, we now use PDEs as page map entries and employ two stage lookup
in libkvm: virtual address -> PDE -> PTE -> physical address. PTEs are
now dumped as regular pages. Fixed page map size now is 2MB.
libkvm keeps support for accessing amd64 minidumps of version 1.
Support for 1GB pages is added.
Many thanks to Alan Cox for his guidance, numerous reviews, suggestions,
enhancments and corrections.
Reviewed by: alc [kernel part]
MFC after: 15 days
|
| |
|
|
|
|
| |
code made obsolete in the same commit.
|
|
|
|
|
| |
Prefer MACHNE_CPUARCH to MACHINE_ARCH in most contexts where you want
to test of all the CPUs of a given family conform.
|
| |
|
| |
|
|
|
|
|
| |
Reviewed by: alc
Obtained from: Yahoo Inc.
|
|
|
|
|
|
|
|
| |
Additionally, because of sysctl(3) use (which is generally good), behaviour
for crash dumps differs slightly from behaviour for live kernels and this
will probably never be fixed entirely, so weaken that claim.
MFC after: 1 week
|
|
|
|
|
|
| |
Found by: make manlint
Reviewed by: ru
Approved by: philip (mentor)
|
|
|
|
|
|
|
| |
u_int, so prefer unsigned int.
MFC after: 6 days
Pointed out by: bz, kib, Mr Tinderbox
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(DPCPU):
A new API, kvm_dpcpu_setcpu(3), selects the active CPU for the purposes
of DPCPU. Calls to kvm_nlist(3) will automatically translate DPCPU
symbols and return a pointer to the current CPU's version of the data.
Consumers needing to read the same symbol on several CPUs will invoke a
series of setcpu/nlist calls, one per CPU of interest.
This addition makes it possible for tools like netstat(1) to query the
values of DPCPU variables during crashdump analysis, and is based on
similar code handling virtualized global variables.
MFC after: 1 week
Sponsored by: Juniper Networks, Inc.
|
|
|
|
| |
MFC after: 3 days
|
|
|
|
|
|
|
|
|
| |
Similar to libexec/, do the same with lib/. Make WARNS=6 the norm and
lower it when needed.
I'm setting WARNS?=0 for secure/. It seems secure/ includes the
Makefile.inc provided by lib/. I'm not going to touch that directory.
Most of the code there is contributed anyway.
|
|
|
|
|
|
| |
NGROUPS.
Submitted by: Dmitry Pryanishnikov <lynx dot ripe at gmail dot com>
|
|
|
|
|
|
|
| |
a page mapped by a large page in the kernel.
Submitted by: Dorr H. Clark dclark of engr.scu.edu
MFC after: 1 week
|
|
|
|
|
|
|
|
|
|
|
| |
in a seperate array. As such we need to use kvm_read rather than bcopy
to populate the ki_groups field.
This fixes a crash when running ps -ax on a coredump.
Reported by: brucec
Tested by: brucec
MFC after: 3 days
|
|
|
|
|
|
|
|
|
| |
value the kernel calculated directly as we already read it
with struct vnet. This will make kvm_vnet.c more resilent
in case of possible kernel changes.
Reviewed by: rwatson
Approved by: re (kib)
|
|
|
|
|
|
|
|
|
|
| |
vnet.h, we now use jails (rather than vimages) as the abstraction
for virtualization management, and what remained was specific to
virtual network stacks. Minor cleanups are done in the process,
and comments updated to reflect these changes.
Reviewed by: bz
Approved by: re (vimage blanket)
|
|
|
|
|
|
|
|
|
|
| |
in up to 16 (KI_NGROUPS) values and steal a bit from ki_cr_flags
(all bits currently unused) to indicate overflow with the new flag
KI_CRF_GRP_OVERFLOW.
This fixes procstat -s.
Approved by: re (kib)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
without VIMAGE virtualization in the kernel.
If we cannot resolve a symbol try to see if we can find it with
prefix of the virtualized subsystem, currently only "vnet_entry"
by identifying either the vnet of the current process for a
live system or the vnet of proc0 (or of dumptid if compiled
in a non-default way).
The way this is done currently allows us to only touch libkvm
but no single application. Once we are going to virtualize more
subsystems we will have to review this decision for better scaling.
Submitted by: rwatson (initial version of kvm_vnet.c, lots of ideas)
Reviewed by: rwatson
Approved by: re (kib)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
NGROUPS_MAX, eliminate ABI dependencies on them, and raise the to 1024
and 1023 respectively. (Previously they were equal, but under a close
reading of POSIX, NGROUPS_MAX was defined to be too large by 1 since it
is the number of supplemental groups, not total number of groups.)
The bulk of the change consists of converting the struct ucred member
cr_groups from a static array to a pointer. Do the equivalent in
kinfo_proc.
Introduce new interfaces crcopysafe() and crsetgroups() for duplicating
a process credential before modifying it and for setting group lists
respectively. Both interfaces take care for the details of allocating
groups array. crsetgroups() takes care of truncating the group list
to the current maximum (NGROUPS) if necessary. In the future,
crsetgroups() may be responsible for insuring invariants such as sorting
the supplemental groups to allow groupmember() to be implemented as a
binary search.
Because we can not change struct xucred without breaking application
ABIs, we leave it alone and introduce a new XU_NGROUPS value which is
always 16 and is to be used or NGRPS as appropriate for things such as
NFS which need to use no more than 16 groups. When feasible, truncate
the group list rather than generating an error.
Minor changes:
- Reduce the number of hand rolled versions of groupmember().
- Do not assign to both cr_gid and cr_groups[0].
- Modify ipfw to cache ucreds instead of part of their contents since
they are immutable once referenced by more than one entity.
Submitted by: Isilon Systems (initial implementation)
X-MFC after: never
PR: bin/113398 kern/133867
|
|
|
|
| |
Submitted by: Pawel Worach
|