xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v4 0/2] Fuzz/x86emul and x86emul/test fixes
@ 2017-02-20 14:37 Wei Liu
  2017-02-20 14:37 ` [PATCH v4 1/2] fuzz/x86emul: avoid race in link farm rune Wei Liu
  2017-02-20 14:37 ` [PATCH v4 2/2] x86emul/test: " Wei Liu
  0 siblings, 2 replies; 5+ messages in thread
From: Wei Liu @ 2017-02-20 14:37 UTC (permalink / raw)
  To: Xen-devel; +Cc: Andrew Cooper, Ian Jackson, Wei Liu, Jan Beulich

Wei Liu (2):
  fuzz/x86emul: avoid race in link farm rune
  x86emul/test: avoid race in link farm rune

 tools/fuzz/x86_instruction_emulator/Makefile | 12 ++++++++----
 tools/tests/x86_emulator/Makefile            | 12 ++++++++----
 2 files changed, 16 insertions(+), 8 deletions(-)

-- 
2.11.0


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH v4 1/2] fuzz/x86emul: avoid race in link farm rune
  2017-02-20 14:37 [PATCH v4 0/2] Fuzz/x86emul and x86emul/test fixes Wei Liu
@ 2017-02-20 14:37 ` Wei Liu
  2017-02-20 14:53   ` Jan Beulich
  2017-02-20 14:37 ` [PATCH v4 2/2] x86emul/test: " Wei Liu
  1 sibling, 1 reply; 5+ messages in thread
From: Wei Liu @ 2017-02-20 14:37 UTC (permalink / raw)
  To: Xen-devel; +Cc: Andrew Cooper, Ian Jackson, Wei Liu, Jan Beulich

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@citrix.com>
Signed-off-by: Wei Liu <wei.liu2@citrix.com>
---
 tools/fuzz/x86_instruction_emulator/Makefile | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)

diff --git a/tools/fuzz/x86_instruction_emulator/Makefile b/tools/fuzz/x86_instruction_emulator/Makefile
index fede7e9afd..3b75beb07d 100644
--- a/tools/fuzz/x86_instruction_emulator/Makefile
+++ b/tools/fuzz/x86_instruction_emulator/Makefile
@@ -8,11 +8,15 @@ else
 x86-instruction-emulator-fuzzer-all:
 endif
 
-x86_emulate/x86_emulate.c x86_emulate/x86_emulate.h:
-	[ -L x86_emulate ] || ln -sf $(XEN_ROOT)/xen/arch/x86/x86_emulate .
+x86_emulate:
+	[ -L $@ ] || ln -sf $(XEN_ROOT)/xen/arch/x86/$@
 
-asm/x86-vendors.h asm/x86-defns.h asm/msr-index.h:
-	[ -L asm ] || ln -sf $(XEN_ROOT)/xen/include/asm-x86 asm
+x86_emulate/%: x86_emulate ;
+
+asm:
+	[ -L $@ ] || ln -sf $(XEN_ROOT)/xen/include/asm-x86 $@
+
+asm/%: asm ;
 
 x86_emulate.c x86_emulate.h: %:
 	[ -L $* ] || ln -sf $(XEN_ROOT)/tools/tests/x86_emulator/$*
-- 
2.11.0


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH v4 2/2] x86emul/test: avoid race in link farm rune
  2017-02-20 14:37 [PATCH v4 0/2] Fuzz/x86emul and x86emul/test fixes Wei Liu
  2017-02-20 14:37 ` [PATCH v4 1/2] fuzz/x86emul: avoid race in link farm rune Wei Liu
@ 2017-02-20 14:37 ` Wei Liu
  2017-02-20 14:54   ` Jan Beulich
  1 sibling, 1 reply; 5+ messages in thread
From: Wei Liu @ 2017-02-20 14:37 UTC (permalink / raw)
  To: Xen-devel; +Cc: Andrew Cooper, Ian Jackson, Wei Liu, Jan Beulich

Several `ln -sf` can race with each other.  Provide dedicated targets
for soft-linking directories.

Signed-off-by: Wei Liu <wei.liu2@citrix.com>
---
 tools/tests/x86_emulator/Makefile | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)

diff --git a/tools/tests/x86_emulator/Makefile b/tools/tests/x86_emulator/Makefile
index 9bf36947c0..7ca138d31a 100644
--- a/tools/tests/x86_emulator/Makefile
+++ b/tools/tests/x86_emulator/Makefile
@@ -40,11 +40,15 @@ distclean: clean
 .PHONY: install
 install:
 
-x86_emulate/x86_emulate.c x86_emulate/x86_emulate.h:
-	[ -L x86_emulate ] || ln -sf $(XEN_ROOT)/xen/arch/x86/x86_emulate .
+x86_emulate:
+	[ -L $@ ] || ln -sf $(XEN_ROOT)/xen/arch/x86/$@
 
-asm/x86-vendors.h asm/x86-defns.h asm/msr-index.h:
-	[ -L asm ] || ln -sf $(XEN_ROOT)/xen/include/asm-x86 asm
+x86_emulate/%: x86_emulate ;
+
+asm:
+	[ -L $@ ] || ln -sf $(XEN_ROOT)/xen/include/asm-x86 $@
+
+asm/%: asm ;
 
 HOSTCFLAGS += $(CFLAGS_xeninclude) -I.
 
-- 
2.11.0


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH v4 1/2] fuzz/x86emul: avoid race in link farm rune
  2017-02-20 14:37 ` [PATCH v4 1/2] fuzz/x86emul: avoid race in link farm rune Wei Liu
@ 2017-02-20 14:53   ` Jan Beulich
  0 siblings, 0 replies; 5+ messages in thread
From: Jan Beulich @ 2017-02-20 14:53 UTC (permalink / raw)
  To: Wei Liu; +Cc: Andrew Cooper, Ian Jackson, Xen-devel

>>> On 20.02.17 at 15:37, <wei.liu2@citrix.com> 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@citrix.com>
> Signed-off-by: Wei Liu <wei.liu2@citrix.com>

Reviewed-by: Jan Beulich <jbeulich@suse.com>



_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH v4 2/2] x86emul/test: avoid race in link farm rune
  2017-02-20 14:37 ` [PATCH v4 2/2] x86emul/test: " Wei Liu
@ 2017-02-20 14:54   ` Jan Beulich
  0 siblings, 0 replies; 5+ messages in thread
From: Jan Beulich @ 2017-02-20 14:54 UTC (permalink / raw)
  To: Wei Liu; +Cc: Andrew Cooper, Ian Jackson, Xen-devel

>>> On 20.02.17 at 15:37, <wei.liu2@citrix.com> wrote:
> Several `ln -sf` can race with each other.  Provide dedicated targets
> for soft-linking directories.
> 
> Signed-off-by: Wei Liu <wei.liu2@citrix.com>

Reviewed-by: Jan Beulich <jbeulich@suse.com>



_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2017-02-20 14:54 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-02-20 14:37 [PATCH v4 0/2] Fuzz/x86emul and x86emul/test fixes Wei Liu
2017-02-20 14:37 ` [PATCH v4 1/2] fuzz/x86emul: avoid race in link farm rune Wei Liu
2017-02-20 14:53   ` Jan Beulich
2017-02-20 14:37 ` [PATCH v4 2/2] x86emul/test: " Wei Liu
2017-02-20 14:54   ` Jan Beulich

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).