Re: locate/mklocatedb.sh: remove unused option

2017-06-20 Thread Michal Mazurek
Bump. These scripts could use a little refreshing. On 22:34:57, 12.06.17, Michal Mazurek wrote: > This script has an option called -presort or -nosort, that appears to > never be used, so remove it. This makes the $sort* options unneeded, > remove them too. > > The script

crypt_checkpass.3: clarify cetrain points

2017-06-19 Thread Michal Mazurek
if .Fa pref -is unsupported. +is unsupported, or the value of +.Fa hashsize +is insufficient. .Sh SEE ALSO .Xr crypt 3 , .Xr login.conf 5 , -- Michal Mazurek

hack: fix paths, remove hack.sh

2017-06-15 Thread Michal Mazurek
*) - exec $HACK $@ - ;; - *) - exec $HACK $@ $MAXNROFPLAYERS - ;; -esac -- Michal Mazurek

Re: tcpdump: drop atalk support

2017-06-13 Thread Michal Mazurek
LK 0 -#define FTAB_PFOSFP1 +#define FTAB_PFOSFP 0 enum cmd_types { PRIV_OPEN_BPF, /* open a bpf descriptor */ -- Michal Mazurek

Re: htpasswd: use crypt_newhash instead of bcrypt API

2017-06-13 Thread Michal Mazurek
en < BCRYPT_HASHSPACE) goto inval; BCRYPT_HASHSPACE is defined thus: libc/crypt/bcrypt.c:#define BCRYPT_HASHSPACE61 -- Michal Mazurek

Re: games/hunt: /usr/games/lib doesn't exist

2017-06-13 Thread Michal Mazurek
udp waitnobody /usr/games/lib/huntdhuntd + huntdgram udp waitnobody /usr/games/huntdhuntd This works for 4.3BSD. I don't remember the configuration file format for 4.2BSD inetd. -- Michal Mazurek

Re: games/fortune: /usr/games/lib doesn't exist

2017-06-12 Thread Michal Mazurek
On 18:50:26, 12.06.17, Jason McIntyre wrote: > On Mon, Jun 12, 2017 at 07:13:43PM +0200, Michal Mazurek wrote: > > Can't have outdated paths in fortunes. > > > > OK? > > > > Index: games/fortune//datfiles/fortunes2 > >

locate/mklocatedb.sh: remove unused option

2017-06-12 Thread Michal Mazurek
> $filelist; then +$bigram < $filelist | sort -Hnr | awk -Ft 'BEGIN { ORS = "" } NR <= 128 { print $2 }' > $bigrams && $code $bigrams < $filelist else -- Michal Mazurek

locate: remove /usr/libexec/locate.concatdb

2017-06-12 Thread Michal Mazurek
'rm -f $bigrams' 0 1 2 3 5 10 15 - -for db -do - $locate -d $db / -done | $bigram | $sort -nr | awk 'BEGIN { ORS = "" } NR <= 128 { print $2 }' > $bigrams - -for db -do - $locate -d $db / -done | $code $bigrams -- Michal Mazurek

games/fortune: /usr/games/lib doesn't exist

2017-06-12 Thread Michal Mazurek
% -HELP I'm being held prisoner in /usr/games/lib! +HELP I'm being held prisoner in /usr/share/games! % Help stamp out Mickey-Mouse computer interfaces -- Menus are for Restaurants! % -- Michal Mazurek

games/hunt: /usr/games/lib doesn't exist

2017-06-12 Thread Michal Mazurek
well. In /etc/inetd.conf, add the line - huntdgram udp waitnobody /usr/games/lib/huntdhuntd + huntdgram udp waitnobody /usr/games/huntdhuntd This works for 4.3BSD. I don't remember the configuration file format for 4.2BSD inetd. -- Michal Mazurek

viocon.4: mention all ttyVI devices

2017-06-11 Thread Michal Mazurek
+.It Pa /dev/ttyVI30 +.It Pa /dev/ttyVI40 .El .Sh SEE ALSO .Xr intro 4 , -- Michal Mazurek

Re: htpasswd: use crypt_newhash instead of bcrypt API

2017-06-10 Thread Michal Mazurek
On 21:16:08, 6.06.17, Michal Mazurek wrote: > When talking about this with mulander@ it came out that the docs could > use a touch. > > The commit message for the diff that didn't update the docs was: > > permit "bcrypt" as an alias for "blowfish&qu

Re: tcpdump: drop atalk support

2017-06-08 Thread Michal Mazurek
KIP DDP packets -but aren't. -Even if we were inclined to do anything to promote the use of Ethertalk -(we aren't, LBL doesn't allow Ethertalk on any of its -networks so we'd have no way of testing this code). .Pp A packet trace that crosses a daylight saving time change will give skewed time stamps -- Michal Mazurek

