[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH 1/3] fuzz/x86emul: avoid race in link farm rune
On Thu, Feb 16, 2017 at 07:10:41PM +0000, Andrew Cooper wrote: > On 16/02/17 18:56, Wei Liu wrote: > > Several `ln -sf` can race with each other and cause error like: > > > > 14:43:56 00:07:06 O: ln: cannot remove 'asm': No such file or directory > > > > Provide dedicated targets for soft-linking directories. > > > > Reported-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx> > > Signed-off-by: Wei Liu <wei.liu2@xxxxxxxxxx> > > --- > > tools/fuzz/x86_instruction_emulator/Makefile | 8 ++++++-- > > 1 file changed, 6 insertions(+), 2 deletions(-) > > > > diff --git a/tools/fuzz/x86_instruction_emulator/Makefile > > b/tools/fuzz/x86_instruction_emulator/Makefile > > index fede7e9afd..0cd49753cf 100644 > > --- a/tools/fuzz/x86_instruction_emulator/Makefile > > +++ b/tools/fuzz/x86_instruction_emulator/Makefile > > @@ -8,12 +8,16 @@ else > > x86-instruction-emulator-fuzzer-all: > > endif > > > > -x86_emulate/x86_emulate.c x86_emulate/x86_emulate.h: > > +x86_emulate: > > [ -L x86_emulate ] || ln -sf $(XEN_ROOT)/xen/arch/x86/x86_emulate . > > > > -asm/x86-vendors.h asm/x86-defns.h asm/msr-index.h: > > +x86_emulate/x86_emulate.c x86_emulate/x86_emulate.h: x86_emulate > > You should be able to do this: > > x86_emulate/%: x86_emulate > Using % won't work. Jan made a similar comment during the first iteration of the fuzzer series. It turned out that we needed to list explicitly every file because of the other rules explicitly listed those files. > > + > > +asm: > > [ -L asm ] || ln -sf $(XEN_ROOT)/xen/include/asm-x86 asm > > > > +asm/x86-vendors.h asm/x86-defns.h asm/msr-index.h: asm > > And this: > > asm/%: asm > This can be made work by eliminating the explicit listing of individual files because we're linking asm-x86 wholesale. Wei. > Otherwise, Reviewed-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx> > > > + > > x86_emulate.c x86_emulate.h: %: > > [ -L $* ] || ln -sf $(XEN_ROOT)/tools/tests/x86_emulator/$* > > > _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx https://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |