jhb (John Baldwin)
User

Projects (6)

User Details

User Since
Mar 11 2014, 8:46 PM (185 w, 59 m)

Recent Activity

Yesterday

jhb added inline comments to D12452: aesni(4): Add support for x86 SHA intrinsics.
Mon, Sep 25, 8:54 PM
jhb committed rS323994: Log signal number passed to PT_STEP requests in KTR_PTRACE traces..
Log signal number passed to PT_STEP requests in KTR_PTRACE traces.
Mon, Sep 25, 8:39 PM
jhb committed rS323993: Use tmpfs_print for tmpfs FIFOs..
Use tmpfs_print for tmpfs FIFOs.
Mon, Sep 25, 8:26 PM
jhb added a comment to D12452: aesni(4): Add support for x86 SHA intrinsics.

If you'd like an alternate testing tool (one that can test AES-CBC chained with SHA for example), you can try 'cryptocheck' from github/bsdjhb/freebsd.git on the 'cryptocheck' branch. You can also run IPSec across a session using the ciphers for testing but that requires a bit more setup.

Mon, Sep 25, 8:08 PM
jhb accepted D12451: crypto(9): Use a more specific error code when a capable driver is not found.

Thanks

Mon, Sep 25, 8:02 PM
jhb accepted D12437: opencrypto: Loosen restriction on HMAC key sizes.
Mon, Sep 25, 8:01 PM
jhb accepted D12120: Remove artificial restriction on lio_listio's operation count.
Mon, Sep 25, 8:00 PM
jhb accepted D12437: opencrypto: Loosen restriction on HMAC key sizes.
In D12437#258495, @cem wrote:
In D12437#258465, @jhb wrote:

Unfortunately we can't just assume 'blocksize' because some algorithms (keyed SHA1, NULL, etc.) have 0 for the keysize. I just think 'max_keysize' is a bit of a misnomer because I consider the 'auth_xform' structures to provide values related to "what the algorithm uses" in which case 'keysize' is a single fixed-length field much like 'blocksize'. Handling "user provided keys" of different sizes is something that needs to happen at a slightly higher level similar to how one uses PKCS padding to deal with data that isn't an even multiple of a block. It's not the end of the world though. I looked and OpenSSL doesn't provide anything like 'keysize' in its EVP_MD structures, and HMAC() requires a key and assumes a block size (so for OpenSSL it seems you have to provide a bogus key for NULL HMAC which seems odd)

Ok. Would you like me to rename max_keysize back to keysize? Are there any other changes you'd like to see before this goes in?

Mon, Sep 25, 6:33 PM
jhb created D12494: Don't defer wakeup()'s for completed journal workitems..
Mon, Sep 25, 6:04 PM
jhb added a comment to D12451: crypto(9): Use a more specific error code when a capable driver is not found.