Re: htpasswd: use crypt_newhash instead of bcrypt API

2017-06-06 Thread Michal Mazurek
change it. Judging by the commit message the author was aware of this discrepancy though, and marked is as "for now", so let's see what others say. -- Michal Mazurek

Re: htpasswd: use crypt_newhash instead of bcrypt API

2017-06-06 Thread Michal Mazurek
owfish +can be used as an alias for +.Dq bcrypt . .El .Sh RETURN VALUES .Rv -std crypt_checkpass crypt_newhash @@ -89,7 +101,9 @@ to .Er EINVAL if .Fa pref -is unsupported. +is unsupported, or the value of +.Fa hashsize +is insufficient. .Sh SEE ALSO .Xr crypt 3 , .Xr login.conf 5 , -- Michal Mazurek

tcpdump: print-bgp.c: update error code 7

2017-05-30 Thread Michal Mazurek
_minor_holdtime[0]), sizeof(bgpnotify_minor_fsm)/sizeof(bgpnotify_minor_fsm[0]), sizeof(bgpnotify_minor_cease)/sizeof(bgpnotify_minor_cease[0]), - sizeof(bgpnotify_minor_cap)/sizeof(bgpnotify_minor_cap[0]), + sizeof(bgpnotify_minor_err)/sizeof(bgpnotify_minor_err[0]), }; static const char *bgpattr_origin[] = { -- Michal Mazurek

Re: tcpdump: enable some more bgp info

2017-05-30 Thread Michal Mazurek
f(bgpnotify_minor_cease)/sizeof(bgpnotify_minor_cease[0]), sizeof(bgpnotify_minor_cap)/sizeof(bgpnotify_minor_cap[0]), }; -- Michal Mazurek

Re: tcpdump: drop atalk support

2017-05-30 Thread Michal Mazurek
r than .Nm tcpdump . -.Pp -Apple Ethertalk DDP packets could be dumped as easily as KIP DDP packets -but aren't. -Even if we were inclined to do anything to promote the use of Ethertalk -(we aren't, LBL doesn't allow Ethertalk on any of its -networks so we'd have no way of testing this code). .Pp A packet trace that crosses a daylight saving time change will give skewed time stamps -- Michal Mazurek

Re: tcpdump: enable some more bgp info

2017-05-30 Thread Michal Mazurek
ify_minor_fsm)/sizeof(bgpnotify_minor_fsm[0]), sizeof(bgpnotify_minor_cease)/sizeof(bgpnotify_minor_cease[0]), sizeof(bgpnotify_minor_cap)/sizeof(bgpnotify_minor_cap[0]), }; -- Michal Mazurek

tcpdump: fix some clang warnings

2017-05-29 Thread Michal Mazurek
ph = (const struct pkt_hdr *)hdr; len -= sizeof(*ph); - if (len < 0 || (u_char *)(ph + 1) <= snapend) { + if ((u_char *)(ph + 1) <= snapend) { if (ph->ph_flags) printf("*"); switch (ph->ph_type) { -- Michal Mazurek

tcpdump: enable some more bgp info

2017-05-29 Thread Michal Mazurek
r_update[0]), - 0, - 0, + sizeof(bgpnotify_minor_holdtime)/sizeof(bgpnotify_minor_holdtime[0]), + sizeof(bgpnotify_minor_fsm)/sizeof(bgpnotify_minor_fsm[0]), sizeof(bgpnotify_minor_cease)/sizeof(bgpnotify_minor_cease[0]), sizeof(bgpnotify_minor_cap)/sizeof(bgpnotify_minor_cap[0]), }; -- Michal Mazurek

tcpdump: drop atalk support

2017-05-28 Thread Michal Mazurek
tcpdump . -.Pp -Apple Ethertalk DDP packets could be dumped as easily as KIP DDP packets -but aren't. -Even if we were inclined to do anything to promote the use of Ethertalk -(we aren't, LBL doesn't allow Ethertalk on any of its -networks so we'd have no way of testing this code). .Pp A packet trace that crosses a daylight saving time change will give skewed time stamps -- Michal Mazurek

pfctl/parse.y: don't check np->port for NULL

2017-05-28 Thread Michal Mazurek
if (isrdr) { - if (!rs->rdr->rport.b && rs->rdr->rport.t && np->port != NULL) { + if (!rs->rdr->rport.b && rs->rdr->rport.t) { rpool->proxy_port[1] = ntohs(rs->rdr->rport.a) + (ntohs(np->port[1]) - ntohs(np->port[0])); } else -- Michal Mazurek

tcpdump/pfctl_osfp.c: comment out pfctl_show_fingerprints()

2017-05-28 Thread Michal Mazurek
sort_name_list(opts, ); + print_name_list(opts, , ""); + } + } } +#endif /* Lookup a fingerprint */ pf_osfp_t -- Michal Mazurek

