[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH] x86emul/fuzz: correct header (symlink) dependencies


  • To: "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Mon, 17 Apr 2023 09:54:15 +0200
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=suse.com; dmarc=pass action=none header.from=suse.com; dkim=pass header.d=suse.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=gE0a1mE6c2npUCOmNFYKdH+0rHLAz4QE3HbsVfSob6Y=; b=kMGocZqje/K4CoYYWo3zRuJD38tZnOFvDkmR51AJtf6jZcf9nCpH8OM5ApQiJXvD1ckwzBaqzB6a3nq98nidN9afVHPYRSNDmYlWsSSODNT159/ztK6l+UGqst4TNN4Si6hSR0bvP7YkP4GJ93J7hkozli7xFouv8R01svu5X57Zj7tkN9CPE6yo9zlr8LSfbSUYT4gOgidtUHnJW+GLwibE64RuR9ZaazBxdrmhgOPAd5CyMCu6BKvTtkQJhe2oFvR9ZZ3pTGKcveiXtr5qPyp0k7q2CO3zL0Go2USxx/dTj0amAT5UdmV0xj/Vmydl/CMKMrSb+XOLNHQ/7GICkQ==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=PAkXTsnJAiBIsoLsb7678toiVXG6Fsn1vtmR9FA1gu3JtcBQLWy5SHIqJgwvUB1PJxu7tsEt0i9DBAZ0S0BqX1BXroCaookRM/uDUlm8sb7qgD7yauWCiX+Gx2+eJVSTf/5HNd0B5sEhDQy4gr42lxVh1xudzf0nA9Uj6Z0WrRWjtvheLD/UQ1Yj/BlXxijH6Ya1huOT3ZxJZyk+ezPPpoDzBPuBiEZPbOUT2CU65hwHdytTuEHCRhpb0NEgdm5kDLiZvxfCeScJEOU/e5V51N/KTCZj87e8a1C70arTAfxV2rBVhuvUli6xnakyYZwRyQOtYg8vlPirMi17SLtCwQ==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
  • Cc: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>
  • Delivery-date: Mon, 17 Apr 2023 07:54:59 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

A use of $(x86_emulate.h) was introduced (mirroring what the testharness
has) without realizing that no such variable exists here. (Re)name the
variable (to) "private.h", which better expresses what is included which
way.

Note that because of automatic dependencies tracking, unlike in the test
harness no $(x86.h) variable is needed here - we solely need explicit
dependencies for files which need symlinks created.

Fixes: 9ace97ab9b87 ("x86emul: split off opcode 0f01 handling")
Reported-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>

--- a/tools/fuzz/x86_instruction_emulator/Makefile
+++ b/tools/fuzz/x86_instruction_emulator/Makefile
@@ -35,14 +35,16 @@ OBJS := fuzz-emul.o x86-emulate.o
 OBJS += x86_emulate/0f01.o x86_emulate/0fae.o x86_emulate/0fc7.o
 OBJS += x86_emulate/decode.o x86_emulate/fpu.o
 
+private.h := x86-emulate.h x86_emulate/x86_emulate.h x86_emulate/private.h
+
 x86-emulate.h: x86_emulate/x86_emulate.h
-x86-emulate.o x86-emulate-cov.o: x86-emulate.h x86_emulate/x86_emulate.c 
x86_emulate/private.h
+x86-emulate.o x86-emulate-cov.o: x86_emulate/x86_emulate.c $(private.h)
 fuzz-emul.o fuzz-emul-cov.o wrappers.o: x86-emulate.h
 
-$(filter x86_emulate/%.o,$(OBJS)): x86_emulate/%.o: x86_emulate/%.c 
x86_emulate/private.h $(x86_emulate.h)
+$(filter x86_emulate/%.o,$(OBJS)): x86_emulate/%.o: x86_emulate/%.c 
$(private.h)
        $(CC) $(CPPFLAGS) $(CFLAGS) $(CFLAGS_$*.o) -c -o $@ $< $(APPEND_CFLAGS)
 
-$(patsubst %.o,%-cov.o,$(filter x86_emulate/%.o,$(OBJS))): 
x86_emulate/%-cov.o: x86_emulate/%.c x86_emulate/private.h $(x86_emulate.h)
+$(patsubst %.o,%-cov.o,$(filter x86_emulate/%.o,$(OBJS))): 
x86_emulate/%-cov.o: x86_emulate/%.c $(private.h)
        $(CC) $(CPPFLAGS) $(CFLAGS) $(CFLAGS_$*.o) $(GCOV_FLAGS) -c -o $@ $< 
$(APPEND_CFLAGS)
 
 x86-insn-fuzzer.a: $(OBJS) cpuid.o



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.