# Memory test. Tries userspace copies covering # the entire 32-bit address space. global addr %{ static char buf[16384]; %} function copy_more:long(addr:long) %{ THIS->__retvalue = _stp_copy_from_user (buf, (char __user *)(long)THIS->addr, 2048); %} probe kernel.function("sys_read") { printf("copying from %x ... ", addr) ret = copy_more(addr) if (ret < 2048) printf("FAILED (%d)\n", ret) else printf("GOOD\n") addr += 4096 if (addr > 0xffffffff) exit() } probe end { printf("\nDONE. Test succeeded if you see this and there\n") printf("are no might_sleep warnings in the system log.\n") }