tcpdump/pfctl_osfp.c: catch up 2

2017-05-28 Thread Michal Mazurek
class_count = 0; } @@ -980,6 +984,7 @@ get_field(u_char **line, size_t *len, in } +#ifdef OSFP_DEBUG const char * print_ioctl(struct pf_osfp_ioctl *fp) { @@ -1081,3 +1086,4 @@ print_ioctl(struct pf_osfp_ioctl *fp) return (buf); } +#endif -- Michal Mazurek

tcpdump/pfctl_osfp.c: catch up

2017-05-27 Thread Michal Mazurek
e next field out of a formatted config file line */ char * get_field(u_char **line, size_t *len, int *fieldlen) { -- Michal Mazurek

pfctl/pfctl_osfp.c: print_ioctl() used only in debug mode

2017-05-27 Thread Michal Mazurek
fdef OSFP_DEBUG const char * print_ioctl(struct pf_osfp_ioctl *fp) { @@ -1091,3 +1095,4 @@ print_ioctl(struct pf_osfp_ioctl *fp) return (buf); } +#endif -- Michal Mazurek

pfctl/pfctl_osfp.c: mark functions as static

2017-05-27 Thread Michal Mazurek
, size_t *len, int *fieldlen) { char *ret, *ptr = *line; @@ -989,8 +987,7 @@ get_field(char **line, size_t *len, int return (ret); } - -const char * +static const char * print_ioctl(struct pf_osfp_ioctl *fp) { static char buf[1024]; -- Michal Mazurek

Re: pf.conf.5: mention the inversion (!) operator

2017-05-19 Thread Michal Mazurek
On 07:52:28, 19.05.17, Jason McIntyre wrote: > On Fri, May 19, 2017 at 08:34:54AM +0200, Michal Mazurek wrote: > > Now that it was commited, what remains is to convert tabs to spaces inside > > a > > literal block: > > > > morning. > > what's the reas

Re: pf.conf.5: mention the inversion (!) operator

2017-05-19 Thread Michal Mazurek
rt" ] | -[ route ] | [ "set tos" tos ] | - [ [ "!" ] "received-on" ( interface-name | interface-group ) ] + "af-to" af "from" ( redirhost | "{" redirhost-list "}" ) + [ "to" ( redirhost | "{" redirhost-list "}" ) ] | + "binat-to" ( redirhost | "{" redirhost-list "}" ) + [ portspec ] [ pooltype ] | + "rdr-to" ( redirhost | "{" redirhost-list "}" ) + [ portspec ] [ pooltype ] | + "nat-to" ( redirhost | "{" redirhost-list "}" ) + [ portspec ] [ pooltype ] [ "static-port" ] | + [ route ] | [ "set tos" tos ] | + [ [ "!" ] "received-on" ( interface-name | interface-group ) ] scrubopts = scrubopt [ [ "," ] scrubopts ] scrubopt = "no-df" | "min-ttl" number | "max-mss" number | -- Michal Mazurek

pf.conf.5: mention the inversion (!) operator

2017-05-15 Thread Michal Mazurek
irhost-list "}" ) -[ portspec ] [ pooltype ] [ "static-port" ] | -[ route ] | [ "set tos" tos ] | -[ [ "!" ] "received-on" ( interface-name | interface-group ) ] + "af-to" af "from" ( redirhost | "{" redirhost-list "}" ) + [ "to" ( redirhost | "{" redirhost-list "}" ) ] | + "binat-to" ( redirhost | "{" redirhost-list "}" ) + [ portspec ] [ pooltype ] | + "rdr-to" ( redirhost | "{" redirhost-list "}" ) + [ portspec ] [ pooltype ] | + "nat-to" ( redirhost | "{" redirhost-list "}" ) + [ portspec ] [ pooltype ] [ "static-port" ] | + [ route ] | [ "set tos" tos ] | + [ [ "!" ] "received-on" ( interface-name | interface-group ) ] scrubopts = scrubopt [ [ "," ] scrubopts ] scrubopt = "no-df" | "min-ttl" number | "max-mss" number | -- Michal Mazurek

Re: sleep.1: "while true;" -> "while :;"

2016-12-21 Thread Michal Mazurek
On 22:49:38, 20.12.16, Jason McIntyre wrote: > On Tue, Dec 20, 2016 at 10:58:40PM +0100, Michal Mazurek wrote: > > While there is nothing wrong with "while true", "while :" is better > > and used a lot more often in the source tree. > > > > OK?

sleep.1: "while true;" -> "while :;"

2016-12-20 Thread Michal Mazurek
o ls -l file sleep 5 done -- Michal Mazurek

loadfirmware.9: mention /mnt/etc/firmware

2016-12-20 Thread Michal Mazurek
in the directory .Pa /etc/firmware . +In addition to that, if the kernel is a ramdisk kernel, the extra +directory +.Pa /mnt/etc/firmware +will also be used for the lookup. Memory for the firmware is allocated using .Xr malloc 9 with type -- Michal Mazurek

faq4.html: loading firmware during install

2016-12-09 Thread Michal Mazurek
mnt and reload the interface: + + +ifconfig iwm0 down +ifconfig iwm0 up + + +And then unmount the drive. + + +Be aware that the installer uses /mnt to copy the +distribution sets to disk, and thus loading the firmware must be +performed before it is started. -- Michal Mazurek

Re: ps.1 tweak

2016-10-06 Thread Michal Mazurek
us 1, or 79 columns if none of .Dv stdout , .Dv stderr -- Michal Mazurek

ps.1 tweak

2016-10-06 Thread Michal Mazurek
:24:51 - @@ -543,7 +543,7 @@ If set to a positive integer, output is formatted to the given width in columns. Otherwise, .Nm -defaults to the terminal width \(mi 1, +defaults to the terminal width \(mi1, or 79 columns if none of .Dv stdout , .Dv stderr -- Michal Mazurek

STANDARDS in err.3

2016-09-14 Thread Michal Mazurek
+++ lib/libc/gen/err.3 14 Sep 2016 07:28:26 - @@ -189,6 +189,10 @@ if ((fd = open(block_device, O_RDONLY, 0 .Xr perror 3 , .Xr printf 3 , .Xr strerror 3 +.Sh STANDARDS +These functions are +.Bx +extensions. .Sh HISTORY The functions .Fn err , -- Michal Mazurek

mount(8): remove unneeded headers

2016-09-07 Thread Michal Mazurek
#include "pathnames.h" -- Michal Mazurek

mount(8): strlen + malloc + snprintf == asprintf

2016-09-04 Thread Michal Mazurek
== NULL) + if (asprintf(, "%s,%s", s0, s1) == -1) err(1, NULL); - (void)snprintf(cp, i, "%s,%s", s0, s1); } else cp = strdup(s1); free(s0); - return (cp); + return cp; } void -- Michal Mazurek

Re: Futexes for OpenBSD

2016-09-04 Thread Michal Mazurek
6 Makefile.inc --- lib/libc/sys/Makefile.inc 4 Jul 2016 18:01:44 - 1.146 +++ lib/libc/sys/Makefile.inc 4 Sep 2016 13:12:41 - @@ -87,6 +87,7 @@ DASM= ${ASM:.o=.do} # syscalls that CANNOT FAIL. They can return whatever value they want, # they just never want to set errno. ASM_NOERR=__get

Remove tickets from librthreads

2016-09-03 Thread Michal Mazurek
000 1.17 +++ lib/librthread/rthread_tls.c3 Sep 2016 19:41:55 - @@ -27,7 +27,7 @@ #include "rthread.h" static struct rthread_key rkeys[PTHREAD_KEYS_MAX]; -static struct _spinlock rkeyslock = _SPINLOCK_UNLOCKED; +static _atomic_lock_t rkeyslock = _SPINLOCK_UNLOCKED; int pthread_key_create(pthread_key_t *key, void (*destructor)(void*)) -- Michal Mazurek

__thrsleep.2 tweak

2016-09-03 Thread Michal Mazurek
clock_gettime 2 +clock id. .El .Pp .Fn __thrwakeup -- Michal Mazurek

Remove _USING_TICKETS from librthreads

2016-09-03 Thread Michal Mazurek
error = __thrsleep(self, 0 | _USING_TICKETS, NULL, - >lock.ticket, >delayed_cancel); + error = __thrsleep(self, 0, NULL, >lock.ticket, + >delayed_cancel); /* * If we took a normal signal (not from -- Michal Mazurek

Mention the maximum packet size in ping6.8

2016-09-03 Thread Michal Mazurek
going packets. .It Fl v -- Michal Mazurek

Re: thrsleep: remove ticket lock support

2016-09-03 Thread Michal Mazurek
_VISIBLE -#define__CLOCK_USE_TICKET_LOCKS8 /* flag for __thrsleep() */ - /* * Per-process and per-thread clocks encode the PID or TID into the * high bits, with the type in the bottom bits -- Michal Mazurek

thrsleep: remove ticket lock support

2016-09-03 Thread Michal Mazurek
/* flag for __thrsleep() */ - /* * Per-process and per-thread clocks encode the PID or TID into the * high bits, with the type in the bottom bits -- Michal Mazurek

Remove mention of deprecated flags in ping6.8

2016-09-02 Thread Michal Mazurek
v -- Michal Mazurek

Mention the maximum packet size in ping.8

2016-09-02 Thread Michal Mazurek
@@ -176,6 +176,7 @@ Specifies the number of data bytes to be The default is 56, which translates into 64 ICMP data bytes when combined with the 8 bytes of ICMP header data. +The maximum packet size is 65467. .It Fl T Ar toskeyword Change IPv4 TOS value. .Ar toskeyword -- Michal Mazurek

Re: Better wording in ping error messages

2016-09-02 Thread Michal Mazurek
On 12:12:11, 2.09.16, Ted Unangst wrote: > Michal Mazurek wrote: > > worms(6) does this more concisely: > > > > errx(1, "length (2-1024) is %s: %s", errstr, > > there's multiple schools of thought here, but i've always preferred somewhat > shorter e

Better wording in ping error messages

2016-09-02 Thread Michal Mazurek
errx(1, "rtable value is %s: %s; provide a " + "value between 0 and %d inclusive", errstr, + optarg, RT_TABLEID_MAX); if (setsockopt(s, SOL_SOCKET, SO_RTABLE, , sizeof(rtableid)) == -1) err(1, "setsockopt SO_RTABLE"); -- Michal Mazurek

Futexes for OpenBSD

2016-09-02 Thread Michal Mazurek
,15 @@ struct sys___set_tcb_args { syscallarg(void *) tcb; }; +struct sys_futex_args { + syscallarg(void *) uaddr; + syscallarg(int) futex_op; + syscallarg(int) val; + syscallarg(const struct timespec *) tp; + syscallarg(int *) uaddr2; + syscallarg(int) val3; +}; + /* * System call prototypes. */ @@ -1347,3 +1356,4 @@ int sys_symlinkat(struct proc *, void *, intsys_unlinkat(struct proc *, void *, register_t *); intsys___set_tcb(struct proc *, void *, register_t *); intsys___get_tcb(struct proc *, void *, register_t *); +intsys_futex(struct proc *, void *, register_t *); -- Michal Mazurek

sys_process.c: remove relebad

2016-09-01 Thread Michal Mazurek
(uap, pid) < THREAD_PID_OFFSET && tr->ps_single) -- Michal Mazurek

remove MPSAFE from makesyscalls.sh

2016-09-01 Thread Michal Mazurek
not need locks sycall_flags = sprintf("SY_NOLOCK | %s", sycall_flags) f++ -- Michal Mazurek

Remove last mention of nonexistent ktr_kuser().

2016-09-01 Thread Michal Mazurek
*, size_t); int ktruser(struct proc *, const char *, const void *, size_t); void ktrexec(struct proc *, int, const char *, ssize_t); void ktrpledge(struct proc *, int, uint64_t, int); -- Michal Mazurek

Fix comment in sys/sem.h

2016-09-01 Thread Michal Mazurek
04:31:42 - 1.23 +++ sys/sys/sem.h 1 Sep 2016 07:22:26 - @@ -195,4 +195,4 @@ int semop(int, struct sembuf *, size_t); __END_DECLS #endif /* !_KERNEL */ -#endif /* !_SEM_H_ */ +#endif /* !_SYS_SEM_H_ */ -- Michal Mazurek

Array of TAILQs in kern_synch.c

2016-08-31 Thread Michal Mazurek
LQ_REMOVE(, p, p_runq); if (p->p_stat == SSLEEP) setrunnable(p); } -- Michal Mazurek

Undefined behaviour in subr_hibernate.c

2016-08-31 Thread Michal Mazurek
turn l < r ? -1 : (l > r); + vaddr_t vl = (vaddr_t)l; + vaddr_t vr = (vaddr_t)r; + + return vl < vr ? -1 : (vl > vr); } RB_PROTOTYPE(hiballoc_addr, hiballoc_entry, hibe_entry, hibe_cmp) -- Michal Mazurek

