Re: RFR JDK-8239950: Update PKCS9 Attributes to PKCS#9 v2.0 Encodings

2020-06-22 Thread Weijun Wang
Perfect, thank you for encoding exact 16 bytes on each line and have them aligned. Thanks, Max > On Jun 23, 2020, at 7:39 AM, Jamil Nimeh wrote: > > Hi Weijun, > > I've got a new webrev with the test vectors as hexdumps of the DER encoding. > Let me know what you think. > > https://cr.open

Re: RFR JDK-8239950: Update PKCS9 Attributes to PKCS#9 v2.0 Encodings

2020-06-22 Thread Jamil Nimeh
Hi Weijun, I've got a new webrev with the test vectors as hexdumps of the DER encoding.  Let me know what you think. https://cr.openjdk.java.net/~jnimeh/reviews/8239950/webrev.02 --Jamil On 6/22/20 7:56 AM, Jamil Nimeh wrote: Sure, I have code in other tests to do the conversions into hexdum

Re: RFR: 8247995: Avoid use of a mapping function in Permissions.getPermissionCollection

2020-06-22 Thread Claes Redestad
On 2020-06-23 00:30, Roger Riggs wrote: Hi Claes, Looks good. Thanks! Thanks for the followup. No problem. /Claes Roger On 6/22/20 6:29 PM, Claes Redestad wrote: Hi, inlining the new method actually messed up microbenchmark scores a lot (15-80% overhead). I settled for simplifying

Re: RFR: 8247995: Avoid use of a mapping function in Permissions.getPermissionCollection

2020-06-22 Thread Roger Riggs
Hi Claes, Looks good. Thanks for the followup. Roger On 6/22/20 6:29 PM, Claes Redestad wrote: Hi, inlining the new method actually messed up microbenchmark scores a lot (15-80% overhead). I settled for simplifying the duplicate permsMap.get in the outer method in a way that keeps scores neu

Re: RFR: 8247995: Avoid use of a mapping function in Permissions.getPermissionCollection

2020-06-22 Thread Claes Redestad
Hi, inlining the new method actually messed up microbenchmark scores a lot (15-80% overhead). I settled for simplifying the duplicate permsMap.get in the outer method in a way that keeps scores neutral: http://cr.openjdk.java.net/~redestad/8247995/open.01/ Benchmark

Re: RFR: 8247995: Avoid use of a mapping function in Permissions.getPermissionCollection

2020-06-22 Thread Claes Redestad
Hi Roger, I prototyped it as such, and saw a 0.4ns/op overhead in the PermissionImplies.withoutPermission. Thinking about it a bit now, this should be the rare path taken, since it means the permission is not implied and the performance largely irrelevant. I'll simplify as you suggested. /Clae

Re: RFR: 8247995: Avoid use of a mapping function in Permissions.getPermissionCollection

2020-06-22 Thread Roger Riggs
Hi Claes, Its correct as is but I would have written it without duplicating the 'permsMap.get(p.getClass())' invocation and as a single method (unless the inlining of getPermissionCollection(p,create)) is important. A patch on top of yours: diff --git a/src/java.base/share/classes/java/secur

[PATCH] remove redundant initialization of volatile fields with default values

2020-06-22 Thread Сергей Цыпанов
Hello, while investigating an issue I've found out that assignment of default value to volatile fields slows down object instantiation. Consider the benchmark: @State(Scope.Thread) @OutputTimeUnit(TimeUnit.NANOSECONDS) @BenchmarkMode(value = Mode.AverageTime) @Fork(jvmArgsAppend = {"-Xms2g", "-

Re: RFR: 8218021: jarsigner strips the execute permission when signing a .zip file

2020-06-22 Thread Lance Andersen
HI Sean, Looks OK based on our exchanges. Thank you for your time on this one! Best Lance > On Jun 22, 2020, at 7:22 AM, Seán Coffey wrote: > > Thanks Lance. > > I've updated the patch with some extra offline feedback from yourself and Max. > A new warning is printed with use of the new flag

RFR: 8247995: Avoid use of a mapping function in Permissions.getPermissionCollection

2020-06-22 Thread Claes Redestad
Hi, this patch fixes a corner-case performance issue with Permissions.implies(Permission) by not needing to allocate a mapper function (or lambda) on each invocation of getPermissionCollection when there are unresolved permissions present. Bug: https://bugs.openjdk.java.net/browse/JDK-8247995

Re: RFR JDK-8239950: Update PKCS9 Attributes to PKCS#9 v2.0 Encodings

2020-06-22 Thread Jamil Nimeh
Sure, I have code in other tests to do the conversions into hexdumps as well.  I'll convert those today and send a new review out.  Thanks for looking this over, Max! --Jamil On 6/22/2020 12:42 AM, Weijun Wang wrote: Source change looks fine to me. One small suggestion: Is it possible to enc

Re: RFR: 8218021: jarsigner strips the execute permission when signing a .zip file

2020-06-22 Thread Seán Coffey
Thanks Lance. I've updated the patch with some extra offline feedback from yourself and Max. A new warning is printed with use of the new flag. A warning is also printed when file posix permissions are detected on resources being signed. Test updated for that also. https://cr.openjdk.java.ne

Re: RFR[15] JDK-8243114: Implement montgomery{Multiply, Square}intrinsics on Windows

2020-06-22 Thread Andrew Haley
On 18/06/2020 19:33, Martin Balao wrote: > * sharedRuntime_x86_64.cpp > * L3685 >* Do we still need 'long long' type for 'i' and 'cnt' local variables? No, but this is 64-bit-only code. And len is a long, so let's keep it. > * L3724 >* The last argument of 'sub' has type 'int', while

Re: RFR JDK-8239950: Update PKCS9 Attributes to PKCS#9 v2.0 Encodings

2020-06-22 Thread Weijun Wang
Source change looks fine to me. One small suggestion: Is it possible to encode the bytes in the test as HEX instead of BASE64? If so, I can use my human eyes to look at the content. HexPrinter in test/lib can be used to generate them and Utils.toByteArray can be used to translate them back to b