Re: weak symbols

2015-04-08 Thread Philip Guenther
On Tue, 7 Apr 2015, Martijn van Duren wrote: $ nm -e ./a.out ... W __cxa_atexit - _dl_searchnum ... 0c90 W __register_frame_info - (null) ... 0dd4 W pthread_create - __got_end 0dfd W pthread_mutex_init - __data_start 0e10 W pthread_mutex_lock - exit

Re: weak symbols

2015-04-08 Thread Mark Kettenis
Date: Tue, 7 Apr 2015 23:14:51 -0700 From: Philip Guenther guent...@gmail.com On Tue, 7 Apr 2015, Martijn van Duren wrote: $ nm -e ./a.out ... W __cxa_atexit - _dl_searchnum ... 0c90 W __register_frame_info - (null) ... 0dd4 W pthread_create - __got_end

Re: [PATCH] bsd.port.mk - make relation between GH_TAGNAME GH_COMMIT more apparent (prevent actual bug regression)

2015-04-08 Thread Stuart Henderson
On 2015/04/06 11:59, Dmitrij D. Czarkoff wrote: Stuart Henderson said: I think we should remove the existing ones and make it an error to specify both GH_TAGNAME and GH_COMMIT. Thoughts? If people think this is a good idea I'll do the ports mop-up. I'd rather see a warning saying that

Re: falloc and related stuff

2015-04-08 Thread kanonenvogel....@gmail.com
On 08 Apr 2015, at 02:31, Philip Guenther guent...@gmail.com wrote: On Tue, Apr 7, 2015 at 3:57 PM, Kanonenvogel kanonenvogel@gmail.com wrote: I have idea to modify falloc() function and related logic. Now, after successful faclloc call, we have half-initialized struct file object,

Re: bce(4), lge(4), nge(4), vge(4), wb(4), malo(4) and hme(4/sparc)

2015-04-08 Thread Martin Pieuchot
On 08/04/15(Wed) 10:03, David Gwynne wrote: On 8 Apr 2015, at 01:38, Martin Pieuchot m...@openbsd.org wrote: Here's a diff to convert these drivers to if_input(). They all make use of m_devget(9) which takes an ifp as argument and I'd like to change that. But first I need to make

rename gettdbbyaddr to gettdbbydst

2015-04-08 Thread Mike Belopuhov
OK to rename gettdbbyaddr to gettdbbydst since that's what it does and it aligns well with gettdbbysrc? --- sys/netinet/ip_ipsp.c | 47 +-- sys/netinet/ip_ipsp.h | 4 ++-- sys/netinet/ip_spd.c | 6 +++--- 3 files changed, 30 insertions(+), 27

gettdb* functions do not need mbuf and af arguments

2015-04-08 Thread Mike Belopuhov
OK to remove unused arguments? --- sys/netinet/ip_ipsp.c | 7 +++ sys/netinet/ip_ipsp.h | 7 +++ sys/netinet/ip_spd.c | 13 ++--- 3 files changed, 12 insertions(+), 15 deletions(-) diff --git sys/netinet/ip_ipsp.c sys/netinet/ip_ipsp.c index c6864e8..f6e598f 100644 ---

use tdb_flow for IP_IPSECFLOWINFO

2015-04-08 Thread Mike Belopuhov
Convert IP_IPSECFLOWINFO to use tdb flow id instead of an SPI. Tested with npppd and Windows NAT-T clients. OK? --- sys/netinet/ip_spd.c | 49 +++- sys/netinet/udp_usrreq.c | 2 +- 2 files changed, 29 insertions(+), 22 deletions(-) diff --git

Re: falloc and related stuff

2015-04-08 Thread Ted Unangst
kanonenvogel@gmail.com wrote: On 08 Apr 2015, at 02:31, Philip Guenther guent...@gmail.com wrote: On Tue, Apr 7, 2015 at 3:57 PM, Kanonenvogel kanonenvogel@gmail.com wrote: I have idea to modify falloc() function and related logic. Now, after successful faclloc call, we have

introduce tdb flows and tdb flow hash

2015-04-08 Thread Mike Belopuhov
Each tdb (SA) bundle will receive a flow identificator that will be reassigned to the newly established SAs upon rekeying. Later this will be passed as IP_IPSECFLOWINFO control message to userland. Discussed with with Markus and Bret Lambert. OK? --- sys/netinet/ip_ipsp.c | 101

Re: rename gettdbbyaddr to gettdbbydst

2015-04-08 Thread Mike Belopuhov
On 8 April 2015 at 12:46, Martin Pieuchot m...@openbsd.org wrote: On 08/04/15(Wed) 12:15, Mike Belopuhov wrote: OK to rename gettdbbyaddr to gettdbbydst since that's what it does and it aligns well with gettdbbysrc? Makes sense to me. This is also coherent to the comments in ip_ipsp.h. One

