Messages in this thread | | | Subject | Re: [PATCH 2/4] UBIFS: Add xattr support for symlinks | From | Artem Bityutskiy <> | Date | Tue, 11 Nov 2014 12:17:53 +0200 |
| |
On Mon, 2014-11-10 at 11:12 -0600, Ben Shelton wrote: > On 11/10, Artem Bityutskiy wrote: > > Could you please re-test this with any kernel and carefully verify > > symlinks. I think this should not work, because in case of symlinks we > > already store the link target path in the inode, and with this patch the > > target patch will be over-written with the SELinux label. I expect this > > to be seen easily on testing - symlink targets should be corrupted. > > > > Artem. > > > > I retested this with a 3.18-rc3 kernel on one of our ARM-based targets. > The kernel has patch 1/4 with your changes, plus patches 2/4, 3/4, and > 4/4 as posted.
Ben, thanks for re-testing. And yes, I was wrong. Now I checked again and finally remembered how it works.
So yes, symlink inode has data, and the target is in the data.
If we add an extattr to a symlink, we create a separate inode for that xattr under the symlink inode. Any new xattr gets a new inode.
Artem.
| |