Page MenuHomeFreeBSD

tig_freebsdfoundation.org (Tiger Gao)
User

Projects

User does not belong to any projects.

User Details

User Since
Jan 9 2020, 2:26 PM (224 w, 1 d)

Recent Activity

Dec 4 2020

tig_freebsdfoundation.org added inline comments to D27466: elftoolchain/addr2line: fix bugs found by coverity.
Dec 4 2020, 8:07 PM
tig_freebsdfoundation.org updated the diff for D27466: elftoolchain/addr2line: fix bugs found by coverity.
Dec 4 2020, 8:06 PM

Dec 3 2020

tig_freebsdfoundation.org requested review of D27466: elftoolchain/addr2line: fix bugs found by coverity.
Dec 3 2020, 9:07 PM

Dec 1 2020

tig_freebsdfoundation.org accepted D27426: addr2line: rework check_range conditions.
Dec 1 2020, 3:36 PM

Nov 23 2020

tig_freebsdfoundation.org added inline comments to D23782: addr2line: add label checks when DW_AT_range and DW_AT_low_pc cannot be used.
Nov 23 2020, 3:03 PM

Nov 19 2020

tig_freebsdfoundation.org added a comment to D23782: addr2line: add label checks when DW_AT_range and DW_AT_low_pc cannot be used.

Initially, I thought _fini is a label in the test case. However, I found, using readelf, that _fini isn't a label in the test case ~/src/elftoolchain/test/elfdump/ts/dso2/test.so. I found it in the symbol table (symtab) instead. Currently, symtab is not checked by addr2line so in order to pass this test a new feature to check symtab is needed.
This patch does help resolve labels addr. For example, when _init is in a DW_TAG_label:

Nov 19 2020, 5:02 PM

Nov 10 2020

tig_freebsdfoundation.org updated the diff for D27107: syzkaller: add tool to check missing FreeBSD system calls.

Cleaned up the code/design to make the tool easier to use.

Nov 10 2020, 9:17 PM

Nov 6 2020

tig_freebsdfoundation.org added a comment to D27107: syzkaller: add tool to check missing FreeBSD system calls.

I added functions to find missing ioctl calls. The output has become significantly larger and kind of ugly. I wonder if it's a good idea to let user choose which part they want printed out (normal syscalls vs ioctl.

Nov 6 2020, 9:14 PM
tig_freebsdfoundation.org added a comment to D27107: syzkaller: add tool to check missing FreeBSD system calls.

Here's a sorted version

Nov 6 2020, 4:18 PM
tig_freebsdfoundation.org added a comment to D27107: syzkaller: add tool to check missing FreeBSD system calls.

Should the output list be sorted?

Nov 6 2020, 4:16 PM
tig_freebsdfoundation.org added a comment to D27107: syzkaller: add tool to check missing FreeBSD system calls.

Nov 6 2020, 4:15 PM
tig_freebsdfoundation.org added a comment to D27107: syzkaller: add tool to check missing FreeBSD system calls.

It prints out missing system calls.

Nov 6 2020, 3:31 PM

Nov 5 2020

tig_freebsdfoundation.org requested review of D27107: syzkaller: add tool to check missing FreeBSD system calls.
Nov 5 2020, 4:38 PM

Nov 2 2020

tig_freebsdfoundation.org added inline comments to D23782: addr2line: add label checks when DW_AT_range and DW_AT_low_pc cannot be used.
Nov 2 2020, 6:01 PM

Oct 30 2020

tig_freebsdfoundation.org updated the diff for D26909: Readelf: add -z decompression support.
Oct 30 2020, 8:17 PM

Oct 29 2020

tig_freebsdfoundation.org updated the test plan for D23782: addr2line: add label checks when DW_AT_range and DW_AT_low_pc cannot be used.
Oct 29 2020, 3:50 PM
tig_freebsdfoundation.org updated the diff for D23782: addr2line: add label checks when DW_AT_range and DW_AT_low_pc cannot be used.
Oct 29 2020, 3:50 PM
tig_freebsdfoundation.org updated the test plan for D23782: addr2line: add label checks when DW_AT_range and DW_AT_low_pc cannot be used.
Oct 29 2020, 3:32 PM
tig_freebsdfoundation.org updated the test plan for D23782: addr2line: add label checks when DW_AT_range and DW_AT_low_pc cannot be used.
Oct 29 2020, 3:31 PM