check KTRPOINT() before calling ktrpledge()

2016-06-21 Thread Michal Mazurek
ktrpledge(p, error, code, p->p_pledge_syscall); + if (KTRPOINT(p, KTR_PLEDGE)) + ktrpledge(p, error, code, p->p_pledge_syscall); #endif /* Send uncatchable SIGABRT for coredump */ memset(, 0, sizeof sa); -- Michal Mazurek

pledge in /usr/bin/ktrace

2016-06-15 Thread Michal Mazurek
facs |= KTRFAC_PLEDGE; break; case '+': facs |= DEF_POINTS; -- Michal Mazurek

ktremul() no longer exists

2016-06-15 Thread Michal Mazurek
ar *path" @@ -70,12 +67,6 @@ Possible values for the .Fa type argument are a mask of the KTRFAC_ values described in .Xr ktrace 2 . -.Pp -.Fn ktremul -should be called every time emulation for the execution environment -is changed and thus the name of which is given in the -.Fa name -argument. .Pp .Fn ktrgenio should be called for each generic input/output transaction that is -- Michal Mazurek

documentation: valid KTRPOINT() arguments

2016-06-15 Thread Michal Mazurek
type -argument are a mask of the KTRFAC_ values described in +must be a KTR_ value matching the respective KTRFAC_ value described in .Xr ktrace 2 . .Pp .Fn ktremul -- Michal Mazurek

