1. 01 7月, 2022 17 次提交
  2. 30 6月, 2022 23 次提交
    • D
      [main] Update dependencies from dotnet/xharness dotnet/runtime-assets... · 3f041eb4
      dotnet-maestro[bot] 提交于
      [main] Update dependencies from dotnet/xharness dotnet/runtime-assets dotnet/roslyn-analyzers (#71376)
      
      [main] Update dependencies from dotnet/xharness dotnet/runtime-assets dotnet/roslyn-analyzers
      3f041eb4
    • P
      [wasm] Preparation for public API in System.Runtime.InteropServices.JavaScript (#71332) · 4823df3d
      Pavel Savara 提交于
      *    new ref assembly System.Runtime.InteropServices.JavaScript - empty
      *    new src assembly System.Runtime.InteropServices.JavaScript
              moved all implementation from System.Private.Runtime.InteropServices.JavaScript into it
      *    added IMPORTS, EXPORTS to js API
      *    refactored setup_managed_proxy and teardown_managed_proxy in JS
      *    added more range assert for working with wasm memory in JS
      4823df3d
    • D
    • V
      Use full path for rd.xml in ilc rsp file (#71480) · 928f0700
      Vitek Karas 提交于
      This makes the rsp file work regardless of the current directory and makes it much easier for reproducing issues.
      
      So far all of the other paths in the file are generated as absolute paths, except for the rd.xml file path.
      928f0700
    • F
      Improve interoperability of NTLM encryption/decryption and authentication (#71373) · ac9e1f96
      Filip Navara 提交于
      * Implement NTLM quirk in NegotiateStreamPal.Encrypt/Decrypt
      
      NegotiateStream on non-encrypted connections with NTLM sends the
      messages in a special `<signature token><plain text message>` format.
      That's not something that gss_wrap/gss_unwrap would produce. It can be
      produced through gss_get_mic/gss_verify_mic calls though so let's do
      that.
      
      * Remove MakeSignature/VerifySignature from SspiCli interop
      
      The method names were misleading since they wrapped the EncryptMessage
      and DecryptMessage native APIs and not the MakeSignature/VerifySignature
      APIs that also exist.
      
      * Remove unused sequenceNumber parameters in NegotiateStreamPal.Encrypt/Decrypt
      
      The SSPI / GSSAPI providers keep track of the sequence numbers
      themselves.
      
      * Replace NTAuthentication.MakeSignature/VerifySignature with Wrap/Unwrap
      
      This maps directly to the semantics of gss_wrap/gss_unwrap methods
      that are used in many specifications. It replaces the misleading name
      which in SSPI API is an equivalent of gss_get_mic/gss_verify_mic.
      It also fixes the declaration to actually decode the buffers both
      on Windows and Unix. In NTLM the content of the message is sealed
      and needs to be decoded.
      
      Note that previously on Unix the VerifySignature API didn't decode the
      content. On Windows it did decode the content inside a buffer that was
      passed as ReadOnlySpan<byte> but it didn't communicate back the offset
      of the decoded data.
      
      The SMTP GSSAPI authentication code was thus reading incorrect data.
      In case the underlying authentication was Kerberos the data were
      not encrypted and they were located at the beginning of the buffer
      so it was not an issue. In case the underlying authentication was
      NTLM it was looking at the NTLM signature token which luckily
      happens to always start with the bytes 01 00 00 00. That exactly
      matched the expected value by accident.
      
      * Fix processing of last SMTP GSSAPI token
      
      The last token in the GSSAPI SASL authentication mechanism is a bit
      mask that specifies the supported security protections offered by the
      server and the maximum token size. The client is supposed to choose
      one of the protections and reply back. Relax the check to actually
      support servers that offer anything but "no protection". As long
      as the server also offers no protection we can choose it.
      
      * Update unit test to use the new Wrap/Unwrap APIs
      
      * Reset NTLM keys after successful Negotiate authentication
      
      Updated the managed NTLM implementation and the fake servers to
      implement the specification quirk:
      
      MS-SPNG section 3.2.5.1 NTLM RC4 Key State for MechListMIC and First
      Signed Message specifies that the RC4 sealing keys are reset back to
      the initial state for the first message.
      
      Since the managed implementation doesn't expose encryption yet it
      didn't affect any observable behavior. Likewise the fake servers
      didn't need this code path yet.
      
      * Add GSSAPI authentication test to the loopback SMTP server
      
      * Workaround for https://github.com/gssapi/gss-ntlmssp/issues/77
      
      * Expose the confidentiality flag from the native gss_wrap/unwrap APIs
      
      * Allow default credentials for NTLM server-side on Linux/macOS
      ac9e1f96
    • L
      Fixing a typo in copying pdb files (#71450) · 667812e4
      Lakshan Fernando 提交于
      * fixing a typo in copying pdb files
      
      * FB
      667812e4
    • A
      Implement HttpProtocolException for HTTP/2 (#71345) · f3a04a61
      Anton Firszov 提交于
      Contributes to #70684
      f3a04a61
    • A
      [wasm] Wasm.Build.Tests - fixes for tests failing on CI (#70704) · ce6d3dff
      Ankit Jain 提交于
      * [wasm][nodejs] Ensure that stdout/stderr have been flushed out before exiting
      
      When the results xml is large, and we are writing the base64
      representation in one line, `node` can exit before all the output gets
      flushed out. This results in xharness getting an incomplete
      `STARTRESULTXML <len> <base64> ... ` with missing `ENDRESULTXML`, thus
      no `testResults.xml` is generated.
      
      This can be seen in the case of `Microsoft.Extensions.Primitives.Tests`
      which has xml ~140KB, and `System.Memory.Tests` which has a xml ~13MB.
      
      So, wait for the two streams to be flushed out, with a timeout of 3secs.
      
      * [wasm] Wasm.Build.Tests: improve reading output from processes
      
      - Fix to call `WaitForExit()` once `WaitForExit(int)` returns, which
        ensures that all the async handlers have been run.
      
      - Also, for non-browser xharness runs use the emitted `wasm-console.log`
        as the output, so we don't depend on xharness' stdout.
      
      * Wasm.Build.Tests: Run the crypto test only with browser. Other cases are covered in library tests
      
      * Enable WasmTemplateTests.ConsolePublishAndRun
      
      Fixes https://github.com/dotnet/runtime/issues/70675
      
      * Wasm.Build.Tests: avoid unncessary copy when building locally
      
      Copy sdk for testing workloads only on CI.
      
      * Address feedback from @kg
      
      * Remove timeout on flushing stdout/stderr streams, for console templates, IOW, user apps
      ce6d3dff
    • J
      JIT: Avoid introducing GT_NULLCHECK in gtTryRemoveBoxUpstreamEffects (#71439) · 9e703be9
      Jakob Botsch Nielsen 提交于
      Adding GT_NULLCHECK nodes requires knowledge of which basic block the
      nullcheck will end up in. We do not have this easily available in all
      places this method is called, and regardless using GT_NULLCHECK here has
      minimal diffs.
      
      Fix #71193
      9e703be9
    • M
      #71252 disable Atan2PiTest on Android x86 (#71382) · d04a5899
      Meri Khamoyan 提交于
      * #71252 disable AtanPiTest on Android x86
      d04a5899
    • A
      [wasm] InterpToNativeGenerator: use invariant culture when generating C (#71460) · 14dac227
      Ankit Jain 提交于
      * [wasm] InterpToNativeGenerator: use invariant culture when generating C
      
      .. functions.
      
      Fixes https://github.com/dotnet/runtime/issues/71149
      
      * Add missing file
      14dac227
    • J
      Allow specifying the in/ref/out marshaller scenarios for the generator factory (#71466) · fae43479
      Jeremy Koritzinsky 提交于
      Allow specifying the in/ref/out marshaller scenarios for the generator factory and use the element scenarios types for element scenarios.
      
      Also fix a typo in the CollectionsOfCollectionsStress test that implementing this exposed.
      fae43479
    • S
      Implement NarrowUtf16ToAscii for AArch64 (#70080) · 04025505
      SwapnilGaikwad 提交于
      * Implement NarrowUtf16ToAscii for AArch64
      
      * Combine x64 and AArch64 implementations of NarrowUtf16ToAscii intrinsic
      
      * Improve comments in VectorContainsNonAsciiChar
      04025505
    • E
      Enable AES encryption on Browser WASM (#70915) · 6a02d5d3
      Eric Erhardt 提交于
      * Copy RijndaelManagedTransform from reference source
      
      Copied from https://github.com/microsoft/referencesource/blob/5697c29004a34d80acdaf5742d7e699022c64ecd/mscorlib/system/security/cryptography/rijndaelmanagedtransform.cs
      
      * Format document
      
      * Clean up RijndaelManagedTransform
      
      1. Add copyright
      2. Remove unnecessary attributes
      3. Mark class as internal
      4. Remove FEATURE_CRYPTO define. Only support CipherMode.CBC and PaddingMode.PKCS7.
      5. Remove Contracts and replace with Debug.Assert.
      
      * Get RijndaelManagedTransform to compile successfully.
      
      * Make RijndaelManagedTransform implement ILiteSymmetricCipher
      
      And hook it up to AesImplementation for Browser.
      
      * Enable all the Aes tests on Browser.
      
      Mark Aes APIs as supported on Browser.
      
      * Mark all CipherModes and PaddingModes other than CBC and PKCS7 as unsupported on Browser
      
      * Make fields readonly and rename according to code style.
      
      * Replace RijndaelManagedTransformMode with bool encrypting.
      
      * Throw PNSE for unsupported CipherMode and PaddingMode.
      
      Remove unnecessary parameters and fields that aren't supported.
      
      * Fix DecryptorReuse_LeadsToSameResults test so it works on Browser and passes for all CipherModes on other platforms
      
      * Spanify the input buffer in RijndaelManagedTransform Transform and TransformFinal.
      
      * First round of PR feedback
      
      * Make _Nb constant BlockSizeInts
      
      * Get rid of unnecessary allocations
      
      * Remove unsafe pointers from RijndaelManagedTransform.
      
      * PR feedback
      
      Encrypt and Decrypt index arrays are constant values.
      Use CopyTo in more places.
      
      * Rename RijndaelManagedTransform => AesManagedTransform
      
      * Change AesManagedTransform to no longer do padding.
      
      Instead, reuse the UniversalCrypto infrastructure to do padding.
      
      * Remove UnsupportedPlatform for PaddingMode
      
      * PR feedback
      
      - clean up unnecessary changes
      
      * PR feedback
      
      Remove UnsupportedOSPlatform("browser") from CipherMode and the SymmetricAlgorithm base class. These create too many false positives and aren't technically accurate since other implementations may support these on browser.
      6a02d5d3
    • J
      Use llvm-objcopy for regular and cross builds (#71446) · c389356d
      Jan Vorlicek 提交于
      * Use llvm-objcopy for regular and cross builds
      
      This change enables using llvm-objcopy instead of the gnu objcopy for
      building runtime. The benefit for cross build is that the host machine
      no longer needs to have cross-architecture gnu objcopy installed.
      
      There was an attempt to enable llvm objcopy in the past, but it was
      reverted due to a problem with objcopy in llvm 9 that incorrectly
      didn't strip debug symbols when `--strip-unneeded` option was specified.
      I have fixed that by adding `--strip-debug` in addition to the`--strip-unneeded`.
      
      * Fix OSX build, reflect PR feedback
      c389356d
    • E
      Add CET pipeline (#71223) · 8b59076b
      Eduardo Velarde 提交于
      8b59076b
    • J
      8334fa5e
    • S
      Delete "fgMorphGetStructAddr" (#71078) · 120db95b
      SingleAccretion 提交于
      120db95b
    • A
      Enable hot/cold splitting of EH funclets (#71236) · 3401228a
      Aman Khalid 提交于
      Currently, EH funclets are placed after the function's main body in memory.
      Via the heuristic that EH funclets are infrequently run, this enables a simple splitting implementation:
      * If we find a good split point in the function's main body, split there as usual.
      * Else if the function has exception handling,
         * Check that all the EH funclets are cold. If any of the funclets are frequently run, don't bother splitting at all.
         * If all of the EH funclets are cold, split at `fgFirstFuncletBB`, so that all EH funclets are placed in the cold section.
      3401228a
    • S
      Delete dead code (#71351) · 4a85a491
      SingleAccretion 提交于
      4a85a491
    • S
      Check layout compatibility before morphing `OBJ(ADDR(LCL_VAR))` into a list of... · 0866cd52
      SingleAccretion 提交于
      Check layout compatibility before morphing `OBJ(ADDR(LCL_VAR))` into a list of promoted fields (#71348)
      
      * Fix non-x86 targets
      
      * Fix x86
      
      * Add tests
      0866cd52
    • S
      Enable `TYP_STRUCT` `LCL_VAR/LCL_FLD` call args on ARM64 (#71328) · 282fd1b7
      SingleAccretion 提交于
      * Arm64: local morph
      
      * Arm64: morph
      
      * Fix MultiregStructArgs up
      282fd1b7
    • S
      Spill non-morphable split args on non-ARM targets (#71380) · 1d3e4eef
      SingleAccretion 提交于
      * Spill split args on non-ARM targets
      
      * Add a test
      
      * Work around vectors in varargs being broken
      1d3e4eef