lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <alpine.LNX.2.00.1104081645480.6022@pobox.suse.cz>
Date:	Fri, 8 Apr 2011 16:54:51 -0700 (PDT)
From:	Jiri Kosina <jkosina@...e.cz>
To:	Stephen Rothwell <sfr@...b.auug.org.au>
Cc:	linux-next@...r.kernel.org, linux-kernel@...r.kernel.org,
	Alan Ott <alan@...nal11.us>
Subject: Re: linux-next: build failure after merge of the hid tree

On Thu, 7 Apr 2011, Stephen Rothwell wrote:

> Hi Jiri,
> 
> After merging the hid tree, today's linux-next build (x86_64 allmodconfig)
> failed like this:
> 
> samples/hidraw/hid-example.c: In function 'main':
> samples/hidraw/hid-example.c:103: warning: implicit declaration of function 'HIDIOCSFEATURE'
> samples/hidraw/hid-example.c:111: warning: implicit declaration of function 'HIDIOCGFEATURE'
> tmp/ccK96SHd.o: In function `main':
> hid-example.c:(.text+0x205): undefined reference to `HIDIOCSFEATURE'
> hid-example.c:(.text+0x23e): undefined reference to `HIDIOCGFEATURE'
> 
> Caused by commit c54ea4918c2b ("HID: Documentation for hidraw").  I can
> only assume that linux/hidraw.h is being included from /usr/include and
> not the kernel tree being built?
> 
> I have used the hid tree from next-20110406 for today.

OK, I have introduced the patch below to the branch now. I am not proud of 
it, but I don't see other option currently. Will remove it after some 
time.



From: Jiri Kosina <jkosina@...e.cz>
Subject: [PATCH] HID: hidraw: fix samples miscompilation

On systems where userspace doesn't have new hidraw.h populated to
/usr/include, the hidraw sample won't compile as it's missing the new
ioctl defitions.

Introduce temporary ugly workaround to define the ioctls "manually"
in such cases, just to avoid miscompilation in allmodconfig cases.

Reported-by: Stephen Rothwell <sfr@...b.auug.org.au>
Signed-off-by: Jiri Kosina <jkosina@...e.cz>
---
 samples/hidraw/hid-example.c |   11 +++++++++++
 1 files changed, 11 insertions(+), 0 deletions(-)

diff --git a/samples/hidraw/hid-example.c b/samples/hidraw/hid-example.c
index 40e3d62..816e2dc 100644
--- a/samples/hidraw/hid-example.c
+++ b/samples/hidraw/hid-example.c
@@ -14,6 +14,17 @@
 #include <linux/input.h>
 #include <linux/hidraw.h>
 
+/*
+ * Ugly hack to work around failing compilation on systems that don't
+ * yet populate new version of hidraw.h to userspace.
+ *
+ * If you need this, please have your distro update the kernel headers.
+ */
+#ifndef HIDIOCSFEATURE
+#define HIDIOCSFEATURE(len)    _IOC(_IOC_WRITE|_IOC_READ, 'H', 0x06, len)
+#define HIDIOCGFEATURE(len)    _IOC(_IOC_WRITE|_IOC_READ, 'H', 0x07, len)
+#endif
+
 /* Unix */
 #include <sys/ioctl.h>
 #include <sys/types.h>
-- 
1.7.3.1


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