Re: tidy strstr.3

2016-05-12 Thread Michal Mazurek
On 19:55:48, 11.05.16, Ingo Schwarze wrote: > Hi, > > Michal Mazurek wrote on Wed, May 11, 2016 at 10:41:03AM +0200: > > > * add explicit RETURN VALUES section > > * add an EXAMPLES section, from NetBSD and FreeBSD > > * mention memmem(3) > > Committed with

Re: Allow top(1) to search arguments (again)

2016-05-11 Thread Michal Mazurek
/* argument that caused the error */ }; extern struct errs errs[]; -- Michal Mazurek

tidy strstr.3

2016-05-11 Thread Michal Mazurek
o Bar Baz"; +const char *smallstring = "Bar"; +char *ptr; + +ptr = strstr(largestring, smallstring); +.Ed .Sh SEE ALSO .Xr memchr 3 , +.Xr memmem 3 , .Xr strchr 3 , .Xr strcspn 3 , .Xr strpbrk 3 , -- Michal Mazurek

vm.conf.5 - number of sections

2016-05-04 Thread Michal Mazurek
: +is divided into two main sections: .Bl -tag -width .It Sy Macros User-defined variables may be defined and used later, simplifying the -- Michal Mazurek

Re: document NOLOCK in syscalls.master

2016-05-02 Thread Michal Mazurek
compat options are defined in the syscalls.conf file, and the ; compat option name is prefixed to the syscall name. Other than -- Michal Mazurek

