<feed xmlns='http://www.w3.org/2005/Atom'>
<title>src/lib/libkvm/kvm_proc.c, branch releng/12.4</title>
<subtitle>FreeBSD source tree</subtitle>
<id>https://cgit-dev.freebsd.org/src/atom?h=releng%2F12.4</id>
<link rel='self' href='https://cgit-dev.freebsd.org/src/atom?h=releng%2F12.4'/>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/'/>
<updated>2021-02-09T08:35:50Z</updated>
<entry>
<title>jobc: rework detection of orphaned groups.</title>
<updated>2021-02-09T08:35:50Z</updated>
<author>
<name>Konstantin Belousov</name>
<email>kib@FreeBSD.org</email>
</author>
<published>2020-12-29T00:41:56Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=328a4f451f14fb4d830c74c12445a4a80ee61b4c'/>
<id>urn:sha1:328a4f451f14fb4d830c74c12445a4a80ee61b4c</id>
<content type='text'>
Tested by:	pho

For MFC, pg_jobc member is left in struct pgrp, but it is unused now.

(cherry picked from commit 5844bd058aed6f3d0c8cbbddd6aa95993ece0189)
</content>
</entry>
<entry>
<title>MFC r352597: Add support for ps -H on corefiles in libkvm</title>
<updated>2019-09-29T06:12:51Z</updated>
<author>
<name>Mike Karels</name>
<email>karels@FreeBSD.org</email>
</author>
<published>2019-09-29T06:12:51Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=d48a3322ce5fc4f31d812805c972a7c0f64d27fe'/>
<id>urn:sha1:d48a3322ce5fc4f31d812805c972a7c0f64d27fe</id>
<content type='text'>
Add support for kernel threads in kvm_getprocs() and the underlying
kvm_proclist() in libkvm when fetching from a kernel core file. This
has been missing/needed for several releases, when kernel threads became
normal threads.  The loop over the processes now contains a sub-loop for
threads, which iterates beyond the first thread only when threads are
requested.  Also set some fields such as tid that were previously
uninitialized.

Sponsored by:   Forcepoint LLC
</content>
</entry>
<entry>
<title>Use __SCCSID for SCCS IDs in libkvm sources.</title>
<updated>2018-05-22T15:52:22Z</updated>
<author>
<name>John Baldwin</name>
<email>jhb@FreeBSD.org</email>
</author>
<published>2018-05-22T15:52:22Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=993d074be6458c1492e9b111f7962ac43aac3edc'/>
<id>urn:sha1:993d074be6458c1492e9b111f7962ac43aac3edc</id>
<content type='text'>
Rather than using #ifdef's around a static char array, use the
existing helper macro from &lt;sys/cdefs.h&gt; for SCCS IDs.  To
preserve existing behavior, add -DNO__SCCSID to CFLAGS to not
include SCCS IDs in the built library by default.

Reviewed by:	brooks, dab (older version)
Reviewed by:	rgrimes
Differential Revision:	https://reviews.freebsd.org/D15459
</content>
</entry>
<entry>
<title>General further adoption of SPDX licensing ID tags.</title>
<updated>2017-11-20T19:49:47Z</updated>
<author>
<name>Pedro F. Giffuni</name>
<email>pfg@FreeBSD.org</email>
</author>
<published>2017-11-20T19:49:47Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=8a16b7a18f5d0b031f09832fd7752fba717e2a97'/>
<id>urn:sha1:8a16b7a18f5d0b031f09832fd7752fba717e2a97</id>
<content type='text'>
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.
</content>
</entry>
<entry>
<title>Commit the 64-bit inode project.</title>
<updated>2017-05-23T09:29:05Z</updated>
<author>
<name>Konstantin Belousov</name>
<email>kib@FreeBSD.org</email>
</author>
<published>2017-05-23T09:29:05Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=69921123490b99c2588b0c743bc4af32bbe6601c'/>
<id>urn:sha1:69921123490b99c2588b0c743bc4af32bbe6601c</id>
<content type='text'>
Extend the ino_t, dev_t, nlink_t types to 64-bit ints.  Modify
struct dirent layout to add d_off, increase the size of d_fileno
to 64-bits, increase the size of d_namlen to 16-bits, and change
the required alignment.  Increase struct statfs f_mntfromname[] and
f_mntonname[] array length MNAMELEN to 1024.

ABI breakage is mitigated by providing compatibility using versioned
symbols, ingenious use of the existing padding in structures, and
by employing other tricks.  Unfortunately, not everything can be
fixed, especially outside the base system.  For instance, third-party
APIs which pass struct stat around are broken in backward and
forward incompatible ways.

Kinfo sysctl MIBs ABI is changed in backward-compatible way, but
there is no general mechanism to handle other sysctl MIBS which
return structures where the layout has changed. It was considered
that the breakage is either in the management interfaces, where we
usually allow ABI slip, or is not important.