Re: bce(4), lge(4), nge(4), vge(4), wb(4), malo(4) and hme(4/sparc)

2015-04-08 Thread David Gwynne
On 8 Apr 2015, at 8:09 pm, Martin Pieuchot m...@openbsd.org wrote: On 08/04/15(Wed) 10:03, David Gwynne wrote: On 8 Apr 2015, at 01:38, Martin Pieuchot m...@openbsd.org wrote: Here's a diff to convert these drivers to if_input(). They all make use of m_devget(9) which takes an ifp as

make filter match optional in ipsp_aux_match

2015-04-08 Thread Mike Belopuhov
Since all other arguments are optional I don't see why filter is special. OK? --- sys/netinet/ip_ipsp.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git sys/netinet/ip_ipsp.c sys/netinet/ip_ipsp.c index edeabc8..184c28f 100644 --- sys/netinet/ip_ipsp.c +++

perform bypass check before ipsecflowinfo

2015-04-08 Thread Mike Belopuhov
It's better to perform the socket bypass check before we start dealing with SAs. OK? --- sys/netinet/ip_spd.c | 23 --- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git sys/netinet/ip_spd.c sys/netinet/ip_spd.c index 81e22da..e4b858c 100644 ---

Re: rename gettdbbyaddr to gettdbbydst

2015-04-08 Thread Martin Pieuchot
On 08/04/15(Wed) 12:15, Mike Belopuhov wrote: OK to rename gettdbbyaddr to gettdbbydst since that's what it does and it aligns well with gettdbbysrc? Makes sense to me. This is also coherent to the comments in ip_ipsp.h. One comment though, you're moving a splsoftnet() in tdb_delete() but it

print 802.11h chan switch announcements

2015-04-08 Thread Stuart Henderson
This teaches tcpdump to print the channel switch announcements used for DFS and Ruckus ChannelFly, described in 7.3.2.20 in 802.11h-2003. I think the noTX is used for radar-detected DFS where you want everybody to shut up quickly, I don't have a good way to trigger that ;) I considered hiding

prevent busy loop in rnd.c

2015-04-08 Thread Martin Natano
Due to an involuntary integer overflow, the randomread() and randomwrite() functions can be tricked into entering an endless loop. That loop can be triggered by performing a read() of UINT_MAX + 1 bytes from /dev/random on a platform where sizeof(size_t) sizeof(u_int). This holds true for e.g.

Re: falloc and related stuff

2015-04-08 Thread kanonenvogel . 87g
On 08 Apr 2015, at 17:33, kanonenvogel@gmail.com wrote: Is it a good idea? bad idea because of sys_pread

Re: falloc and related stuff

2015-04-08 Thread kanonenvogel....@gmail.com
On 08 Apr 2015, at 17:33, kanonenvogel@gmail.com wrote: Is it a good idea? bad idea because of sys_pread/sys_pwrite

Re: unused argument in pfr_create_kentry()

2015-04-08 Thread Mike Belopuhov
On 30 September 2014 at 18:03, Alexandr Nedvedicky alexandr.nedvedi...@oracle.com wrote: Hello, while working with PF code we've found the arg1 (flags) of pfr_create_kentry() is unused. the patch is trivial, just in case you are interested. regards sasha committed, thanks.

Re: pfi_kif leaks for PBR rules

2015-04-08 Thread Mike Belopuhov
On Sun, Apr 05, 2015 at 12:06 +0200, Alexandr Nedvedicky wrote: Hello, while testing PBR on Solaris we found out the pfi_kif instances are not removed from pfi_ifs table. We took a look at crashdump and have seen pfik_route counter at those object is still non-zero, while all rules were

Re: falloc and related stuff

2015-04-08 Thread kanonenvogel....@gmail.com
On 08 Apr 2015, at 15:03, Ted Unangst t...@tedunangst.com wrote: The atomic functions are quite expensive on some architectures, so we don't want to just use them everywhere. So, rwlock is better here? Also, can you explain this lines from finishdup() function (openbsd-5., file

m_devget(9), m_clget(9) and ifp

