Page MenuHomePhabricator

cryptoad (Kostya Kortchinsky)
User

Projects

User does not belong to any projects.

User Details

User Since
May 5 2016, 2:57 PM (194 w, 5 d)

Recent Activity

Today

cryptoad committed rGa1f6ff26814b: [scudo][standalone] Fix Android logging (authored by cryptoad).
[scudo][standalone] Fix Android logging
Tue, Jan 28, 11:10 AM
cryptoad closed D73561: [scudo][standalone] Fix Android logging.
Tue, Jan 28, 11:10 AM · Restricted Project, Restricted Project
cryptoad updated the diff for D73561: [scudo][standalone] Fix Android logging.

constexpr-ing.

Tue, Jan 28, 10:39 AM · Restricted Project, Restricted Project
cryptoad created D73561: [scudo][standalone] Fix Android logging.
Tue, Jan 28, 9:40 AM · Restricted Project, Restricted Project
cryptoad committed rG993e3c926948: [scudo][standalone] Secondary & general other improvements (authored by cryptoad).
[scudo][standalone] Secondary & general other improvements
Tue, Jan 28, 7:29 AM
cryptoad closed D73507: [scudo][standalone] Secondary & general other improvements.
Tue, Jan 28, 7:29 AM · Restricted Project, Restricted Project
cryptoad added inline comments to D73507: [scudo][standalone] Secondary & general other improvements.
Tue, Jan 28, 7:08 AM · Restricted Project, Restricted Project
cryptoad updated the diff for D73507: [scudo][standalone] Secondary & general other improvements.

Passing ReleaseToOsInterval from init to initLinkerInitialized in
the Secondary.

Tue, Jan 28, 6:59 AM · Restricted Project, Restricted Project

Yesterday

cryptoad updated the diff for D73507: [scudo][standalone] Secondary & general other improvements.

Marking a parameter unused.

Mon, Jan 27, 11:29 PM · Restricted Project, Restricted Project
cryptoad added inline comments to D73507: [scudo][standalone] Secondary & general other improvements.
Mon, Jan 27, 4:00 PM · Restricted Project, Restricted Project
cryptoad updated the summary of D73507: [scudo][standalone] Secondary & general other improvements.
Mon, Jan 27, 2:36 PM · Restricted Project, Restricted Project
cryptoad created D73507: [scudo][standalone] Secondary & general other improvements.
Mon, Jan 27, 2:07 PM · Restricted Project, Restricted Project

Wed, Jan 22

cryptoad added inline comments to D72882: [scudo][standalone] WIP: make release interval configurable.
Wed, Jan 22, 9:55 AM · Restricted Project, Restricted Project
cryptoad committed rG990acd450cf1: [scudo][standalone] Reduce Android region sizes to 128MB (authored by cryptoad).
[scudo][standalone] Reduce Android region sizes to 128MB
Wed, Jan 22, 9:46 AM
cryptoad closed D73143: [scudo][standalone] Reduce Android region sizes to 128MB.
Wed, Jan 22, 9:46 AM · Restricted Project, Restricted Project

Tue, Jan 21

cryptoad created D73143: [scudo][standalone] Reduce Android region sizes to 128MB.
Tue, Jan 21, 2:41 PM · Restricted Project, Restricted Project
cryptoad committed rG561fa844777c: [scudo][standalone] Allow sched_getaffinity to fail (authored by cryptoad).
[scudo][standalone] Allow sched_getaffinity to fail
Tue, Jan 21, 11:27 AM
cryptoad closed D73055: [scudo][standalone] Allow sched_getaffinity to fail.
Tue, Jan 21, 11:27 AM · Restricted Project, Restricted Project
cryptoad updated the diff for D73055: [scudo][standalone] Allow sched_getaffinity to fail.

Commenting getNumberOfCPUs to indicate failure value in common.h,
moving sched_getaffinity comment in linux.cpp in body of function.

Tue, Jan 21, 8:33 AM · Restricted Project, Restricted Project
cryptoad added inline comments to D73055: [scudo][standalone] Allow sched_getaffinity to fail.
Tue, Jan 21, 6:48 AM · Restricted Project, Restricted Project

Mon, Jan 20

cryptoad created D73055: [scudo][standalone] Allow sched_getaffinity to fail.
Mon, Jan 20, 9:58 AM · Restricted Project, Restricted Project

Thu, Jan 16

cryptoad created D72882: [scudo][standalone] WIP: make release interval configurable.
Thu, Jan 16, 3:03 PM · Restricted Project, Restricted Project
cryptoad accepted D70762: scudo: Add initial memory tagging support..

