Page MenuHomeFreeBSD

jilles (Jilles Tjoelker)
User

Projects

User Details

User Since
May 14 2014, 7:55 PM (262 w, 3 d)

Recent Activity

Tue, May 21

jilles accepted D20258: posixshmcontrol(1), an utility to query and manipulate named posix shm objects.
Tue, May 21, 8:42 PM

Mon, May 20

jilles added a comment to D19902: bsearc.3: Add EXAMPLES section.
In D19902#437991, @hrs wrote:

Perhaps it is cleaner to pass the int age to be searched for by reference. However, the asymmetry in the compare function is intentional as this allows finding an object with more data given the key, while having only one storage array.

Mon, May 20, 9:15 PM

Sun, May 19

jilles added a comment to D20258: posixshmcontrol(1), an utility to query and manipulate named posix shm objects.

I think it will be useful to have this. It fixes most of the drop in functionality when moving from System V shared memory to POSIX shared memory.

Sun, May 19, 9:17 PM
jilles added inline comments to D19902: bsearc.3: Add EXAMPLES section.
Sun, May 19, 8:51 PM
jilles added a comment to D19902: bsearc.3: Add EXAMPLES section.
In D19902#437950, @hrs wrote:

As already pointed out on the mailing list, this example has a lot of problems which are not only style bugs. Ones I think as critical except for the style issues are the following:

  • The function to compare two elements should accept the same type, not using an "age" field value by using a pointer type. It is a function to compare, not look up a matched element in the definition of bsearch(3). Passing a raw value as (void *) type is not impossible, but it is not suitable for a "textbook" example.
Sun, May 19, 8:42 PM

Tue, May 7

jilles accepted D20187: Fix r347229 libsbuf symbol version.

The new function sbuf_printf_drain was added recently enough that this should be safe (binaries using sbuf_printf_drain linked against the old libsbuf.so.6 will not run against the new libsbuf.so.6).

Tue, May 7, 9:10 PM

Thu, May 2

jilles accepted D20111: directory.3: add a STANDARDS section.

Not so fast! I just discovered a serious footgun: Linux's struct dirent has a
d_off field, but it's meaning is different than FreeBSD's. That's worth
mentioning.

Thu, May 2, 7:51 PM

Wed, May 1

jilles added a comment to D20111: directory.3: add a STANDARDS section.

Not so fast! I just discovered a serious footgun: Linux's struct dirent has a
d_off field, but it's meaning is different than FreeBSD's. That's worth
mentioning.

Wed, May 1, 11:13 PM

Apr 15 2019

jilles accepted D19902: bsearc.3: Add EXAMPLES section.
Apr 15 2019, 4:39 PM

Apr 13 2019

jilles added inline comments to D19902: bsearc.3: Add EXAMPLES section.
Apr 13 2019, 7:38 PM

Apr 5 2019

jilles accepted D18670: Minor speedup for load_kld function.
Apr 5 2019, 10:06 PM

Mar 27 2019

jilles committed rS345617: MFC r344306: sh: Send normal output from bind builtin to stdout.
MFC r344306: sh: Send normal output from bind builtin to stdout
Mar 27 2019, 10:09 PM
jilles committed rS345613: MFC r344306: sh: Send normal output from bind builtin to stdout.
MFC r344306: sh: Send normal output from bind builtin to stdout
Mar 27 2019, 9:53 PM

Mar 26 2019

jilles committed rS345561: MFC r344502: sh: Add set -o pipefail.
MFC r344502: sh: Add set -o pipefail
Mar 26 2019, 10:34 PM
jilles committed rS345559: MFC r328818: sh: Refactor job status printing, preparing for -o pipefail and.
MFC r328818: sh: Refactor job status printing, preparing for -o pipefail and
Mar 26 2019, 9:30 PM
jilles committed rS345556: MFC r327475: sh: Move various structs from jobs.h to jobs.c.
MFC r327475: sh: Move various structs from jobs.h to jobs.c
Mar 26 2019, 8:47 PM

Mar 24 2019

jilles committed rS345487: MFC r344502: sh: Add set -o pipefail.
MFC r344502: sh: Add set -o pipefail
Mar 24 2019, 10:10 PM

Mar 13 2019