2015-04-08 Thread Martin Pieuchot
Now that all the drivers using m_devget(9) have been converted to if_input() we no longer need to pass an interface pointer to set `rcvif'. This is a small step towards the removal of an interface pointer in the mbuf header. While here, m_clget(9) also no longer needs an ifp. Ok? Index:

Re: copy'n'paste like typo in pf.c

2015-04-08 Thread Mike Belopuhov
On 5 April 2015 at 15:14, Florian Obser flor...@openbsd.org wrote: On Sun, Apr 05, 2015 at 11:48:21AM +0200, Alexandr Nedvedicky wrote: Hello, when we ran PF sources through coverity we got an error as follows: 8310 if (ri-r-dst.addr.type == PF_ADDR_TABLE) 8311

Re: falloc and related stuff

2015-04-08 Thread kanonenvogel....@gmail.com
On 08 Apr 2015, at 15:03, Ted Unangst t...@tedunangst.com wrote: Also, this only helps if you're sure that the code reading the flag will do so in an smp safe way. In many cases, the reading code will also need to acquire a lock in order to correctly do something after reading the flag. From

Re: add m_defrag to pcn driver

2015-04-08 Thread Stefan Fritsch
On Wednesday 08 April 2015 09:48:14, David Gwynne wrote: +continue; +} Other drivers don't dequeue mbufs in out of mem situations. I think you should just set IFF_OACTIVE and break out of the for loop (not shown in the diff). The old code just

Re: prevent busy loop in rnd.c

2015-04-08 Thread Todd C. Miller
Your diff looks correct, though I don't think the explicit casts are needed since the prototypes are in scope. Perhaps it quiets a warning with some compiler flags? There's a scary number of instances of min(foo, uio-uio_resid) in the kernel that should probably be fixed as well. - todd

Re: prevent busy loop in rnd.c

2015-04-08 Thread Martin Natano
Your diff looks correct, though I don't think the explicit casts are needed since the prototypes are in scope. Perhaps it quiets a warning with some compiler flags? The casts are not strictly necessary and you are correct about the warnings; both gcc (I believe since version 4.3 with the

Re: autoinstall(8) tweaks

2015-04-08 Thread Stuart Henderson
Our autolabel sizes seem mostly based around desktop-type machines (though /usr/local is a bit too small these days, /usr/X11R6 acceptable but seems stingy, and there are probably equal numbers of those who would quite like to have /usr/ports and those who really wouldn't want to waste the space).

Re: libressl-2.1.6 on AIX

2015-04-08 Thread Brent Cook
Thanks Michael, I have incorporated some initial AIX patches - can you please check out the latest tree? https://github.com/libressl-portable/portable/commit/fe3f7fc6365bfaac3418a72256b8c11603e80cbf https://github.com/libressl-portable/openbsd/commit/37d8e3c080e7c73158093f253d8e06fa1906dc03

fix for re(4) with 7k jumbos

2015-04-08 Thread Jim Smith
hello, below is a diff to fix a regression on re chips which have 7k jumbo support (RL_JUMBO_MTU_7K) as reported by daniel jakots and emilio perea. the regression was caused because RL_JUMBO_FRAMELEN was changed to 9k and i missed fixing up the RL_JUMBO_MTU_7K macro. Index: rtl81x9reg.h

Re: autoinstall(8) tweaks

2015-04-08 Thread Stuart Henderson
On 2015/04/09 01:53, Alexander Hall wrote: On April 8, 2015 9:13:27 AM GMT+02:00, Stuart Henderson st...@openbsd.org wrote: On 2015/04/07 20:02, Alex Wilson wrote: On the topic of local tweaks to autoinstall, I was trying to use it for a bunch of blades with very limited disk the other

Re: autoinstall(8) tweaks

2015-04-08 Thread Theo de Raadt
On 2015/04/09 01:53, Alexander Hall wrote: On April 8, 2015 9:13:27 AM GMT+02:00, Stuart Henderson st...@openbsd.org wrote: On 2015/04/07 20:02, Alex Wilson wrote: On the topic of local tweaks to autoinstall, I was trying to use it for a bunch of blades with very limited disk the

Re: autoinstall(8) tweaks

2015-04-08 Thread Theo de Raadt
Our autolabel sizes seem mostly based around desktop-type machines (though /usr/local is a bit too small these days, /usr/X11R6 acceptable but seems stingy, and there are probably equal numbers of those who would quite like to have /usr/ports and those who really wouldn't want to waste the

Re: autoinstall(8) tweaks

2015-04-08 Thread Alexander Hall
On April 8, 2015 9:13:27 AM GMT+02:00, Stuart Henderson st...@openbsd.org wrote: On 2015/04/07 20:02, Alex Wilson wrote: On the topic of local tweaks to autoinstall, I was trying to use it for a bunch of blades with very limited disk the other day, and I really wanted to make them just create

Re: print 802.11h chan switch announcements

2015-04-08 Thread Stefan Sperling
On Wed, Apr 08, 2015 at 01:01:51PM +0100, Stuart Henderson wrote: This teaches tcpdump to print the channel switch announcements used for DFS and Ruckus ChannelFly, described in 7.3.2.20 in 802.11h-2003. I think the noTX is used for radar-detected DFS where you want everybody to shut up

libressl-2.1.6 on AIX

2015-04-08 Thread Michael Felt
I applied the patch I had sent in before, made one change (correction) - correcting a typo that brent had pointed out (netinfo that needs to be diskinfo) in the getentrophy_aix.c If you need the patch again, I can send it again. I am curious about whether this is moving forward - and if there is