<feed xmlns='http://www.w3.org/2005/Atom'>
<title>src/lib/libkvm, branch releng/11.2</title>
<subtitle>FreeBSD source tree</subtitle>
<id>https://cgit-dev.freebsd.org/src/atom?h=releng%2F11.2</id>
<link rel='self' href='https://cgit-dev.freebsd.org/src/atom?h=releng%2F11.2'/>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/'/>
<updated>2018-03-29T02:50:57Z</updated>
<entry>
<title>Revert r330897:</title>
<updated>2018-03-29T02:50:57Z</updated>
<author>
<name>Eitan Adler</name>
<email>eadler@FreeBSD.org</email>
</author>
<published>2018-03-29T02:50:57Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=4ab2e064d7950be84256d671a7ae93f87cc6aa36'/>
<id>urn:sha1:4ab2e064d7950be84256d671a7ae93f87cc6aa36</id>
<content type='text'>
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)
</content>
</entry>
<entry>
<title>Partial merge of the SPDX changes</title>
<updated>2018-03-14T03:19:51Z</updated>
<author>
<name>Eitan Adler</name>
<email>eadler@FreeBSD.org</email>
</author>
<published>2018-03-14T03:19:51Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=be5d0b9566b13fdf8cabebb63334cbec12bfc409'/>
<id>urn:sha1:be5d0b9566b13fdf8cabebb63334cbec12bfc409</id>
<content type='text'>
These changes are incomplete but are making it difficult
to determine what other changes can/should be merged.

No objections from:	pfg
</content>
</entry>
<entry>
<title>MFC r315698:</title>
<updated>2017-05-28T06:31:52Z</updated>
<author>
<name>Enji Cooper</name>
<email>ngie@FreeBSD.org</email>
</author>
<published>2017-05-28T06:31:52Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=f06334309b69e34b69b2310bb0317ea2bb593a4a'/>
<id>urn:sha1:f06334309b69e34b69b2310bb0317ea2bb593a4a</id>
<content type='text'>
libkvm: bump WARNS to 6 after recent commits done to resolve warnings issues

Tested with:	make tinderbox; clang 4.0.0 (amd64), gcc 4.2.1/6.3.0 (amd64)
</content>
</entry>
<entry>
<title>MFC r319010:</title>
<updated>2017-05-27T23:24:33Z</updated>
<author>
<name>Enji Cooper</name>
<email>ngie@FreeBSD.org</email>
</author>
<published>2017-05-27T23:24:33Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=b56dca725676d2852b12c7a8cd5d776e9c97ff33'/>
<id>urn:sha1:b56dca725676d2852b12c7a8cd5d776e9c97ff33</id>
<content type='text'>
Fix #if conditional added in r319008

I committed an earlier version of the file by accident

This is a no-op on ^/head and ^/stable/11.
</content>
</entry>
<entry>
<title>MFC r319008:</title>
<updated>2017-05-27T23:20:28Z</updated>
<author>
<name>Enji Cooper</name>
<email>ngie@FreeBSD.org</email>
</author>
<published>2017-05-27T23:20:28Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=97c54765dc7b1bdac5f4e0fc733bb1bc5a1f2f9e'/>
<id>urn:sha1:97c54765dc7b1bdac5f4e0fc733bb1bc5a1f2f9e</id>
<content type='text'>
kvm_geterr_test: Compile out the portions that require kvm_open2(3) on
systems that lack the libcall, based on __FreeBSD_version.

kvm_open2(3) wasn't made available until r291406, which is in ^/stable/11,
but not ^/stable/10. This makes some of kvm_geterr_test available for testing
on ^/stable/10.
</content>
</entry>
<entry>
<title>MFC r316099:</title>
<updated>2017-05-27T23:04:40Z</updated>
<author>
<name>Enji Cooper</name>
<email>ngie@FreeBSD.org</email>
</author>
<published>2017-05-27T23:04:40Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=a19e7e145e72e07a4f6061ec831efaa486e32242'/>
<id>urn:sha1:a19e7e145e72e07a4f6061ec831efaa486e32242</id>
<content type='text'>
lib/libkvm: start adding basic tests for kvm(3)

- kvm_close: add a testcase to verify support for errno = EINVAL / -1
  (see D10065) when kd == NULL is provided to the libcall.