jilles committed rS345117: MFC r342880,r343981,r344902: sh: Fix $((-9223372036854775808)).
MFC r342880,r343981,r344902: sh: Fix $((-9223372036854775808))
Mar 13 2019, 9:53 PM

Mar 8 2019

jilles accepted D19441: Remove an unneeded 'tail -n 1' from a pipeline.
Mar 8 2019, 10:00 PM

Mar 7 2019

jilles committed rS344902: sh/tests: Improve failure messages of expansion/arith15.0.
sh/tests: Improve failure messages of expansion/arith15.0
Mar 7 2019, 10:52 PM

Feb 24 2019

jilles committed rS344502: sh: Add set -o pipefail.
sh: Add set -o pipefail
Feb 24 2019, 9:05 PM

Feb 19 2019

jilles committed rS344306: sh: Send normal output from bind builtin to stdout.
sh: Send normal output from bind builtin to stdout
Feb 19 2019, 9:27 PM

Feb 17 2019

jilles accepted D19211: pkru(3).
Feb 17 2019, 9:15 PM
jilles committed rS344237: MFC r343896,r343922: dhclient: Pass through exit status from script.
MFC r343896,r343922: dhclient: Pass through exit status from script
Feb 17 2019, 8:25 PM
jilles added inline comments to D19221: Use iconv to ensure the output of calendar respects the output encoding.
Feb 17 2019, 1:03 PM

Feb 16 2019

jilles added inline comments to D19211: pkru(3).
Feb 16 2019, 6:58 PM
jilles added inline comments to D19211: pkru(3).
Feb 16 2019, 2:57 PM

Feb 10 2019

jilles committed rS343981: sh: Restore $((x)) error checking after fix for $((-9223372036854775808)).
sh: Restore $((x)) error checking after fix for $((-9223372036854775808))
Feb 10 2019, 10:23 PM
jilles closed D18926: sh: Restore $((x)) error checking after fix for $((-9223372036854775808)).
Feb 10 2019, 10:23 PM

Feb 8 2019

jilles committed rS343922: dhclient: Return non-zero status when script exits due to a signal.
dhclient: Return non-zero status when script exits due to a signal
Feb 8 2019, 11:03 PM

Feb 7 2019

jilles accepted D19096: Fix renameat(2) for CAPABILITIES kernels..
Feb 7 2019, 9:23 PM

Feb 3 2019

jilles added inline comments to D19058: posix_spawn(3): handle potential signal issues with vfork.
Feb 3 2019, 11:33 PM
jilles added inline comments to D19058: posix_spawn(3): handle potential signal issues with vfork.
Feb 3 2019, 9:12 PM
jilles added a comment to D19058: posix_spawn(3): handle potential signal issues with vfork.

It is indeed important to ensure that this is the complete kernel assist for posix_spawn, so we do not leave multiple versions of this around, each with their own flag.

Feb 3 2019, 3:54 PM

Feb 1 2019

jilles added inline comments to D19058: posix_spawn(3): handle potential signal issues with vfork.
Feb 1 2019, 8:58 PM
jilles requested changes to D19058: posix_spawn(3): handle potential signal issues with vfork.

The general approach seems good.

Feb 1 2019, 8:45 PM

Jan 30 2019

jilles added a comment to D18988: Untangle jemalloc and mutexes initialization..

This seems a good approach to make things work. Malloc typically uses mutexes, so it makes things much easier if mutexes do not use malloc.

Jan 30 2019, 10:09 PM

Jan 29 2019

jilles added a comment to D18926: sh: Restore $((x)) error checking after fix for $((-9223372036854775808)).
In D18926#406366, @se wrote:

I'd do not like the conversion to floating point for numbers outside the range of 64 bit integers. They violate assumptions I'd like to be able to make (e.g. that adding and then subtracting the same number leads back to the initial value in all cases).

Jan 29 2019, 7:29 PM
jilles updated the diff for D18926: sh: Restore $((x)) error checking after fix for $((-9223372036854775808)).

Add test for [ERANGE] special case.

Jan 29 2019, 7:12 PM

Jan 27 2019

jilles added a comment to D18926: sh: Restore $((x)) error checking after fix for $((-9223372036854775808)).
In D18926#405742, @se wrote:

