Re: axphy(4): new dumb driver for axe(4) phys

2015-10-23 Thread Paul Irofti
On 23.10.2015 02:44, Jonathan Gray wrote: What does this do that ukphy doesn't? I don't see any errata or special handling here. First I added a custom reset function, but it turned out the problem was elsewhere. So the current driver is just pretty printf'ing the model and the phy. And

Re: does anoybody use ul?

2015-10-23 Thread Nicholas Marriott
Well, it does work: printf 'A\bA_\bB'|ul I still think it is not useful, I say kill it. On Fri, Oct 23, 2015 at 03:47:56AM -0400, Ted Unangst wrote: > ul appears somewhat useless for its intended purpose. > > echo _xxx_ | ul does not result in underlined text in an xterm, so I doubt > many

Re: axphy(4): new dumb driver for axe(4) phys

2015-10-23 Thread Theo de Raadt
> First I added a custom reset function, but it turned out the problem was > elsewhere. So the current driver is just pretty printf'ing the model and > the phy. > > And you're right, it's not worth getting this in tree so forget about > this diff. correct. ukphy is named a bit strangely.

Re: does anoybody use ul?

2015-10-23 Thread Ted Unangst
Nicholas Marriott wrote: > Well, it does work: > > printf 'A\bA_\bB'|ul > > I still think it is not useful, I say kill it. Oh! Is that how you use it? The man page doesn't explain, apparently expecting that everybody just knows there's only one true way to mark up text.

Re: does anoybody use ul?

2015-10-23 Thread Alessandro DE LAURENZIS
Hi Ted, On Fri 23/10/2015 03:47, Ted Unangst wrote: > ul appears somewhat useless for its intended purpose. > > echo _xxx_ | ul does not result in underlined text in an xterm, so I doubt > many people are using this. [...] I don't use it anymore, but some time ago I needed to quickly highlight

Re: does anoybody use ul?

2015-10-23 Thread Stuart Henderson
On 2015/10/23 11:52, Ingo Schwarze wrote: > I didn't use it so far, but now that you made me look at it, i'm > likely to start using it almost daily. I often felt unhappy that > my gmdiff tool (for comparing groff and mandoc output) does not > show bold and underline fonts and i always had to

Re: does anoybody use ul?

2015-10-23 Thread Ted Unangst
Stefan Sperling wrote: > On Fri, Oct 23, 2015 at 05:50:53AM -0400, Ted Unangst wrote: > > well, it doesn't work with utf-8 because it tries to underline only half the > > character. i'm aiming for the "quick fix"... > > Why not at least try a kind of better fix to see how it would work? Is this

Re: connect routing domains on layer 2

2015-10-23 Thread Reyk Floeter
On Fri, Oct 23, 2015 at 01:54:36PM +0200, Martin Pieuchot wrote: > On 23/10/15(Fri) 13:21, David Gwynne wrote: > > > > > On 23 Oct 2015, at 09:00, Reyk Floeter wrote: > > > > > > Hi, > > > > > > this diff allows to interconnect routing domains. > > > > > > It is very useful

Re: WAPBL implementation

2015-10-23 Thread Joerg Jung
On Fri, Oct 23, 2015 at 01:19:15PM -0200, Walter Neto wrote: > Like recommended from other developers I started developing WAPBL support for > OpenBSD. > > Looking at NetBSD and Bitrig I mage a first funcional patch. Wow... that is a big diff :) Care to elaborate in some more words what

Re: does anoybody use ul?