Re: remove MPSAFE from makesyscalls.sh

2016-05-02 Thread Michal Mazurek
On 10:22:58, 7.04.16, Martin Natano wrote: > On Wed, Apr 06, 2016 at 03:42:20PM +0200, Michal Mazurek wrote: > > MPSAFE is never used, and doesn't look like it's even supported (no > > matching SY_MPSAFE anywhere). > > SY_MPSAFE seems to be unused since it's introduction in

Re: sys_process.c: remove relebad

2016-04-09 Thread Michal Mazurek
On 10:13:06, 7.04.16, Martin Natano wrote: > On Wed, Apr 06, 2016 at 09:47:35AM +0200, Michal Mazurek wrote: > > relebad used to have more body: > > relebad: > > PRELE(t); > > return (error); > > But then PRELE(t); was removed. T

tidy syscall_mi.h

2016-04-07 Thread Michal Mazurek
rror); } #endif + if (lock) + KERNEL_LOCK(); error = (*callp->sy_call)(p, argp, retval); -#if NSYSTRACE > 0 -done: -#endif if (lock) KERNEL_UNLOCK(); -- Michal Mazurek

remove MPSAFE from makesyscalls.sh

2016-04-06 Thread Michal Mazurek
IG_ENDIAN #define SCARG(p, k)((p)->k.be.datum) /* get arg from args pointer */ -- Michal Mazurek

document NOLOCK in syscalls.master

2016-04-06 Thread Michal Mazurek
always included. +; UNIMPL unimplemented, not included in system. ; ; The compat options are defined in the syscalls.conf file, and the ; compat option name is prefixed to the syscall name. Other than -- Michal Mazurek

sys_process.c: remove relebad

2016-04-06 Thread Michal Mazurek
or init */ @@ -522,9 +522,6 @@ sys_ptrace(struct proc *p, void *v, regi } return (0); - - relebad: - return (error); case PT_KILL: if (SCARG(uap, pid) < THREAD_PID_OFFSET && tr->ps_single) -- Michal Mazurek

ps: remove emul support

