1. 15 6月, 2021 3 次提交
  2. 14 6月, 2021 15 次提交
    • F
      Fix NTLM authentication from macOS to Windows machines (#54101) · 17481fef
      Filip Navara 提交于
      * Fix NTLM authentication from macOS to Windows machines
      
      The GSSAPI implementation on macOS has partially broken NTLM implementation. It only supports NTLMv2 with the message integrity code (MIC) as specified by the MS-NLMP specification. The MIC is calculated using HMAC-MD5 authentication code over the exchanged NTLM messages with a key named ExportedSessionKey. The proper generation of ExportedSessionKey requires the implementation to negotiate correct capabilities, namely NTLMSSP_NEGOTIATE_KEY_EXCH and at least one of NTLMSSP_NEGOTIATE_SIGN or NTLMSSP_NEGOTIATE_SEAL flags. By default the macOS implementation negotiates NTLMSSP_NEGOTIATE_KEY_EXCH and sends MIC but fails to set one of the additional flags that would make the key exchange valid. This results in violation of the following part of the NTLM specification:
      
      "A session key MUST always exist to generate the MIC (section 3.1.5.1.2) in the authenticate message. NTLMSSP_NEGOTIATE_ALWAYS_SIGN MUST be set in the NEGOTIATE_MESSAGE to the server and the CHALLENGE_MESSAGE to the client."
      
      Adding the GSS_C_INTEG_FLAG flag forces macOS to properly negitiate all the necessary flags (NTLMSSP_NEGOTIATE_ALWAYS_SIGN and NTLMSSP_NEGOTIATE_SIGN) to make the MIC exchange valid. This in turn enables the whole NTLM exchange to be recognized as valid by Windows server side.
      
      The gss-ntlmssp package on Linux interprets the GSS_C_INTEG_FLAG flag as additional negotiation of NTLMSSP_NEGOTIATE_SIGN and NTLMSSP_NEGOTIATE_KEY_EXCH. That should not hurt anything and in fact it may improve security depending on specific configuration. The flag was already specified when NTLM was used by System.Net.Mail.SmtpClient.
      
      * Add temporary test to verify NTLM and Negotiate connections from all platforms
      
      Notably this is expected to fail on Android and tvOS where GSSAPI is not available.
      
      The test machine is single purpose virtual machine running in Azure with clean Windows Server 2019 installation and all the patches. It hosts IIS with single static page behind an NT authentication. The test account and the machine itself is disposable and does NOT contain any sensitive data. Nevertheless I don't expect this test to be merged.
      
      * Use full domain name in test credentials
      
      * Revert "Use full domain name in test credentials"
      
      This reverts commit ea4dc615824c207845628143addc7d8c774ce702.
      
      * Revert "Add temporary test to verify NTLM and Negotiate connections from all platforms"
      
      This reverts commit abf44ce1430edf631fe74b15d354eca9073b4c83.
      17481fef
    • D
      Set the async local just before execution (#54133) · 2ac5e2bb
      David Fowler 提交于
      * Set the async local just before execution.
      - Subscribing to DiagnosticListener.AllListeners replays all created DiagnosticListener instances. Because of this, we need to set the async local just before the execution of the entry point so that we only collect the events that are relevant to the call. Right now, it's also firing with the async local set pre-maturely.
      - Wrote a concurrency test to make sure it's safe to instantiate the factory in parallel.
      2ac5e2bb
    • E
      Make JsonSerializer work when IsDynamicCodeSupported is false. (#54027) · 49fa010d
      Eric Erhardt 提交于
      Use the non-Emit codepath if IsDynamicCodeSupported is false.
      49fa010d
    • J
      Logging Generator: messaging fix (#54080) · 469db3d7
      Jeff Layton 提交于
      469db3d7
    • H
      Cleanup BitVector32 (#54097) · 342e4cd6
      Huo Yaoyuan 提交于
      * Cleanup BitVector32
      
      * Cleanup Section.ToString
      342e4cd6
    • D
      [main] Update dependencies from mono/linker dotnet/runtime dotnet/arcade... · 4c0d2f01
      dotnet-maestro[bot] 提交于
      [main] Update dependencies from mono/linker dotnet/runtime dotnet/arcade dnceng/internal/dotnet-optimization dotnet/xharness dotnet/hotreload-utils (#54060)
      
      [main] Update dependencies from mono/linker dotnet/runtime dotnet/arcade dnceng/internal/dotnet-optimization dotnet/xharness dotnet/hotreload-utils
      4c0d2f01
    • T
      a87bc705
    • R
      8a9a24bd
    • M
      [MacCatalyst][libraries] Skip Crashing test suites (#53625) · bc16a7bd
      Mitchell Hwang 提交于
      * [MacCatalyst][libraries] Skip Crashing test suites
      
      * Fix typos
      
      * Add System.Linq.Parallel skip AppCrash
      
      * Add Amore arm64 flakes
      
      * Add additional App Launch Failure skip
      
      * Add System.IO.UnmanagedMemoryStream.Tests skip
      
      * Add more tests failing to app launch failures
      Co-authored-by: NMitchell Hwang <mitchell.hwang@microsoft.com>
      bc16a7bd
    • D
      Update dependencies from https://github.com/mono/linker build 20210610.3 (#54061) · 49bcd39b
      dotnet-maestro[bot] 提交于
      Microsoft.NET.ILLink.Tasks
       From Version 6.0.100-preview.6.21308.1 -> To Version 6.0.100-preview.6.21310.3
      Co-authored-by: Ndotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
      49bcd39b
    • A
      Always build with hot reload support (in a component) (#54124) · 8818fb0d
      Aleksey Kliger (λgeek) 提交于
      Get rid of the ENABLE_METADATA_UPDATE ifdef.  To disable hot reload,
      don't include the component in the runtime
      8818fb0d
    • A
      Remove allocation from MsQuicAddressHelpers.IPEndPointToINet (#54095) · af5c2385
      Austin Wise 提交于
      Assuming that GetAddressBytes() does not have side effects, this call
      should not be needed.
      
      Clean up from dotnet/runtime#53461
      af5c2385
    • J
      Fix ILVerify dependencies (#54112) · 5bf0a3f4
      Jan Kotas 提交于
      - Update ILVerify to build for NetCoreAppToolCurrent
      5bf0a3f4
    • I
      [mono] Reenable some amd64 intrinsic tests, enable amd64 ISA extensions when... · b8b3ef13
      imhameed 提交于
      [mono] Reenable some amd64 intrinsic tests, enable amd64 ISA extensions when AOTing, several intrinsics fixes (#53752)
      
      Changes:
      
      * Consolidate SSE shuffle constant unrolling
      
        Remove `OP_SSE2_SHUFFLE`, which is unused.
      
        Rename `OP_SSE_SHUFFLE` to `OP_SSE_SHUFPS`, to make this more consistent with
        the naming convention used for other SSE shuffles.
      
        Use `immediate_unroll_*` instead of hand-writing branch emission. These
        branch tables are huge (in the simplest case, with 256 different constant
        values, we can spend over 1KB of code on nothing but `shufps` and `jmp`s, and
        the cost gets worse if any tail duplication happens), and are currently
        emitted inline.  Future work ought to:
      
        1. use a sequence of extractelement/insertelement instructions, which can be
        optimized into a constant shuffle when the shuffle control parameter is
        constant, and otherwise generates a high-latency but low-code-size fallback
        (note that this only works for shuffles); or
      
        2. emit the fallback branch tables out of line and use `llvm.is.constant` to
        generate either a constant shuffle or a call to a fallback shuffle branch
        table function (the cost isn't too bad: a direct-call/ret pair would add ~4-5
        cycles and eat an RSB slot on top of the cost of the branch table).
      
        Fixes `JIT/HardwareIntrinsics/X86/Regression/GitHub_21855/GitHub_21855_r`.
      
      
      * Fix intrinsification for MathF.Round
      
        `OP_SSE41_ROUNDS` takes two source registers, not one.
      
        TODO: Investigate what happens with `llvm.round` and
        `llvm.experimental.constrained.round`.
      
        Fixes `JIT/Intrinsics/MathRoundSingle_r`,
        `JIT/Math/Functions/Functions_r`, and
        `JIT/Performance/CodeQuality/Math/Functions/Functions`.
      
      
      * Clean up intrinsic group lookup
      
        Use a dummy never-supported intrinsic group as a default fallback, instead of
        adding a special-case "intrinsic group not present" branch
      
        Correctly intrinsify get_IsSupported even when not using LLVM
      
        Fixes spurious `System.PlatformNotSupportedException`s when calling
        `get_IsSupported` when the LLVM backend isn't being used.
      
      
      * The "not" SSE comparions are unordered, so use the appropriate unordered LLVM
        IR comparisons
      
        Add labeled constants for the immediate parameter we pass to CMPSS/CMPSD.
      
        Fixes `Regressions.coreclr/GitHub_34094/Test34094`.
      
      
      * Fix `LoadAndDuplicateToVector128`
      
        `LoadAndDuplicateToVector128` should load exactly one 8-byte value from memory
        before broadcasting it into both lanes in a 128-bit result vector.
      
        Fixes `JIT/HardwareIntrinsics/X86/Sse3/LoadAndDuplicateToVector128_r`.
      
      
      * Implement constant unrolling for `Sse41.DotProduct`
      
        As with shuffles, the fallback jump table should probably be kept out of line
        someday; `vdpps` uses 6 bytes of space, so any fallback jump table for the
        selection control mask will be at least 1.5kb large.
      
        Fixes `JIT/HardwareIntrinsics/X86/Sse41/DotProduct_r`.
      
      
      * Implement constant unrolling for `Sse41.Blend`
      
        The usual: big jump blobs should be out of line, possible to use
        extract/insertelement.
      
      
      * Zero is part of the domain of `lzcnt` and shouldn't yield an undef.
      
        Use fully-defined `llvm.ctlz` when implementing `OP_LZCNT32/64`.
      
        Fixes `JIT/HardwareIntrinsics/X86/Regression/GitHub_21666/GitHub_21666_r`
      
      
      * Unify amd64/arm64 vector extraction handling
      
        Removes `OP_EXTRACT_U1` and `OP_EXTRACT_U2`. Instead, sign/zero extension is
        determined via `inst_c1` for `OP_EXTRACT_*` and `OP_XEXTRACT_*` (and
        `OP_EXTRACTX_U2`, which doesn't seem to be generated as part of intrinsic
        translation), which must be set to a MonoTypeEnum.
      
        Replaces `OP_EXTRACT_VAR_*` with `OP_XEXTRACT_*`.
      
        Fixes `JIT/Regression/JitBlue/GitHub_23159/GitHub_23159` and
        `JIT/Regression/JitBlue/GitHub_13568/GitHub_13568`.
      
      * Remove `OP_DPPS`; it is unused
      
      * Disable `JIT/Regression/CLR-x86-JIT/V1.1-M1-Beta1/b143840` when running with mono LLVM AOT
      
      * Disable finalizearray when running with mono LLVM AOT
      
      * Disable Vector256_1/Vector128_1 tests on wasm
      
      * Enable sse4.2, popcnt, lzcnt, bmi, and bmi2 when AOT compiling the runtime
        tests.
      
      * Pass the runtime variant to `helixpublishwitharcade.proj`, and forward this
        runtime variant to testenvironment.proj.
      
        This is used to selectively enable LLVM JIT on the LLVM AOT lanes. Removes
        the hack added to CLRTest.Execute.Bash.targets that did this for arm64 (which
        happens to only have an LLVM AOT lane for runtime tests right now).
      
      * Enable `JIT/HardwareIntrinsics/General/Vector128_1/**`,
        `JIT/HardwareIntrinsics/General/Vector256/**`,
        `JIT/HardwareIntrinsics/General/Vector256_1/**`, and
        `JIT/HardwareIntrinsics/X86/General/IsSupported*/**` for LLVM AOT on amd64.
      b8b3ef13
    • J
      Infrastructure: correct dependencies and clean helix agent from stray corerun procs (#54094) · 86cebb31
      Juan Hoyos 提交于
      * Add dependency on coreclr in monojit/monointerpreter jobs explicitly to solve pipeline issue #53842
      * Use Helix Pre/Post hooks to kill linkering corerun instances to work around ARM64 agent issues
      Co-authored-by: NKunal Pathak <Kunal.Pathak@microsoft.com>
      86cebb31
  3. 13 6月, 2021 2 次提交
  4. 12 6月, 2021 20 次提交
    • T
      fix ConnectWithCertificateChain quic test (#54026) · 4aa29f43
      Tomas Weinfurt 提交于
      4aa29f43
    • J
      Unify macOS ARM64 write protection holders with W^X ones (#54067) · cc6d3147
      Jan Vorlicek 提交于
      * Unify macOS ARM64 write protection holders with W^X ones
      
      This change removes the original holders that were added for changing
      memory protection for executable code and moves the actual switching to
      the recently added W^X holders.
      
      The unixexports files don't support target specific symbols. So I needed
      to export a dummy version of the PAL_JitWriteProtect for macOS x64.
      cc6d3147
    • D
      Scope events to the execution of the entry point (#54090) · 2a011f80
      David Fowler 提交于
      * Scope events to the execution of the entry point
      - Today we're using the global event source and events that fire in the app domain get captured and this can result in capturing the wrong instances. This fix uses an async local to scope the events for the HostingEventListener to the execution of the application's entry point.
      - Removed the RemoteExecutor as a result of this change
      - Remove RequirementsMet property
      2a011f80
    • A
      [mono] Componentize hot reload (#52866) · 23336b89
      Aleksey Kliger (λgeek) 提交于
      * Move most of the code to hot_reload.c
      
      For the fast path data, we will leave a struct in the runtime with the values
      and pass its address to the component to fill in.
      
      * Mark functions used by hot reload with MONO_COMPONENT_API
      
      * Drop the metadata_update_init EE and runtime callbacks
      
      They're unused now
      
      * remove mono_ prefix from some static methods in hot reload
      
      * Always define metadata_update_published runtime callback
      
      * Move metadata update data out of MonoImage, into hot_reload component
      
      Use separate baseline and delta structs for tracking updates
      
      * move slowpath metadata lookup, and cleanup to hot_reload component
      
      Move the delta_image and method_table_update data into BaselineInfo
      and DeltaInfo.  Keep a single `MonoImage:has_updates` flag to switch
      over to the slow path through the component.
      
      * fixup: set has_updates on first update, too
      
      Also setup the BaselineInfo and DeltaInfo earlier before the first
      string heap lookup
      
      * fixup after rebase
      
      * ConsoleDelta sample: build on osx-arm64, use hotreload buildtool
      
      instead of hotreload-delta-gen CLI tool
      
      * fix whitespace
      
      * bugfix - get the value of MonoImage:has_updates not its address
      
      * Dynamically query runtime for GetApplyUpdateCapabilities
      
      if the hot reload component is stubbed out, return empty capabilities.
      
      This is a step toward removing FEATURE_METADATA_UPDATE and
      ENABLE_METADATA_UPDATE defines and solely using component
      infrastrucutre for controlling behavior
      
      * Mark some runtime functions with MONO_COMPONENT_API
      
      * fixup icall declaration
      
      * fix whitespace and indentation
      
      * Return capabilities if hot reload component is available, even if env var isn't set.
      
      Match CoreCLR behavior.  Also makes our testsuite actually run the
      tests (we check for capabilities before running setting
      DOTNET_MODIFIABLE_ASSEMBLIES using the remote executor)
      23336b89
    • J
      simplify gh53564 test (#54081) · 1b382e2b
      John Salem 提交于
      1b382e2b
    • D
      Add support for IServiceProviderIsService (#54047) · c14ac488
      David Fowler 提交于
      * Add support for IServiceProviderIsService
      - This optional service lets consumers query to see if a service is resolvable without side effects (not having to explicitly resolve the service).
      - Added new spec tests to verify the baseline behavior based on IServiceCollection features.
      - Handle built in services as part of IsServce
      - Special case built in services as part of the IsService check
      - Make the tests part of the core DI tests and enable skipping via a property
      Co-authored-by: NTravis Illig <tillig@paraesthesia.com>
      c14ac488
    • A
    • S
      Fix 54025 (#54070) · b2fe6678
      Steve MacLean 提交于
      b2fe6678
    • S
      Fix Deflate/Brotli/CryptoStream handling of partial and zero-byte reads (#53644) · 68dec6ac
      Stephen Toub 提交于
      Stream.Read{Async} is supposed to return once at least a byte of data is available, and in particular, if there's any data already available, it shouldn't block.  But Read{Async} on DeflateStream (and thus also GZipStream and ZLibStream), BrotliStream, and CryptoStream won't return until either it hits the end of the stream or the caller's buffer is filled.  This makes it behave very unexpectedly when used in a context where the app is using a large read buffer but expects to be able to process data as it's available, e.g. in networked streaming scenarios where messages are being sent as part of bidirectional communication.
      
      This fixes that by stopping looping once any data is consumed.  Just doing that, though, caused problems for zero-byte reads.  Zero-byte reads are typically used by code that's trying to delay-allocate a buffer for the read data until data will be available to read.  At present, however, zero-byte reads return immediately regardless of whether data is available to be consumed.  I've changed the flow to make it so that zero-byte reads don't return until there's at least some data available as input to the inflater/transform (this, though, doesn't 100% guarantee the inflater/transform will be able to produce output data).
      
      Note that both of these changes have the potential to introduce breaks into an app that erroneously depended on these implementation details:
      - If an app passing in a buffer of size N to Read{Async} depended on that call always producing the requested number of bytes (rather than what the Stream contract defines), they might experience behavioral changes.
      - If an app passing in a zero-byte buffer expected it to return immediately, it might instead end up waiting until data was actually available.
      68dec6ac
    • H
      Expose RoundUpToPowerOf2 (#53992) · ffcef4af
      Huo Yaoyuan 提交于
      * 32bit
      
      * 64bit
      
      * Expose in public api
      
      * Unit test
      
      * Add more tests
      
      * Use in test
      
      * Apply suggestions from code review
      Co-authored-by: NStephen Toub <stoub@microsoft.com>
      Co-authored-by: NStephen Toub <stoub@microsoft.com>
      ffcef4af
    • J
      Improve dotnet-pgo output and fix null type handles (#53494) · 146b3b16
      Jakob Botsch Nielsen 提交于
      * Improve dotnet-pgo output and fix null type handles
      
      * When comparing .mibc files, find a unique name to print for both files
        by repeatedly appending another parent directory on it.
      
      * When comparing .mibc files, print a comparison of type handle
        histogram data
      
      * Fix a potential division by zero
      
      * Print some info when producing .mibc that are based on samples/LBR
        data
      
      * Fix .mibc read type handles with value 0 to actually return IsNull
      
      * Use different devirt threshold for interfaces and classes
      
      * Add ClassProfileFlags to PgoFormat.cs
      146b3b16
    • Z
      [mono][llvm] Remove some dead code. (#53920) · dd72b1d2
      Zoltan Varga 提交于
      dd72b1d2
    • B
      Fix mismatch between morph and lower (#53911) · e492dc7e
      Bruce Forstall 提交于
      For x86 delegate invoke tailcall via helper calls,
      Lower expects the `this` pointer in a LCL_VAR. Morph
      (`fgMorphTailCallViaJitHelper`) was letting a LCL_FLD go through
      instead of inserting a copy of the field to a temp local.
      
      Simply change the condition in morph to match the condition in Lower.
      
      Fixes #53568
      e492dc7e
    • S
      Reenable 48786 (#54028) · 6cea5f70
      Steve MacLean 提交于
      Reenable tests disabled for issue 48786
      
      This should be fixed now that we have moved to crossgen2
      6cea5f70
    • T
      make MsQuicStatusCodes platform specific (#54031) · cf10c2dc
      Tomas Weinfurt 提交于
      * make MsQuicStatusCodes platform specific
      
      * add missing StreamLimit
      cf10c2dc
    • M
      Re-enabled mock tests for H/3. (#53802) · 9ea8c200
      Marie Píchová 提交于
      * Re-enabled mock tests for H/3.
      
      * Used IsMockQuicSupported to run the mock tests only on supported platforms.
      
      * Disabling mock test completely.
      
      * Hanging test fix experiment.
      
      * Disabled some mock tests failing in CI.
      9ea8c200
    • T
      Fix assertion on debugger-engine (#54041) · 645dfe69
      Thays Grazia 提交于
      Sync to mono/mono #21100
      645dfe69
    • V
      Update dotnet SDK to 6.0 Preview 4 (#53808) · 8698d0f3
      Viktor Hofer 提交于
      * Update dotnet SDK to 6.0 Preview 4
      
      Update the minimum and target version of the SDK to 6.0 Preview 4.
      
      Part of https://github.com/dotnet/runtime/issues/53411
      
      * Switch to using eng/targetingpacks.targets for redirecting runtime pack location in src/mono/sample
      
      * Fix binder tracing tests
      
      * Set UseMonoRuntime property so the dotnet SDK can pull the mono runtime packs
      
      This is necessary after the changes from https://github.com/dotnet/sdk/pull/16909.
      
      * Move UseMonoRuntimeProperty and set it to false in coreclr
      Co-authored-by: NAlexander Köplinger <alex.koeplinger@outlook.com>
      Co-authored-by: NElinor Fung <elfung@microsoft.com>
      8698d0f3
    • I
      Vector.Sum(Vector<T>) API implementation for horizontal add. (#53527) · 6afe03ef
      Ivan Zlatanov 提交于
      * Vector.Sum(Vector<T>) API implementation for horizontal add.
      
      * Fixed inccorrect referece to Arm64 AddAccross intrinsic function.
      
      * Added implementation for hardware accelerated Vector<T>.Sum for long, ulong, float, double on ARM64.
      
      * Fixed formatting issue.
      
      * Correctness.
      
      * Fixed compiler error for ARM64.
      
      * Formatting issue.
      
      * More explicit switch statement. Fixed wrong simd size for NI_Vector64_ToScalar.
      
      * Fixed auto formatting issue.
      
      * Use AddPairwiseScalar for double, long and ulong on ARM64 for VectorT128_Sum.
      
      * Forgot ToScalar call after AddPairwiseScalar.
      
      * Fixed wrong return type.
      6afe03ef
    • P