The behavior is not consistent for shell arithmetic operating on parameters with or without "$" (e.g. "$((X))" vs. "$(($X))") for variables not in the range of valid integers.
This may be allowed by the standard, but is still somewhat surprising:

Jan 27 2019, 10:41 PM

Jan 25 2019

jilles committed rS343460: MFC r343105: libedit: Avoid out of bounds read in 'bind' command.
MFC r343105: libedit: Avoid out of bounds read in 'bind' command
Jan 25 2019, 10:53 PM

Jan 24 2019

jilles committed rS343415: MFC r343105: libedit: Avoid out of bounds read in 'bind' command.
MFC r343105: libedit: Avoid out of bounds read in 'bind' command
Jan 24 2019, 10:34 PM
jilles accepted D18872: Set PS1 for toor.
Jan 24 2019, 10:25 PM

Jan 23 2019

jilles accepted D18790: Make sh(1) support \u in PS1..
Jan 23 2019, 10:41 PM

Jan 22 2019

jilles created D18926: sh: Restore $((x)) error checking after fix for $((-9223372036854775808)).
Jan 22 2019, 10:49 PM

Jan 20 2019

jilles added a comment to D18790: Make sh(1) support \u in PS1..

My original objection to \u is no longer valid since we have accepted that the ugly \ bash prompt sequences are staying.

Jan 20 2019, 8:00 PM
jilles added inline comments to D18872: Set PS1 for toor.
Jan 20 2019, 7:56 PM
jilles accepted D18809: Don't mess with BLOCKSIZE in shell startup files..

The BLOCKSIZE assignments in share/skel are not "wrong" as such, but BLOCKSIZE seems a configuration option of little use in general. Most of the time, the -h option is more useful.

Jan 20 2019, 7:51 PM
jilles committed rS343215: sh: Send libedit "ferr" output to fd 2.
sh: Send libedit "ferr" output to fd 2
Jan 20 2019, 2:25 PM

Jan 18 2019

jilles accepted D18827: Update /etc/passwd after password db changes.

I wonder when it is appropriate to run pwd_mkdb without -p. Only when etc/passwd is considered legacy and needs to be omitted from the system?

Jan 18 2019, 2:36 PM

Jan 16 2019

jilles committed rS343105: libedit: Avoid out of bounds read in 'bind' command.
libedit: Avoid out of bounds read in 'bind' command
Jan 16 2019, 9:59 PM

Jan 13 2019

jilles committed rS343003: MFC r342817: getconf(1): Minor mdoc fix.
MFC r342817: getconf(1): Minor mdoc fix
Jan 13 2019, 6:48 PM
jilles committed rS343002: MFC r342816: thr_wake(2): Minor mdoc fixes.
MFC r342816: thr_wake(2): Minor mdoc fixes
Jan 13 2019, 6:48 PM
jilles committed rS343001: MFC r342816: thr_wake(2): Minor mdoc fixes.
MFC r342816: thr_wake(2): Minor mdoc fixes
Jan 13 2019, 1:58 PM
jilles committed rS343000: MFC r342817: getconf(1): Minor mdoc fix.
MFC r342817: getconf(1): Minor mdoc fix
Jan 13 2019, 1:57 PM

Jan 9 2019

jilles added a comment to D18765: Add EINTEGRITY as new error number.

If this is only for mounting filesystems, starting mirror/raid and the like, then the new error makes sense to me, including mapping it to EINVAL in the Linux compatibility layer.

Jan 9 2019, 11:28 PM

Jan 8 2019

jilles accepted D18775: Make sh(1) recognize the default $HOME..

A case could be made that it is really login(1) and sshd(8)'s job to set PWD along with chdir(2), but this will do.

Jan 8 2019, 8:26 PM

Jan 7 2019

jilles added a comment to D18765: Add EINTEGRITY as new error number.

Mirror might be able to read both sides but find that they have different values. So it would not know which one to return. Here EIO is not really the right answer as the media is fine, it is just the data that is inconsistent. So saying EINTEGRITY gives a hint that a higher level tool might be able to figure out which one was right and correct the wrong one. None of that is done today, but it is conceivable that it could be done. That said, my main intent is to return this error from UFS when it detects inconsistencies or when a check-hash fails.

Jan 7 2019, 2:45 PM

Jan 6 2019