LGTM, Thanks for all the work Peter!

Thu, Jan 16, 1:07 PM · Restricted Project, Restricted Project
cryptoad added a comment to D70762: scudo: Add initial memory tagging support..

I think this looks good. I think this might not be Fuchsia compatible and could probably use some #if SCUDO_LINUX or ANDROID or top of the __aarch64__ checks.
Fuchsia will want memory tagging support at some point, I 'll check the patch on the platform once the inconsistencies I saw are addressed.

Thu, Jan 16, 7:42 AM · Restricted Project, Restricted Project

Tue, Jan 14

cryptoad committed rG9ef6faf49670: [scudo][standalone] Fork support (authored by cryptoad).
[scudo][standalone] Fork support
Tue, Jan 14, 7:54 AM
cryptoad closed D72470: [scudo][standalone] Fork support.
Tue, Jan 14, 7:53 AM · Restricted Project, Restricted Project
cryptoad updated the diff for D72470: [scudo][standalone] Fork support.

Disable GWP-ASan, FIXME added.

Tue, Jan 14, 7:34 AM · Restricted Project, Restricted Project

Mon, Jan 13

cryptoad updated the diff for D72470: [scudo][standalone] Fork support.

Rebasing.

Mon, Jan 13, 12:09 PM · Restricted Project, Restricted Project
cryptoad updated the diff for D72470: [scudo][standalone] Fork support.

Adding a newline at end of file, to try and trigger presubmit.

Mon, Jan 13, 11:32 AM · Restricted Project, Restricted Project
cryptoad updated the summary of D72470: [scudo][standalone] Fork support.
Mon, Jan 13, 11:13 AM · Restricted Project, Restricted Project
cryptoad updated the diff for D72470: [scudo][standalone] Fork support.

Re-enable GWP-ASan, add a comment about the potentially failing test.
We will skip it if this occurs upstream.

Mon, Jan 13, 11:03 AM · Restricted Project, Restricted Project
cryptoad updated the diff for D72470: [scudo][standalone] Fork support.

Remove the NOINLINE for enable & disable, they were used to debug
some deadlocks.

Mon, Jan 13, 8:41 AM · Restricted Project, Restricted Project
cryptoad added a comment to D72470: [scudo][standalone] Fork support.

I apologize for being pushy, but could I get a yay or nay on this to unblock Android?
Thanks!

Mon, Jan 13, 8:03 AM · Restricted Project, Restricted Project

Fri, Jan 10

cryptoad updated the diff for D72470: [scudo][standalone] Fork support.

Applying simplification suggested by eugenis@: malloc_disable just
calls disable, same for enable.

Fri, Jan 10, 9:55 AM · Restricted Project, Restricted Project
cryptoad added a comment to D72470: [scudo][standalone] Fork support.

SCUDO_PREFIX(Mutex) can be acquired in the child process, and in the parent process, and is not held during fork. That's a potential deadlock.
The condvar code reduces the window for it, but does not eliminate it completely.
Why can't malloc_disable() simply directly call allocator.disable(), and the same in malloc_enable?

Fri, Jan 10, 9:53 AM · Restricted Project, Restricted Project
cryptoad added inline comments to D72470: [scudo][standalone] Fork support.
Fri, Jan 10, 8:39 AM · Restricted Project, Restricted Project
cryptoad updated the diff for D72470: [scudo][standalone] Fork support.

Adding a disable()/fork()/enable() test.

Fri, Jan 10, 8:39 AM · Restricted Project, Restricted Project
cryptoad added inline comments to D72470: [scudo][standalone] Fork support.
Fri, Jan 10, 6:46 AM · Restricted Project, Restricted Project

Thu, Jan 9

cryptoad added reviewers for D72470: [scudo][standalone] Fork support: eugenis, hctim, pcc, cferris.
Thu, Jan 9, 2:47 PM · Restricted Project, Restricted Project
cryptoad updated the diff for D72470: [scudo][standalone] Fork support.

Disable GWP-ASan for now.

Thu, Jan 9, 2:39 PM · Restricted Project, Restricted Project
cryptoad updated the diff for D72470: [scudo][standalone] Fork support.

Wrong version of the makefiles.

Thu, Jan 9, 2:28 PM · Restricted Project, Restricted Project
cryptoad updated the diff for D72470: [scudo][standalone] Fork support.

Correct several inconsistencies wrt locking orders.

