"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "linux/pt.c" between
honggfuzz-2.1.tar.gz and honggfuzz-2.2.tar.gz

About: honggfuzz is a security oriented, feedback-driven, evolutionary, easy-to-use fuzzer with powerful analysis options.

pt.c  (honggfuzz-2.1):pt.c  (honggfuzz-2.2)
skipping to change at line 121 skipping to change at line 121
case pt_ipc_sext_48: case pt_ipc_sext_48:
ip = sext(packet->payload.ip.ip, 48); ip = sext(packet->payload.ip.ip, 48);
break; break;
case pt_ipc_full: case pt_ipc_full:
ip = packet->payload.ip.ip; ip = packet->payload.ip.ip;
break; break;
default: default:
return; return;
} }
if (ip >= run->global->linux.dynamicCutOffAddr) { if (ip >= run->global->arch_linux.dynamicCutOffAddr) {
return; return;
} }
ip &= _HF_PERF_BITMAP_BITSZ_MASK; ip &= _HF_PERF_BITMAP_BITSZ_MASK;
register bool prev = ATOMIC_BITMAP_SET(run->global->feedback.covFeedbackMap- >bbMapPc, ip); register bool prev = ATOMIC_BITMAP_SET(run->global->feedback.covFeedbackMap- >bbMapPc, ip);
if (!prev) { if (!prev) {
run->linux.hwCnts.newBBCnt++; run->hwCnts.newBBCnt++;
} }
} }
void arch_ptAnalyze(run_t* run) { void arch_ptAnalyze(run_t* run) {
struct perf_event_mmap_page* pem = (struct perf_event_mmap_page*)run->linux. perfMmapBuf; struct perf_event_mmap_page* pem = (struct perf_event_mmap_page*)run->arch_l inux.perfMmapBuf;
uint64_t aux_tail = ATOMIC_GET(pem->aux_tail); uint64_t aux_tail = ATOMIC_GET(pem->aux_tail);
uint64_t aux_head = ATOMIC_GET(pem->aux_head); uint64_t aux_head = ATOMIC_GET(pem->aux_head);
/* smp_rmb() required as per /usr/include/linux/perf_event.h */ /* smp_rmb() required as per /usr/include/linux/perf_event.h */
rmb(); rmb();
struct pt_config ptc; struct pt_config ptc;
pt_config_init(&ptc); pt_config_init(&ptc);
ptc.begin = &run->linux.perfMmapAux[aux_tail]; ptc.begin = &run->arch_linux.perfMmapAux[aux_tail];
ptc.end = &run->linux.perfMmapAux[aux_head]; ptc.end = &run->arch_linux.perfMmapAux[aux_head];
ptc.cpu = ptCpu; ptc.cpu = ptCpu;
int errcode = pt_cpu_errata(&ptc.errata, &ptc.cpu); int errcode = pt_cpu_errata(&ptc.errata, &ptc.cpu);
if (errcode < 0) { if (errcode < 0) {
LOG_F("pt_errata() failed: %s", pt_errstr(-errcode)); LOG_F("pt_errata() failed: %s", pt_errstr(-errcode));
} }
struct pt_packet_decoder* ptd = pt_pkt_alloc_decoder(&ptc); struct pt_packet_decoder* ptd = pt_pkt_alloc_decoder(&ptc);
if (ptd == NULL) { if (ptd == NULL) {
LOG_F("pt_pkt_alloc_decoder() failed"); LOG_F("pt_pkt_alloc_decoder() failed");
 End of changes. 4 change blocks. 
5 lines changed or deleted 5 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)