Re: ld.so crash second attempt

2015-11-03 Thread Philip Guenther
On Sun, 25 Oct 2015, Peter Hajdu wrote: > I try to give it one more attempt with a bit more description about the > bug. > > After calling dlclose in _dl_notify_unload_shlib_ group reference counts > are decreased by following the object's grpref-list. Unfortunately the > references are

Re: ml_purge for netinet/if_ether.c

2015-11-03 Thread Martin Pieuchot
On 03/11/15(Tue) 16:17, David Gwynne wrote: > ml_purge returns how many mbufs they freed, so we can decrement the > la_hold_total with that instead of inside an ml_dequeue/m_freem > loop. > > ok? ok mpi@ > > Index: netinet/if_ether.c >

Re: ld.so crash second attempt

2015-11-03 Thread Anthony J. Bentley
Hi Philip, Philip Guenther writes: > Thus the diff below. It works with your test setup (thanks for writing > that!), passes regress/libexec/ld.so/, and chrome hasn't choked on it. > Can someone who's familiar with the sdl problem case test it there? This patch fixes my sdl2 testcase,

Re: Drop register keyword from less(1)

2015-11-03 Thread Craig Skinner
On 2015-11-02 Mon 15:57 PM |, Ted Unangst wrote: > > I would say less has reached the point in its lifecycle where it can only get > bigger and worse, so there's some merit to putting it on a diet. > Ha! Less less(1).

Re: at: remove privs.h

2015-11-03 Thread Nicholas Marriott
Looks good to me, ok nicm On Mon, Nov 02, 2015 at 02:26:15PM -0700, Todd C. Miller wrote: > at(1) tries to run as little code as possible with privileges. This > creates a false sense of security since if there is an overflow an > attacker can easily change the effective gid anyway. > > The

Re: tidy up pledge_ioctl

2015-11-03 Thread Sebastien Marie
On Mon, Nov 02, 2015 at 10:32:40PM -0500, Ted Unangst wrote: > The last argument is always a file, so we can type it instead of using void. > Also, as a safety belt, leave vp null if the file type isn't vnode. OK semarie@ > > Index: kern/kern_pledge.c >

Re: IPsec: AES-GCM with PCLMUL if no AESNI

2015-11-03 Thread Mike Belopuhov
On 3 November 2015 at 16:56, Christian Weisgerber wrote: > There are two parts to accelerating AES-GCM with special instructions > on amd64: AESNI for AES and PCLMUL for GMAC. Currently we link > those: If a machine has AESNI, use AESNI and PCLMUL, otherwise do > everything

Re: patch - potential use-after-free pfr_set_addrs()