Thu, Jan 9, 2:19 PM · Restricted Project, Restricted Project
cryptoad updated the diff for D72470: [scudo][standalone] Fork support.

Adding Quarantine & ByteMap to the things we disable/enable.

Thu, Jan 9, 12:35 PM · Restricted Project, Restricted Project
cryptoad updated the summary of D72470: [scudo][standalone] Fork support.
Thu, Jan 9, 12:07 PM · Restricted Project, Restricted Project
cryptoad updated the diff for D72470: [scudo][standalone] Fork support.

Corrections.

Thu, Jan 9, 11:57 AM · Restricted Project, Restricted Project
cryptoad created D72470: [scudo][standalone] Fork support.
Thu, Jan 9, 11:48 AM · Restricted Project, Restricted Project
cryptoad abandoned D72364: [scudo][standalone] Modify malloc_{enable,disable} wrt fork.

Abandoning this one, this will come back in another form.

Thu, Jan 9, 9:08 AM · Restricted Project, Restricted Project

Wed, Jan 8

cryptoad planned changes to D72364: [scudo][standalone] Modify malloc_{enable,disable} wrt fork.

I realized that this is now no longer correct as the atfork handler is only installed in a disable.

Wed, Jan 8, 1:37 PM · Restricted Project, Restricted Project
cryptoad updated the diff for D72364: [scudo][standalone] Modify malloc_{enable,disable} wrt fork.

Submitting this new design for consideration. I am working on adding
some tests but at least the code idea can get some feedback.

Wed, Jan 8, 1:00 PM · Restricted Project, Restricted Project
cryptoad added a comment to D72364: [scudo][standalone] Modify malloc_{enable,disable} wrt fork.

Right, but it looks like it will have the same effect.
Attempting to disable an already disabled allocator will block until the allocator is enabled.
I.e. pthread_atfork(disable, enable, enable) should be sufficient.

Wed, Jan 8, 12:32 PM · Restricted Project, Restricted Project
cryptoad added a comment to D72364: [scudo][standalone] Modify malloc_{enable,disable} wrt fork.

I see. I think the other approach could be safer. Grab all the locks before fork and release them after fork. This will also allow user applications to use malloc after fork, which ex. glibc allocator supports.

Wed, Jan 8, 11:55 AM · Restricted Project, Restricted Project
cryptoad added a comment to D72364: [scudo][standalone] Modify malloc_{enable,disable} wrt fork.

Could we do this exact same thing in Android? I find this behavior (auto-enabling the allocator after fork) unexpected, and it makes the interface even more confusing then it is now.

Wed, Jan 8, 11:18 AM · Restricted Project, Restricted Project
cryptoad updated the diff for D72364: [scudo][standalone] Modify malloc_{enable,disable} wrt fork.

Updating test to exercise both disable and no-disable pre-fork.
Added an _exit in fork child.

Wed, Jan 8, 8:28 AM · Restricted Project, Restricted Project

Tue, Jan 7

cryptoad added inline comments to D72364: [scudo][standalone] Modify malloc_{enable,disable} wrt fork.
Tue, Jan 7, 4:00 PM · Restricted Project, Restricted Project
cryptoad added inline comments to D72364: [scudo][standalone] Modify malloc_{enable,disable} wrt fork.
Tue, Jan 7, 3:51 PM · Restricted Project, Restricted Project
cryptoad updated the diff for D72364: [scudo][standalone] Modify malloc_{enable,disable} wrt fork.

The wrong version was uploaded.

Tue, Jan 7, 2:45 PM · Restricted Project, Restricted Project
cryptoad created D72364: [scudo][standalone] Modify malloc_{enable,disable} wrt fork.
Tue, Jan 7, 2:45 PM · Restricted Project, Restricted Project

Dec 20 2019

cryptoad committed rG0fd6f19025a7: [scudo][standalone] Support __BIONIC__ (authored by cryptoad).
[scudo][standalone] Support __BIONIC__
Dec 20 2019, 1:04 PM
cryptoad closed D71772: [scudo][standalone] Support __BIONIC__.
Dec 20 2019, 1:04 PM · Restricted Project, Restricted Project
cryptoad updated the diff for D71772: [scudo][standalone] Support __BIONIC__.

Correcting comment typo.

Dec 20 2019, 11:21 AM · Restricted Project, Restricted Project
cryptoad updated the diff for D71772: [scudo][standalone] Support __BIONIC__.

New proposal as per Peter's suggestion: include stdint.h in
platform.h and check for __BIONIC__.

