Re: asn1/a_bitstring.c: zeroing after recallocarray

2020-09-02 Thread Otto Moerbeek
On Thu, Sep 03, 2020 at 07:03:14AM +0200, Theo Buehler wrote: > The memset is not needed as recallocarray(3) does the zeroing already. > (I also think the a->data == NULL check in the if clause is redundant, > but I'm just suggesting to remove a bit that confused me) ok, -Otto > >

Re: m_defrag(9) leak

2020-09-02 Thread Claudio Jeker
On Thu, Sep 03, 2020 at 06:34:38AM +0200, Bjorn Ketelaars wrote: > On Tue 25/08/2020 08:42, Martin Pieuchot wrote: > > Maxime Villard mentioned a leak due to a missing m_freem() in wg(4): > > https://marc.info/?l=netbsd-tech-net=159827988018641=2 > > > > It seems to be that such leak is

libcrypto: clean up asn1/x_info.c

2020-09-02 Thread Theo Buehler
There's this thing called calloc(3) and all variants of free(3) in libcrypto are NULL safe. PS: There's still many dozens of these to clean up. I don't intend to go through these systematically anytime soon, but rather than letting this one rot in my tree, I might as well ask for oks... Index:

asn1/a_bitstring.c: zeroing after recallocarray

2020-09-02 Thread Theo Buehler
The memset is not needed as recallocarray(3) does the zeroing already. (I also think the a->data == NULL check in the if clause is redundant, but I'm just suggesting to remove a bit that confused me) Index: asn1/a_bitstr.c === RCS

Re: m_defrag(9) leak

2020-09-02 Thread Bjorn Ketelaars
On Tue 25/08/2020 08:42, Martin Pieuchot wrote: > Maxime Villard mentioned a leak due to a missing m_freem() in wg(4): > https://marc.info/?l=netbsd-tech-net=159827988018641=2 > > It seems to be that such leak is present in other uses of m_defrag() in > the tree. I won't take the time to

Re: httpd: use the original uri for REQUEST_URI

2020-09-02 Thread YASUOKA Masahiko
Let me update the diff. Previous doesn't have an error handling when strdup() failed. On Thu, 03 Sep 2020 13:02:51 +0900 (JST) YASUOKA Masahiko wrote: > The diff makes REQUEST_URI in FastCGI become the original request > URI. Currently it is an url which is url decoded and canonicalized. > I

httpd: use the original uri for REQUEST_URI

2020-09-02 Thread YASUOKA Masahiko
The diff makes REQUEST_URI in FastCGI become the original request URI. Currently it is an url which is url decoded and canonicalized. I could not find a specification of REQUEST_URI, but I suppose it is the URI in HTTP request. Apache httpd and nginx is using the original URI for it. ok? Use

Re: [PATCH] Add common PCIE capability list

2020-09-02 Thread Jordan Hargrave
On Wed, Sep 02, 2020 at 03:19:55PM +1000, Jonathan Gray wrote: > On Tue, Sep 01, 2020 at 11:44:03PM -0500, Jordan Hargrave wrote: > > This patch adds a common function for scanning PCIE Express Capability list > > The PCIE Capability list starts at 0x100 in extended PCI configuration > > space. >

clang warning in yacc's output.c

2020-09-02 Thread Theo Buehler
This one is a bit less immediate than the vmctl one: /usr/src/usr.bin/yacc/output.c:908:26: warning: comparing a pointer to a null character constant; did you mean to compare to NULL? [-Wpointer-compare] if ((s = symnam[i]) != '\0') {

Re: clang warning in vmctl

2020-09-02 Thread Todd C . Miller
Looks correct, OK millert@ - todd On Wed, 02 Sep 2020 21:43:47 +0200, Theo Buehler wrote: > clang 10 complains: > > /usr/src/usr.sbin/vmctl/vmctl.c:792:35: warning: comparing a pointer to a nul > l character > constant; did you mean to compare to NULL? [-Wpointer-compare] >

Re: clang warning in vmctl

2020-09-02 Thread Theo de Raadt
I had this diff in my tree for a while, but haven't gotten around to passing it up. there are other warnings in the tree, found by newer clang, that people should review. Some of them are just noise, in particular relating to missing {}. Theo Buehler wrote: > clang 10 complains: > >

clang warning in vmctl

2020-09-02 Thread Theo Buehler
clang 10 complains: /usr/src/usr.sbin/vmctl/vmctl.c:792:35: warning: comparing a pointer to a null character constant; did you mean to compare to NULL? [-Wpointer-compare] '/')) == NULL || ++tty == '\0')

pms(4): fix "pointer skipping" for certain v1 elantech touchpads

2020-09-02 Thread sxvghd
So, continuing with fixing my netbook, I have another patch which fixes "pointer skipping". This is a bug in 2 particular (0x20022 and 0x20600) elantech v1 firmwares which causes at least the first packet (in my tests, only one packet was mangled, but Linux says two and I don't have a way to

Re: ldom.conf.5: clarify vcpu strides

2020-09-02 Thread Stefan Sperling
On Wed, Sep 02, 2020 at 04:41:49PM +0200, Klemens Nanni wrote: > They way strides work is everything but intuitive and the manual doesn't > really help; I've had multiple hackers/users ask me how to use them. > > `vcpu 8' assigns eight virtual CPUs to a domain. > > `vcpu 8:2' allocates eight

Re: wg: count peers per interface not globally

2020-09-02 Thread Klemens Nanni
On Wed, Sep 02, 2020 at 04:12:33PM +1000, Matt Dunwoodie wrote: > The patch isn't fully correct. When you remove a peer, sc_peer_num > will decrement, and if you add a new peer afterwards you will have > duplicate IDs. This is likely to create further headaches. A dedicated > ID counter in

ldom.conf.5: clarify vcpu strides

2020-09-02 Thread Klemens Nanni
They way strides work is everything but intuitive and the manual doesn't really help; I've had multiple hackers/users ask me how to use them. `vcpu 8' assigns eight virtual CPUs to a domain. `vcpu 8:2' allocates eight VCPUs two times but assigns eight VCPUs only once, leaving the other eight

Re: shrinking and growing reallocs: a theoretical? bad case for performance

2020-09-02 Thread Otto Moerbeek
On Tue, Sep 01, 2020 at 11:56:36AM +0100, Stuart Henderson wrote: > On 2020/08/31 08:39, Otto Moerbeek wrote: > > A question from Theo made me think about realloc and come up with a > > particular bad case for performance. I do not know if it happens in > > practice, but it was easy to create a

Re: ospf6d: use ROUTE_FLAGFILTER

2020-09-02 Thread Remi Locherer
On Wed, Sep 02, 2020 at 03:23:28PM +1000, Jonathan Matthew wrote: > Like ospfd, ospf6d can use ROUTE_FLAGFILTER to opt out of receiving messages > relating to L2 and broadcast routes on its routing socket. We've been running > this for a week or so with no problems. > > ok? ok remi@ > >

Re: wg: count peers per interface not globally

2020-09-02 Thread Matt Dunwoodie
On Tue, 1 Sep 2020 20:57:09 +0200 Klemens Nanni wrote: > The driver increases a static peer counter across all wg interfaces > when creating peers, the peer number is only used in debug output, > though. > > Feedback? OK? High level, I understand the problem and this makes debugging easier. It