Web Images Videos Maps News Shopping Gmail more »
Recently Visited Groups | Help | Sign in
Google Groups Home
Message from discussion FUSE: 1/3 add padding
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Miklos Szeredi  
View profile  
 More options Mar 31 2005, 3:57 pm
Newsgroups: fa.linux.kernel
From: Miklos Szeredi <mik...@szeredi.hu>
Date: Thu, 31 Mar 2005 20:57:17 GMT
Local: Thurs, Mar 31 2005 3:57 pm
Subject: [PATCH] FUSE: 1/3 add padding
Add padding to structures to make sizes the same on 32bit and 64bit
archs.  Initial testing and test machine generously provided by Franco
Broi.

Signed-off-by: Miklos Szeredi <mik...@szeredi.hu>

diff -rup linux-2.6.12-rc1-mm4/include/linux/fuse.h linux-fuse/include/linux/fuse.h
--- linux-2.6.12-rc1-mm4/include/linux/fuse.h   2005-03-31 21:43:52.000000000 +0200
+++ linux-fuse/include/linux/fuse.h     2005-03-31 21:48:42.000000000 +0200
@@ -25,6 +25,9 @@
 /** The minor number of the fuse character device */
 #define FUSE_MINOR 229

+/* Make sure all structures are padded to 64bit boundary, so 32bit
+   userspace works under 64bit kernels */
+
 struct fuse_attr {
        __u64   ino;
        __u64   size;
@@ -126,6 +129,7 @@ struct fuse_mknod_in {

 struct fuse_mkdir_in {
        __u32   mode;
+       __u32   padding;
 };

 struct fuse_rename_in {
@@ -138,32 +142,38 @@ struct fuse_link_in {

 struct fuse_setattr_in {
        __u32   valid;
+       __u32   padding;
        struct fuse_attr attr;
 };

 struct fuse_open_in {
        __u32   flags;
+       __u32   padding;
 };

 struct fuse_open_out {
        __u64   fh;
        __u32   open_flags;
+       __u32   padding;
 };

 struct fuse_release_in {
        __u64   fh;
        __u32   flags;
+       __u32   padding;
 };

 struct fuse_flush_in {
        __u64   fh;
        __u32   flush_flags;
+       __u32   padding;
 };

 struct fuse_read_in {
        __u64   fh;
        __u64   offset;
        __u32   size;
+       __u32   padding;
 };

 struct fuse_write_in {
@@ -175,6 +185,7 @@ struct fuse_write_in {

 struct fuse_write_out {
        __u32   size;
+       __u32   padding;
 };

 struct fuse_statfs_out {
@@ -184,6 +195,7 @@ struct fuse_statfs_out {
 struct fuse_fsync_in {
        __u64   fh;
        __u32   fsync_flags;
+       __u32   padding;
 };

 struct fuse_setxattr_in {
@@ -193,10 +205,12 @@ struct fuse_setxattr_in {

 struct fuse_getxattr_in {
        __u32   size;
+       __u32   padding;
 };

 struct fuse_getxattr_out {
        __u32   size;
+       __u32   padding;
 };

 struct fuse_init_in_out {
@@ -212,6 +226,7 @@ struct fuse_in_header {
        __u32   uid;
        __u32   gid;
        __u32   pid;
+       __u32   padding;
 };

 struct fuse_out_header {

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


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2009 Google