Dec 20 2019, 10:39 AM · Restricted Project, Restricted Project
cryptoad added inline comments to D71772: [scudo][standalone] Support __BIONIC__.
Dec 20 2019, 10:19 AM · Restricted Project, Restricted Project
cryptoad added inline comments to D71772: [scudo][standalone] Support __BIONIC__.
Dec 20 2019, 9:59 AM · Restricted Project, Restricted Project
cryptoad added inline comments to D71772: [scudo][standalone] Support __BIONIC__.
Dec 20 2019, 9:29 AM · Restricted Project, Restricted Project
cryptoad created D71772: [scudo][standalone] Support __BIONIC__.
Dec 20 2019, 8:29 AM · Restricted Project, Restricted Project
cryptoad committed rG77e906ac78ab: [scudo][standalone] Implement TSD registry disabling (authored by cryptoad).
[scudo][standalone] Implement TSD registry disabling
Dec 20 2019, 6:58 AM
cryptoad closed D71719: [scudo][standalone] Implement TSD registry disabling.
Dec 20 2019, 6:58 AM · Restricted Project, Restricted Project

Dec 19 2019

cryptoad updated the diff for D71719: [scudo][standalone] Implement TSD registry disabling.

Add a comment for disable() with a TODO to improve the behavior.

Dec 19 2019, 2:14 PM · Restricted Project, Restricted Project
cryptoad added inline comments to D71719: [scudo][standalone] Implement TSD registry disabling.
Dec 19 2019, 12:23 PM · Restricted Project, Restricted Project
cryptoad added inline comments to D71719: [scudo][standalone] Implement TSD registry disabling.
Dec 19 2019, 12:23 PM · Restricted Project, Restricted Project
cryptoad updated the diff for D71719: [scudo][standalone] Implement TSD registry disabling.

Use an atomic_u8 for Disabled in the Exclusive Registry.
This should ensure that changes to the variable are visible to the
threads in a somewhat timely manner.

Dec 19 2019, 12:03 PM · Restricted Project, Restricted Project
cryptoad added inline comments to D71719: [scudo][standalone] Implement TSD registry disabling.
Dec 19 2019, 11:42 AM · Restricted Project, Restricted Project
cryptoad added inline comments to D71719: [scudo][standalone] Implement TSD registry disabling.
Dec 19 2019, 11:33 AM · Restricted Project, Restricted Project
cryptoad updated the diff for D71719: [scudo][standalone] Implement TSD registry disabling.

Extra whiteline.

Dec 19 2019, 10:44 AM · Restricted Project, Restricted Project
cryptoad created D71719: [scudo][standalone] Implement TSD registry disabling.
Dec 19 2019, 10:42 AM · Restricted Project, Restricted Project

Dec 10 2019

cryptoad added inline comments to D70762: scudo: Add initial memory tagging support..
Dec 10 2019, 12:19 PM · Restricted Project, Restricted Project
cryptoad accepted D71292: scudo: Tweak how we align UserPtr. NFCI..
Dec 10 2019, 11:42 AM · Restricted Project, Restricted Project
cryptoad accepted D71291: scudo: Move getChunkFromBlock() allocated check into caller. NFCI..
Dec 10 2019, 11:42 AM · Restricted Project, Restricted Project
cryptoad accepted D71229: [Scudo] [GWP-ASan] Add GWP-ASan to Scudo Standalone..
Dec 10 2019, 9:41 AM · Restricted Project, Restricted Project
cryptoad added inline comments to D71229: [Scudo] [GWP-ASan] Add GWP-ASan to Scudo Standalone..
Dec 10 2019, 9:03 AM · Restricted Project, Restricted Project
cryptoad committed rGb36b16372d5f: [scudo][standalone] Define hasHardwareCRC32 for other archs (authored by cryptoad).
[scudo][standalone] Define hasHardwareCRC32 for other archs
Dec 10 2019, 7:43 AM
cryptoad closed D71223: [scudo][standalone] Define hasHardwareCRC32 for other archs.
Dec 10 2019, 7:42 AM · Restricted Project, Restricted Project

Dec 9 2019

cryptoad added a comment to D71229: [Scudo] [GWP-ASan] Add GWP-ASan to Scudo Standalone..

Thanks!
What's the current plan for testing? (Currently I have only enabled the standalone on Linux x86/64 for upstream)

Dec 9 2019, 3:24 PM · Restricted Project, Restricted Project
cryptoad created D71223: [scudo][standalone] Define hasHardwareCRC32 for other archs.
Dec 9 2019, 1:12 PM · Restricted Project, Restricted Project

