[PATCH for-4.17 1/6] test/vpci: add dummy cfcheck define

Roger Pau Monne posted 6 patches 3 years, 3 months ago
There is a newer version of this series
[PATCH for-4.17 1/6] test/vpci: add dummy cfcheck define
Posted by Roger Pau Monne 3 years, 3 months ago
Some vpci functions got the cfcheck attribute added, but that's not
defined in the user-space test harness, so add a dummy define in order
for the harness to build.

Fixes: 4ed7d5525f ('xen/vpci: CFI hardening')
Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
---
 tools/tests/vpci/emul.h | 1 +
 1 file changed, 1 insertion(+)

diff --git a/tools/tests/vpci/emul.h b/tools/tests/vpci/emul.h
index 2e1d3057c9..386b15eb86 100644
--- a/tools/tests/vpci/emul.h
+++ b/tools/tests/vpci/emul.h
@@ -37,6 +37,7 @@
 #define prefetch(x) __builtin_prefetch(x)
 #define ASSERT(x) assert(x)
 #define __must_check __attribute__((__warn_unused_result__))
+#define cf_check
 
 #include "list.h"
 
-- 
2.37.3


Re: [PATCH for-4.17 1/6] test/vpci: add dummy cfcheck define
Posted by Anthony PERARD 3 years, 3 months ago
On Thu, Oct 20, 2022 at 11:46:44AM +0200, Roger Pau Monne wrote:
> Some vpci functions got the cfcheck attribute added, but that's not
> defined in the user-space test harness, so add a dummy define in order
> for the harness to build.
> 
> Fixes: 4ed7d5525f ('xen/vpci: CFI hardening')
> Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>

Acked-by: Anthony PERARD <anthony.perard@citrix.com>

Thanks,

-- 
Anthony PERARD
Re: [PATCH for-4.17 1/6] test/vpci: add dummy cfcheck define
Posted by Andrew Cooper 3 years, 3 months ago
On 20/10/2022 10:46, Roger Pau Monne wrote:
> Some vpci functions got the cfcheck attribute added, but that's not
> defined in the user-space test harness, so add a dummy define in order
> for the harness to build.
>
> Fixes: 4ed7d5525f ('xen/vpci: CFI hardening')
> Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>

Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>

However, I think there wants to be another patch in this series wiring
up the unit test by default, so we don't keep breaking this...