Page MenuHomePhabricator

nuriamari (Nuri Amari)
User

Projects

User does not belong to any projects.

User Details

User Since
Sep 14 2021, 1:39 PM (72 w, 3 d)

Recent Activity

Oct 28 2021

nuriamari accepted D112744: [llvm-objcopy] Fix misaligned access to load command data..
Oct 28 2021, 7:54 PM · Restricted Project

Oct 25 2021

nuriamari added inline comments to D111164: Regenerate LC_CODE_SIGNATURE during llvm-objcopy operations.
Oct 25 2021, 7:35 AM · Restricted Project, Restricted Project, Restricted Project
nuriamari updated the diff for D111164: Regenerate LC_CODE_SIGNATURE during llvm-objcopy operations.

Constexpr C strings

Oct 25 2021, 7:34 AM · Restricted Project, Restricted Project, Restricted Project

Oct 18 2021

nuriamari added a comment to D111164: Regenerate LC_CODE_SIGNATURE during llvm-objcopy operations.

I expanded updateLoadCommandIndexes to update the CodeSignatureCommandIndex and TextSegmentCommandIndex values. In the new test, I check that the text segment size and offset values included in the code signature header are accurate. I also added asserts to make sure TextSegmentCommandIndex does in fact point to the correct load command, and not just another segment load command with identical size and offset. I was unable to get the text segment offset to change (it remains at 0 even after inserting more commands), but I think this is expected and so long as TextSegmentCommandIndex is accurate, the rest should also be accurate.

Oct 18 2021, 12:31 PM · Restricted Project, Restricted Project, Restricted Project
nuriamari updated the diff for D111164: Regenerate LC_CODE_SIGNATURE during llvm-objcopy operations.

Update updateLoadCommandIndexes to include TextSegment/CodeSignature commands, add test inserting load command shifting load commands around

Oct 18 2021, 12:24 PM · Restricted Project, Restricted Project, Restricted Project

Oct 12 2021

nuriamari added a comment to D111164: Regenerate LC_CODE_SIGNATURE during llvm-objcopy operations.

adding / removing load commands (e.g. rpath) can trigger such changes (but beware the alignment + the order of load commands matters) so the test needs to be specifically designed for these purposes

(I would use llvm-objdump or llvm-readobj to verify that the offset of __TEXT has changed etc)

P.S. btw - you probably want to update TextSegmentCommandIndex inside updateLoadCommandIndexes(..) and such a test would catch it, alternatively, it can be calculated where it's actually used (and the field can be dropped)

Oct 12 2021, 11:33 AM · Restricted Project, Restricted Project, Restricted Project

Oct 8 2021

nuriamari updated the diff for D111164: Regenerate LC_CODE_SIGNATURE during llvm-objcopy operations.

Copy test script, remove getSegment* declarations, add const ref getter

Oct 8 2021, 5:42 AM · Restricted Project, Restricted Project, Restricted Project

Oct 7 2021

nuriamari added a comment to D111164: Regenerate LC_CODE_SIGNATURE during llvm-objcopy operations.

The symlink creates a dependency from LLVM to lld, while lld depends on LLVM ^^

Oct 7 2021, 9:03 AM · Restricted Project, Restricted Project, Restricted Project
nuriamari added inline comments to D111164: Regenerate LC_CODE_SIGNATURE during llvm-objcopy operations.
Oct 7 2021, 7:44 AM · Restricted Project, Restricted Project, Restricted Project
nuriamari updated the diff for D111164: Regenerate LC_CODE_SIGNATURE during llvm-objcopy operations.

Remove "Section" in variable names, move CodeSignature to MachOLayoutBuilder, move text segment helpers

Oct 7 2021, 7:43 AM · Restricted Project, Restricted Project, Restricted Project

Oct 5 2021

nuriamari published D111164: Regenerate LC_CODE_SIGNATURE during llvm-objcopy operations for review.
Oct 5 2021, 10:33 AM · Restricted Project, Restricted Project, Restricted Project

Sep 17 2021

nuriamari updated the diff for D109972: Regenerate LC_CODE_SIGNATURE during llvm-objcopy operations.

Correct output file name resolution for windows

