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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Tue, 26 Oct 2010 18:08:11 -0200
From:	Mauro Carvalho Chehab <mchehab@...hat.com>
To:	Randy Dunlap <rdunlap@...otime.net>
CC:	lkml <linux-kernel@...r.kernel.org>,
	Dmitry Torokhov <dmitry.torokhov@...il.com>
Subject: Re: docbook: fix fatal error in linux/input.h

Em 26-10-2010 17:17, Randy Dunlap escreveu:
> On Tue, 26 Oct 2010 17:13:01 -0200 Mauro Carvalho Chehab wrote:
> 
>> Em 26-10-2010 16:45, Randy Dunlap escreveu:
>>> Hi,
>>>
>>> Recent commit 8613e4c2872a87cc309a42de2c7091744dc54d0e:
>>> Author: Mauro Carvalho Chehab <mchehab@...hat.com>
>>> Date:   Thu Sep 9 21:54:22 2010 -0700
>>>     Input: add support for large scancodes
>>>
>>> causes a fatal error in docbook generation:
>>>
>>> linux-2.6.36-git8/DOC1/Documentation/DocBook/device-drivers.xml:40690: parser error : StartTag: invalid element name
>>> #define INPUT_KEYMAP_BY_INDEX	(1 << 0)
>>>                              	    ^
>>>
>>> I think that this message comes from xsltproc, but I'm not positive about that.
>>> I also don't know of a really good fix for it.  However, I did find 2 ways to
>>> work around the error:
>>>
>>> a/ move the #define value to after the end of the struct input_keymap_entry, like:
>>>
>>> /* flags bits: */
>>> #define INPUT_KEYMAP_BY_INDEX	(1 << 0)
>>>
>>> or
>>> b/ don't use the "<< 0" (can leave the #define where it is in this case):
>>> #define INPUT_KEYMAP_BY_INDEX	(1)
>>>
>>> I have tested both of these patches and they work OK.
>>> Are you OK with either of them?  or want to choose one?
>>
>>
>> Hmm... probably, the first one is not correct.
> 
> Why not?  All it does is move the line to after the end of the struct.
> 
>> I suspect that the right way is to use something like:
>>
>> 	#define INPUT_KEYMAP_BY_INDEX	(1 &lt;&lt; 0)
>>
>> Could you please test if this would fix the issue?
> 
> You are suggesting putting that into include/linux/input.h ??
> 
> That would make sense if some tool converted "<<" to "&lt;&lt;".
> And that may be where the problem is, but I don't know those tools.

Well, if you don't do it, you may have other problems ;)

Letting characters like <, > or & source code may generate wrong xml files,
and may be bad interpreted by the xml tools.

Btw, that Makefile patch I did to auto-generate some media files[1] use this
logic to generate such files:

ESCAPE = \
	-e "s/&/\\&amp;/g" \
	-e "s/</\\&lt;/g" \
	-e "s/>/\\&gt;/g"

$(MEDIA_DIR)/videodev2.h.xml: $(srctree)/include/linux/videodev2.h $(MEDIA_DIR)/v4l2.xml
	@$($(quiet)gen_xml)
	@(					\
	echo "<programlisting>") > $@
	@(					\
	expand --tabs=8 < $< |			\
	  sed $(ESCAPE) $(DOCUMENTED) |		\
	  sed 's/i\.e\./&ie;/') >> $@
	@(					\
	echo "</programlisting>") >> $@

[1] https://patchwork.kernel.org/patch/267932/
--
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