Re: calloc -> malloc in get_data() and get_string()

2015-10-28 Thread Ted Unangst
Joerg Jung wrote: > > > > Am 28.10.2015 um 17:05 schrieb Michael McConville : > > > > Relayd, httpd, and ntpd define the functions get_data() and > > get_string(). Both call calloc and then immediately memcpy. Calloc's > > zeroing isn't optimized out. These functions are called in network data >

Re: calloc -> malloc in get_data() and get_string()

2015-10-28 Thread Michael McConville
Joerg Jung wrote: > > > > Michael McConville wrote: > > > > Relayd, httpd, and ntpd define the functions get_data() and > > get_string(). Both call calloc and then immediately memcpy. Calloc's > > zeroing isn't optimized out. These functions are called in network data > > paths in at least a coup

Re: preparing pfi_kif to MP world

2015-10-28 Thread Mike Belopuhov
On 28 October 2015 at 18:41, Alexandr Nedvedicky wrote: > Hello Mike, > > just a quick question: > > are you going to commit your pfi_kif_find() et. al.? > or more work is needed there? > I need OKs > thanks a lot > regards > sasha > >> >> Turns out this is a rather simple issue

cron: get rid of strcmp_until

2015-10-28 Thread Todd C. Miller
It was only used in env_set(). I've also removed the useless FACILITY define and fixed a sizeof(). - todd Index: usr.sbin/cron/env.c === RCS file: /cvs/src/usr.sbin/cron/env.c,v retrieving revision 1.29 diff -u -p -u -r1.29 env.c -

Re: boot from softraid, backspace in passphrase prompt

2015-10-28 Thread Theo de Raadt
> Theo de Raadt wrote: > > Since people are typing blind, can you add support for ^U as well? > > > > > I want correct typing mistakes when booting from softraid crypto disks. > > > Can we handle at least the backspace key, plz^Hease? :) > > Yes, and yes. ^U should be 0x15 and we'll just hope the

Re: boot from softraid, backspace in passphrase prompt

2015-10-28 Thread Ted Unangst
Theo de Raadt wrote: > Since people are typing blind, can you add support for ^U as well? > > > I want correct typing mistakes when booting from softraid crypto disks. > > Can we handle at least the backspace key, plz^Hease? :) Yes, and yes. ^U should be 0x15 and we'll just hope the terminal work

Re: [PATCH] Add a simple roundrobin load balancing feature to rebound(8)

2015-10-28 Thread Ted Unangst
Dimitris Papastamos wrote: > Hi, > > I thought it would be cool for rebound(8) to load balance on a number of > DNS servers. > > While I was working on this, I did not manage to convince myself as to > whether this should be the default behaviour. > > An alternative default would be to use the m

Re: Patch 2/3 - make DIOCRDELADDRS to accept on IP address per ioctl() call

2015-10-28 Thread Alexandr Nedvedicky
Hello, > > Index: sbin/pfctl/pfctl_radix.c > > + io.pfrio_size = 1; > > in 1/3 you have annotated like this > > + io.pfrio_size = 1; /* TODO: check .pfrio_size is needed */ > sorry this has leaked out from my internal repo. The .pfrio_size member will be dropped as soon as I'll be d

Re: Patch 2/3 - make DIOCRDELADDRS to accept on IP address per ioctl() call

2015-10-28 Thread Alexey Suslikov
Alexandr Nedvedicky oracle.com> writes: > Index: sbin/pfctl/pfctl_radix.c > + io.pfrio_size = 1; in 1/3 you have annotated like this + io.pfrio_size = 1; /* TODO: check .pfrio_size is needed */ you either don't need similar comment here, or...? > Index: sbin/pfctl/pfctl_radix.c

Re: pledge(2) and spamd(8)

2015-10-28 Thread Theo de Raadt
> Also, I wonder what the point of having a sanity check against > kern.maxfiles at all is, especially with the arbitrary-feeling > additional rule of "maxcon may not exceed kern.maxfiles - 200". It feels > redundant to me, and it sort of makes a promise of protection it can't > uphold. That code

Re: preparing pfi_kif to MP world

