[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 5/6] xsm: expanding function related macros in dummy.h
- To: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, "Daniel P. Smith" <dpsmith@xxxxxxxxxxxxxxxxxxxx>
- From: Jan Beulich <jbeulich@xxxxxxxx>
- Date: Fri, 18 Jun 2021 14:44:14 +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-SenderADCheck; bh=ASupVSc59AbXSKKOvmTCbTLNYCTi1P5RmZ+rCbaMqOg=; b=CgsEvwBbVSjdZfCnm58OX9sOM+KREHTReixCbol3/e7c1AHw9TMOUqMNyVC9t86yeyR+9E3A6ntro6P4RkMrJKH2E/gEZ5Wed1sk98RP8lNANzACts+JfApNZMBMz7ki4bYA6pbMEp8SSEGU4zWBQq0A7K9/lzeubQ0qflXlgConPhOPqSesX9vxMSXr066yztueumlIFPrDTOpjA2xtqqID9EQmcHI+4ru5zi9cSSHjC9kFBFRg9o0daxcRMZz3SSYB2kfDanLmMaKVTzB2e6BZ8Kh9yNr1mlCA59UnOmBbDaJSn8BOw94Dj9eomYM5Us1iIL8q45xGy6Vd9Y1/4Q==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Vmop0yTHjavv63E6Fh810qWNRblOAjNGGwx+moMow2Y6pJLkFa+Dv3B0ML8tAb+jfG2xdDJpMP43JIPQZ/3stqxSSjw9Md+uGwDJ9Qq4Ij6TGk/Wyh8YHSNiSug51vDQTa6wLyO/DKKvvlhEoi1v6YdVvU7jY4LWffY9Bp6xi4bu1DIm6JnrfCg3RpZbW1TCeNR8Jz6KsMbGYT2qUon2Oc31+5alwRWpmXNRFVp6Ib1TYYuWBwXiwmjDnY96AXn3GiMW/Kd3Eq6Z9A7VrgyPpK7D4Zag8MzQyLR6mLS8CuUNBdgVC5wzUUhLg2x6zE6n+paFzHzj0jvd/pgaCaLH0g==
- Authentication-results: lists.xenproject.org; dkim=none (message not signed) header.d=none;lists.xenproject.org; dmarc=none action=none header.from=suse.com;
- Cc: Stefano Stabellini <sstabellini@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>, George Dunlap <george.dunlap@xxxxxxxxxx>, Ian Jackson <iwj@xxxxxxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>, Tamas K Lengyel <tamas@xxxxxxxxxxxxx>, Tim Deegan <tim@xxxxxxx>, Juergen Gross <jgross@xxxxxxxx>, Alexandru Isaila <aisaila@xxxxxxxxxxxxxxx>, Petre Pircalabu <ppircalabu@xxxxxxxxxxxxxxx>, Dario Faggioli <dfaggioli@xxxxxxxx>, Paul Durrant <paul@xxxxxxx>, Daniel De Graaf <dgdegra@xxxxxxxxxxxxx>, persaur@xxxxxxxxx, christopher.w.clark@xxxxxxxxx, adam.schwalm@xxxxxxxxxx, scott.davis@xxxxxxxxxx, xen-devel@xxxxxxxxxxxxxxxxxxxx
- Delivery-date: Fri, 18 Jun 2021 12:44:25 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
On 18.06.2021 14:40, Jan Beulich wrote:
> On 18.06.2021 14:03, Andrew Cooper wrote:
>> On 18/06/2021 00:39, Daniel P. Smith wrote:
>>> diff --git a/xen/xsm/dummy.h b/xen/xsm/dummy.h
>>> index 7e2bb09dac..0f8ea163af 100644
>>> --- a/xen/xsm/dummy.h
>>> +++ b/xen/xsm/dummy.h
>>> @@ -9,7 +9,7 @@
>>> *
>>> *
>>> * Each XSM hook implementing an access check should have its first
>>> parameter
>>> - * preceded by XSM_DEFAULT_ARG (or use XSM_DEFAULT_VOID if it has no
>>> + * preceded by (or use XSM_DEFAULT_VOID if it has no
>>> * arguments). The first non-declaration statement shold be
>>> XSM_ASSERT_ACTION
>>> * with the expected type of the hook, which will either define or check
>>> the
>>> * value of action.
>>> @@ -47,14 +47,12 @@ void __xsm_action_mismatch_detected(void);
>>> * xsm_default_t argument available, so the value from the assertion is
>>> used to
>>> * initialize the variable.
>>> */
>>> -#define XSM_INLINE __maybe_unused
>>
>> Nothing in a header file should ever need __maybe_unused. Now that the
>> !XSM case has been untangled, I think this can be dropped, rather than
>> expanded inline.
>>
>>> -
>>> -#define XSM_DEFAULT_ARG /* */
>>> #define XSM_DEFAULT_VOID void
>>
>> XSM_DEFAULT_VOID needs to disappear too. I can't see what it is even
>> doing before the cleanup, because if it is missing, you'll fail the
>> compile for using K&R style functions.
>
> You need to look at the state before patch 3 to see its purpose. Patch 3
> removed the other variant, and hence the need for this one as well, but
> I think it is reasonable to not clean up everything in one go (unless
> it would mean touching exactly the same code a 2nd time later on).
Albeit, having looked at the patch itself, I agree it should be dropped
here together with XSM_DEFAULT_ARG, of which it is (was) a companion.
But again, all provided there is agreement to remove the top level XSM
option, which I personally don't think is a good idea.
Jan
|