2015-11-03 Thread Alexandr Nedvedicky
On Tue, Nov 03, 2015 at 10:09:49PM +0100, Alexander Bluhm wrote: > On Tue, Nov 03, 2015 at 09:40:38PM +0100, Alexandr Nedvedicky wrote: > > I think the > > right thing is to use goto _skip; in that branch to avoid 499 et. al. > > completely. > > Yes > > > @@ -491,6 +491,7 @@ pfr_set_addrs(struct

Re: LibreSSL MIPS64 build with GCC5

2015-11-03 Thread Ruslan Babayev
Thanks for feedback Michael! I wasn't aware of __GNUC_PREREQ. I did a grep and found a few more places where it can be used. Index: lib/libssl/src/crypto/bn/bn_lcl.h === RCS file: /cvs/src/lib/libssl/src/crypto/bn/bn_lcl.h,v

Re: patch - potential use-after-free pfr_set_addrs()

2015-11-03 Thread Mike Belopuhov
On Tue, Nov 03, 2015 at 21:40 +0100, Alexandr Nedvedicky wrote: > Hello, > > Patch fixes potential use-after-free in pf_table.c:pfr_set_addrs(): > > 463 for (i = 0; i < size; i++) { > ... > 483 q = pfr_lookup_addr(tmpkt, , 1); > 484 if

Re: patch - potential use-after-free pfr_set_addrs()

2015-11-03 Thread Alexander Bluhm
On Tue, Nov 03, 2015 at 09:40:38PM +0100, Alexandr Nedvedicky wrote: > I think the > right thing is to use goto _skip; in that branch to avoid 499 et. al. > completely. Yes > @@ -491,6 +491,7 @@ pfr_set_addrs(struct pfr_table *tbl, str > if (pfr_route_kentry(tmpkt, p)) { >

patch - potential use-after-free pfr_set_addrs()

2015-11-03 Thread Alexandr Nedvedicky
Hello, Patch fixes potential use-after-free in pf_table.c:pfr_set_addrs(): 463 for (i = 0; i < size; i++) { ... 483 q = pfr_lookup_addr(tmpkt, , 1); 484 if (q != NULL) { 485 ad.pfra_fback =

wi(4) hostap vs if_enqueue

2015-11-03 Thread David Gwynne
if_wi_hostap.c basically inlines what if_enqueue does, but badly. more specifically, it uses IF_FOO operations to manipulate the interfaces send queue, but they only work if you're using priq. if you have hfsc on the interface it's not going to work well. this makes it just call if_enqueue. ok?

IFQ_PREPEND

2015-11-03 Thread David Gwynne
im working on making the interface send queue mpsafe. part of that involced deprecating the IFQ_POLL api because it allows the caller to get a reference an mbuf that is still on the send queue. this is dangerous if another cpu tries to manipulate the send queue. instead code should call

replace ifqueues in net80211 with mbuf_queus

2015-11-03 Thread David Gwynne
ive sent this to a couple of people before, but that was before i added mq_purge and ml_purge. it uses mbuf_queues in the net80211 stack instead of ifqueues. this means we shrink memory usage slightly, and get some locking. could someone give this a run on some wifi chips and see how it goes?

[PATCH] intro(8) - corrections and update

2015-11-03 Thread Raf Czlonka
Hi all, Some explanation regarding the changes: - might -> "needs to" - it has to be there, no "might" about it :^) - I've added the additional httpd_flags example back - without it, the following sentence doesn't make sense. Alternatively the "As can be seen..." sentence can be removed

[patch] tcpdump gre sre segfault

2015-11-03 Thread Kevin Reay
Fix a segfault in the GRE printer when a GRE packet SRE length extends past the actual captured length (but not the packet's original length). gre_print() now checks if the length extends past snapend and, if so, uses the snapend to determine the usable length. Also includes a small change to

wc does not count last line if no trailing newline present

2015-11-03 Thread dan mclaughlin
i was writing a script when i ran across this. $ echo "hello world" | wc 1 2 12 $ echo -n "hello world" | wc 0 2 11 the following patch corrects this: --- usr.bin/wc/wc.c.origFri Oct 9 02:43:08 2015 +++ usr.bin/wc/wc.c Tue Nov 3 22:52:46 2015 @@

Re: IPv6 DHCP-PD/SLAAC - no /64 route in routing table

2015-11-03 Thread Yury Shefer
Seems to be working. I can see correct records in the routing table and able to connect to IPv6-enabled destinations (5.8 stable + Stuart's patch): 2601:647::::/64 2601:647:::cab3:73ff:fe46:fb5c UC 60 - 8 axe0

Re: wc does not count last line if no trailing newline present

2015-11-03 Thread Anthony J. Bentley
dan mclaughlin writes: > i was writing a script when i ran across this. Is there a wc that doesn't behave this way? POSIX wc explicitly counts newline characters. So this is probably the behavior people write their scripts against.

Re: IPv6 DHCP-PD/SLAAC - no /64 route in routing table

2015-11-03 Thread Yury Shefer
not sure if I applied it correctly: ../../../../netinet6/in6.c: In function 'in6_control': ../../../../netinet6/in6.c:470: error: 'IN6_IFF_NODAD' undeclared (first use in this function) ../../../../netinet6/in6.c:470: error: (Each undeclared identifier is reported only once

Re: wc does not count last line if no trailing newline present

2015-11-03 Thread Philip Guenther
On Tue, Nov 3, 2015 at 8:35 PM, dan mclaughlin wrote: > i was writing a script when i ran across this. > > $ echo "hello world" | wc >1 2 12 > $ echo -n "hello world" | wc >0 2 11 > > the following patch corrects this: ...but it's

Re: wc does not count last line if no trailing newline present

2015-11-03 Thread dan mclaughlin
On Tue, 3 Nov 2015 21:01:36 -0800 Philip Guenther wrote: > On Tue, Nov 3, 2015 at 8:35 PM, dan mclaughlin wrote > > i was writing a script when i ran across this. > > > > $ echo "hello world" | wc > >1 2 12 > > $ echo -n "hello

cron: kill some extern globals

2015-11-03 Thread Todd C. Miller
Make things static that are not used outside their respective .c files. Also remove some unused defines. - todd Index: usr.sbin/cron/cron.c === RCS file: /cvs/src/usr.sbin/cron/cron.c,v retrieving revision 1.60 diff -u -p -u

Re: wc does not count last line if no trailing newline present

2015-11-03 Thread Philip Guenther
On Tue, Nov 3, 2015 at 10:23 PM, dan mclaughlin wrote: > On Wed, 04 Nov 2015 01:05:38 -0500 dan mclaughlin > wrote: >> >> also wondering how to get equivalent functionality. maybe there's a better >> way, but off the top of my head i can only

a small change to OpenSSH upstream

2015-11-03 Thread Ivo Raisr
Based on the request from OpenSSH portable team (Darren Tucker) [1] I am sending this bug report to "upstream" OpenSSH. Please see [2] for background, rationale and patch (also attached). Kind regards, Ivo Raisr [1] https://bugzilla.mindrot.org/show_bug.cgi?id=2483#c1 [2]

Re: wc does not count last line if no trailing newline present

2015-11-03 Thread Jason McIntyre
On Wed, Nov 04, 2015 at 01:05:38AM -0500, dan mclaughlin wrote: > On Tue, 3 Nov 2015 21:01:36 -0800 Philip Guenther wrote: > > On Tue, Nov 3, 2015 at 8:35 PM, dan mclaughlin > > wrote > > > i was writing a script when i ran across this. > > > > > > $

Re: wc does not count last line if no trailing newline present

2015-11-03 Thread dan mclaughlin
On Wed, 04 Nov 2015 01:05:38 -0500 dan mclaughlin wrote: > > also wondering how to get equivalent functionality. maybe there's a better > way, but off the top of my head i can only think of: > > grep -n .* | tail -1 | sed 's/:.*//' > ack. thought of this right after

Re: IFQ_PREPEND

2015-11-03 Thread Martin Pieuchot
On 04/11/15(Wed) 10:39, David Gwynne wrote: > im working on making the interface send queue mpsafe. > > part of that involced deprecating the IFQ_POLL api because it allows the > caller to get a reference an mbuf that is still on the send queue. this is > dangerous if another cpu tries to

Re: wi(4) hostap vs if_enqueue

2015-11-03 Thread Martin Pieuchot
On 04/11/15(Wed) 10:29, David Gwynne wrote: > if_wi_hostap.c basically inlines what if_enqueue does, but badly. > > more specifically, it uses IF_FOO operations to manipulate the > interfaces send queue, but they only work if you're using priq. if > you have hfsc on the interface it's not going

Re: replace ifqueues in net80211 with mbuf_queus

2015-11-03 Thread Martin Pieuchot
On 04/11/15(Wed) 10:44, David Gwynne wrote: > ive sent this to a couple of people before, but that was before i > added mq_purge and ml_purge. > > it uses mbuf_queues in the net80211 stack instead of ifqueues. this > means we shrink memory usage slightly, and get some locking. > > could someone

IPsec: AES-GCM with PCLMUL if no AESNI

2015-11-03 Thread Christian Weisgerber
There are two parts to accelerating AES-GCM with special instructions on amd64: AESNI for AES and PCLMUL for GMAC. Currently we link those: If a machine has AESNI, use AESNI and PCLMUL, otherwise do everything in software. For the last few years, all low-end Intel CPUs (Celeron, Pentium G, i3)

ftp.1: "dir |more" example not working as intended

2015-11-03 Thread Frederic Nowak
Hi there, I think the "dir |more" example in ftp.1 is not working as intended. ls (and by extension its synonym dir) expects to be called like this: ls [remote-directory [local-file]] Therefore, "dir |more" would print the contents of a remote directory called "|more", which usually doesn't