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 (45 w, 6 d)

Recent Activity

Mon, Nov 23

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

Thu, Nov 19

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:

Thu, Nov 19, 5:02 PM

Tue, Nov 10

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.

Tue, Nov 10, 9:17 PM

Fri, Nov 6

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.

Fri, Nov 6, 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{F11346634}

Fri, Nov 6, 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?

Fri, Nov 6, 4:16 PM
tig_freebsdfoundation.org added a comment to D27107: syzkaller: add tool to check missing FreeBSD system calls.
[tig@tiger /usr/home/tig/go/src/github.com/google/syzkaller/tools]$ ./check-missing-freebsd-syscalls.py 
kldsym
ksem_destroy
sctp_generic_recvmsg
kmq_unlink
ktimer_gettime
unmount
pselect
aio_return
aio_waitcomplete
sstk
afs3_syscall
aio_fsync
lutimes
rtprio
nlm_syscall
reboot
fhstatfs
sched_get_priority_max
profil
sctp_peeloff
__acl_delete_link
__mac_get_pid
kldunload
setlogin
cpuset_setaffinity
modstat
cpuset_setdomain
ksem_getvalue
sigsuspend
getauid
kmq_open
getloginclass
pwrite
thr_set_name
cpuset_getdomain
sched_yield
wait6
mkfifoat
fstatfs
freebsd11_getfsstat
kmq_setattr
__mac_get_proc
ffclock_getcounter
thr_create
rctl_remove_rule
close_range
sched_setscheduler
funlinkat
vfork
sigreturn
settimeofday
__acl_get_fd
sigwait
setegid
extattr_get_link
ntp_adjtime
futimes
mac_syscall
modnext
aio_error
cpuset_getaffinity
__acl_set_link
getcontext
swapon
semsys
rctl_add_rule
gssd_syscall
sctp_generic_sendmsg
extattr_delete_file
sigtimedwait
jail_attach
lgetfh
abort2
sigprocmask
freebsd7_msgctl
pread
thr_kill
access
mount
extattr_set_link
sched_get_priority_min
fstatat
kldnext
syscall
ktrace
extattr_list_fd
__acl_delete_fd
getrandom
kmq_timedsend
aio_write
ksem_post
extattr_set_file
kill
fexecve
modfnext
kldstat
kenv
freebsd7___semctl
freebsd11_statfs
getdtablesize
ktimer_create
auditon
sysarch
freebsd7_shmctl
ktimer_settime
ksem_init
break
getlogin
__acl_aclcheck_link
sctp_generic_sendmsg_iov
sched_rr_get_interval
sigaction
umask
_umtx_op
fhstat
freebsd11_getdirentries
extattrctl
rtprio_thread
extattr_delete_fd
thr_new
__acl_get_link
getpriority
__acl_set_fd
__mac_set_fd
msgsys
procctl
freebsd12_closefrom
fhlink
revoke
getdirentries
ksem_wait
modfind
nfssvc
ksem_open
sched_setparam
kldunloadf
sigfastblock
rpctls_syscall
yield
quotactl
mkfifo
pdfork
sigpending
jail_remove
extattr_list_file
rctl_get_rules
getfhat
setcontext
cpuset
acct
getfh
rctl_get_limits
thr_wake
ptrace
ffclock_setestimate
sched_getscheduler
thr_exit
MAXSYSCALL
sigwaitinfo
uuidgen
freebsd11_fstatat
setfib
getsid
fhlinkat
ksem_close
rfork
ktimer_delete
__acl_aclcheck_file
undelete
__mac_get_link
setpriority
setauid
setsid
kmq_notify
aio_cancel
thr_suspend
__acl_set_file
kldfirstmod
setaudit
shmsys
ksem_unlink
futimens
jail
aio_mlock
sigqueue
jail_get
cpuset_getid
__mac_get_file
setaudit_addr
sched_getparam
__syscall
adjtime
statfs
ksem_trywait
ktimer_getoverrun
issetugid
freebsd11_fhstat
aio_suspend
jail_set
kmq_timedreceive
getppid
freebsd11_nstat
freebsd11_fstatfs
kldfind
__acl_get_file
thr_kill2
kldload
swapcontext
getaudit
auditctl
audit
clock_getcpuclockid2
aio_read
ntp_gettime
__mac_get_fd
setloginclass
posix_openpt
utrace
__acl_delete_file
eaccess
fork
cpuset_setid
extattr_list_link
swapoff
lio_listio
__mac_set_link
__sysctl
extattr_set_fd
rctl_get_racct
freebsd11_vadvise
ksem_timedwait
freebsd11_nlstat
nnpfs_syscall
pdgetpid
gettimeofday
extattr_delete_link
fhopen
extattr_get_fd
sbrk
__mac_execve
freebsd11_nfstat
__mac_set_file
__mac_set_proc
extattr_get_file
nmount
fhreadlink
pdkill
getfsstat
getaudit_addr
freebsd11_fhstatfs
ffclock_getestimate
seteuid
thr_self
__sysctlbyname
__setugid
__acl_aclcheck_fd
Fri, Nov 6, 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.

Fri, Nov 6, 3:31 PM

Thu, Nov 5

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

Mon, Nov 2

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

Fri, Oct 30

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

Thu, Oct 29

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.
Thu, Oct 29, 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.
Thu, Oct 29, 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.
Thu, Oct 29, 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.
Thu, Oct 29, 3:31 PM

Tue, Oct 27

tig_freebsdfoundation.org added inline comments to D26909: Readelf: add -z decompression support.
Tue, Oct 27, 3:29 PM
tig_freebsdfoundation.org updated the diff for D26909: Readelf: add -z decompression support.
Tue, Oct 27, 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?

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:


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
tig_freebsdfoundation.org updated the diff for D23571: Fixed bug where elfcopy --add-section needs to be called twice for section to be created.
Feb 7 2020, 3:58 PM
tig_freebsdfoundation.org created D23571: Fixed bug where elfcopy --add-section needs to be called twice for section to be created.
Feb 7 2020, 3:56 PM

Feb 6 2020

tig_freebsdfoundation.org updated the diff for D23501: Added ranges to Addr2line.
Feb 6 2020, 4:17 PM
tig_freebsdfoundation.org updated the diff for D23501: Added ranges to Addr2line.
Feb 6 2020, 4:15 PM