Masanori Misono

Results 25 comments of Masanori Misono

The program should be ```diff --- a/originals/Ch08_FileSystems/scread.bt +++ b/originals/Ch08_FileSystems/scread.bt @@ -20,6 +20,6 @@ tracepoint:syscalls:sys_enter_read { $task = (struct task_struct *)curtask; - $file = (struct file *)*($task->files->fdt->fd + args->fd); + $file...

I don't try it, but I guess the following workaround will work. ``` struct my_spa_t { char spa_name[64]; // define other fields if needed } kprobe:zfs_read,kprobe:zfs_write { $spa = (struct...

bpftrace treats `char *` and `char []` differently, and the type of former is `Type::integer` and the latter is `Type::string`. When accessing a struct field whose type is `Type::string` (e.g.,...

Storing strings in a map is definitely useful. The issue is #305. It is possible to use a map value directly as a key in Linux v4.18 (https://github.com/torvalds/linux/commit/d71962f3e627b5941804036755c844fabfb65ff5).) So although...

I hit this issue recently and investigated. As of `uaddr()`, I found a workaround. The base address of ASLR can be obtained by consulting `vm_area_struct`. For example: ``` % bpftrace...

FYI perf-probe has dwarf support, and it uses dwarf for not only arguments access but also stack unwinding. IIRC it works with both kprobes and uprobes. (though I think we...

I forgot to mention, but perf-probe also utilizes DWARF to access local variables. Example: The source file ```c #include int main(){ int a = 1; int b = 2; int...

It seems this is also due to #1305. ``` % sudo ./src/bpftrace -e 'U:./a:test:probe1 { printf("%s\n", str(arg0, arg1)); }' % sudo ./bpftool prog dump xlated id 410 0: (bf) r6...

As of kprobe, bpftrace emites an error: ``` sudo ./bpftrace -e 'BEGIN {1} k:aaaa {1}' Attaching 2 probes... cannot attach kprobe, probe entry may not exist ERROR: Error attaching probe:...

Considering the compatibility, I think ignoring invalid attachpoints by default would be less harmless (I mean, we will add `--strict` option then, though we need to modify bcc apparently.)