Page MenuHomeFreeBSD

delphij (Xin Li)
User

Projects (8)

User Details

User Since
May 14 2014, 3:53 AM (265 w, 6 d)

Recent Activity

Yesterday

delphij committed rS349151: Separate kernel crc32() implementation to its own header (gsb_crc32.h) and.
Separate kernel crc32() implementation to its own header (gsb_crc32.h) and
Mon, Jun 17, 7:49 PM
D20313: Fortuna: allow increased concurrency is now accepted and ready to land.
Mon, Jun 17, 7:36 PM
D20313: Fortuna: allow increased concurrency is now accepted and ready to land.
Mon, Jun 17, 6:33 PM
D20313: Fortuna: allow increased concurrency now requires changes to proceed.
Mon, Jun 17, 5:55 PM

Sat, Jun 15

delphij committed rS349048: In ask(): override default option if any of alwaysyes/alwaysno/rdonly is.
In ask(): override default option if any of alwaysyes/alwaysno/rdonly is
Sat, Jun 15, 7:23 AM
delphij committed rS349047: Blankspace. No actual code change..
Blankspace. No actual code change.
Sat, Jun 15, 6:52 AM

Tue, Jun 11

delphij committed rS348967: Avoid out of boundary access when checking invalid long filenames..
Avoid out of boundary access when checking invalid long filenames.
Tue, Jun 11, 10:21 PM

Fri, Jun 7

delphij accepted D20312: random(4): Generalize algorithm-independent APIs.

For the microoptimization: Note that it's possible to avoid the additional branching by doing unlock in both cases, e.g.:

Fri, Jun 7, 10:07 PM
delphij added a comment to D20312: random(4): Generalize algorithm-independent APIs.

Actually, the delay/sleep is probably not necessary (releasing the lock is sufficient for another thread to race in).

Fri, Jun 7, 9:05 PM
delphij accepted D20312: random(4): Generalize algorithm-independent APIs.

LGTM but please amend the wmsg message to not exceed 6 characters (see comment inline) prior to commit.

Fri, Jun 7, 8:11 PM
delphij committed rS348769: MFC r348302:.
MFC r348302:
Fri, Jun 7, 2:36 AM
delphij committed rS348767: preen should work independently with alwaysyes and alwaysno..
preen should work independently with alwaysyes and alwaysno.
Fri, Jun 7, 1:39 AM

Tue, Jun 4

delphij requested changes to D20517: fsck_msdosfs: Use le32enc/le16enc macros to simplify.
Tue, Jun 4, 8:29 PM
delphij committed rS348602: Don't increment cl after increment..
Don't increment cl after increment.
Tue, Jun 4, 7:02 AM

Fri, May 31

delphij accepted D20466: random(4): Fix RANDOM_LOADABLE build.
Fri, May 31, 5:41 PM

Thu, May 30

delphij committed rS348382: MFC r348302:.
MFC r348302:
Thu, May 30, 4:09 AM
delphij committed rS348381: Unexpand be32dec()..
Unexpand be32dec().
Thu, May 30, 2:24 AM
delphij accepted D20466: random(4): Fix RANDOM_LOADABLE build.
Thu, May 30, 2:19 AM

Tue, May 28

delphij accepted D20448: style.9: Codify tolerance for eliding blank lines.
Tue, May 28, 6:19 PM

Mon, May 27

delphij committed rS348302: Chase r261913: hardcoded default crypt(3) algorithm is SHA-512 when DES.
Chase r261913: hardcoded default crypt(3) algorithm is SHA-512 when DES
Mon, May 27, 6:37 AM

Sat, May 25

delphij committed rS348261: MFC r347244:.
MFC r347244:
Sat, May 25, 1:58 AM

Fri, May 24

delphij added a comment to D20366: Bug 182518: Support crypt parameters in login.conf.

This version does not change the default, but allows users to change the parameters.

Fri, May 24, 5:40 PM
delphij requested changes to D20366: Bug 182518: Support crypt parameters in login.conf.

In the Kitchener/Waterloo hackathon we discussed the plan as three parts

  1. (This patch) allow users to overwrite the default parameters through login.conf
Fri, May 24, 4:33 PM
delphij added a comment to D17083: Alter the prototype of qsort_r(3) to match glibc..

Ping?

Fri, May 24, 5:36 AM
delphij committed rS348225: Remove kgzip and kgzldr..
Remove kgzip and kgzldr.
Fri, May 24, 5:35 AM
delphij closed D20248: Delete kgzip and kgzldr..
Fri, May 24, 5:34 AM
delphij updated the diff for D20248: Delete kgzip and kgzldr..

Rebase and minor fixup.

