Re: RFR: 4887998: Use Integer.rotateLeft() and rotateRight() in crypto implementations

2022-07-11 Thread Jatin Bhateja
On Tue, 12 Jul 2022 00:44:37 GMT, Mark Powers wrote: >> https://bugs.openjdk.org/browse/JDK-4887998 > > 1. I tried to keep as much of the original parenthesis as possible. I can do > the minimum number if that is what you prefer. > 2. I'll change MD4, MD5, and SHA-1 to use `rotateLeft` in keepin

Re: RFR: 4887998: Use Integer.rotateLeft() and rotateRight() in crypto implementations [v2]

2022-07-11 Thread Mark Powers
> https://bugs.openjdk.org/browse/JDK-4887998 Mark Powers has updated the pull request incrementally with one additional commit since the last revision: second iteration - Changes: - all: https://git.openjdk.org/jdk/pull/9456/files - new: https://git.openjdk.org/jdk/pull/9456

Re: RFR: 4887998: Use Integer.rotateLeft() and rotateRight() in crypto implementations

2022-07-11 Thread Mark Powers
On Mon, 11 Jul 2022 21:20:43 GMT, Mark Powers wrote: > https://bugs.openjdk.org/browse/JDK-4887998 1. I tried to keep as much of the original parenthesis as possible. I can do the minimum number if that is what you prefer. 2. I'll change MD4, MD5, and SHA-1 to use `rotateLeft` in keeping with h

Re: RFR: 4887998: Use Integer.rotateLeft() and rotateRight() in crypto implementations

2022-07-11 Thread Weijun Wang
On Mon, 11 Jul 2022 21:20:43 GMT, Mark Powers wrote: > https://bugs.openjdk.org/browse/JDK-4887998 Two comments: 1. There are many unnecessary parenthesis, like `(32 - s)` or `(Integer... + 5)`. 2. Why choose `rotateRight` and not `rotateLeft`? https://en.wikipedia.org/wiki/SHA-1 uses "circula

Re: RFR: 8282730: LdapLoginModule throw NPE from logout method after login failure [v2]

2022-07-11 Thread Weijun Wang
> Add null-checks in all `LoginModule` implementations. It's possible that an > application calls `logout` after a login failure, where most internal > variables for principals and credentials are null and removing a null from > the `Subject`'s principals and credentials sets will trigger a > `

Re: RFR: 8282730: LdapLoginModule throw NPE from logout method after login failure

2022-07-11 Thread Weijun Wang
On Fri, 1 Jul 2022 17:31:06 GMT, Weijun Wang wrote: > Add null-checks in all `LoginModule` implementations. It's possible that an > application calls `logout` after a login failure, where most internal > variables for principals and credentials are null and removing a null from > the `Subject`

RFR: 4887998: Use Integer.rotateLeft() and rotateRight() in crypto implementations

2022-07-11 Thread Mark Powers
https://bugs.openjdk.org/browse/JDK-4887998 - Commit messages: - Merge - first iteration Changes: https://git.openjdk.org/jdk/pull/9456/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=9456&range=00 Issue: https://bugs.openjdk.org/browse/JDK-4887998 Stats: 31 lines in 5

Re: RFR: 8282730: LdapLoginModule throw NPE from logout method after login failure

2022-07-11 Thread Sean Mullan
On Mon, 11 Jul 2022 19:49:13 GMT, Weijun Wang wrote: >> src/jdk.security.auth/share/classes/com/sun/security/auth/module/UnixLoginModule.java >> line 289: >> >>> 287: subject.getPrincipals().remove(GIDPrincipal); >>> 288: } >>> 289: if (supplementaryGroups != null) {

Re: RFR: 8282730: LdapLoginModule throw NPE from logout method after login failure

2022-07-11 Thread Weijun Wang
On Mon, 11 Jul 2022 20:09:31 GMT, Sean Mullan wrote: >> Add null-checks in all `LoginModule` implementations. It's possible that an >> application calls `logout` after a login failure, where most internal >> variables for principals and credentials are null and removing a null from >> the `Sub

Re: RFR: 8282730: LdapLoginModule throw NPE from logout method after login failure

2022-07-11 Thread Sean Mullan
On Fri, 1 Jul 2022 17:31:06 GMT, Weijun Wang wrote: > Add null-checks in all `LoginModule` implementations. It's possible that an > application calls `logout` after a login failure, where most internal > variables for principals and credentials are null and removing a null from > the `Subject`

Re: RFR: 8282730: LdapLoginModule throw NPE from logout method after login failure