- kvm_geterr:
-- Add a negative testcase for kd == NULL returning "" (see D10022).
-- Add two positive testcases:
--- test the error case using kvm_write on a O_RDONLY descriptor.
--- test the "no error" case using kvm_read(3) and kvm_nlist(3) as
    helper routines and by injecting a bogus error message via
    _kvm_err (an internal API) _kvm_err was used as there isn't a
    formalized way to clear the error output, and because
    kvm_nlist always returns ENOENT with the NULL terminator today.
- kvm_open, kvm_open2:
-- Add some basic negative tests for kvm_open(3) and kvm_open2(3).
   Testing positive cases with a specific
   `corefile`/`execfile`/`resolver` requires more work and would require
   user intervention today in order to reliably test this out.
</content>
</entry>
<entry>
<title>MFC r315697:</title>
<updated>2017-03-29T07:30:59Z</updated>
<author>
<name>Enji Cooper</name>
<email>ngie@FreeBSD.org</email>
</author>
<published>2017-03-29T07:30:59Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=a97048e3a3e56f88dc2f34c9f9a0316c61331f5c'/>
<id>urn:sha1:a97048e3a3e56f88dc2f34c9f9a0316c61331f5c</id>
<content type='text'>
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)
</content>
</entry>
<entry>
<title>MFC r315686,r315688:</title>
<updated>2017-03-28T06:03:43Z</updated>
<author>
<name>Enji Cooper</name>
<email>ngie@FreeBSD.org</email>
</author>
<published>2017-03-28T06:03:43Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=ba90d4189c4abeb6d10d43d4e074ca680d054fd4'/>
<id>urn:sha1:ba90d4189c4abeb6d10d43d4e074ca680d054fd4</id>
<content type='text'>
r315686:

kvm_geterr: handle `kd` == NULL in a deterministic/graceful manner

Return a NUL string instead of just working by accident with kvm_geterr(3)
when MALLOC_PRODUCTION is disabled (I didn't confirm the MALLOC_PRODUCTION
being enabled path).

Document the new explicit return behavior for kvm_geterr(3), as well
as the previous implicit behavior, i.e., the buffer attached to
returned via kvm_geterr(3) would be empty if a previous error hadn't been
stored in `kd`.

r315688:

kvm_write: fix -Wcast-qual warning in pointer arithmetic argument

Cast buf to `const char *` when doing arithmetic operation to match
`cp`'s type [1].
</content>
</entry>
<entry>
<title>MFC r315595,r315601,r315603,r315647:</title>
<updated>2017-03-27T18:22:33Z</updated>
<author>
<name>Enji Cooper</name>
<email>ngie@FreeBSD.org</email>
</author>
<published>2017-03-27T18:22:33Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=225a567986e17c05623d43941cdf7c963dec4f6a'/>
<id>urn:sha1:225a567986e17c05623d43941cdf7c963dec4f6a</id>
<content type='text'>
r315595:

Remove a commented out line before kvm_getprocs(3)

The commented out return value for kvm_getprocs(3) was misleading -- the
uncommented line is correct.

No content change

r315601:

kvm_open2(3): remove '*' when describing addr argument for `resolver`

As noted by vangyzen, with a similar issue in D10022, the pointer portion of
the .Fa macro call is unnecessary, so remove the '*'.

r315603:

kvm_close(3): return `error` instead of blindly returning `0`

`error` is the accumulated error from previous close(2) calls.

This bug has been present since the libcall's import from 4.4BSD
Lite (r1573).

Noticed by:	vangyzen (D10022)
Relnotes:	yes

r315647:

Handle kd == NULL gracefully with kvm_close(3)

Don't segfault in kvm_close(3) if provided a NULL pointer. Instead, return
-1 and set errno to EINVAL.

Document this new behavior explicitly.
</content>
</entry>
<entry>
<title>MFC r315360:</title>
<updated>2017-03-23T04:50:44Z</updated>
<author>
<name>Enji Cooper</name>
<email>ngie@FreeBSD.org</email>
</author>
<published>2017-03-23T04:50:44Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=ff181cdb38726731dee9578b20920d1dfa05e033'/>
<id>urn:sha1:ff181cdb38726731dee9578b20920d1dfa05e033</id>
<content type='text'>
Return NULL instead of 0 on failure in _kvm_open, kvm_open{,2,files}

This is being done for the following reasons:
- kvm_open(3), etc says they will return NULL.
- NULL by definition is (void*)0 per POSIX, but can be redefined,
  depending on the compiler, etc.
</content>
</entry>
</feed>