2016-03-26 Thread Michal Mazurek
@@ -209,8 +209,6 @@ CPU ID (zero on single processor systems Current working directory. .It Cm dsiz Data size, in Kilobytes. -.It Cm emul -Name of system call emulation environment. .It Cm flags Alias: .Cm f . -- Michal Mazurek

Re: New scheduler for OpenBSD

2016-03-19 Thread Michal Mazurek
second. When running tests with it I sometimes observe one cpu is 0.5-1 second behind another, so I think this is a good next step for this scheduler. BFS has one shared queue for all CPUs, maybe there is a very good reason for that, we'll see. I'd like to thank everyone for all the feedback. --

Re: New scheduler for OpenBSD

2016-03-15 Thread Michal Mazurek
On 14:57:40, 15.03.16, Alexandre Ratchov wrote: > On Sat, Mar 12, 2016 at 05:36:21PM +0100, Michal Mazurek wrote: > > > > p_usrpri and p_priority will go away, so userland utilities like 'ps' > > will need to be changed. > > > > AFAIU, this would hurt interactiv

Re: hexdump(1) - unneeded headers

2016-03-14 Thread Michal Mazurek
This was sent during the freeze. On 14:13:40, 8.02.16, Michal Mazurek wrote: > These headers appear to be unneeded: > > Index: conv.c > === > RCS file: /cvs/src/usr.bin/hexdump/conv.c,v > retrieving revision

Re: hexdump(1) - tidy declarations

2016-03-14 Thread Michal Mazurek
This was sent during the freeze. On 15:04:28, 8.02.16, Michal Mazurek wrote: > Move some declarations out of hexdump.h > Mark some declarations as __dead or static > Remove a commented out declaration > Convert some spaces to tabs > >

Re: New scheduler for OpenBSD

2016-03-14 Thread Michal Mazurek
On 16:35:49, 13.03.16, Martin Pieuchot wrote: > On 12/03/16(Sat) 17:36, Michal Mazurek wrote: > > [...] > > Some notes: > > > > Chrome is still not very usable. > > Are you wanting to improve the browser experience on OpenBSD? If that's > your goal then I

Re: New scheduler for OpenBSD

2016-03-14 Thread Michal Mazurek
it is a good idea to do so. Any advice? -- Michal Mazurek

queue.3, tree.3 - SEE ALSO

2016-03-13 Thread Michal Mazurek
Mar 2016 09:57:24 - @@ -549,6 +549,8 @@ main() return (0); } .Ed +.Sh SEE ALSO +.Xr queue 3 .Sh NOTES Trying to free a tree in the following way is a common error: .Bd -literal -offset indent -- Michal Mazurek

New scheduler for OpenBSD

2016-03-12 Thread Michal Mazurek
+#include /* * Posix defines a which may want to include @@ -99,6 +100,7 @@ struct schedstate_percpu { u_int spc_schedticks; /* ticks for schedclock() */ u_int64_t spc_cp_time[CPUSTATES]; /* CPU state statistics */ u_char spc_curpriority; /* usrpri of curproc */ + u_int64_t spc_curdeadline; int spc_rrticks;/* ticks until roundrobin() */ int spc_pscnt; /* prof/stat counter */ int spc_psdiv; /* prof/stat divisor */ @@ -109,6 +111,8 @@ struct schedstate_percpu { TAILQ_HEAD(prochead, proc) spc_qs[SCHED_NQS]; volatile uint32_t spc_whichqs; + + RB_HEAD(prochead2, proc) spc_rq; #ifdef notyet struct proc *spc_reaper;/* dead proc reaper */ -- Michal Mazurek

scheduler: abstract away spc_whichqs

2016-03-11 Thread Michal Mazurek
pc_whichqs == 0) void sched_init_runqueues(void); void setrunqueue(struct proc *); -- Michal Mazurek

Re: update comment about p_usrpri

2016-03-09 Thread Michal Mazurek
On 09:42:32, 9.03.16, Michal Mazurek wrote: > On 22:47:08, 8.03.16, Martin Pieuchot wrote: > > On 08/03/16(Tue) 10:01, Michal Mazurek wrote: > > > p_cpu exists, but p_usrpri isn't based on it. > > > > Michal I lost track of all your comment fixes. One of the a

Re: update comment about p_usrpri

2016-03-09 Thread Michal Mazurek
On 22:47:08, 8.03.16, Martin Pieuchot wrote: > On 08/03/16(Tue) 10:01, Michal Mazurek wrote: > > p_cpu exists, but p_usrpri isn't based on it. > > Michal I lost track of all your comment fixes. One of the accepted > rules when we read code is that comments are always lying. S

update comment about p_usrpri

2016-03-08 Thread Michal Mazurek
;/* U_CHAR: Process "nice" value. */ u_int16_t p_xstat; /* U_SHORT: Exit status for wait; also stop signal. */ -- Michal Mazurek

