Re: libkvm usage on FreeBSD

2024-06-18 Thread Bart Van Assche via Net-snmp-coders
On 6/11/24 7:04 AM, Mark Johnston wrote: commit 304f8cf7f176920cb689d237f612c9a25cd14e84 Author: Mark Johnston Date: Thu Apr 4 16:34:26 2024 -0400 snmpd: Always open libkvm in "safe mode" on FreeBSD This patch has been applied on the V5-9-patches and master branches. Thanks for the pat

Re: libkvm usage on FreeBSD

2024-06-11 Thread Mark Johnston
On Mon, Jun 10, 2024 at 03:51:33PM -0700, Bart Van Assche wrote: > > On 6/10/24 13:27, Mark Johnston wrote: > > Would it be helpful for me to submit a patch? A few of us have been > > testing snmpd with my original patch (to tell libkvm not to open > > /dev/kmem etc.) for a while now with no issu

Re: libkvm usage on FreeBSD

2024-06-10 Thread Bart Van Assche via Net-snmp-coders
On 6/10/24 13:27, Mark Johnston wrote: Would it be helpful for me to submit a patch? A few of us have been testing snmpd with my original patch (to tell libkvm not to open /dev/kmem etc.) for a while now with no issues. A patch definitely would be welcome. Thanks, Bart. _

Re: libkvm usage on FreeBSD

2024-06-10 Thread Mark Johnston
On Fri, Apr 12, 2024 at 03:51:51PM -0700, Bart Van Assche wrote: > On 4/12/24 7:29 AM, Mark Johnston wrote: > > Do you mean that on FreeBSD we should always perform an unprivileged > > kvm_openfile() call, no matter whether --without-kmem-usage is > > specified? > > Yes, that's what I'm proposing.

Re: libkvm usage on FreeBSD

2024-05-06 Thread Bart Van Assche via Net-snmp-coders
On 4/30/24 10:53 AM, Mark Johnston wrote: Fix var_udp6 and var_tcp6 on FreeBSD > [ ... ] This patch has been applied on the V5-9-patches and master branches. Thanks for the patch! Bart. ___ Net-snmp-coders mailing list Net-snmp-coders@lists.source

Re: libkvm usage on FreeBSD

2024-04-30 Thread Mark Johnston
On Fri, Apr 12, 2024 at 03:51:51PM -0700, Bart Van Assche wrote: > On 4/12/24 7:29 AM, Mark Johnston wrote: > > Do you mean that on FreeBSD we should always perform an unprivileged > > kvm_openfile() call, no matter whether --without-kmem-usage is > > specified? > > Yes, that's what I'm proposing.

Re: libkvm usage on FreeBSD

2024-04-13 Thread Mark Johnston
On Fri, Apr 12, 2024 at 03:51:51PM -0700, Bart Van Assche wrote: > On 4/12/24 7:29 AM, Mark Johnston wrote: > > Do you mean that on FreeBSD we should always perform an unprivileged > > kvm_openfile() call, no matter whether --without-kmem-usage is > > specified? > > Yes, that's what I'm proposing.

Re: libkvm usage on FreeBSD

2024-04-12 Thread Bart Van Assche via Net-snmp-coders
On 4/12/24 7:29 AM, Mark Johnston wrote: Do you mean that on FreeBSD we should always perform an unprivileged kvm_openfile() call, no matter whether --without-kmem-usage is specified? Yes, that's what I'm proposing. If someone disagrees, please share your opinion now. Thanks, Bart.

Re: libkvm usage on FreeBSD

2024-04-12 Thread Mark Johnston
On Fri, Apr 12, 2024 at 07:13:41AM -0700, Bart Van Assche wrote: > On 4/12/24 06:44, Mark Johnston wrote: > > I would like to introduce the patch below, which gets compiled when > > --without-kmem-usage is specified. In this case, snmpd will still use > > libkvm, but won't open /dev/(k)mem. In my

Re: libkvm usage on FreeBSD

2024-04-12 Thread Bart Van Assche via Net-snmp-coders
On 4/12/24 06:44, Mark Johnston wrote: I would like to introduce the patch below, which gets compiled when --without-kmem-usage is specified. In this case, snmpd will still use libkvm, but won't open /dev/(k)mem. In my testing so far, this works perfectly. Does anyone have any thoughts on this

libkvm usage on FreeBSD

2024-04-12 Thread Mark Johnston
I'm quite new to net-snmp, so apologies in advance if this is the wrong place to discuss patches. Currently, when one runs snmpd on FreeBSD, it keeps /dev/mem and /dev/kmem open. This is a result of using kvm_openfiles() to get a kvm descriptor, which is used to implement various MIBs (via kvm_ge