Skip to contentSkip to conversation

to allow sys_pread64 and sys_pwrite64 to be used from modules

PATCH In review Luke Kenneth Casson Leighton 2 participants 5 messages Sep 29, 2004

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 to allow sys_pread64 and sys_pwrite64 to be used from modules

i do not know if this does any damage (and i'm going to find out!)

i seek to use these two functions from an experimental kernel module: i get warnings about "symbol not found" without this patch:

Index: fs/read_write.c
===================================================================
RCS file: /cvsroot/selinux/nsa/linux-2.6/fs/read_write.c,v retrieving revision 1.1.1.6

read_write.c +2 -0
diff -u -3 -p -u -r1.1.1.6 read_write.c
@@ -318,6 +318,7 @@ asmlinkage ssize_t sys_pread64(unsigned 
 
 	return ret;
 }
+EXPORT_SYMBOL_GPL(sys_pread64);
 
 asmlinkage ssize_t sys_pwrite64(unsigned int fd, const char __user *buf,
 			      size_t count, loff_t pos)
@@ -337,6 +338,7 @@ asmlinkage ssize_t sys_pwrite64(unsigned
 
 	return ret;
 }
+EXPORT_SYMBOL_GPL(sys_pwrite64);
 
 /*
  * Reduce an iovec's length in-place.  Return the resulting number of segments
Signature · 7 lines
--
Truth, honesty and respect are rare commodities that all spring from
the same well: Love.  If you love yourself and everyone and everything
around you, funnily and coincidentally enough, life gets a lot better.
--
<a href="http://lkcl.net">      lkcl.net      </a> <br />
<a href="mailto:[email protected]"> [email protected] </a> <br />
#1 lore raw
Quoted 5 lines · Luke Kenneth Casson Leighton

i do not know if this does any damage (and i'm going to find out!)

i seek to use these two functions from an experimental kernel module: i get warnings about "symbol not found" without this patch:

what on earth are you doing in your module??????

#2 lore raw
Quoted 8 lines · Arjan van de Ven
Quoted 5 lines · Luke Kenneth Casson Leighton

i do not know if this does any damage (and i'm going to find out!)

i seek to use these two functions from an experimental kernel module: i get warnings about "symbol not found" without this patch:

what on earth are you doing in your module??????

... if i feel like giving up i will of course try something like install the selinux-enabled nfs server plus nfs client selinux patches, and mount the filesystem via 127.0.0.1.

as a last resort.

Signature · 7 lines
--
Truth, honesty and respect are rare commodities that all spring from
the same well: Love.  If you love yourself and everyone and everything
around you, funnily and coincidentally enough, life gets a lot better.
--
<a href="http://lkcl.net">      lkcl.net      </a> <br />
<a href="mailto:[email protected]"> [email protected] </a> <br />
#3 lore raw
In reply to Arjan van de Ven
Quoted 8 lines · Arjan van de Ven
Quoted 5 lines · Luke Kenneth Casson Leighton

i do not know if this does any damage (and i'm going to find out!)

i seek to use these two functions from an experimental kernel module: i get warnings about "symbol not found" without this patch:

what on earth are you doing in your module??????

prefixing a new root onto the front of the file name and then re-issuing (proxying) a request.

all file requests, all stats, all opendirs, everything.

i'm hacking fuse in an attempt to remove the userspace bits, merging the functionality of the userspace "fusexmp" - fuse example program - into the fuse kernel module.

l.

p.s. if someone fixes the ioctl bug BLKRRDPART on a usb scsi
storage device which has been umounted with a "-l" option, then i don't have to do all this work.

bugs.debian.org no #273055.

Signature · 7 lines
--
Truth, honesty and respect are rare commodities that all spring from
the same well: Love.  If you love yourself and everyone and everything
around you, funnily and coincidentally enough, life gets a lot better.
--
<a href="http://lkcl.net">      lkcl.net      </a> <br />
<a href="mailto:[email protected]"> [email protected] </a> <br />
#4 lore raw
In reply to Luke Kenneth Casson Leighton

scratch that: i found that vfs_read along with filp_open and filp_close would do the job.

having a ball :)

Quoted 40 lines · Luke Kenneth Casson Leighton

i do not know if this does any damage (and i'm going to find out!)

i seek to use these two functions from an experimental kernel module: i get warnings about "symbol not found" without this patch:

Index: fs/read_write.c
===================================================================
RCS file: /cvsroot/selinux/nsa/linux-2.6/fs/read_write.c,v retrieving revision 1.1.1.6
diff -u -3 -p -u -r1.1.1.6 read_write.c

read_write.c +2 -0
@@ -318,6 +318,7 @@ asmlinkage ssize_t sys_pread64(unsigned 
 
 	return ret;
 }
+EXPORT_SYMBOL_GPL(sys_pread64);
 
 asmlinkage ssize_t sys_pwrite64(unsigned int fd, const char __user *buf,
 			      size_t count, loff_t pos)
@@ -337,6 +338,7 @@ asmlinkage ssize_t sys_pwrite64(unsigned
 
 	return ret;
 }
+EXPORT_SYMBOL_GPL(sys_pwrite64);
 
 /*
  * Reduce an iovec's length in-place.  Return the resulting number of segments
Signature · 8 lines
-- 
--
Truth, honesty and respect are rare commodities that all spring from
the same well: Love.  If you love yourself and everyone and everything
around you, funnily and coincidentally enough, life gets a lot better.
--
<a href="http://lkcl.net">      lkcl.net      </a> <br />
<a href="mailto:[email protected]"> [email protected] </a> <br />
Signature · 7 lines
--
Truth, honesty and respect are rare commodities that all spring from
the same well: Love.  If you love yourself and everyone and everything
around you, funnily and coincidentally enough, life gets a lot better.
--
<a href="http://lkcl.net">      lkcl.net      </a> <br />
<a href="mailto:[email protected]"> [email protected] </a> <br />