Sep 17 2021, 2:33 PM · Restricted Project
nuriamari published D109972: Regenerate LC_CODE_SIGNATURE during llvm-objcopy operations for review.
Sep 17 2021, 9:33 AM · Restricted Project

Sep 16 2021

nuriamari updated the diff for D109803: Extract LC_CODE_SIGNATURE related implementation out of LLD.

Construct object::CodeSignature object once

Sep 16 2021, 8:29 AM · Restricted Project, Restricted Project
nuriamari updated the diff for D109840: Add MachO signature verification test.

Use FileCheck variables in test

Sep 16 2021, 6:53 AM · Restricted Project, Restricted Project

Sep 15 2021

nuriamari added a comment to D109840: Add MachO signature verification test.

What @oontvoo left out was how to define variables for FileCheck :) you'll want something like -D#DATAOFF=16400 here for the substitution to work. Then you can reference it via #DATAOFF. (The # indicates that the value is an integer. It only matters if you want to do arithmetic on the values, which doesn't apply in this case, but it's nice to use # anyway for clarity.)

Ah, yes - I'd forgot that part. Thanks for clarifying it!

not sure why this comment is not in-lined anymore. 🤔 @nuriamari : Do you use arc to update this patch?

Sep 15 2021, 8:15 PM · Restricted Project, Restricted Project
nuriamari updated the diff for D109803: Extract LC_CODE_SIGNATURE related implementation out of LLD.

Restore static asserts

Sep 15 2021, 8:08 PM · Restricted Project, Restricted Project
nuriamari updated the diff for D109803: Extract LC_CODE_SIGNATURE related implementation out of LLD.

Satisfy clang-tidy / clang-format

Sep 15 2021, 8:04 PM · Restricted Project, Restricted Project
nuriamari updated the diff for D109840: Add MachO signature verification test.

Correct docstring argument description

Sep 15 2021, 4:02 PM · Restricted Project, Restricted Project
nuriamari added inline comments to D109803: Extract LC_CODE_SIGNATURE related implementation out of LLD.
Sep 15 2021, 3:55 PM · Restricted Project, Restricted Project
nuriamari updated the diff for D109803: Extract LC_CODE_SIGNATURE related implementation out of LLD.

Fix stray comment, rearrange type definition and clean up static asserts

Sep 15 2021, 3:55 PM · Restricted Project, Restricted Project
nuriamari added inline comments to D109840: Add MachO signature verification test.
Sep 15 2021, 2:17 PM · Restricted Project, Restricted Project
nuriamari updated the diff for D109840: Add MachO signature verification test.

Address shebang, comment and spacing related feeback

Sep 15 2021, 2:15 PM · Restricted Project, Restricted Project
nuriamari added a comment to D109803: Extract LC_CODE_SIGNATURE related implementation out of LLD.

Move itself looks fine, but why is there a new lld test in here? This should be behavior-preserving, so I wouldn't expect test updates.

If you want to add a new test to lld independently from this change (?), I'd put that in a separate patch.

The new test is to ensure no behavior is broken. The existing code signature related test does not test that the hash was performed properly, just that the load command is included. This test is to make sure the move doesn't break the signature generation.

Can we land that in its own patch? :)

Sep 15 2021, 11:22 AM · Restricted Project, Restricted Project
nuriamari updated the diff for D109803: Extract LC_CODE_SIGNATURE related implementation out of LLD.

Remove new test, now included in separate patch

Sep 15 2021, 11:20 AM · Restricted Project, Restricted Project
nuriamari published D109840: Add MachO signature verification test for review.
Sep 15 2021, 11:14 AM · Restricted Project, Restricted Project
nuriamari added a comment to D109803: Extract LC_CODE_SIGNATURE related implementation out of LLD.

Move itself looks fine, but why is there a new lld test in here? This should be behavior-preserving, so I wouldn't expect test updates.

If you want to add a new test to lld independently from this change (?), I'd put that in a separate patch.

Sep 15 2021, 9:19 AM · Restricted Project, Restricted Project
nuriamari published D109803: Extract LC_CODE_SIGNATURE related implementation out of LLD for review.
Sep 15 2021, 9:06 AM · Restricted Project, Restricted Project