View previous topic :: View next topic |
Author |
Message |
steve_v Guru
Joined: 20 Jun 2004 Posts: 416 Location: New Zealand
|
Posted: Sat Nov 12, 2005 5:25 am Post subject: "lirc_serial: Unknown symbol verify_area" with 2.6 |
|
|
As the subject line says.
Gentoo-sources-2.6.14-r1
lirc-0.7.2
Compiles cleanly but lirc_serial module won't load
"lirc_serial: Unknown symbol verify_area"
Any ideas?
Cheers,
Steve. |
|
Back to top |
|
|
rc Apprentice
Joined: 16 Dec 2003 Posts: 234
|
Posted: Sat Nov 12, 2005 1:15 pm Post subject: |
|
|
Hi,
i encountered that problem some while ago.
I found some way to make it work again though i think this "fix" is pretty crude.
My solution is to stop the emerge process after unpacking the sources via STRG+Z.
Then edit /var/tmp/portage/lirc-0.7.2/work/lirc-0.7.2/drivers/lirc_serial/lirc_serial.c and comment out the following two lines:
Code: |
retval=verify_area(VERIFY_READ,buf,n);
if(retval) return(retval);
|
And finally continue the emerge process with fg.
As mentioned above i think this way is pretty crude.
Comments and suggestions are always appreciated.
Greetings,
rc |
|
Back to top |
|
|
rc Apprentice
Joined: 16 Dec 2003 Posts: 234
|
|
Back to top |
|
|
Magic Michael n00b
Joined: 02 Aug 2004 Posts: 53 Location: Berlin (West) / Deutschland
|
Posted: Sat Nov 12, 2005 4:54 pm Post subject: |
|
|
Thank you rc, you saved my day. Do we have a bug report for this lirc-issue ? |
|
Back to top |
|
|
steve_v Guru
Joined: 20 Jun 2004 Posts: 416 Location: New Zealand
|
Posted: Sun Nov 13, 2005 4:27 am Post subject: Here's a <very> crude patch |
|
|
Code: | --- lirc-0.7.2/drivers/lirc_serial/lirc_serial.c.orig 2005-04-23 23:40:01.000000000 +1200
+++ lirc-0.7.2/drivers/lirc_serial/lirc_serial.c 2005-11-12 18:34:25.000000000 +1300
@@ -913,7 +913,7 @@
static ssize_t lirc_write(struct file *file, const char *buf,
size_t n, loff_t * ppos)
{
- int retval,i,count;
+ int i,count;
unsigned long flags;
long delta=0;
@@ -921,13 +921,10 @@
{
return(-EBADF);
}
-
if(n%sizeof(lirc_t)) return(-EINVAL);
- retval=verify_area(VERIFY_READ,buf,n);
- if(retval) return(retval);
count=n/sizeof(lirc_t);
if(count>WBUF_LEN || count%2==0) return(-EINVAL);
- copy_from_user(wbuf,buf,n);
+ if(copy_from_user(wbuf,buf,n)) return -EFAULT;
local_irq_save(flags);
if(hardware[type].type==LIRC_IRDEO)
{ |
|
|
Back to top |
|
|
elderet n00b
Joined: 21 Mar 2004 Posts: 9 Location: Göteborg, Sweden
|
Posted: Thu Nov 17, 2005 5:27 pm Post subject: |
|
|
Thank you for the patches!
An alternative to the "STRG+Z"-method:
Code: |
ebuild /usr/portage/app-misc/lirc/lirc-0.7.2.ebuild clean
ebuild /usr/portage/app-misc/lirc/lirc-0.7.2.ebuild fetch
ebuild /usr/portage/app-misc/lirc/lirc-0.7.2.ebuild unpack
|
Apply patch to: /var/tmp/portage/lirc-0.7.2/work/lirc-0.7.2/drivers/lirc_serial/lirc_serial.c
Code: |
ebuild /usr/portage/app-misc/lirc/lirc-0.7.2.ebuild compile
ebuild /usr/portage/app-misc/lirc/lirc-0.7.2.ebuild install
ebuild /usr/portage/app-misc/lirc/lirc-0.7.2.ebuild qmerge
modprobe lirc_dev
modprobe lirc_serial
(/etc/init.d/lircd stop)
(/etc/init.d/lircd zap)
/etc/init.d/lircd start
|
LIRC is ALWAYS failing after upgrading the kernel... :-/ |
|
Back to top |
|
|
lion1977 n00b
Joined: 21 Nov 2005 Posts: 5 Location: Linz, Austria
|
Posted: Mon Nov 21, 2005 8:42 pm Post subject: Patch from lirc mailing list |
|
|
Hi,
i've found the following replacement for verify_area in the lirc mailing list archive:
Replace Code: | retval=verify_area(type,addr,size); | with Code: | retval=access_ok(type,addr,size) ? 0 : -EFAULT; | That should fix the problem. See http://sourceforge.net/mailarchive/message.php?msg_id=12912655
Another post on the list explained that the problem is solved in the cvs-tree of lirc_serial.c (http://sourceforge.net/mailarchive/message.php?msg_id=13745204).
I believe that removing the check, as suggested above, is a bad idea. It would no longer be verified that the given memory area belongs to userspace.
There are already two bugs filed, dealing with this problem. bug 111820 and a duplicate bug 106683 which deals with the problem. An ebuild is attached to the first one. Maybe it helps. |
|
Back to top |
|
|
nightmarez Tux's lil' helper
Joined: 17 May 2004 Posts: 111 Location: FSV Mainz 05 ;)
|
Posted: Mon Nov 28, 2005 10:15 am Post subject: |
|
|
i just emerged lirc-cvs from gentoo-de overlay and i works fine _________________ Ecce quomodo moritur iustus |
|
Back to top |
|
|
fincoop Tux's lil' helper
Joined: 02 Feb 2004 Posts: 147
|
Posted: Wed Dec 28, 2005 1:54 pm Post subject: |
|
|
nightmarez wrote: | i just emerged lirc-cvs from gentoo-de overlay and i works fine |
How do you do that? |
|
Back to top |
|
|
firestrike n00b
Joined: 05 May 2004 Posts: 22
|
|
Back to top |
|
|
Crazy Fucker n00b
Joined: 20 Feb 2005 Posts: 11 Location: Belgium
|
Posted: Fri Dec 30, 2005 3:29 pm Post subject: |
|
|
merged lirc-cvs from gentoo-de and it gives me the same problem as the standard lirc ebuild |
|
Back to top |
|
|
|