WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
197264
Make NetworkCache blobs safe for mmap instead of not using blobs
https://bugs.webkit.org/show_bug.cgi?id=197264
Summary
Make NetworkCache blobs safe for mmap instead of not using blobs
Alex Christensen
Reported
2019-04-24 17:16:42 PDT
Make NetworkCache blobs safe for mmap instead of not using blobs
Attachments
Patch
(7.73 KB, patch)
2019-04-24 17:18 PDT
,
Alex Christensen
no flags
Details
Formatted Diff
Diff
Patch
(7.62 KB, patch)
2019-04-24 22:26 PDT
,
Alex Christensen
no flags
Details
Formatted Diff
Diff
Patch
(7.10 KB, patch)
2019-04-25 10:22 PDT
,
Alex Christensen
no flags
Details
Formatted Diff
Diff
Show Obsolete
(2)
View All
Add attachment
proposed patch, testcase, etc.
Alex Christensen
Comment 1
2019-04-24 17:18:49 PDT
Created
attachment 368203
[details]
Patch
Alex Christensen
Comment 2
2019-04-24 22:26:57 PDT
Created
attachment 368213
[details]
Patch
Antti Koivisto
Comment 3
2019-04-25 00:38:06 PDT
Comment on
attachment 368213
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=368213&action=review
Looks fine except the part where it doesn't build.
> Source/WebKit/NetworkProcess/cache/NetworkCacheBlobStorage.cpp:97 > + makeSafeToUseMemoryMapForPath(blobPathString);
Can't you do this after the existence test? Or do you specifically want to upgrade existing files?
> Source/WebKit/NetworkProcess/cache/NetworkCacheStorage.cpp:-281 > -static size_t estimateRecordsSize(unsigned recordCount, unsigned blobCount) > -{ > - auto inlineBodyCount = recordCount - std::min(blobCount, recordCount); > - auto headerSizes = recordCount * 4096; > - auto inlineBodySizes = (maximumInlineBodySize / 2) * inlineBodyCount; > - return headerSizes + inlineBodySizes; > -}
You can't delete this function!
> Source/WebKit/NetworkProcess/cache/NetworkCacheStorage.cpp:315 >
...because you call it here.
Alex Christensen
Comment 4
2019-04-25 10:21:27 PDT
Comment on
attachment 368213
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=368213&action=review
>> Source/WebKit/NetworkProcess/cache/NetworkCacheBlobStorage.cpp:97 >> + makeSafeToUseMemoryMapForPath(blobPathString); > > Can't you do this after the existence test? Or do you specifically want to upgrade existing files?
I want to "upgrade" existing files. I don't think it matters if I do it before or after the call to access, but it needs to be before the call to mapFile.
Alex Christensen
Comment 5
2019-04-25 10:22:21 PDT
Created
attachment 368243
[details]
Patch
WebKit Commit Bot
Comment 6
2019-04-25 23:06:15 PDT
Comment on
attachment 368243
[details]
Patch Clearing flags on attachment: 368243 Committed
r244678
: <
https://trac.webkit.org/changeset/244678
>
WebKit Commit Bot
Comment 7
2019-04-25 23:06:17 PDT
All reviewed patches have been landed. Closing bug.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug