Pete's Log: adventures in hacking

Entry #816, (Coding, Hacking, & CS stuff)
(posted when I was 22 years old.)

oh man. what a trip it's been. Lessons learned:
  • whatever version of vmware I'm currently running does not play nice with my current X server. X crashes once I exit vmware. grrrr.
  • get_random_bytes will cause a kernel oops if passed a buffer that was allocated with kmalloc(GFP_KERNEL, ...) ... for reasons I don't understand. Solution: statically allocate buffers instead
  • when using vmware, if one accesses the rdtsc register, it's the live register on the processor, so instruction counts get heavily skewed by vmware overhead. for this reason, the code must be run on a real system to get good results.
  • instruction counts: quicksort: 2068908, bubble sort: 596170874.
overall, a fun adventure...