Fri, May 24, 3:06 AM
delphij commandeered D20248: Delete kgzip and kgzldr..
Fri, May 24, 3:04 AM
delphij committed rS348222: cryptodeflate: Drop z_stream zbuf.state->dummy from SDT probe..
cryptodeflate: Drop z_stream zbuf.state->dummy from SDT probe.
Fri, May 24, 2:44 AM
delphij closed D20222: Drop z_stream zbuf.state->dummy from SDT probe..
Fri, May 24, 2:44 AM

Thu, May 23

delphij requested changes to D20366: Bug 182518: Support crypt parameters in login.conf.

(also see D15713)

Thu, May 23, 5:24 PM
delphij committed rS348149: MFC r347244:.
MFC r347244:
Thu, May 23, 5:50 AM
delphij closed D20190: Delete #include <sys/inflate.h> from sys/mips..
Thu, May 23, 5:17 AM
delphij committed rS348148: Delete unneeded #include <sys/inflate.h> from sys/mips..
Delete unneeded #include <sys/inflate.h> from sys/mips.
Thu, May 23, 5:17 AM

Wed, May 22

delphij accepted D20358: save-entropy(8), rc.d/random: Set nodump flag.
Wed, May 22, 9:25 PM
delphij requested changes to D20358: save-entropy(8), rc.d/random: Set nodump flag.

Looks good to me overall, but please remove the warn (see comment inline for reasoning).

Wed, May 22, 8:20 PM

Tue, May 21

delphij accepted D20344: Add deprecation warnings for weaker algorithms to geli(4)..
Tue, May 21, 10:49 PM
delphij accepted D20318: random(4): deduplicate explicit_bzero() in harvest.

Looks good to me in principal.

Tue, May 21, 2:16 AM

Sun, May 19

delphij committed rS347977: MFC r347488,347606: Update leap-seconds to leap-seconds.3676924800..
MFC r347488,347606: Update leap-seconds to leap-seconds.3676924800.
Sun, May 19, 6:31 PM

May 19 2019

delphij committed rS347965: MFC r347488,347606: Update leap-seconds to leap-seconds.3676924800..
MFC r347488,347606: Update leap-seconds to leap-seconds.3676924800.
May 19 2019, 4:56 AM

May 16 2019

delphij added inline comments to D20193: Relocate crc32 functions from libkern.h to gsb_crc32.h/c.
May 16 2019, 4:55 PM
delphij committed rP501771: Update to 0.5.2..
Update to 0.5.2.
May 16 2019, 5:50 AM

May 15 2019

delphij committed rS347606: Replace the leap-seconds file in r347488 from USNO with a.
Replace the leap-seconds file in r347488 from USNO with a
May 15 2019, 3:39 AM

May 14 2019

delphij accepted D20222: Drop z_stream zbuf.state->dummy from SDT probe..

LGTM.

May 14 2019, 6:07 PM
delphij added reviewers for D20222: Drop z_stream zbuf.state->dummy from SDT probe.: markj, bz.

+markj and bz@ for the DTrace probe.

May 14 2019, 5:58 PM

May 13 2019

delphij accepted D20248: Delete kgzip and kgzldr..
May 13 2019, 4:13 PM
delphij accepted D20239: Fortuna: Fix false negatives in is_random_seeded().
May 13 2019, 4:11 PM
delphij accepted D20222: Drop z_stream zbuf.state->dummy from SDT probe..

I think this can go independently with other changes: is there some reason that you would like to wait instead of proceeding?

May 13 2019, 3:55 PM

May 12 2019

delphij accepted D20242: Depessimize arc4rand.

Looks reasonable to me.

May 12 2019, 4:09 AM

May 11 2019

delphij committed rS347488: Update leap-seconds to leap-seconds.3757622400..
Update leap-seconds to leap-seconds.3757622400.
May 11 2019, 2:22 PM

May 10 2019

delphij accepted D20218: Do not return NULL from the Intel hw PRNG ifunc resolver..
May 10 2019, 12:15 AM

May 9 2019

delphij accepted D20190: Delete #include <sys/inflate.h> from sys/mips..

Warner -- can you commit this change?

May 9 2019, 4:47 PM

May 8 2019

delphij committed rS347244: Move contrib/zlib to sys/contrib/zlib so that we can use it in kernel..
Move contrib/zlib to sys/contrib/zlib so that we can use it in kernel.
May 8 2019, 4:50 PM
delphij closed D20191: Relocate contrib/zlib to sys/contrib/zlib so that we can use this in kernel..

Committed as rS347244.

May 8 2019, 4:45 PM
delphij accepted D20195: random: Don't complain noisily when an entropy source is slow.

