Bug 218269 - Use _CFURLConnectionSetFrameworkStubs for SecItemShim instead of DYLD_INTERPOSE on Apple Silicon Macs
Summary: Use _CFURLConnectionSetFrameworkStubs for SecItemShim instead of DYLD_INTERPO...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Alex Christensen
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2020-10-27 18:23 PDT by Alex Christensen
Modified: 2020-10-28 21:53 PDT (History)
4 users (show)

See Also:


Attachments
Patch (5.33 KB, patch)
2020-10-27 18:32 PDT, Alex Christensen
darin: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Alex Christensen 2020-10-27 18:23:23 PDT
Use _CFURLConnectionSetFrameworkStubs instead of DYLD_INTERPOSE on Apple Silicon Macs
Comment 1 Alex Christensen 2020-10-27 18:32:56 PDT
Created attachment 412493 [details]
Patch
Comment 2 Darin Adler 2020-10-27 18:44:02 PDT
Comment on attachment 412493 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=412493&action=review

> Source/WebKit/Shared/mac/SecItemShim.cpp:146
> -#if PLATFORM(IOS_FAMILY)
> +#if PLATFORM(IOS_FAMILY) || (PLATFORM(MAC) && !CPU(X86_64))

How about this instead:

    #if !CPU(X86_64)

It doesn’t seem like we need IOS_FAMILY vs. MAC here.

> Source/WebKit/Shared/mac/SecItemShim.cpp:158
> -#if PLATFORM(MAC)
> +#if PLATFORM(MAC) && CPU(X86_64)

How about this instead:

    #if CPU(X86_64)

Or:

    #else

It doesn’t seem like we need IOS_FAMILY vs. MAC here.
Comment 3 mitz 2020-10-27 18:49:23 PDT
Comment on attachment 412493 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=412493&action=review

>> Source/WebKit/Shared/mac/SecItemShim.cpp:146
>> +#if PLATFORM(IOS_FAMILY) || (PLATFORM(MAC) && !CPU(X86_64))
> 
> How about this instead:
> 
>     #if !CPU(X86_64)
> 
> It doesn’t seem like we need IOS_FAMILY vs. MAC here.

I believe the iOS Simulator is x86_64 but doesn’t have the interposing shim.
Comment 4 Alex Christensen 2020-10-27 20:04:06 PDT
http://trac.webkit.org/r269094
Comment 5 Radar WebKit Bug Importer 2020-10-27 20:05:18 PDT
<rdar://problem/70749479>
Comment 6 Sam Weinig 2020-10-28 10:39:17 PDT
I would propose we use a more clear USE(DYLD_INTERPOSE_FOR_SEC_ITEM_SHIM) or something like that.
Comment 7 Alex Christensen 2020-10-28 21:53:16 PDT
I would propose we stop using DYLD_INTERPOSE entirely and replace it with _CFURLConnectionSetFrameworkStubs in the short term and a per-NSURLSession solution I have yet to write in the long term.  Given the nature of this radar, though, I wanted the absolute minimum risk and the easiest cherry picking to the branch.