Hello, Sasha, all,
The reason for that mess is that on <=4.14 kernels, there is a dependency on 6396bb22151 ("treewide: kzalloc() -> kcalloc()"), but since that patch is a treewide change, to bring that in we need a big pile of seemingly random patches from all over the tree, which is the output you see.
Indeed, this patch depends on 2 tree-wide patches, one being 6396bb22151 ("treewide: kzalloc() -> kcalloc()") as you've mentioned and another one is a9a08845e9ac ("vfs: do bulk POLL* -> EPOLL* replacement"). In the part of HID driver they basically do:
#6396bb22151
- buf = kzalloc(sizeof(char) * HID_DEBUG_BUFSIZE, GFP_ATOMIC); + buf = kzalloc(HID_DEBUG_BUFSIZE, GFP_ATOMIC);
- if (!(list->hid_debug_buf = kzalloc(sizeof(char) * HID_DEBUG_BUFSIZE, GFP_KERNEL))) { + if (!(list->hid_debug_buf = kzalloc(HID_DEBUG_BUFSIZE, GFP_KERNEL))) {
#a9a08845e9ac - return POLLIN | POLLRDNORM; + return EPOLLIN | EPOLLRDNORM;
- return POLLERR | POLLHUP; + return EPOLLERR | EPOLLHUP;
Adding this 2 changes to the 4.14.y make HID patch to apply cleanly (except offsets). I suppose, I need to backport HID patch (adding these 2 changes above) and post to stable@.
I will follow this process: https://www.kernel.org/doc/html/latest/process/stable-kernel-rules.html
In case I do smth wrong, please, tell.
Best regards, Vladis Dronov | Red Hat, Inc. | Product Security | Senior Software Engineer