I think the change as-is is fine.

May 8 2019, 8:58 AM
delphij accepted D20191: Relocate contrib/zlib to sys/contrib/zlib so that we can use this in kernel..

I'll commit this after a universe build.

May 8 2019, 8:27 AM
delphij accepted D20192: random: x86 driver: Prefer RDSEED over RDRAND when available.

LGTM in principle

May 8 2019, 12:35 AM

May 6 2019

delphij accepted D20163: Remove IPSEC from GENERIC due to performance issues.

No objection from me.

May 6 2019, 5:57 PM

Apr 21 2019

delphij added inline comments to D19928: random(4): More thoroughly attempt to ensure seeding during priming.
Apr 21 2019, 7:08 AM

Apr 18 2019

delphij accepted D19944: random(4): Restore availability tradeoff prior to r346250.
Apr 18 2019, 7:15 PM
delphij added inline comments to D19944: random(4): Restore availability tradeoff prior to r346250.
Apr 18 2019, 5:22 PM
delphij accepted D19944: random(4): Restore availability tradeoff prior to r346250.

(I'm not against with the overall plan, but see my comments about use of hash function inline).

Apr 18 2019, 5:04 PM

Apr 17 2019

delphij added inline comments to D19928: random(4): More thoroughly attempt to ensure seeding during priming.
Apr 17 2019, 11:29 PM
delphij added inline comments to D19944: random(4): Restore availability tradeoff prior to r346250.
Apr 17 2019, 11:19 PM

Apr 16 2019

delphij requested changes to D19928: random(4): More thoroughly attempt to ensure seeding during priming.
Apr 16 2019, 8:37 PM
delphij accepted D19927: stack_protector: Add tunable to bypass random cookies.

For a stopgap fix I think it's fine. Note that it's probably better to derive __stack_chk_guard from SHA512 of something that we change often (e.g. __FreeBSD_version) concatenate with something that potentially varies, like getcyclecount(), for the fallback guard data: these are not secure random numbers, but would make it harder for an attacker to develop more generic smashing attack.

Apr 16 2019, 6:34 PM
delphij accepted D19926: random(4): Add is_random_seeded(9) KPI.
Apr 16 2019, 4:36 PM

Apr 15 2019

delphij added a comment to D19918: sys: Remove DEV_RANDOM device option.

I'm in favor of this change; please consider this as an explicit "accepted" if nobody objects in a week.

Apr 15 2019, 10:16 PM
delphij accepted D19744: random(4): Block read_random(9) on initial seeding.

The code changes looks good to me -- and thanks for working on this!

Apr 15 2019, 7:09 AM
delphij committed rS346220: Don't cast result from malloc()..
Don't cast result from malloc().
Apr 15 2019, 6:33 AM

Apr 12 2019

delphij accepted D19713: tpm: Prevent session hijack..

I don't really know the internals of this driver (ideally this should be done by someone who is familiar with it), but are we sure that the write method is always called before a read? Also, if the discard callout is fired, should the owner tid be reset (because the contents is now discarded)?

If the write method hasn't been called before a read then there will be nothing in the buffer and the read will fail - as pending_data_length equals 0.
Essentially the way it works is that write is used to do the entire communication with TPM and read just copies the response to userspace.
As for the discard callout, since it also clears the buffer read would fail either way and tid is not checked in write, as it is used only to restrict access to buffer contents which is empty when a write is performed.

Apr 12 2019, 3:49 PM
delphij committed rS346147: MFC r345647:.
MFC r345647:
Apr 12 2019, 2:27 AM
delphij committed rS346146: MFC r345647:.
MFC r345647:
Apr 12 2019, 2:24 AM

Apr 11 2019

delphij added a comment to D19713: tpm: Prevent session hijack..

I don't really know the internals of this driver (ideally this should be done by someone who is familiar with it), but are we sure that the write method is always called before a read? Also, if the discard callout is fired, should the owner tid be reset (because the contents is now discarded)?

Apr 11 2019, 7:03 PM
delphij added inline comments to D19744: random(4): Block read_random(9) on initial seeding.
Apr 11 2019, 8:02 AM

Apr 6 2019

delphij requested changes to D19744: random(4): Block read_random(9) on initial seeding.

Noticed a few minor issues, please see comment inline. Overall I think the change is good.

Apr 6 2019, 7:36 PM
delphij committed rS345976: Write string constant differently to improve readability..
Write string constant differently to improve readability.
Apr 6 2019, 3:42 AM
delphij closed D19829: Write string constant differently to improve readability..
Apr 6 2019, 3:42 AM

Apr 5 2019

delphij created D19829: Write string constant differently to improve readability..
Apr 5 2019, 6:45 AM
delphij committed rS345901: Fix build..
Fix build.
Apr 5 2019, 2:37 AM
delphij committed rS345900: Implement checking of `.' and `..' entries of subdirectory..
Implement checking of `.' and `..' entries of subdirectory.
Apr 5 2019, 2:21 AM
delphij closed D19824: Implement checking of `.' and `..' entries of subdirectory..
Apr 5 2019, 2:21 AM

Apr 4 2019

delphij committed rS345897: Restore lfcl when LOSTDIR's chain was corrupted and overwritten.
Restore lfcl when LOSTDIR's chain was corrupted and overwritten
Apr 4 2019, 11:34 PM
delphij created D19824: Implement checking of `.' and `..' entries of subdirectory..
Apr 4 2019, 11:31 PM
delphij committed rS345894: Restore the ability of checking and fixing next free.
Restore the ability of checking and fixing next free
Apr 4 2019, 11:16 PM

Apr 3 2019

delphij accepted D19760: Replace read_random(9) with more appropriate arc4rand(9) KPIs.
Apr 3 2019, 7:46 AM
delphij accepted D19712: tpm: Add a cv_wait to the harvesting function..
Apr 3 2019, 7:40 AM
delphij committed rS345839: Assert that q can't be NULL. 'empty' is always non-NULL when DIREMPTY.
Assert that q can't be NULL. 'empty' is always non-NULL when DIREMPTY
Apr 3 2019, 7:09 AM

Mar 31 2019

delphij accepted D19742: random(4): Attempt to persist entropy promptly.

LGTM, thanks!

Mar 31 2019, 4:44 AM

Mar 29 2019

delphij requested changes to D19742: random(4): Attempt to persist entropy promptly.

The shutdown script change LGTM, but I insist that libexec/save-entropy/save-entropy.sh line 83 should be removed as explained in previous comment.

Mar 29 2019, 10:50 PM
delphij added a comment to D19742: random(4): Attempt to persist entropy promptly.
In D19742#423456, @cem wrote:

I think a 'fsync saved-entropy.1 .' should be sufficient.
We don't really care if the renames were not persistent until the new entropy is saved,

Sure, if that is the power-fail/crash behavior of un-fsynced renames. But I don't believe that model is accurate. There is no requirement that the underlying filesystem order the dirent writes in a way that matches this observable behavior; the only requirement is that it is persisted by fsync.
FS&K §9.6.2 is clear, "All updates to the seed file must be atomic" and goes into more detail in §9.6.5.

Mar 29 2019, 10:38 PM
delphij added a reviewer for D19744: random(4): Block read_random(9) on initial seeding: O3: Kernel Random Numbers Generator.

I think you should separate most of the read_random() -> arc4random_buf() change out because in most cases the code should use the latter exclusively, especially places where the return value of read_random() were not tested because it would be a strict improvement to the status quo.

Mar 29 2019, 7:47 AM
delphij added a comment to D19742: random(4): Attempt to persist entropy promptly.

I think a 'fsync saved-entropy.1 .' should be sufficient.

Mar 29 2019, 7:32 AM

Mar 28 2019

delphij committed rS345647: Distinguish between lseek errors and read errores..
Distinguish between lseek errors and read errores.
Mar 28 2019, 6:20 PM
delphij added a comment to D19706: Allow Kernel to link in both legacy libkern/zlib and new sys/contrib/zlib..

I need to understand better kernel malloc/free as they take 1 extra argument compare to stdlib.h.

Mar 28 2019, 5:43 AM

Mar 27 2019

delphij updated subscribers of D19706: Allow Kernel to link in both legacy libkern/zlib and new sys/contrib/zlib..

Hi, first of all, kudos for taking on this! The change looks mostly Ok to me except a few minor issues commented inline.

Mar 27 2019, 6:23 PM

Mar 23 2019

delphij added a comment to D19686: Update message displaying during `zpool upgrade`.

Why is the partition index changed from 1 to 2? (The change looks otherwise fine to me).

Mar 23 2019, 7:04 AM

Mar 22 2019

delphij accepted D19682: Make it possible to update TMPFS mount point from read-only to read-write and vice versa..
Mar 22 2019, 8:03 PM
delphij accepted D19620: Add an option to use TPM as entropy source.

Thanks! LGTM (note that discard_buffer_callout should probably also be drained, but it's unrelated to this change).

Mar 22 2019, 4:48 PM

Mar 21 2019

delphij requested changes to D19620: Add an option to use TPM as entropy source.

I have noticed a few minor issues and have commented inline.

Mar 21 2019, 7:31 PM