I still prefer a single errno value (it's also a smaller code patch and is a bit simpler to read post-patch). I don't think adding the errors section is a hard requirement for this change though, that is an old bug.

Mon, Sep 25, 4:24 PM

Fri, Sep 22

jhb created D12470: Pretty-print the kevent structures logged via KTRACE..
Fri, Sep 22, 10:46 PM
jhb added a comment to D12437: opencrypto: Loosen restriction on HMAC key sizes.
In D12437#258463, @cem wrote:
In D12437#258455, @jhb wrote:

Hmm, the commit message is perhaps not clear as it conflates the two meanings of "key" when it first states "there is no limit", which applies to "user supplied key" but it is about correcting the size of the "key the algorithm uses".

I'm not sure I understand the concern or what changes you would like made. I'll try to clarify the commit message slightly.

I would perhaps leave the member as 'keysize' instead of 'max_keysize'.  Perhaps we can replace it in the future with a flag indicating if a key is valid at all and if it is the implied value is 'blocksize'.

I did consider just removing keysize entirely and using the blocksize field as the limit, but worried about missing an instance of the struct (they do not use C99 initializers). Maybe I should just replace it with a padding field. I'd be happy to make this change.

Fri, Sep 22, 9:47 PM
jhb added a comment to D12437: opencrypto: Loosen restriction on HMAC key sizes.

Hmm, the commit message is perhaps not clear as it conflates the two meanings of "key" when it first states "there is no limit", which applies to "user supplied key" but it is about correcting the size of the "key the algorithm uses". I would perhaps leave the member as 'keysize' instead of 'max_keysize'. Perhaps we can replace it in the future with a flag indicating if a key is valid at all and if it is the implied value is 'blocksize'.

Fri, Sep 22, 7:45 PM
jhb added a comment to D12452: aesni(4): Add support for x86 SHA intrinsics.

On a general note, I would almost consider making this part of aesni.ko instead if the effective sets of CPUs that support both instruction sets is the same (or nearly so). In particular, the existing aesni.ko code does not accelerate things that combine AES with an HMAC (like an IPSec session using AES-CBC with a SHA HMAC). Having a single module that registers support for whatever algorithms the CPU supports (only SHA if AESNI isn't available for example) would permit the driver to handle these chained operations by combining AESNI with accelerated SHA hashing. (In this case aesni.ko would perhaps be better named "x86_crypto.ko" or some such to mean "accelerated software crypto for x86".)

Fri, Sep 22, 7:12 PM
jhb added a comment to D12451: crypto(9): Use a more specific error code when a capable driver is not found.

I was going to say that you needed to update crypto(4) but it doesn't have an ERRORS section yet. :(

Fri, Sep 22, 7:07 PM
jhb added a comment to D12437: opencrypto: Loosen restriction on HMAC key sizes.
In D12437#258088, @cem wrote:
In D12437#258077, @jhb wrote:

By larger keys I meant keys larger than the block size. ccr(4) handles this explicitly in ccr_init_hmac_digest() for example. However, this same bit of code needs to be duplicated in all drivers which seems a bit odd.

Ah. None of the drivers I reviewed handles larger than block size correctly. It would be a little odd to have to duplicate that in all of the drivers.

Fri, Sep 22, 7:02 PM
jhb updated the diff for D12409: Retire NOTE_PDATAMASK and NOTE_PCTRLMASK..
  • Style.
Fri, Sep 22, 6:04 PM
jhb committed rS323934: Detect NEON and set HWCAP_NEON if present..
Detect NEON and set HWCAP_NEON if present.
Fri, Sep 22, 5:59 PM
jhb closed D12389: Detect NEON and set HWCAP_NEON if present..
Fri, Sep 22, 5:59 PM
jhb committed rS323933: Correct HWCAP_VFP3* values to match Linux..
Correct HWCAP_VFP3* values to match Linux.
Fri, Sep 22, 5:58 PM
jhb closed D12388: Correct HWCAP_VFP3* values to match Linux..
Fri, Sep 22, 5:58 PM
jhb committed rS323892: Support AEAD requests with non-GCM algorithms..
Support AEAD requests with non-GCM algorithms.
Fri, Sep 22, 12:35 AM
jhb closed D11759: Support AEAD requests with non-GCM algorithms..
Fri, Sep 22, 12:35 AM
jhb added a comment to D12437: opencrypto: Loosen restriction on HMAC key sizes.

By larger keys I meant keys larger than the block size. ccr(4) handles this explicitly in ccr_init_hmac_digest() for example. However, this same bit of code needs to be duplicated in all drivers which seems a bit odd. For keys larger than the block size I would rather have the crypto framework handle this I think by hashing the key before passing it down to the driver. Similarly, I would expect a layer above the drivers to handle any padding required for "short" keys so that drivers always get a key that is a block size.

Fri, Sep 22, 12:27 AM
jhb committed rS323891: Add a new COP_F_CIPHER_FIRST flag for struct crypt_op..
Add a new COP_F_CIPHER_FIRST flag for struct crypt_op.
Fri, Sep 22, 12:22 AM
jhb closed D11757: Add a new COP_F_CIPHER_FIRST flag for struct crypt_op..
Fri, Sep 22, 12:22 AM
jhb committed rS323889: Place the AAD before the plaintext/ciphertext for CIOCRYPTAEAD..
Place the AAD before the plaintext/ciphertext for CIOCRYPTAEAD.
Fri, Sep 22, 12:16 AM
jhb closed D11758: Place the AAD before the plaintext/ciphertext for CIOCRYPTAEAD..
Fri, Sep 22, 12:16 AM

Thu, Sep 21

jhb committed rS323884: MFC 323630: Avoid reusing the wrong buffer for a DDP AIO request..
MFC 323630: Avoid reusing the wrong buffer for a DDP AIO request.
Thu, Sep 21, 11:11 PM
jhb committed rS323882: Only handle _PC_MAX_CANON, _PC_MAX_INPUT, and _PC_VDISABLE for TTY devices..
Only handle _PC_MAX_CANON, _PC_MAX_INPUT, and _PC_VDISABLE for TTY devices.
Thu, Sep 21, 11:05 PM
jhb committed rS323881: Use UFS_LINK_MAX instead of LINK_MAX..
Use UFS_LINK_MAX instead of LINK_MAX.
Thu, Sep 21, 10:34 PM
jhb committed rP450307: Honor SRC_BASE when building..
Honor SRC_BASE when building.
Thu, Sep 21, 9:02 PM
jhb closed D12441: Honor SRC_BASE..
Thu, Sep 21, 9:02 PM
jhb committed rS323877: MFC 323025: Read max_stack_flags from correct object..
MFC 323025: Read max_stack_flags from correct object.
Thu, Sep 21, 8:59 PM
jhb created D12441: Honor SRC_BASE..
Thu, Sep 21, 8:58 PM
jhb added a comment to D12437: opencrypto: Loosen restriction on HMAC key sizes.

Have you checked any drivers to see if they handle the larger keys? ccr(4) does I believe (and out-of-tree qat(4) does). I haven't checked our software ones to see if they do.

Thu, Sep 21, 6:51 PM

Wed, Sep 20

jhb committed rS323827: MFC 322915: Extend the workaround for LLVM bug 11663 to MIPS N32..
MFC 322915: Extend the workaround for LLVM bug 11663 to MIPS N32.
Wed, Sep 20, 8:59 PM
jhb committed rS323826: MFC 322270: Fix a NULL pointer dereference in mly_user_command()..
MFC 322270: Fix a NULL pointer dereference in mly_user_command().
Wed, Sep 20, 8:48 PM

Tue, Sep 19

jhb added a comment to D12414: Fix kvm_getprocs(3) error reporting in ps(1)..

Note that 'ps -p <X>' is supposed to only output the header and not fail it seems, so you need to ensure you aren't breaking that. See rS127513 and rS127149 which added the nentries check and explain why. (svn annotate is your friend, there was only one "noise" change of s/0/NULL/ to skip over to find these two commits for the line you are changing)

Tue, Sep 19, 5:24 PM
jhb accepted D12413: Do not do torn writes to active LDTs..
Tue, Sep 19, 4:59 PM

Mon, Sep 18

jhb committed rS323724: Enable support for lookaside crypto operations by default..
Enable support for lookaside crypto operations by default.
Mon, Sep 18, 11:50 PM
jhb created D12409: Retire NOTE_PDATAMASK and NOTE_PCTRLMASK..
Mon, Sep 18, 11:37 PM
jhb committed rS323723: Add UFS_LINK_MAX for the UFS-specific limit on link counts..
Add UFS_LINK_MAX for the UFS-specific limit on link counts.
Mon, Sep 18, 11:30 PM
jhb accepted D12402: Fix handling of the segment registers on i386..
Mon, Sep 18, 7:20 PM
jhb added inline comments to D12402: Fix handling of the segment registers on i386..
Mon, Sep 18, 4:53 PM

Fri, Sep 15

jhb closed D12384: Add missing newline after unknown MIPS-specific dynamic entries..
Fri, Sep 15, 10:57 PM
jhb committed rS323632: Add missing newline after unknown MIPS-specific dynamic entries..
Add missing newline after unknown MIPS-specific dynamic entries.
Fri, Sep 15, 10:57 PM
jhb committed rS323631: Add an -a flag to getconf..
Add an -a flag to getconf.
Fri, Sep 15, 10:55 PM
jhb closed D12373: Add an -a flag to getconf..
Fri, Sep 15, 10:55 PM
jhb added a dependent revision for D12388: Correct HWCAP_VFP3* values to match Linux.: D12389: Detect NEON and set HWCAP_NEON if present..
Fri, Sep 15, 10:54 PM
jhb added a dependency for D12389: Detect NEON and set HWCAP_NEON if present.: D12388: Correct HWCAP_VFP3* values to match Linux..
Fri, Sep 15, 10:54 PM
jhb updated the diff for D12373: Add an -a flag to getconf..
  • Use warn() for errors from pathconf().
  • Add braces in foreach routines.
Fri, Sep 15, 10:51 PM
jhb committed rS323630: Avoid reusing the wrong buffer for a DDP AIO request..
Avoid reusing the wrong buffer for a DDP AIO request.
Fri, Sep 15, 10:41 PM
jhb created D12389: Detect NEON and set HWCAP_NEON if present..
Fri, Sep 15, 9:04 PM
jhb created D12388: Correct HWCAP_VFP3* values to match Linux..
Fri, Sep 15, 9:03 PM
jhb created D12384: Add missing newline after unknown MIPS-specific dynamic entries..
Fri, Sep 15, 7:24 PM

Thu, Sep 14

jhb committed rS323600: Fix some incorrect sysctl pointers for some error stats..
Fix some incorrect sysctl pointers for some error stats.
Thu, Sep 14, 9:06 PM
jhb added inline comments to D12373: Add an -a flag to getconf..
Thu, Sep 14, 8:51 PM
jhb created D12373: Add an -a flag to getconf..
Thu, Sep 14, 5:38 PM
jhb closed D12371: Recognize NT_PTLWPINFO and NT_ARM_VFP in FreeBSD ELF cores..
Thu, Sep 14, 4:41 PM
jhb committed rS323588: Recognize NT_PTLWPINFO and NT_ARM_VFP in FreeBSD ELF cores..
Recognize NT_PTLWPINFO and NT_ARM_VFP in FreeBSD ELF cores.
Thu, Sep 14, 4:41 PM
jhb committed rS323585: Add AT_EHDRFLAGS and AT_HWCAP on amd64..
Add AT_EHDRFLAGS and AT_HWCAP on amd64.
Thu, Sep 14, 3:34 PM
jhb created D12371: Recognize NT_PTLWPINFO and NT_ARM_VFP in FreeBSD ELF cores..
Thu, Sep 14, 3:32 PM
jhb committed rS323584: Add a NT_ARM_VFP ELF core note to hold VFP registers for each thread..
Add a NT_ARM_VFP ELF core note to hold VFP registers for each thread.
Thu, Sep 14, 3:08 PM
jhb closed D12293: Add a NT_ARM_VFP ELF core note to hold VFP registers for each thread..
Thu, Sep 14, 3:08 PM
jhb committed rS323583: Export get/set_vfpcontext from machdep.c..
Export get/set_vfpcontext from machdep.c.
Thu, Sep 14, 3:06 PM
jhb committed rS323582: Add ptrace operations to fetch and store VFP registers..
Add ptrace operations to fetch and store VFP registers.
Thu, Sep 14, 3:04 PM
jhb closed D12294: Add ptrace operations to fetch and store VFP registers..
Thu, Sep 14, 3:04 PM
jhb updated the diff for D12294: Add ptrace operations to fetch and store VFP registers..
  • Add explicit padding in vfpreg.
Thu, Sep 14, 2:58 PM
jhb committed rS323581: Only mess with VFP state on the CPU for curthread for get/set_vfpcontext..
Only mess with VFP state on the CPU for curthread for get/set_vfpcontext.
Thu, Sep 14, 2:37 PM
jhb closed D12292: Only mess with VFP state on the CPU for curthread for get/set_vfpcontext..
Thu, Sep 14, 2:37 PM
jhb committed rS323580: Add AT_HWCAP flags for VFP settings for FreeBSD/arm..
Add AT_HWCAP flags for VFP settings for FreeBSD/arm.
Thu, Sep 14, 2:31 PM
jhb closed D12291: Add AT_HWCAP flags for VFP settings for FreeBSD/arm..
Thu, Sep 14, 2:31 PM
jhb committed rS323579: Add AT_HWCAP and AT_EHDRFLAGS on all platforms..
Add AT_HWCAP and AT_EHDRFLAGS on all platforms.
Thu, Sep 14, 2:27 PM
jhb closed D12290: Add AT_HWCAP and AT_EHDRFLAGS on all platforms..
Thu, Sep 14, 2:27 PM
jhb added a comment to D12290: Add AT_HWCAP and AT_EHDRFLAGS on all platforms..
In D12290#256189, @kib wrote:
In D12290#255968, @jhb wrote:

One question is if 'u_long' is the right type for 'sv_hwcap'.

De-facto long becomes the way to express the 'native word size' of a machine. It is used more often than register_t, and I think that register_t is actually wrong e.g. on mips n32 for this purpose.

So the actual initialization of *sv_hwcap for native sysents will follow in a separate patch, I suppose ?

Thu, Sep 14, 12:21 AM
jhb updated the diff for D12292: Only mess with VFP state on the CPU for curthread for get/set_vfpcontext..
  • Assert threads are suspended for get/set_vfpcontext.
Thu, Sep 14, 12:10 AM

Wed, Sep 13

jhb accepted D12361: Bring in bit operation functions, ala gawk..

Thanks

Wed, Sep 13, 8:30 PM

Tue, Sep 12

jhb added inline comments to D12292: Only mess with VFP state on the CPU for curthread for get/set_vfpcontext..
Tue, Sep 12, 11:12 PM
jhb added a comment to D12182: Fix build on MIPS and powerpc..

Gerald Pfeifer has recently changed the default for USE_GCC to GCC 6 and will soon fix Uses/compiler.mk to use GCC 6 (instead of 5) for the C++14 case. At that point I think this patch can be committed as is.

Tue, Sep 12, 7:53 PM
jhb updated the diff for D12293: Add a NT_ARM_VFP ELF core note to hold VFP registers for each thread..
  • Add NT_ARM_VFP support to gcore.
Tue, Sep 12, 7:47 PM
jhb added a dependent revision for D12294: Add ptrace operations to fetch and store VFP registers.: D12293: Add a NT_ARM_VFP ELF core note to hold VFP registers for each thread..
Tue, Sep 12, 7:45 PM
jhb added a dependency for D12293: Add a NT_ARM_VFP ELF core note to hold VFP registers for each thread.: D12294: Add ptrace operations to fetch and store VFP registers..
Tue, Sep 12, 7:45 PM
jhb added a dependency for D12294: Add ptrace operations to fetch and store VFP registers.: D12292: Only mess with VFP state on the CPU for curthread for get/set_vfpcontext..
Tue, Sep 12, 7:45 PM
jhb added a dependent revision for D12292: Only mess with VFP state on the CPU for curthread for get/set_vfpcontext.: D12294: Add ptrace operations to fetch and store VFP registers..
Tue, Sep 12, 7:45 PM
jhb removed a dependency for D12294: Add ptrace operations to fetch and store VFP registers.: D12293: Add a NT_ARM_VFP ELF core note to hold VFP registers for each thread..
Tue, Sep 12, 7:44 PM
jhb removed a dependent revision for D12293: Add a NT_ARM_VFP ELF core note to hold VFP registers for each thread.: D12294: Add ptrace operations to fetch and store VFP registers..
Tue, Sep 12, 7:44 PM
jhb added inline comments to D12291: Add AT_HWCAP flags for VFP settings for FreeBSD/arm..
Tue, Sep 12, 7:43 PM
jhb added inline comments to D12294: Add ptrace operations to fetch and store VFP registers..
Tue, Sep 12, 7:02 PM
jhb added inline comments to D12292: Only mess with VFP state on the CPU for curthread for get/set_vfpcontext..
Tue, Sep 12, 7:00 PM
jhb updated the diff for D12291: Add AT_HWCAP flags for VFP settings for FreeBSD/arm..
  • Trim _ARM from HWCAP names.
Tue, Sep 12, 6:58 PM
jhb added inline comments to D12291: Add AT_HWCAP flags for VFP settings for FreeBSD/arm..
Tue, Sep 12, 6:48 PM
jhb updated the diff for D12291: Add AT_HWCAP flags for VFP settings for FreeBSD/arm..
  • Update for sv_hwcap.
Tue, Sep 12, 6:45 PM
jhb added a comment to D12290: Add AT_HWCAP and AT_EHDRFLAGS on all platforms..

Re: AT_HWCAP2, once elf.h is unified (which I will probably work on soon) it will be fairly easy to add.

Tue, Sep 12, 6:43 PM
jhb updated the diff for D12290: Add AT_HWCAP and AT_EHDRFLAGS on all platforms..
  • Fix feature typo.
Tue, Sep 12, 6:41 PM
jhb updated the diff for D12290: Add AT_HWCAP and AT_EHDRFLAGS on all platforms..
  • Replace elf32/64_hwcap with a sv_hwcap pointer in sysentvec.
  • Only provide AT_HWCAP if the pointer exists.
Tue, Sep 12, 6:39 PM
jhb committed rS323501: Handle relocations for newer non-PIC MIPS ABI..
Handle relocations for newer non-PIC MIPS ABI.
Tue, Sep 12, 5:46 PM
jhb closed D12326: Handle relocations for newer non-PIC MIPS ABI..
Tue, Sep 12, 5:46 PM

Mon, Sep 11

jhb created D12326: Handle relocations for newer non-PIC MIPS ABI..
Mon, Sep 11, 11:10 PM
jhb committed rS323466: Add CFI directives for _rtld_bind_start..
Add CFI directives for _rtld_bind_start.
Mon, Sep 11, 10:18 PM