2015-10-28 Thread Alexandr Nedvedicky
Hello Mike, just a quick question: are you going to commit your pfi_kif_find() et. al.? or more work is needed there? thanks a lot regards sasha > > Turns out this is a rather simple issue that got slightly > complicated by the code diverging quite a bit since the > inception.

Re: pledge(2) and spamd(8)

2015-10-28 Thread Benny Lofgren
On 2015-10-28 17:47, Theo de Raadt wrote: >> I was just trying to pledge(2) spamd(8), nevertheless came across 2 >> priviliges kern_pledge.c is missing for this to work. >> >> First spamd(8) needs to read sysctl kern.maxfiles in order to see if it >> can launch with that value or not, and second

Patch 1/3 - make DIOCRADDADDRS to accept on IP address per ioctl() call

2015-10-28 Thread Alexandr Nedvedicky
Hello, this is the first patch in series of three. All patches modify PF radix table API such the ioctl() functions accept one IP address per call. The idea has been proposed by Claudio at Varazdin. I still have to untangle pfr_commit_ktable() and DIOCRSETADDRS ioctl. Both seem to be more compli

Patch 3/3 - update userland to reflect DIOCRADDADDRS/DIOCRDELADDRS changes

2015-10-28 Thread Alexandr Nedvedicky
Hello, this is the third patch in the first PF radix changes batch. Patch requires earlier patches to be in place, otherwise compilation will fail. Patch updates various user land tools by new PF radix table changes: s/DIOCRADDADDRS/DIOCRADDADDR s/DIOCRDELADDRS/DIOCRDELADDR it's also

Patch 2/3 - make DIOCRDELADDRS to accept on IP address per ioctl() call

2015-10-28 Thread Alexandr Nedvedicky
Hello, this is the second patch in 3-patch series. Patch changes DIOCRDELADDRS ioctl to DIOCRDELADDR, which accepts one IP address only per ioctl(2) call. Patch updates kernel and pfctl(8) only. Other components, which happen to use DIOCRDELADDRS will be updated by extra patch. thanks and regar

patch saves some cycles by extending pfr_walktree() a bit

2015-10-28 Thread Alexandr Nedvedicky
Hello, This is yet another patch, which 'scratches surface', this time in pf_table.c. As briefly discussed in Varazdin the plan is to clean up pf_table.c a bit, to make implementation of reference handling and further MP stuff bit easier. I've noticed sub-optimal implementation table entries at t

Re: calloc -> malloc in get_data() and get_string()

2015-10-28 Thread Joerg Jung
> Am 28.10.2015 um 17:05 schrieb Michael McConville : > > Relayd, httpd, and ntpd define the functions get_data() and > get_string(). Both call calloc and then immediately memcpy. Calloc's > zeroing isn't optimized out. These functions are called in network data > paths in at least a couple plac

Re: pledge(2) and spamd(8)

2015-10-28 Thread Theo de Raadt
> I was just trying to pledge(2) spamd(8), nevertheless came across 2 > priviliges kern_pledge.c is missing for this to work. > > First spamd(8) needs to read sysctl kern.maxfiles in order to see if it > can launch with that value or not, and second if the multicast options > are passed as param

pledge(2) and spamd(8)

2015-10-28 Thread Ricardo Mestre
Hi I was just trying to pledge(2) spamd(8), nevertheless came across 2 priviliges kern_pledge.c is missing for this to work. First spamd(8) needs to read sysctl kern.maxfiles in order to see if it can launch with that value or not, and second if the multicast options are passed as parameters

calloc -> malloc in get_data() and get_string()

2015-10-28 Thread Michael McConville
Relayd, httpd, and ntpd define the functions get_data() and get_string(). Both call calloc and then immediately memcpy. Calloc's zeroing isn't optimized out. These functions are called in network data paths in at least a couple places, so all this extra writing could have a meaningful performance i

Re: [PATCH] Use rbtree for looking up the client in rebound(8)

2015-10-28 Thread Dimitris Papastamos
On Tue, Oct 27, 2015 at 05:20:31PM -0400, Ted Unangst wrote: > Dimitris Papastamos wrote: > > There was a comment in the code that indicated that it might be worth > > investigating the use of trees. I have not currently done any kind of > > serious benchmarking on this but I am looking into it. >