Struct xvnode changed layout, no compat shims are provided.

For struct xtty, dev_t tty device member was reduced to uint32_t.
It was decided that keeping ABI compat in this case is more useful
than reporting 64-bit dev_t, for the sake of pstat.

Update note: strictly follow the instructions in UPDATING.  Build
and install the new kernel with COMPAT_FREEBSD11 option enabled,
then reboot, and only then install new world.

Credits: The 64-bit inode project, also known as ino64, started life
many years ago as a project by Gleb Kurtsou (gleb).  Kirk McKusick
(mckusick) then picked up and updated the patch, and acted as a
flag-waver.  Feedback, suggestions, and discussions were carried
by Ed Maste (emaste), John Baldwin (jhb), Jilles Tjoelker (jilles),
and Rick Macklem (rmacklem).  Kris Moore (kris) performed an initial
ports investigation followed by an exp-run by Antoine Brodin (antoine).
Essential and all-embracing testing was done by Peter Holm (pho).
The heavy lifting of coordinating all these efforts and bringing the
project to completion were done by Konstantin Belousov (kib).

Sponsored by:	The FreeBSD Foundation (emaste, kib)
Differential revision:	https://reviews.freebsd.org/D10439
</content>
</entry>
<entry>
<title>Renumber copyright clause 4</title>
<updated>2017-02-28T23:42:47Z</updated>
<author>
<name>Warner Losh</name>
<email>imp@FreeBSD.org</email>
</author>
<published>2017-02-28T23:42:47Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=fbbd9655e5107c68e4e0146ff22b73d7350475bc'/>
<id>urn:sha1:fbbd9655e5107c68e4e0146ff22b73d7350475bc</id>
<content type='text'>
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 &lt;jschauma@stevens.edu&gt;
Pull Request:	https://github.com/freebsd/freebsd/pull/96
</content>
</entry>
<entry>
<title>Export the whole thread name in kinfo_proc</title>
<updated>2016-12-07T15:04:22Z</updated>
<author>
<name>Eric van Gyzen</name>
<email>vangyzen@FreeBSD.org</email>
</author>
<published>2016-12-07T15:04:22Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=3d32d4a7c97401beb9eb1aaafbcb0389e50d9109'/>
<id>urn:sha1:3d32d4a7c97401beb9eb1aaafbcb0389e50d9109</id>
<content type='text'>
kinfo_proc::ki_tdname is three characters shorter than
thread::td_name.  Add a ki_moretdname field for these three
extra characters.  Add the new field to kinfo_proc32, as well.
Update all in-tree consumers to read the new field and assemble
the full name, except for lldb's HostThreadFreeBSD.cpp, which
I will handle separately.  Bump __FreeBSD_version.

Reviewed by:	kib
MFC after:	1 week
Relnotes:	yes
Sponsored by:	Dell EMC
Differential Revision:	https://reviews.freebsd.org/D8722
</content>
</entry>
<entry>
<title>Fix memory allocation edgecases in kvm_argv(..)</title>
<updated>2016-04-30T09:13:26Z</updated>
<author>
<name>Enji Cooper</name>
<email>ngie@FreeBSD.org</email>
</author>
<published>2016-04-30T09:13:26Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=68b68bf55d62b45c339f8ec24e6367f77cd61c46'/>
<id>urn:sha1:68b68bf55d62b45c339f8ec24e6367f77cd61c46</id>
<content type='text'>
- Don't leak nbufp on realloc failure in kvm_argv
- Catch malloc errors with bufp
- Set buflen last in the "buflen == 0" case to ensure that
  bufp/nbufp is properly reallocated on the next go around

Differential Revision: https://reviews.freebsd.org/D6051
MFC after: 1 week
Reviewed by: jhb, markj
Reported by: cppcheck
Sponsored by: EMC / Isilon Storage Division
</content>
</entry>
<entry>
<title>Fix up pointer issues with lib/libkvm</title>
<updated>2016-04-22T18:05:34Z</updated>
<author>
<name>Enji Cooper</name>
<email>ngie@FreeBSD.org</email>
</author>
<published>2016-04-22T18:05:34Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=fb0e1892d9e31cdba013c27b24c47c86838924a8'/>
<id>urn:sha1:fb0e1892d9e31cdba013c27b24c47c86838924a8</id>
<content type='text'>
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
</content>
</entry>
<entry>
<title>Add support to libkvm for reading vmcores from other architectures.</title>
<updated>2015-11-27T18:58:26Z</updated>
<author>
<name>John Baldwin</name>
<email>jhb@FreeBSD.org</email>
</author>
<published>2015-11-27T18:58:26Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=7f911abe54fff2adbb0dfea5a7fd8e81117d6527'/>
<id>urn:sha1:7f911abe54fff2adbb0dfea5a7fd8e81117d6527</id>
<content type='text'>
- 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
</content>
</entry>
</feed>