Dec 6 2019

cryptoad accepted D71104: scudo: Add a basic malloc/free benchmark..

Thanks!

Dec 6 2019, 9:28 PM · Restricted Project, Restricted Project
cryptoad added a comment to D71104: scudo: Add a basic malloc/free benchmark..

Could you please put a comment somewhere on how to use the benchmark?

Dec 6 2019, 12:15 PM · Restricted Project, Restricted Project

Dec 5 2019

cryptoad accepted D71077: scudo: Fix the build of wrappers_c_test.cpp on Android..
Dec 5 2019, 11:11 AM · Restricted Project, Restricted Project
cryptoad accepted D71078: scudo: Fix one of the C wrapper tests on Android..
Dec 5 2019, 11:11 AM · Restricted Project, Restricted Project

Dec 3 2019

cryptoad added a comment to D70762: scudo: Add initial memory tagging support..
In D70762#1767420, @pcc wrote:

When you say reclaiming you mean calling releasePagesToOS(), correct? In that case, wouldn't that cause the header to be set to 0, which would put us in the same state as if we hadn't used the chunk before?

Dec 3 2019, 11:19 AM · Restricted Project, Restricted Project
cryptoad added a comment to D70762: scudo: Add initial memory tagging support..
In D70762#1762390, @pcc wrote:

There is already a header field 'SizeOrUnusedBytes" that stores the allocation size. When a chunk is freed, we don't disturb that field. That gives us a way to recover the size of the previous allocation. We can call getChunkFromBlock() (modifying it to accept deallocated chunks) to recover the location of the chunk header given a block.

I think we can use the header itself to store the "has never been tagged" state. If the header read as a word is equal to 0, that means that the chunk has never been used before and we need to IRG before setting tags. That won't result in early paging because by the time we read the header we've already decided to use that block for the allocation.

One complication is that we need to handle the case where the new allocation has lower alignment than the old allocation. In that case, malloc will need to set tags on both sides of the allocation (because the previous free will have retagged starting from a higher address).

Dec 3 2019, 9:46 AM · Restricted Project, Restricted Project
cryptoad committed rG5595249e48ef: [scudo][standalone] Add chunk ownership function (authored by cryptoad).
[scudo][standalone] Add chunk ownership function
Dec 3 2019, 8:33 AM
cryptoad closed D70908: [scudo][standalone] Add chunk ownership function.
Dec 3 2019, 8:33 AM · Restricted Project, Restricted Project

Dec 2 2019

cryptoad updated the diff for D70908: [scudo][standalone] Add chunk ownership function.

Adding a comment saying that a corrupted chunk won't be reported
as owned (well technically it might be "owned"), but that it's WAI.

Dec 2 2019, 2:10 PM · Restricted Project, Restricted Project
cryptoad updated the diff for D70908: [scudo][standalone] Add chunk ownership function.

Adding a log for the new static_assert.

Dec 2 2019, 1:24 PM · Restricted Project, Restricted Project
cryptoad added a comment to D70908: [scudo][standalone] Add chunk ownership function.

So the model presented asserts that if the chunk header is truncated, the pointer is not owned by us. Is this WAI? I can forsee that a chunk header was truncated, and then the pointer to the associated allocation is checked for ownership, which the ownership will fail as the chunk header check didn't succeed.

Dec 2 2019, 1:21 PM · Restricted Project, Restricted Project
cryptoad added a comment to D70860: [docs] Fixed incorrect build instructions for Scudo.

FYI, I'm not an LLVM committer, so I'll need someone to merge this for me. Thanks!

Dec 2 2019, 10:06 AM · Restricted Project
cryptoad created D70908: [scudo][standalone] Add chunk ownership function.
Dec 2 2019, 8:52 AM · Restricted Project, Restricted Project

Nov 29 2019

cryptoad accepted D70860: [docs] Fixed incorrect build instructions for Scudo.
Nov 29 2019, 1:08 PM · Restricted Project

Nov 27 2019

cryptoad added a comment to D64457: [GWP-ASan] Attempt to fix Android/ARM platforms..

Can this be abandoned? Looks stale.

I'll need to take a look and rethink this - is planned changes okay to get it off your dashboard?

Nov 27 2019, 1:10 PM · Restricted Project, Restricted Project
cryptoad added a comment to D64457: [GWP-ASan] Attempt to fix Android/ARM platforms..

Can this be abandoned? Looks stale.

Nov 27 2019, 12:28 PM · Restricted Project, Restricted Project