[PATCH] Add a simple roundrobin load balancing feature to rebound(8)

2015-10-28 Thread Dimitris Papastamos
Hi, I thought it would be cool for rebound(8) to load balance on a number of DNS servers. While I was working on this, I did not manage to convince myself as to whether this should be the default behaviour. An alternative default would be to use the master server provided. If requests started t

Re: boot from softraid, backspace in passphrase prompt

2015-10-28 Thread Theo de Raadt
Since people are typing blind, can you add support for ^U as well? > I want correct typing mistakes when booting from softraid crypto disks. > Can we handle at least the backspace key, plz^Hease? :) > > diff --git sys/arch/amd64/stand/libsa/softraid.c > sys/arch/amd64/stand/libsa/softraid.c > in

boot from softraid, backspace in passphrase prompt

2015-10-28 Thread Uwe Stuehler
I want correct typing mistakes when booting from softraid crypto disks. Can we handle at least the backspace key, plz^Hease? :) diff --git sys/arch/amd64/stand/libsa/softraid.c sys/arch/amd64/stand/libsa/softraid.c index 336865a..801cec4 100644 --- sys/arch/amd64/stand/libsa/softraid.c +++ sys/ar

Re: (patch) tcpdump cleanup stats format

2015-10-28 Thread Jérémie Courrèges-Anglas
Kevin Reay writes: > Correct printf format for received/dropped packet counts in cleanup(). Committed, thanks. > ps_recv and ps_drop (struct pcap_stat) are both type u_int. > Index: tcpdump.c > === > RCS file: /cvs/src/usr.sbin/tcp

Re: WAPBL implementation

2015-10-28 Thread Walter Neto
On Wed, Oct 28, 2015 at 12:50:24PM +0100, Jasper Lievisse Adriaanse wrote: > On Wed, Oct 28, 2015 at 09:06:54AM -0200, Walter Neto wrote: > > Adding WAPBL support for dumpfs(8) > > > > next diffs: > > - tunefs(8) showing log information and setting log size > > - fsck_ffs(8) WAPBL support > > > >

Re: WAPBL implementation

2015-10-28 Thread Jasper Lievisse Adriaanse
On Wed, Oct 28, 2015 at 09:06:54AM -0200, Walter Neto wrote: > Adding WAPBL support for dumpfs(8) > > next diffs: > - tunefs(8) showing log information and setting log size > - fsck_ffs(8) WAPBL support > > ok jasper@ Correction: I only pointed out that we should have the option to somehow get in

Re: ld.so crash second attempt

2015-10-28 Thread Alf Schlichting
On Sun, 25 Oct 2015 11:01:27 +0100, Peter Hajdu wrote: > > [1 ] > Hi, > > 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. Unfortuna

Re: WAPBL implementation

2015-10-28 Thread Walter Neto
Adding WAPBL support for dumpfs(8) next diffs: - tunefs(8) showing log information and setting log size - fsck_ffs(8) WAPBL support ok jasper@ Index: sbin/dumpfs/dumpfs.c === RCS file: /Volumes/CSP/cvs/src/sbin/dumpfs/dumpfs.c,v re

Re: pidfile()

2015-10-28 Thread Jason McIntyre
On Tue, Oct 27, 2015 at 02:28:51PM +0100, Jan Stary wrote: > > usr.sbin/rbootd: rbootd.c > > usr.sbin/rarpd : rarpd.c > > usr.sbin/mrouted: main.c > > usr.bin/usbhidaction: usbhidaction.c > > usr.sbin/wsmoused: wsmoused.8 wsmoused.c wsmoused.h > > usr.sbin/ypserv/ypserv

Re: top crash - pledge issue?

2015-10-28 Thread Ricardo Mestre
Hi, Revision 1.81 from kern_pledge.c still doesn't solve the issue, miblen should be changed to 2 since machine.c from top(1) code is: 268 } else { 269 int cp_time_mib[] = {CTL_KERN, KERN_CPTIME}; 270 long cp_time_tmp[CPUSTATES]; 271 272 size = sizeof(cp_time_tmp);