2022-07-11 Thread Weijun Wang
On Mon, 11 Jul 2022 18:49:26 GMT, Sean Mullan wrote: >> Add null-checks in all `LoginModule` implementations. It's possible that an >> application calls `logout` after a login failure, where most internal >> variables for principals and credentials are null and removing a null from >> the `Sub

Re: RFR: 8282730: LdapLoginModule throw NPE from logout method after login failure

2022-07-11 Thread Sean Mullan
On Fri, 1 Jul 2022 17:31:06 GMT, Weijun Wang wrote: > Add null-checks in all `LoginModule` implementations. It's possible that an > application calls `logout` after a login failure, where most internal > variables for principals and credentials are null and removing a null from > the `Subject`

Re: RFR 8050427 LoginContext tests to cover JDK-4703361

2022-07-11 Thread سراج نورأحمد

[jdk19] Integrated: 8287809: Revisit implementation of memory session

2022-07-11 Thread Maurizio Cimadamore
On Wed, 15 Jun 2022 18:06:44 GMT, Maurizio Cimadamore wrote: > This is a JDK 19 clone of: https://github.com/openjdk/jdk/pull/9017 This pull request has now been integrated. Changeset: fed3af8a Author:Maurizio Cimadamore URL: https://git.openjdk.org/jdk19/commit/fed3af8ae069fc760a2

Integrated: 8275662: remove test/lib/sun/hotspot

2022-07-11 Thread Coleen Phillimore
On Fri, 8 Jul 2022 19:46:17 GMT, Coleen Phillimore wrote: > This change removes the last remnants of sun/hotspot/WhiteBox.java and other > classes, and uses the versions in jdk/test/whitebox. > I used sed to change sun.hotspot.{gc,code,cpuinfo} to jdk.test.whitebox and > deleted the old files a

Re: RFR: 8275662: remove test/lib/sun/hotspot

2022-07-11 Thread Coleen Phillimore
On Fri, 8 Jul 2022 19:46:17 GMT, Coleen Phillimore wrote: > This change removes the last remnants of sun/hotspot/WhiteBox.java and other > classes, and uses the versions in jdk/test/whitebox. > I used sed to change sun.hotspot.{gc,code,cpuinfo} to jdk.test.whitebox and > deleted the old files a

Re: RFR: 8289908: Skip bounds check for cases when String is constructed from entirely used byte[] [v3]

2022-07-11 Thread Сергей Цыпанов
On Mon, 11 Jul 2022 08:02:43 GMT, Сергей Цыпанов wrote: >> The new constructor looks very odd, especially when it does not have an >> explanation and doesn't describe the required preconditions for calling it. >> Is there a better way than adding a non-functional argument? >> The "unused" name

Re: RFR: 8289908: Skip bounds check for cases when String is constructed from entirely used byte[] [v3]

2022-07-11 Thread Сергей Цыпанов
> We can skip bounds check and null check for Charset in case we use the array > entirely and the Charset is either default one or proven to be non-null. > > Benchmark results: > > before > > Benchmark Mode Cnt Score > Error Units > StringC

Re: RFR: 8289768: Clean up unused code [v3]

2022-07-11 Thread Chris Hegarty
On Fri, 8 Jul 2022 07:08:46 GMT, Daniel Jeliński wrote: >> This patch removes many unused variables and one unused label reported by >> the compilers when relevant warnings are enabled. >> >> The unused code was found by compiling after removing `unused` from the list >> of disabled warnings

Re: RFR: 8289908: Skip bounds check for cases when String is constructed from entirely used byte[] [v2]

2022-07-11 Thread Сергей Цыпанов
> We can skip bounds check and null check for Charset in case we use the array > entirely and the Charset is either default one or proven to be non-null. > > Benchmark results: > > before > > Benchmark Mode Cnt Score > Error Units > StringC

Re: RFR: 8289908: Skip bounds check for cases when String is constructed from entirely used byte[] [v2]

2022-07-11 Thread Сергей Цыпанов
On Fri, 8 Jul 2022 14:04:14 GMT, Roger Riggs wrote: >> But if I roll back the added constructor I'll go through existing public one >> `public String(byte[] bytes, int offset, int length, Charset charset)` doing >> bounds check twice, won't I? > > The new constructor looks very odd, especially

Re: RFR: 8289768: Clean up unused code [v3]

2022-07-11 Thread Michael McMahon
On Fri, 8 Jul 2022 07:08:46 GMT, Daniel Jeliński wrote: >> This patch removes many unused variables and one unused label reported by >> the compilers when relevant warnings are enabled. >> >> The unused code was found by compiling after removing `unused` from the list >> of disabled warnings