Oct 27 2020

tig_freebsdfoundation.org added inline comments to D26909: Readelf: add -z decompression support.
Oct 27 2020, 3:29 PM
tig_freebsdfoundation.org updated the diff for D26909: Readelf: add -z decompression support.
Oct 27 2020, 3:28 PM

Oct 26 2020

tig_freebsdfoundation.org retitled D23782: addr2line: add label checks when DW_AT_range and DW_AT_low_pc cannot be used from Add label checks when DW_AT_range and DW_AT_low_pc cannot be used to addr2line: add label checks when DW_AT_range and DW_AT_low_pc cannot be used.
Oct 26 2020, 5:18 PM
tig_freebsdfoundation.org updated the diff for D26909: Readelf: add -z decompression support.
Oct 26 2020, 4:18 PM

Oct 23 2020

tig_freebsdfoundation.org added inline comments to D26909: Readelf: add -z decompression support.
Oct 23 2020, 7:20 PM
tig_freebsdfoundation.org updated the diff for D26909: Readelf: add -z decompression support.
Oct 23 2020, 7:20 PM
tig_freebsdfoundation.org retitled D26909: Readelf: add -z decompression support from Add -z to readelf to Readelf: add -z decompression support.
Oct 23 2020, 5:13 PM

Oct 22 2020

tig_freebsdfoundation.org updated the summary of D24566: Add functions to get compression header for libelf.
Oct 22 2020, 7:13 PM
tig_freebsdfoundation.org updated the summary of D24566: Add functions to get compression header for libelf.
Oct 22 2020, 7:13 PM
tig_freebsdfoundation.org updated the summary of D26909: Readelf: add -z decompression support.
Oct 22 2020, 7:10 PM
tig_freebsdfoundation.org updated the test plan for D24566: Add functions to get compression header for libelf.
Oct 22 2020, 7:10 PM
tig_freebsdfoundation.org added a comment to D24566: Add functions to get compression header for libelf.

Moved readelf revision here

Oct 22 2020, 7:09 PM
tig_freebsdfoundation.org updated the diff for D24566: Add functions to get compression header for libelf.
Oct 22 2020, 7:09 PM
tig_freebsdfoundation.org requested review of D26909: Readelf: add -z decompression support.
Oct 22 2020, 7:04 PM
tig_freebsdfoundation.org added inline comments to D24566: Add functions to get compression header for libelf.
Oct 22 2020, 5:47 PM
tig_freebsdfoundation.org added a comment to D24566: Add functions to get compression header for libelf.

I'll put readelf.c and usr.bin/readelf/Makefile into a separate review

Oct 22 2020, 2:10 PM
tig_freebsdfoundation.org added a comment to D24566: Add functions to get compression header for libelf.

@emaste Yup, I can do that.

Oct 22 2020, 2:09 PM

Oct 21 2020

tig_freebsdfoundation.org added inline comments to D24566: Add functions to get compression header for libelf.
Oct 21 2020, 8:47 PM
tig_freebsdfoundation.org updated the diff for D24566: Add functions to get compression header for libelf.
Oct 21 2020, 8:47 PM
tig_freebsdfoundation.org added inline comments to D24566: Add functions to get compression header for libelf.
Oct 21 2020, 8:14 PM
tig_freebsdfoundation.org added inline comments to D24566: Add functions to get compression header for libelf.
Oct 21 2020, 7:37 PM
tig_freebsdfoundation.org added inline comments to D24566: Add functions to get compression header for libelf.
Oct 21 2020, 7:27 PM
tig_freebsdfoundation.org added inline comments to D24566: Add functions to get compression header for libelf.
Oct 21 2020, 5:52 PM
tig_freebsdfoundation.org updated the diff for D24566: Add functions to get compression header for libelf.
Oct 21 2020, 3:16 PM

Oct 20 2020

tig_freebsdfoundation.org updated the diff for D24566: Add functions to get compression header for libelf.
Oct 20 2020, 9:58 PM
tig_freebsdfoundation.org updated the diff for D24566: Add functions to get compression header for libelf.
Oct 20 2020, 8:15 PM

