Date: Mon, 4 Sep 2023 21:29:44 +0300 From: Dmitry Chagin <dchagin@freebsd.org> To: current@freebsd.org Subject: Re: Possible issue with linux xattr support? Message-ID: <ZPYiGN1__7rKo2lt@heemeyer.club> In-Reply-To: <52go6mhpf34em7x7llzh7dgtf7ggdd7n2wuofm2yrndiw73yqk@pgngyvdypvhd> References: <g5lcvxsnjppbfchdtiufwxcbx7au2dbv2wkxwf5pqp66mo547b@vouujjivkgox> <ZO8EfRnfbF4ixn_L@heemeyer.club> <wp767un2xqnfmmox7uxrl3arrr3mzhccze7okk6zcmc4qnr2xj@kgjyjpezyfy6> <ZO8KaKBwliVeGdVG@heemeyer.club> <l5vgnwjddobhl5h2vceafhdo5uyqznaih7se7rk7bilwzqjpax@5ucptcralggq> <ZO8ea5sXCEKYimr1@heemeyer.club> <hwugmejws4sihu2gi4ccqi34cplyq6dfctkhkb6crnuivz65pz@sbr6og3znxlv> <ZO8iWGOWcM9x8FOR@heemeyer.club> <xehacpkc3uc3cjgkybj26snod2d76hfuoz2qnhsjectxtojvhx@ytzoek66ksz5> <52go6mhpf34em7x7llzh7dgtf7ggdd7n2wuofm2yrndiw73yqk@pgngyvdypvhd>
next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, Sep 04, 2023 at 04:03:54PM +0200, Felix Palmen wrote: > * Felix Palmen <zirias@freebsd.org> [20230904 15:39]: > > For some reason (I still have to try to get more information about it, > > will do soon), something else is broken now. While install from GNU > > coreutils works fine, some build systems use 'cp -p' to install files > > instead, which now fails with: > > > > | cp: preserving permissions for [...]: Operation not permitted > > The issue seems to be with listing attributes: > > | root@15-default:/wrkdirs/usr/ports/x11/linuxsrc-libxcb/work/libxcb-1.15/doc # truss /compat/linux/bin/cp -pR ./tutorial '/wrkdirs/usr/ports/x11/linuxsrc-libxcb/work/stage/compat/linux/usr/share/doc/libxcb/' 2>&1 | grep xattr > | linux_flistxattr(0x4,0x0,0x0) ERR#-1 'Operation not permitted' > | linux_flistxattr(0x4,0x0,0x0) ERR#-1 'Operation not permitted' > | linux_llistxattr(0xffffffffcdd9,0x0,0x0) ERR#-1 'Operation not permitted' > > The following q&d patch makes it work again: > > #v+ > diff --git a/sys/compat/linux/linux_xattr.c b/sys/compat/linux/linux_xattr.c > index 74b47f1cbaec..0b5af084b1b1 100644 > --- a/sys/compat/linux/linux_xattr.c > +++ b/sys/compat/linux/linux_xattr.c > @@ -198,7 +198,7 @@ listxattr(struct thread *td, struct listxattr_args *args) > if (error == 0) > td->td_retval[0] = cnt; > free(data, M_LINUX); > - return (error_to_xattrerror(attrnamespace, error)); > + return (error_to_xattrerror(EXTATTR_NAMESPACE_SYSTEM, error)); > } > > int > #v- > > I think this makes sense, because listxattr iterates over all > namespaces, so there's no sane way to know whether the EPERM was caused > by trying to access "system" or something else. Thanks for the report, please, try this: https://people.freebsd.org/~dchagin/lxattr.patch Don't be surprised, there 2 fixes > > Cheers, Felix > > -- > Felix Palmen <zirias@FreeBSD.org> {private} felix@palmen-it.de > -- ports committer -- {web} http://palmen-it.de > {pgp public key} http://palmen-it.de/pub.txt > {pgp fingerprint} 6936 13D5 5BBF 4837 B212 3ACC 54AD E006 9879 F231
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?ZPYiGN1__7rKo2lt>