2015-10-23 Thread Christian Weisgerber
Ted Unangst: > > mandoc /usr/share/man/man1/ksh.1 | sed -n 1185,1190p | ul > > so that works with the diff below. i'm not sure how far down this road we need > to travel, but i figure it's worth a little exploration. That works so far. Next problem: tabs. (I think it's reasonable to ignore

Re: utf8 hack for ls

2015-10-23 Thread Christian Weisgerber
On 2015-10-23, "Ted Unangst" wrote: >> To what degree should tools like ls protect terminals from escape codes? > > I think this is beyond the scope of what ls should care about. du doesn't have > such a check. Does the shell perform a check before tab completing? Our ksh,

pair(4) (was: connect routing domains on layer 2)

2015-10-23 Thread Reyk Floeter
Hi, as requested by Theo and discussed with many, the following diff moves it into a new driver. This also allowed to improve the logic of link states related to the connection (as discussed with Claudio). The new driver is called pair(4). # ifconfig pair1 rdomain 1 10.1.1.1/24 up

syslogd delayed tty write event

2015-10-23 Thread Alexander Bluhm
Hi, If writing to a tty blocks, syslogd forks and tries to write again in a background process. A potential fork(2) at every message is bad, so replace this with an event. As a bonus the syslogd child process does not need to pledge "proc" anymore. Also limit the number of delayed write

Interface indexes & route entries

2015-10-23 Thread Martin Pieuchot
This diff adds a small define to be able to convert code dereferencing "rt_ifp" to if_get()+if_put(). This will allows us to guarantee that ``ifp'' got from route entries are used with a proper reference count. If the direction is ok I'll commit the .h. I also accept reviews on the chunks

Re: does anoybody use ul?

2015-10-23 Thread Ted Unangst
Christian Weisgerber wrote: > On 2015-10-23, "Ted Unangst" wrote: > > > ul appears somewhat useless for its intended purpose. > > mandoc /usr/share/man/man1/ls.1 | ul > > Works fine. Of course that functionality has been incorporated > into more/less decades ago. > > >

Re: does anoybody use ul?

2015-10-23 Thread Ingo Schwarze
Hi Ted, Ted Unangst wrote on Fri, Oct 23, 2015 at 03:47:56AM -0400: > ul appears somewhat useless for its intended purpose. > > echo _xxx_ | ul does not result in underlined text in an xterm, > so I doubt many people are using this. > > Unlike, say, mandoc, it can't output Greek letters. > I

Re: CVS: cvs.openbsd.org: src

2015-10-23 Thread Joerg Jung
On Wed, Sep 30, 2015 at 06:07:54PM +0200, Joerg Jung wrote: > On Wed, Sep 30, 2015 at 05:13:31PM +0200, Martijn van Duren wrote: > > On 09/30/15 14:15, Joerg Jung wrote: > > > Thanks! Although it does add about 5-10 seconds to my boot-time, waiting > > primarily for the temperature sensors. > >

Re: utf8 in rs

2015-10-23 Thread Christian Weisgerber
Ted Unangst: > I'm very scared to try counting chars vs bytes upfront in such code. However, > the code that prints spaces to pad the output is much simpler. I think that's insufficient to cover rs's functionality. -z will overestimate the required widths and... yes, -j is completely broken.

Re: towards mpsafe rtfree(9)

2015-10-23 Thread Alexander Bluhm
On Fri, Oct 23, 2015 at 02:41:34PM +0200, Martin Pieuchot wrote: > On 22/10/15(Thu) 19:42, Martin Pieuchot wrote: > > Now that we have a single refcounting mechanism for route entries, I'd > > like to use atomic operations and grab the KERNEL_LOCK only if a CPU is > > dropping the last reference

Re: utf8 hack for ls

2015-10-23 Thread Peter Hessler
As a different approach to ls, I wrote this a while ago. This uses the wchar_t functions, but only in putname(). On 2015 Oct 23 (Fri) at 08:42:52 -0400 (-0400), Ted Unangst wrote: :So, third diff to ponder as we evaluate this approach. This one also uses a :u8len() function to help get the

Re: utf8 hack for ls

2015-10-23 Thread Stefan Sperling
On Fri, Oct 23, 2015 at 08:42:52AM -0400, Ted Unangst wrote: > So, third diff to ponder as we evaluate this approach. This one also uses a > u8len() function to help get the column widths correct. > > (Still not dealing with combining or otherwise not 1 width glyphs.) > > Index: ls.c >

Re: utf8 hack for ls

2015-10-23 Thread Nicholas Marriott
Hi This doesn't account for UTF-8 double width characters, so they will still throw the column widths off? On Fri, Oct 23, 2015 at 08:42:52AM -0400, Ted Unangst wrote: > So, third diff to ponder as we evaluate this approach. This one also uses a > u8len() function to help get the column widths

utf8 hack for ls

2015-10-23 Thread Ted Unangst
So, third diff to ponder as we evaluate this approach. This one also uses a u8len() function to help get the column widths correct. (Still not dealing with combining or otherwise not 1 width glyphs.) Index: ls.c === RCS file:

rt_ifp is never NULL

2015-10-23 Thread Martin Pieuchot
ok? Index: netinet/in_pcb.c === RCS file: /cvs/src/sys/netinet/in_pcb.c,v retrieving revision 1.185 diff -u -p -r1.185 in_pcb.c --- netinet/in_pcb.c20 Oct 2015 18:04:03 - 1.185 +++ netinet/in_pcb.c23 Oct 2015

Re: utf8 hack for ls

2015-10-23 Thread Ted Unangst
Nicholas Marriott wrote: > Hi > > This doesn't account for UTF-8 double width characters, so they will > still throw the column widths off? right. maybe we will steal some code from tmux for that :). but getting u8len() into the right places is the first step. i don't think we want a isu8cont()

Re: utf8 hack for ls

2015-10-23 Thread Stefan Sperling
On Fri, Oct 23, 2015 at 02:52:13PM +0200, Peter Hessler wrote: > As a different approach to ls, I wrote this a while ago. This uses the > wchar_t functions, but only in putname(). That's like the colorls port does it. I'm not sure if that's the best answer either, this diff would already be in

Re: utf8 hack for ls

2015-10-23 Thread Ted Unangst
Stefan Sperling wrote: > This removes the isprint() check entirely. Do we really want that? > > To what degree should tools like ls protect terminals from escape codes? I think this is beyond the scope of what ls should care about. du doesn't have such a check. Does the shell perform a check

Re: utf8 hack for ls

2015-10-23 Thread Ted Unangst
Peter Hessler wrote: > As a different approach to ls, I wrote this a while ago. This uses the > wchar_t functions, but only in putname(). This will correct the alignment of columns, but if you have a filename like pöp the columns will be super wide instead of nicely

Re: does anoybody use ul?

2015-10-23 Thread Christian Weisgerber
Ted Unangst: > --- ul.c 10 Oct 2015 16:15:03 - 1.19 > +++ ul.c 23 Oct 2015 10:29:43 - > @@ -241,6 +241,8 @@ mfilter(FILE *f) > obuf[col].c_mode |= BOLD|mode; > else > obuf[col].c_mode = mode; > + if ((c &

Re: does anoybody use ul?

2015-10-23 Thread Ted Unangst
Christian Weisgerber wrote: > Ted Unangst: > > > --- ul.c10 Oct 2015 16:15:03 - 1.19 > > +++ ul.c23 Oct 2015 10:29:43 - > > @@ -241,6 +241,8 @@ mfilter(FILE *f) > > obuf[col].c_mode |= BOLD|mode; > > else > >

Re: towards mpsafe rtfree(9)

2015-10-23 Thread Martin Pieuchot
On 22/10/15(Thu) 19:42, Martin Pieuchot wrote: > Now that we have a single refcounting mechanism for route entries, I'd > like to use atomic operations and grab the KERNEL_LOCK only if a CPU is > dropping the last reference on an entry. > > Currently this only matters for MPLS. I intentionally

Further cleanup of Russian calendars

2015-10-23 Thread Vadim Zhukov
Further cleanup in Russian calendars: * Fix #ifndef safeguards (rename/add where missing); * Use consistent spelling for year when it's mentioned in day desc; * Tweak some wrong casing cases; * Remove calendar.msk since Moscow doesn't have summer time anymore, and that was the only

Re: connect routing domains on layer 2

2015-10-23 Thread Martin Pieuchot
On 23/10/15(Fri) 13:21, David Gwynne wrote: > > > On 23 Oct 2015, at 09:00, Reyk Floeter wrote: > > > > Hi, > > > > this diff allows to interconnect routing domains. > > > > It is very useful to route traffic from one routing domain to another, > > without using the pf

Re: does anoybody use ul?

2015-10-23 Thread Theo de Raadt
> > From: "Ted Unangst" > > Date: Fri, 23 Oct 2015 03:47:56 -0400 > > > > ul appears somewhat useless for its intended purpose. > > > > echo _xxx_ | ul does not result in underlined text in an xterm, so I doubt > > many people are using this. > > > > Unlike, say, mandoc,

utf8 in rs

2015-10-23 Thread Ted Unangst
rs doesn't print nicely aligned columns with utf-8 inputs. there's a few ways to handle this; here's just one. note that the source is riddled with lots of code like: if (maxlen < p - *ep) /* update maxlen */ maxlen = p - *ep; I'm very scared to try

Re: does anoybody use ul?

2015-10-23 Thread Stefan Sperling
On Fri, Oct 23, 2015 at 06:32:32AM -0400, Ted Unangst wrote: > Stefan Sperling wrote: > > On Fri, Oct 23, 2015 at 05:50:53AM -0400, Ted Unangst wrote: > > > well, it doesn't work with utf-8 because it tries to underline only half > > > the > > > character. i'm aiming for the "quick fix"... > > >

Re: does anoybody use ul?

2015-10-23 Thread Mark Kettenis
> From: "Ted Unangst" > Date: Fri, 23 Oct 2015 03:47:56 -0400 > > ul appears somewhat useless for its intended purpose. > > echo _xxx_ | ul does not result in underlined text in an xterm, so I doubt > many people are using this. > > Unlike, say, mandoc, it can't output

Re: does anoybody use ul?

2015-10-23 Thread Christian Weisgerber
Ted Unangst: > well, it doesn't work with utf-8 because it tries to underline only half the > character. i'm aiming for the "quick fix"... FreeBSD has imported a fix for this, r132858. -- Christian "naddy" Weisgerber na...@mips.inka.de

Re: does anoybody use ul?

2015-10-23 Thread Stefan Sperling
On Fri, Oct 23, 2015 at 05:50:53AM -0400, Ted Unangst wrote: > well, it doesn't work with utf-8 because it tries to underline only half the > character. i'm aiming for the "quick fix"... Why not at least try a kind of better fix to see how it would work?

Re: support for malloc allocation canaries

2015-10-23 Thread Janne Johansson
With this patch on -current and ln -sf CJ /etc/malloc.conf a lot of things stopped working, like "man ls" and "tmux". With only C or only J, the system seems to work ok, but with both it doesn't. Will check the resulting core files. ntpd and tmux both bombed out on memset inside realloc if I read

Re: towards mpsafe rtfree(9)

2015-10-23 Thread Martin Pieuchot
On 22/10/15(Thu) 20:41, Bret Lambert wrote: > On Thu, Oct 22, 2015 at 07:42:24PM +0200, Martin Pieuchot wrote: > > Now that we have a single refcounting mechanism for route entries, I'd > > like to use atomic operations and grab the KERNEL_LOCK only if a CPU is > > dropping the last reference on

Re: does anoybody use ul?

2015-10-23 Thread Christian Weisgerber
On 2015-10-23, "Ted Unangst" wrote: > ul appears somewhat useless for its intended purpose. mandoc /usr/share/man/man1/ls.1 | ul Works fine. Of course that functionality has been incorporated into more/less decades ago. > Will anyone miss it? Probably not, but what's

Re: enhanced use-after-free detection for malloc

2015-10-23 Thread Daniel Micay
Er, here it is without the screwed up whitespace (whoops): diff --git a/stdlib/malloc.c b/stdlib/malloc.c index 424dd77..7c33a7a 100644 --- a/stdlib/malloc.c +++ b/stdlib/malloc.c @@ -182,6 +182,7 @@ struct malloc_readonly { int malloc_freeunmap; /* mprotect free pages

Re: does anoybody use ul?

2015-10-23 Thread Nicholas Marriott
On Fri, Oct 23, 2015 at 05:11:42AM -0400, Ted Unangst wrote: > Nicholas Marriott wrote: > > Well, it does work: > > > > printf 'A\bA_\bB'|ul > > > > I still think it is not useful, I say kill it. > > Oh! Is that how you use it? The man page doesn't explain, apparently expecting > that everybody

Re: does anoybody use ul?

2015-10-23 Thread Ingo Schwarze
Hi Stuart, Stuart Henderson wrote on Fri, Oct 23, 2015 at 11:28:35AM +0100: > On 2015/10/23 11:52, Ingo Schwarze wrote: >> I didn't use it so far, but now that you made me look at it, i'm >> likely to start using it almost daily. I often felt unhappy that >> my gmdiff tool (for comparing groff

Re: catopen/catgets: out of boundary access

2015-10-23 Thread Tobias Stoeckmann
On Fri, Oct 23, 2015 at 09:19:34PM +0200, Stefan Sperling wrote: > Now that this is committed, do you intend to audit the runes code as > well? :-) Hah, yeah that's the next logical step to do. Except you are faster than me, then I would probably okay it. ;)

locate(1): small cleanup

2015-10-23 Thread Michael Reed
- mmap support was recently made the default, but the includes were left unsorted; this diff deals with that - remove optarg & optind declarations as unistd.h already does this - remove `#ifdef sun' block: htohl() isn't used anywhere here, although ntohl() is in util.c (perhaps endian.h

Re: WAPBL implementation

2015-10-23 Thread Janne Johansson
did you miss sys/wapbl.h ? cc ... -D_KERNEL -MD -MP -c ../../../../kern/vfs_bio.c ../../../../kern/vfs_bio.c:59:23: error: sys/wapbl.h: No such file or directory ../../../../kern/vfs_bio.c: In function 'bio_doread': ../../../../kern/vfs_bio.c:358: error: 'struct vnode' has no member named

Re: catopen/catgets: out of boundary access

2015-10-23 Thread Stefan Sperling
On Tue, Oct 06, 2015 at 12:08:42PM +0200, Tobias Stöckmann wrote: > > On October 6, 2015 at 11:40 AM Stefan Sperling wrote: > > What do you think about a similar treatment for locale/rune.c? > > I think you refer to _Read_RuneMagi function, > which lacks the same input

Re: does anoybody use ul?

2015-10-23 Thread Vadim Zhukov
2015-10-23 15:38 GMT+02:00 Ted Unangst : > Christian Weisgerber wrote: >> Ted Unangst: >> >> > --- ul.c10 Oct 2015 16:15:03 - 1.19 >> > +++ ul.c23 Oct 2015 10:29:43 - >> > @@ -241,6 +241,8 @@ mfilter(FILE *f) >> > obuf[col].c_mode |=

Re: utf8 hack for ls

2015-10-23 Thread Nicholas Marriott
Ah right this makes sense to me On Fri, Oct 23, 2015 at 09:13:02AM -0400, Ted Unangst wrote: > Nicholas Marriott wrote: > > Hi > > > > This doesn't account for UTF-8 double width characters, so they will > > still throw the column widths off? > > right. maybe we will steal some code from tmux

WAPBL implementation

2015-10-23 Thread Walter Neto
Like recommended from other developers I started developing WAPBL support for OpenBSD. Looking at NetBSD and Bitrig I mage a first funcional patch. Index: sbin/mount/mntopts.h === RCS file:

Re: connect routing domains on layer 2

2015-10-23 Thread Reyk Floeter
On Fri, Oct 23, 2015 at 01:21:05PM +1000, David Gwynne wrote: > > > On 23 Oct 2015, at 09:00, Reyk Floeter wrote: > > > > Hi, > > > > this diff allows to interconnect routing domains. > > > > It is very useful to route traffic from one routing domain to another, > > without

Re: WAPBL implementation

2015-10-23 Thread Ted Unangst
Walter Neto wrote: > Hi guys, sorry for the inconvenience. > > Once you only have use git at console, cvs is nightmare :( > > But I am learning :) this indeed looks a lot better. although it's quite the diff to review. some brave soul testing of this might be appreciated.

Re: does anoybody use ul?

2015-10-23 Thread Christian Weisgerber
Ingo Schwarze: > - The FreeBSD change with wchar_t (+70 -44 lines) seems >like overkill to me. Wait until you've added double-width characters and correct tab handling, which the FreeBSD code supports. -- Christian "naddy" Weisgerber na...@mips.inka.de

Re: does anoybody use ul?

2015-10-23 Thread Ingo Schwarze
Hi Christian, Christian Weisgerber wrote on Fri, Oct 23, 2015 at 11:26:00PM +0200: > Ingo Schwarze: >> - The FreeBSD change with wchar_t (+70 -44 lines) seems >>like overkill to me. > Wait until you've added double-width characters I tested double-width characters (both bold and

unify errno messages

2015-10-23 Thread Alexander Bluhm
Hi, Before removig nls, I would like to unify all error messages in - include comment - libc comment - nls C - man page The EPROGUNAVAIL change is just beautification. Any objections against that? ok? bluhm Index: sys/sys/errno.h

Re: locate(1): small cleanup

2015-10-23 Thread Michael McConville
Michael Reed wrote: > - mmap support was recently made the default, but the includes were > left unsorted; this diff deals with that > > - remove optarg & optind declarations as unistd.h already does this > > - remove `#ifdef sun' block: htohl() isn't used anywhere here, although > ntohl()

syslogd pledge rpath cacert

2015-10-23 Thread Alexander Bluhm
Hi, When loading the CA certificates at startup fails, the syslogd child tries to load the default CA file when it connects to a TLS server. This always fails, as the child is chrooted to /var/empty. Set the CA storage to an empty string, to remove the pledge "rpath". ok? bluhm Index:

Re: does anoybody use ul?

2015-10-23 Thread Vadim Zhukov
2015-10-23 23:00 GMT+02:00 Ingo Schwarze : > Hi Ted, > > Ted Unangst wrote on Fri, Oct 23, 2015 at 09:38:22AM -0400: > >> so that works with the diff below. > > I agree with the direction for this kind of tool, at least for now. > However, your diff has a few issues, so i

Re: does anoybody use ul?

2015-10-23 Thread Ingo Schwarze
Hi Ted, Ted Unangst wrote on Fri, Oct 23, 2015 at 09:38:22AM -0400: > so that works with the diff below. I agree with the direction for this kind of tool, at least for now. However, your diff has a few issues, so i improved it, see below. Any OKs or vetos? Ted, in case you want to commit, the

Re: support for malloc allocation canaries

2015-10-23 Thread Daniel Micay
On 23/10/15 07:22 AM, Janne Johansson wrote: > With this patch on -current and > ln -sf CJ /etc/malloc.conf > a lot of things stopped working, like "man ls" and "tmux". > With only C or only J, the system seems to work ok, but with both it > doesn't. > Will check the resulting core files. > ntpd

Re: diff tmpdir

2015-10-23 Thread Todd C. Miller
On Fri, 23 Oct 2015 14:22:34 -0400, "Ted Unangst" wrote: > this burns the tmpdir out of diff, so as to let pledge tmppath work a little > better. OK millert@ since POSIX doesn't require TMPDIR. - todd

does anoybody use ul?

2015-10-23 Thread Ted Unangst
ul appears somewhat useless for its intended purpose. echo _xxx_ | ul does not result in underlined text in an xterm, so I doubt many people are using this. Unlike, say, mandoc, it can't output Greek letters. I also imagine most people have moved on to some form of markdown for their other text

Re: unused macros in ksh

2015-10-23 Thread Nicholas Marriott
The patch is mangled so it doesn't apply, but ok nicm On Thu, Oct 22, 2015 at 08:53:48PM -0400, Michael McConville wrote: > Beat me to it. ok mmcc@ > > Ilya Kaliman wrote: > > === > > RCS file: /cvs/src/bin/ksh/shf.c,v > >

enhanced use-after-free detection for malloc

2015-10-23 Thread Daniel Micay
This patch adds a form of use-after-free detection based on validating that the junk data is still in place when swapping out an allocation from the delayed chunk cache. It will probably nearly double the cost of the junk free feature that's enabled by default since it needs to do a whole extra

Re: Further cleanup of Russian calendars

2015-10-23 Thread Mikhail
2015-10-23 14:15 GMT+03:00 Vadim Zhukov : > Further cleanup in Russian calendars: > > * Fix #ifndef safeguards (rename/add where missing); > * Use consistent spelling for year when it's mentioned in day desc; > * Tweak some wrong casing cases; > * Remove calendar.msk