microsoft / ntosebpfext

eBPF-For-Windows extension to provide access to Windows kernel functionality
MIT License
15 stars 11 forks source link

Change ntosebpfext command lines and image file names from UTF-8 to UTF-16 #77

Closed Austin-Lamb closed 4 months ago

Austin-Lamb commented 4 months ago

Description

Originally when ntosebpfext was created, there was a pretty low limit on the number of characters that could be marshalled through, so the strings from the kernel were converted to UTF-8 to pack more characters into the limited space. But, with the recent PR (#76), we're now able to marshal much longer strings. Rather than convert them to UTF-8, only to re-convert back to UTF-16 in user mode in many cases, we just pass the UTF-16 string the whole way through.

This reduces 2 string allocations during process create events as a happy little perf side-effect.

Testing

I ran the existing tests locally.

Documentation

No doc updates needed.

Installation

No installer impact.