sched_bsd.c: update comment about p_pctcpu

2016-03-07 Thread Michal Mazurek
. */ #if(FSHIFT >= CCPU_SHIFT) p->p_pctcpu += (phz == 100)? -- Michal Mazurek

sched_bsd.c: update comment

2016-03-07 Thread Michal Mazurek
p->p_slptime++; @@ -715,4 +714,3 @@ sysctl_hwperfpolicy(void *oldp, size_t * return 0; } #endif - -- Michal Mazurek

Re: proc.h: update PID_MAX after sys/compat is gone

2016-03-06 Thread Michal Mazurek
On 11:32:04, 5.03.16, Philip Guenther wrote: > On Sat, Mar 5, 2016 at 8:10 AM, Michal Mazurek <akf...@jasminek.net> wrote: > > sys/compat is gone. I don't know if PID_MAX can or should be increased, > > but I don't think the comment is now useful. > > I think

proc.h: update PID_MAX after sys/compat is gone

2016-03-05 Thread Michal Mazurek
quot;. - * We set PID_MAX to (SHRT_MAX - 1) so we don't break sys/compat. + * We set PID_MAX to (SHRT_MAX - 1) for historical reasons. */ #definePID_MAX 32766 #defineNO_PID (PID_MAX+1) -- Michal Mazurek

Re: sched_bsd.c update comment

2016-03-05 Thread Michal Mazurek
On 16:20:11, 1.03.16, Michal Mazurek wrote: > > Index: sys/kern/sched_bsd.c > === > RCS file: /cvs/src/sys/kern/sched_bsd.c,v > retrieving revision 1.42 > diff -u -p -r1.42 sched_bsd.c > --- sys/kern/sched_bsd

ptrace.2: document PT_GET_THREAD_FIRST and PT_GET_THREAD_NEXT

2016-03-05 Thread Michal Mazurek
ID of the subsequent thread. +The +.Dq Li struct ptrace_thread_state +pointed to by +.Fa addr +must be initialized by a previous +.Dv PT_GET_THREAD_FIRST +or +.Dv PT_GET_THREAD_NEXT +request. .El .Pp Additionally, machine-specific requests can exist. -- Michal Mazurek

sys_process.c: remove relebad

2016-03-04 Thread Michal Mazurek
or init */ @@ -522,9 +522,6 @@ sys_ptrace(struct proc *p, void *v, regi } return (0); - - relebad: - return (error); case PT_KILL: if (SCARG(uap, pid) < THREAD_PID_OFFSET && tr->ps_single) -- Michal Mazurek

proc.h: fix comment

2016-03-04 Thread Michal Mazurek
PS_BITS \ ("\20" "\01CONTROLT" "\02EXEC" "\03INEXEC" "\04EXITING" "\05SUGID" \ -- Michal Mazurek

kern_proc.c: fix comment

2016-03-04 Thread Michal Mazurek
Sep 2015 08:27:39 - 1.65 +++ sys/kern/kern_proc.c4 Mar 2016 12:36:26 - @@ -150,7 +150,7 @@ chgproccnt(uid_t uid, int diff) } /* - * Is p an inferior of parent? + * Is pr an inferior of parent? */ int inferior(struct process *pr, struct process *parent) -- Michal Mazurek

kern_exit.c: move declarations from proc.h

2016-03-03 Thread Michal Mazurek
@@ int single_thread_check(struct proc *, i void child_return(void *); intproc_cansugid(struct proc *); -void proc_finish_wait(struct proc *, struct proc *); -void process_zap(struct process *); -void proc_free(struct proc *); struct sleep_state { int sls_s; -- Michal

kern_sched.c: unused functions

2016-03-02 Thread Michal Mazurek
et *, struct cpuset *, struct cpuset *); -struct cpu_info *cpuset_first(struct cpuset *); +void cpuset_add(struct cpuset *, struct cpu_info *); +int cpuset_isset(struct cpuset *, struct cpu_info *); #endif /* _KERNEL */ #endif /* !_SYS_PROC_H_ */ - -- Michal Mazurek

cpu.h: parens in macros

2016-03-01 Thread Michal Mazurek
d.md_astpending = 1 +#defineaston(p)((p)->p_md.md_astpending = 1) #ifdef CPU_R8000 #definemips_sync() __asm__ volatile ("lw $0, 0(%0)" :: \ -- Michal Mazurek

sched_bsd.c update comment

2016-03-01 Thread Michal Mazurek
their job. +* We setup the timeouts here and kick schedcpu once to make it do +* its job. */ timeout_set(_to, schedcpu, _to); -- Michal Mazurek

  1   2   >