linux/drivers/misc/vmw_vmci
Gleb Fotengauer-Malinovskiy 7b7d2261aa vmci_host: print unexpanded names of ioctl requests in debug messages
__stringify macro function expands its arguments, but in this messages
we expect to see ioctl request name instead of it's _IOC macro
expansion.

$ cat stringify.c

#include <stdio.h>
#include <asm/ioctl.h>

#define __stringify_1(x)	#x
#define __stringify(x)		__stringify_1(x)

#define VMCI_DO_IOCTL(ioctl_name) \
    char *name = __stringify(IOCTL_VMCI_ ## ioctl_name);

int main() {
        VMCI_DO_IOCTL(INIT_CONTEXT)
        printf("%s\n", name);
}
$ cc stringify.c
$ ./a.out
(((0U) << (((0+8)+8)+14)) | (((7)) << (0+8)) | (((0xa0)) << 0) | ((0) << ((0+8)+8)))

Signed-off-by: Gleb Fotengauer-Malinovskiy <glebfm@altlinux.org>
Link: https://lore.kernel.org/r/20210302153346.300416-1-glebfm@altlinux.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-03-24 08:26:31 +01:00
..
Kconfig treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
Makefile treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
vmci_context.c misc: vmw_vmci: fix kernel info-leak by initializing dbells in vmci_ctx_get_chkpt_doorbells() 2020-12-09 19:36:26 +01:00
vmci_context.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 321 2019-06-05 17:37:05 +02:00
vmci_datagram.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 321 2019-06-05 17:37:05 +02:00
vmci_datagram.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 321 2019-06-05 17:37:05 +02:00
vmci_doorbell.c VMCI: Release resource if the work is already queued 2019-08-28 22:57:07 +02:00
vmci_doorbell.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 321 2019-06-05 17:37:05 +02:00
vmci_driver.c vsock/vmci: make vmci_vsock_cb_host_called static 2019-11-20 12:39:29 -08:00
vmci_driver.h vsock/vmci: register vmci_transport only when VMCI guest/host are active 2019-11-14 18:12:18 -08:00
vmci_event.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 321 2019-06-05 17:37:05 +02:00
vmci_event.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 321 2019-06-05 17:37:05 +02:00
vmci_guest.c vsock/vmci: register vmci_transport only when VMCI guest/host are active 2019-11-14 18:12:18 -08:00
vmci_handle_array.c VMCI: Fix integer overflow in VMCI handle arrays 2019-06-21 16:04:05 +02:00
vmci_handle_array.h VMCI: Fix integer overflow in VMCI handle arrays 2019-06-21 16:04:05 +02:00
vmci_host.c vmci_host: print unexpanded names of ioctl requests in debug messages 2021-03-24 08:26:31 +01:00
vmci_queue_pair.c drivers/misc/vmw_vmci: restrict too big queue size in qp_host_alloc_queue 2021-02-09 12:22:32 +01:00
vmci_queue_pair.h misc/vmw_vmci: fix typo 2021-01-26 19:18:01 +01:00
vmci_resource.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 321 2019-06-05 17:37:05 +02:00
vmci_resource.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 321 2019-06-05 17:37:05 +02:00
vmci_route.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 321 2019-06-05 17:37:05 +02:00
vmci_route.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 321 2019-06-05 17:37:05 +02:00