jilles committed rS342817: getconf(1): Minor mdoc fix.
getconf(1): Minor mdoc fix
Jan 6 2019, 9:43 PM
jilles committed rS342816: thr_wake(2): Minor mdoc fixes.
thr_wake(2): Minor mdoc fixes
Jan 6 2019, 9:34 PM

Jan 5 2019

jilles accepted D18697: Give sh(1) proper prompt by default..
Jan 5 2019, 11:46 PM

Jan 3 2019

jilles committed rS342741: sh: Add test for exported but unset variables.
sh: Add test for exported but unset variables
Jan 3 2019, 8:23 PM
jilles committed rS342740: sh: Do not place exported but unset variables into the environment.
sh: Do not place exported but unset variables into the environment
Jan 3 2019, 8:22 PM

Dec 31 2018

jilles added a comment to D18382: Add new "trim" conversion for dd(1).

A new test in bin/dd/tests that does dd if=/dev/null of=/dev/null status=none conv=trim would be nice (by not writing/trimming any bytes, it does not need a fake disk setup, but it does verify that the option is recognized). Even better would be something using md but that would need more ATF/Kyua magic.

Dec 31 2018, 9:40 PM

Dec 30 2018

jilles accepted D18673: Add current working directory to the default (although commented out) sh(1) prompt..
Dec 30 2018, 11:19 PM

Dec 28 2018

jilles accepted D18662: Simplify the way we set the default sh(1) PS1. No functional changes..
Dec 28 2018, 2:41 PM
jilles committed rS342572: pfind, pfind_any: Correct zombie logic.
pfind, pfind_any: Correct zombie logic
Dec 28 2018, 1:32 PM
jilles closed D18665: pfind, pfind_any: Correct zombie logic.
Dec 28 2018, 1:32 PM
jilles accepted D18663: Collapse $HOME into "~" in PS1..
Dec 28 2018, 1:16 PM
jilles updated the test plan for D18665: pfind, pfind_any: Correct zombie logic.
Dec 28 2018, 12:36 AM
jilles created D18665: pfind, pfind_any: Correct zombie logic.
Dec 28 2018, 12:35 AM

Dec 27 2018

jilles requested changes to D18663: Collapse $HOME into "~" in PS1..
Dec 27 2018, 3:07 PM
jilles added a comment to D18662: Simplify the way we set the default sh(1) PS1. No functional changes..

It seems like the idea is that we're stuck with that ugly \h/\$ bashism anyway so we might as well use it.

Dec 27 2018, 3:01 PM

Dec 18 2018

jilles added a comment to D18602: Add -i ("insecure") option to daemon(8) to create readable pid files..

A world-readable pidfile can be locked in shared mode by any user, which may cause the real daemon to act as if it is already running when it is not (e.g. after it crashed).

Dec 18 2018, 8:53 PM

Dec 12 2018

jilles added inline comments to D17947: Rework UEFI ESP generation.
Dec 12 2018, 11:09 PM

Dec 9 2018

jilles added inline comments to D18481: rc.subr: Implement list_vars without using 'read'.
Dec 9 2018, 10:40 PM
jilles committed rS341767: MFC r341164: sh: Fix ${param?} default error message.
MFC r341164: sh: Fix ${param?} default error message
Dec 9 2018, 7:15 PM

Dec 8 2018

jilles committed rS341725: sh(1): Remove -c string from set builtin documentation.
sh(1): Remove -c string from set builtin documentation
Dec 8 2018, 12:49 PM
jilles added inline comments to D18481: rc.subr: Implement list_vars without using 'read'.
Dec 8 2018, 12:28 PM

Nov 28 2018

jilles committed rS341164: sh: Fix ${param?} default error message.
sh: Fix ${param?} default error message
Nov 28 2018, 8:04 PM

Nov 27 2018

jilles committed rS341097: sh: Use 126 and 127 exit status for failures opening a script.
sh: Use 126 and 127 exit status for failures opening a script
Nov 27 2018, 9:50 PM

Nov 13 2018

jilles added a comment to D17917: d_off support for multiple filesystems.

"Cookie" or "handle" are definitely good words here. The part "to position the directory descriptor to the start of the entry next to the current" could be simplified a bit to "to position the directory descriptor to the next entry" since the position cannot be in the middle of an entry.

Nov 13 2018, 11:03 PM

Nov 9 2018

