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]
Message-ID: <46F8E831.1060305@linux.vnet.ibm.com>
Date:	Tue, 25 Sep 2007 16:21:29 +0530
From:	"Aneesh Kumar K.V" <aneesh.kumar@...ux.vnet.ibm.com>
To:	Andreas Dilger <adilger@...sterfs.com>
CC:	linux-ext4@...r.kernel.org, cmm@...ibm.com
Subject: Re: [PATCH 1/7] ext4: Introduce le32_t and le16_t



Andreas Dilger wrote:
> On Sep 25, 2007  14:41 +0530, Aneesh Kumar K.V wrote:
>> The patches are on top of patch queue. I haven't touched
>> the uid and gid of ext4_inode. Do you think i should
>> change that too ?
> 
> You can add a Signed-off-by: Andreas Dilger <adilger@...sterfs.com>
> to those patches.  As I suspected there were a number of bugs hiding
> in there.  I would also change the uid and gid fields, even if we
> don't suspect any problems now.
> 

the primary reason for me not looking at uid gid and file_acl fields are

a) we can mount with option nouid32 and that will look at only the low 16 
   bits
b) same is true with the gid fields

c) Also i_file_acl. If the creater os is HURD we look at only the low 32 bits.


That means all the pace where we access these fields we have conditional access
That makes it less error prone. 

with the changes the code will some what as below 

         if(!(test_opt (inode->i_sb, NO_UID32))) {
-               inode->i_uid |= le16_to_cpu(raw_inode->i_uid_high) << 16;
-               inode->i_gid |= le16_to_cpu(raw_inode->i_gid_high) << 16;
+               inode->i_uid = ext4_get_i_uid(raw_inode);
+               inode->i_gid = ext4_get_i_gid(raw_inode);
+       } else {
+               inode->i_uid = ext4_get_i_uid_low(raw_inode);
+               inode->i_gid = ext4_get_i_gid_low(raw_inode);
        }


-aneesh
-
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