On 05/29/2018 04:44 PM, Evan Green wrote: > When using -L with Linux app emulation, there is an issue in > init_paths where Qemu will get lost exploring a directory tree > with a symlink loop in it. This causes Qemu to hang, and > eventually consume all memory in the system. > > Qemu's code for pre-exploring the entire directory tree is both > error-prone and slow. Instead, this changes uses faccessat, which > both avoids the symlink loop (since the entire directory space isn't > being explored up front), and likely speeds things up a bit. > > Partial credit goes to Richard Henderson, as it was only after staring > at his patch [1] that I wrote mine. > > [1] https://patchwork.kernel.org/patch/9512083/ > > Signed-off-by: Evan Green <evgr...@chromium.org> > ---
I like this as an improvement on the current situation. Perhaps folks do like this a bit better than my more invasive patch. > +int pathprefixfd = -1; > +__thread char gluedpath[PATH_MAX]; static for both, otherwise, Reviewed-by: Richard Henderson <richard.hender...@linaro.org> r~