jilles committed rS340284: sh: Unify EXERROR and EXEXEC.
sh: Unify EXERROR and EXEXEC
Nov 9 2018, 2:58 PM

Oct 28 2018

jilles accepted D17714: Allow absolute paths for O_BENEATH..

The man page seems to contain the right content now. I just have some English language comments.

Oct 28 2018, 10:22 PM

Oct 27 2018

jilles committed rS339822: sh: Use exitstatus instead of exerrno to pass EXEXEC status.
sh: Use exitstatus instead of exerrno to pass EXEXEC status
Oct 27 2018, 8:18 PM
jilles requested changes to D17714: Allow absolute paths for O_BENEATH..
Oct 27 2018, 10:29 AM

Oct 20 2018

jilles accepted D17547: Implement O_BENEATH and AT_BENEATH.
Oct 20 2018, 5:13 PM

Oct 19 2018

jilles added a comment to D17547: Implement O_BENEATH and AT_BENEATH.
In D17547#375528, @kib wrote:

Unconditionally allowing absolute paths with O_BENEATH seems a bit strange, as I expect this to be used for partially untrusted paths. An application can easily check for absolute paths and cause either behaviour (allowing or disallowing).

This was one of my questions. But, it is not clear to me what change, if any, you are proposing.

Oct 19 2018, 3:23 PM

Oct 17 2018

jilles added a comment to D17582: sh: use larger BUFSIZ.

OUTBUFSIZ is somewhat of a strange name given that these buffers contain shell input.

Oct 17 2018, 10:01 PM

Oct 16 2018

jilles requested changes to D17582: sh: use larger BUFSIZ.
Oct 16 2018, 11:00 PM
jilles added a comment to D17582: sh: use larger BUFSIZ.

I think it would make more sense to define a new buffer size constant than modifying BUFSIZ.

Oct 16 2018, 11:00 PM
jilles added a comment to D17547: Implement O_BENEATH and AT_BENEATH.

Unconditionally allowing absolute paths with O_BENEATH seems a bit strange, as I expect this to be used for partially untrusted paths. An application can easily check for absolute paths and cause either behaviour (allowing or disallowing).

Oct 16 2018, 10:53 PM

Oct 14 2018

jilles requested changes to D17554: s/use/show in two occasions of ls.1.

I don't think "Show time for sorting" is better than "Use time for sorting". If you want to avoid the weak "use", something like "Sort by (with .Fl t) or write (with .Fl l) time when file ..." may be better.

Oct 14 2018, 9:59 PM

Sep 28 2018

jilles committed rS338995: MFC r338473: sh: Fix formal overflow in pointer arithmetic.
MFC r338473: sh: Fix formal overflow in pointer arithmetic
Sep 28 2018, 12:30 PM

Sep 16 2018

jilles added a comment to D17146: ps(1): Add a standard exit status section..

This is not wrong, but perhaps some details about different types of errors may be helpful, such as that nonexistent usernames in -U are immediately fatal while an empty result (such as from only nonexistent process IDs in -p or only existing users that do not currently run any process in -U) still writes the header line (if not disabled) and also returns a non-zero exit status.

Sep 16 2018, 1:41 PM

Sep 6 2018

jilles committed rS338473: sh: Fix formal overflow in pointer arithmetic.
sh: Fix formal overflow in pointer arithmetic
Sep 6 2018, 12:30 PM

Aug 26 2018

jilles created D16910: libmd: Install libmd.so.6 into /lib again after SVN r338270.
Aug 26 2018, 4:33 PM
jilles added a comment to D14626: add -e flag to install(1).

I would like to see a consistent behaviour in handling chown/chmod failures between creating directories and installing files. A -e flag looks ugly and should only be added if both behaviours are necessary in different situations.

Aug 26 2018, 2:06 PM
jilles accepted D16843: development(7): Replace "reboot" with "shutdown -r now".

There is actually another important difference between reboot and shutdown -r now: reboot does not run /etc/rc.shutdown. This is because reboot has its own shutdown procedure and does not signal init like init 6 and shutdown -r now do (except in the case of rerooting via reboot -r).

Aug 26 2018, 11:15 AM

Aug 14 2018

jilles accepted D16700: Add SECURITY section to loader(8).
Aug 14 2018, 5:50 PM