Oct 19 2020

tig_freebsdfoundation.org updated the summary of D24566: Add functions to get compression header for libelf.
Oct 19 2020, 6:05 PM
tig_freebsdfoundation.org updated the diff for D24566: Add functions to get compression header for libelf.

Added Version.map diff

Oct 19 2020, 5:54 PM
tig_freebsdfoundation.org added a comment to D24566: Add functions to get compression header for libelf.

Added to my staging tree as

diff --git a/contrib/elftoolchain/libelf/Version.map b/contrib/elftoolchain/libelf/Version.map
index e71a59197d0d..ae9783f221ca 100644
--- a/contrib/elftoolchain/libelf/Version.map
+++ b/contrib/elftoolchain/libelf/Version.map
@@ -4,6 +4,7 @@ R1.0 {
 global:
        elf32_checksum;
        elf32_fsize;
+       elf32_getchdr;
        elf32_getehdr;
        elf32_getphdr;
        elf32_getshdr;
@@ -13,6 +14,7 @@ global:
        elf32_xlatetom;
        elf64_checksum;
        elf64_fsize;
+       elf64_getchdr;
        elf64_getehdr;
        elf64_getphdr;
        elf64_getshdr;
@@ -65,6 +67,7 @@ global:
        gelf_checksum;
        gelf_fsize;
        gelf_getcap;
+       gelf_getchdr;
        gelf_getclass;
        gelf_getdyn;
        gelf_getehdr;
Oct 19 2020, 5:49 PM
tig_freebsdfoundation.org added a comment to D24327: Add new casper execution service.

From my understanding, doing work in the user interface functions is the same as doing work in user program, as they are the same process. It won't be allowed if program is in cap mode.

I understand what you mean. That's why I used pdfork - having the process descriptor lets me wait for the program even in Capability mode. All the current functionality works, so I'd prefer to keep things as it is unless we want the service to do more.

Oct 19 2020, 5:34 PM · capsicum
tig_freebsdfoundation.org added inline comments to D24327: Add new casper execution service.
Oct 19 2020, 5:23 PM · capsicum
tig_freebsdfoundation.org added a comment to D24327: Add new casper execution service.

Doing the work on the user interface side was a conscious decision on my part. What are the disadvantages of doing it this way? And yes, I do plan to write tests.

From my understanding, doing work in the user interface functions is the same as doing work in user program, as they are the same process. It won't be allowed if program is in cap mode.
exec_command is called by Casper which is a different process, so doing work there is desirable.
It's the pattern I've seen from other Casper services.
I could be wrong though, would appreciate if someone could confirm.

Oct 19 2020, 5:17 PM · capsicum
tig_freebsdfoundation.org added inline comments to D24327: Add new casper execution service.
Oct 19 2020, 5:08 PM · capsicum
tig_freebsdfoundation.org added inline comments to D24327: Add new casper execution service.
Oct 19 2020, 5:04 PM · capsicum
tig_freebsdfoundation.org added a comment to D24327: Add new casper execution service.

Note that in Casper service user interface and Casper backend are separate processes. Casper does all the work and the user interface simply passes and receives parameters.
One issue I noticed is that the code is doing the actual work (closing fds) in the user interface commands cap_exec_open() and cap_exec_close(), this should be done from exec_command(), perhaps via functions cap_exec_command_open() and cap_exec_command_close(). cap_fileargs.c has a good example of how to do this.
Do you plan to add some test cases?

Oct 19 2020, 5:03 PM · capsicum

Oct 8 2020

tig_freebsdfoundation.org updated the diff for D24566: Add functions to get compression header for libelf.
Oct 8 2020, 8:06 PM

Oct 7 2020

tig_freebsdfoundation.org updated the diff for D24566: Add functions to get compression header for libelf.
Oct 7 2020, 8:45 PM

Oct 6 2020

tig_freebsdfoundation.org added inline comments to D24566: Add functions to get compression header for libelf.
Oct 6 2020, 7:21 PM
tig_freebsdfoundation.org updated the diff for D24566: Add functions to get compression header for libelf.
Oct 6 2020, 7:20 PM

Sep 22 2020

tig_freebsdfoundation.org updated the diff for D24566: Add functions to get compression header for libelf.

Sorry, that was my bad. It took me some times to put the diff file together since it was an older patch.

Sep 22 2020, 6:40 PM

Sep 19 2020

tig_freebsdfoundation.org updated the diff for D24566: Add functions to get compression header for libelf.

-Added decompression function for Elf_Data.
-Updated Makefiles.
Previous work:
-Add functions to get compression header.

Sep 19 2020, 12:05 AM

Sep 15 2020

tig_freebsdfoundation.org added inline comments to D23782: addr2line: add label checks when DW_AT_range and DW_AT_low_pc cannot be used.
Sep 15 2020, 3:03 PM
tig_freebsdfoundation.org updated the diff for D23782: addr2line: add label checks when DW_AT_range and DW_AT_low_pc cannot be used.
Sep 15 2020, 3:03 PM

Sep 9 2020

tig_freebsdfoundation.org updated the diff for D23782: addr2line: add label checks when DW_AT_range and DW_AT_low_pc cannot be used.

Addressed the comments.

Sep 9 2020, 3:45 PM

Sep 8 2020

tig_freebsdfoundation.org added a comment to D23782: addr2line: add label checks when DW_AT_range and DW_AT_low_pc cannot be used.

I think all the comments are addressed. Is there anything else that needs to be fixed? Thanks

Sep 8 2020, 6:30 PM

Apr 24 2020

tig_freebsdfoundation.org added a comment to D24566: Add functions to get compression header for libelf.

Please ignore lines 2595-2598 in readelf.c. It was not meant to be added.

Apr 24 2020, 10:50 PM
tig_freebsdfoundation.org created D24566: Add functions to get compression header for libelf.
Apr 24 2020, 10:43 PM

Apr 21 2020

tig_freebsdfoundation.org updated the diff for D24327: Add new casper execution service.

Updated license.

Apr 21 2020, 8:14 PM · capsicum
tig_freebsdfoundation.org updated the diff for D24442: Add new casper socket service.

update license

Apr 21 2020, 8:06 PM · capsicum

Apr 16 2020

tig_freebsdfoundation.org created D24442: Add new casper socket service.
Apr 16 2020, 3:24 PM · capsicum

Apr 7 2020

tig_freebsdfoundation.org updated the summary of D24327: Add new casper execution service.
Apr 7 2020, 5:41 PM · capsicum
tig_freebsdfoundation.org created D24327: Add new casper execution service.
Apr 7 2020, 5:32 PM · capsicum

Mar 20 2020

tig_freebsdfoundation.org added inline comments to D24140: readelf: simplify Xen string note printing.
Mar 20 2020, 5:30 PM

Mar 11 2020

tig_freebsdfoundation.org added a comment to D23744: Added casper service to logger.

Yes that would be great. Please go ahead.

Mar 11 2020, 2:41 PM

Mar 6 2020

tig_freebsdfoundation.org added a comment to D23744: Added casper service to logger.

Any further comments? If not, feel free to accept this revision.

Mar 6 2020, 7:38 PM

Feb 28 2020

tig_freebsdfoundation.org updated the diff for D23782: addr2line: add label checks when DW_AT_range and DW_AT_low_pc cannot be used.
Feb 28 2020, 2:30 PM
tig_freebsdfoundation.org added inline comments to D23782: addr2line: add label checks when DW_AT_range and DW_AT_low_pc cannot be used.
Feb 28 2020, 2:30 PM

Feb 21 2020

tig_freebsdfoundation.org added inline comments to D23782: addr2line: add label checks when DW_AT_range and DW_AT_low_pc cannot be used.
Feb 21 2020, 5:47 PM
tig_freebsdfoundation.org updated the diff for D23782: addr2line: add label checks when DW_AT_range and DW_AT_low_pc cannot be used.
Feb 21 2020, 5:46 PM
tig_freebsdfoundation.org added a comment to D23782: addr2line: add label checks when DW_AT_range and DW_AT_low_pc cannot be used.

It looks like it's just the allocated memory for labels, as most of the memory used by check_labels are given back (freed) according to the picture.
Kernel probably has a lot of assembly files with a lot of labels. Is memory usage a problem?

image.png (895×415 px, 18 KB)

Feb 21 2020, 4:19 PM
tig_freebsdfoundation.org added a comment to D23501: Added ranges to Addr2line.
Feb 21 2020, 4:19 PM
tig_freebsdfoundation.org added a comment to D23782: addr2line: add label checks when DW_AT_range and DW_AT_low_pc cannot be used.

Check labels seems to be using a lot of memory (20 Mb). There might be a bug somewhere. I'm looking into it.

Feb 21 2020, 3:59 PM
tig_freebsdfoundation.org updated the summary of D23782: addr2line: add label checks when DW_AT_range and DW_AT_low_pc cannot be used.
Feb 21 2020, 2:37 PM
tig_freebsdfoundation.org created D23782: addr2line: add label checks when DW_AT_range and DW_AT_low_pc cannot be used.
Feb 21 2020, 2:35 PM

Feb 19 2020

tig_freebsdfoundation.org added inline comments to D23744: Added casper service to logger.
Feb 19 2020, 4:30 PM
tig_freebsdfoundation.org updated the diff for D23744: Added casper service to logger.
Feb 19 2020, 4:30 PM
tig_freebsdfoundation.org added inline comments to D23744: Added casper service to logger.
Feb 19 2020, 4:27 PM
tig_freebsdfoundation.org updated the diff for D23744: Added casper service to logger.
Feb 19 2020, 4:27 PM
tig_freebsdfoundation.org added inline comments to D23744: Added casper service to logger.
Feb 19 2020, 4:10 PM
tig_freebsdfoundation.org updated the diff for D23744: Added casper service to logger.
Feb 19 2020, 4:10 PM
tig_freebsdfoundation.org updated the diff for D23744: Added casper service to logger.

Added Makefile changes.

Feb 19 2020, 3:44 PM

Feb 18 2020

tig_freebsdfoundation.org added inline comments to D23744: Added casper service to logger.
Feb 18 2020, 10:50 PM
tig_freebsdfoundation.org updated the diff for D23744: Added casper service to logger.
Feb 18 2020, 10:49 PM
tig_freebsdfoundation.org updated the diff for D23744: Added casper service to logger.
Feb 18 2020, 7:13 PM
tig_freebsdfoundation.org created D23744: Added casper service to logger.
Feb 18 2020, 6:21 PM

Feb 11 2020

tig_freebsdfoundation.org added a comment to D23501: Added ranges to Addr2line.

I added in line 482

if (lopc == curlopc)
				return (DW_DLV_ERROR);

for the case when DW_AT_Range is present so the program stops when we can't find an address.

Feb 11 2020, 10:07 PM
tig_freebsdfoundation.org updated the diff for D23501: Added ranges to Addr2line.
Feb 11 2020, 10:04 PM
tig_freebsdfoundation.org updated the diff for D23501: Added ranges to Addr2line.

Added comment on check_range()

Feb 11 2020, 9:56 PM

Feb 7 2020

tig_freebsdfoundation.org updated the diff for D23501: Added ranges to Addr2line.

-f and -i flag outputs are now the same as original.
collect_func() needs gdb to get function name, so I added a field a CU to store this info in the cache.

Feb 7 2020, 10:41 PM
tig_freebsdfoundation.org abandoned D23350: Added Single Entry Cache to addr2line.
Feb 7 2020, 7:16 PM
tig_freebsdfoundation.org updated the diff for D23501: Added ranges to Addr2line.
  1. I fixed the issues mentioned in the code comments.
  2. I tested the performance with curlopc and with resetting cu to first cu every time(v2), below is the results:

image.png (461×608 px, 48 KB)

r=reverse
seq=sequential
rand=random
v1 is addr2line with curlopc
v2 is the version that resets cu to first cu for every translation
10000seq stores 10k sorted addr of first 20k kernel addr.
1000rand stores 1k rand addr in all of kernel addr
r10000seq is 10000seq reversed
Which version should I keep?

  1. I didn't test with -f -i before. And having tested it just now I realized the output between the old version and my patch looks different. I'm looking into it now.
Feb 7 2020, 6:11 PM