From nobody Mon Sep 04 14:03:54 2023 X-Original-To: current@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RfVjp5M84z4rSJP for ; Mon, 4 Sep 2023 14:03:58 +0000 (UTC) (envelope-from felix@palmen-it.de) Received: from stef.palmen-it.de (stef.palmen-it.de [IPv6:2001:470:1f0b:bbb:1::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4RfVjn6xPSz4YGR; Mon, 4 Sep 2023 14:03:57 +0000 (UTC) (envelope-from felix@palmen-it.de) Authentication-Results: mx1.freebsd.org; dkim=pass header.d=palmen-it.de header.s=20200414 header.b=CQhQ4nAj; spf=pass (mx1.freebsd.org: domain of felix@palmen-it.de designates 2001:470:1f0b:bbb:1::1 as permitted sender) smtp.mailfrom=felix@palmen-it.de; dmarc=none DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=palmen-it.de; s=20200414; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=2cDPqmp5aBNeI9MmoBENfXjvTk5CFmYi3q0nlMsifBw=; b=CQhQ4nAjlz9HFD/aTvZQPjG7SJ X7pyN14aw/Pqwdl+A5LTJKZg6hsrBFKdUdq7ZDax1YvCY5ssAitIKuaA0WGFBQg64TX7dJXYCPQun djsDITih05vO12v3M2VvBdJSVCkoUjzt8imEzbg0juJoejT4i1SXy3/ULqw24RJxNlfrGpc3HiYG8 uTnDLeN5iucsyoYZiJ3NHaY7CQTclAzKMn+U5XmhR5lV6ap2XDYeUBOXroi+O0efLDsjuKwuWcwj8 qKEm4SZlUdczSXVLzeKABZcrcfrSc9DC6Pe/nS4WbPwFBHNAXqihbDGxo6Jyy4vmRpdgsi8ach96r LE5CzGrg==; Received: from [192.168.71.101] (helo=mail.home.palmen-it.de) by stef.palmen-it.de with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qdABI-00BZko-1Y; Mon, 04 Sep 2023 16:03:56 +0200 Received: from nexus.home.palmen-it.de ([192.168.99.2]) by mail.home.palmen-it.de with esmtpsa (TLS1.3) tls TLS_CHACHA20_POLY1305_SHA256 (Exim 4.96 (FreeBSD)) (envelope-from ) id 1qdABH-0000nA-0o; Mon, 04 Sep 2023 14:03:55 +0000 Date: Mon, 4 Sep 2023 16:03:54 +0200 From: Felix Palmen To: current@freebsd.org Cc: dchagin@freebsd.org Subject: Re: Possible issue with linux xattr support? Message-ID: <52go6mhpf34em7x7llzh7dgtf7ggdd7n2wuofm2yrndiw73yqk@pgngyvdypvhd> Mail-Followup-To: current@freebsd.org, dchagin@freebsd.org X-Face: /1K@t"h.}e~pR@]c7HorQ!T`F^RJCa'BCr#e>IKA{>C/9OTGB4|xh"y2{?1Z5M i2w"AH^pN_LlHR^{+f',_Np~;.B;!M/bL}*qk]p5*r7F5vW};{:@4u5S?T&f0$7BJ-71Q5SV]:v$`5 A0[DZ:=?S52x8HJ~5@^P_\T@MsjG{R( Organization: FreeBSD.org References: List-Id: Discussions about the use of FreeBSD-current List-Archive: https://lists.freebsd.org/archives/freebsd-current List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-current@freebsd.org MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="ygr3ndkcrikak3m7" Content-Disposition: inline In-Reply-To: User-Agent: NeoMutt/20230517 X-Spamd-Bar: ------ X-Spamd-Result: default: False [-6.50 / 15.00]; DWL_DNSWL_MED(-2.00)[palmen-it.de:dkim]; SIGNED_PGP(-2.00)[]; SUBJECT_ENDS_QUESTION(1.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_SHORT(-1.00)[-1.000]; RCVD_DKIM_ARC_DNSWL_MED(-0.50)[]; MID_RHS_NOT_FQDN(0.50)[]; FORGED_SENDER(0.30)[zirias@freebsd.org,felix@palmen-it.de]; R_SPF_ALLOW(-0.20)[+ip6:2001:470:1f0b:bbb:1::1:c]; R_DKIM_ALLOW(-0.20)[palmen-it.de:s=20200414]; RCVD_IN_DNSWL_MED(-0.20)[2001:470:1f0b:bbb:1::1:from]; MIME_GOOD(-0.20)[multipart/signed,text/plain]; MLMMJ_DEST(0.00)[current@freebsd.org]; TO_MATCH_ENVRCPT_ALL(0.00)[]; BLOCKLISTDE_FAIL(0.00)[2001:470:1f0b:bbb:1::1:server fail]; DMARC_NA(0.00)[freebsd.org]; RCVD_VIA_SMTP_AUTH(0.00)[]; ARC_NA(0.00)[]; RCVD_COUNT_TWO(0.00)[2]; DKIM_TRACE(0.00)[palmen-it.de:+]; HAS_ORG_HEADER(0.00)[]; TO_DN_NONE(0.00)[]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_TWO(0.00)[2]; ASN(0.00)[asn:6939, ipnet:2001:470::/32, country:US]; MIME_TRACE(0.00)[0:+,1:+,2:~]; FROM_NEQ_ENVFROM(0.00)[zirias@freebsd.org,felix@palmen-it.de]; RCVD_TLS_ALL(0.00)[] X-Rspamd-Queue-Id: 4RfVjn6xPSz4YGR --ygr3ndkcrikak3m7 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable * Felix Palmen [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: >=20 > | 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/d= oc # truss /compat/linux/bin/cp -pR ./tutorial '/wrkdirs/usr/ports/x11/linu= xsrc-libxcb/work/stage/compat/linux/usr/share/doc/libxcb/' 2>&1 | grep xattr | linux_flistxattr(0x4,0x0,0x0) ERR#-1 'Operation not pe= rmitted' | linux_flistxattr(0x4,0x0,0x0) ERR#-1 'Operation not pe= rmitted' | linux_llistxattr(0xffffffffcdd9,0x0,0x0) ERR#-1 'Operation not pe= rmitted' 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 *arg= s) if (error =3D=3D 0) td->td_retval[0] =3D cnt; free(data, M_LINUX); - return (error_to_xattrerror(attrnamespace, error)); + return (error_to_xattrerror(EXTATTR_NAMESPACE_SYSTEM, error)); } =20 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. Cheers, Felix --=20 Felix Palmen {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 --ygr3ndkcrikak3m7 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iNUEABYKAH0WIQRpNhPVW79IN7ISOsxUreAGmHnyMQUCZPXjyl8UgAAAAAAuAChp c3N1ZXItZnByQG5vdGF0aW9ucy5vcGVucGdwLmZpZnRoaG9yc2VtYW4ubmV0Njkz NjEzRDU1QkJGNDgzN0IyMTIzQUNDNTRBREUwMDY5ODc5RjIzMQAKCRBUreAGmHny MSPeAP92TH9wbrdHer+D7uaF1/jfOQ134xM+wWuqMZxc0C2t9AEA7OfJuEb7M1OX 5h+IOr6QfOh4gPF09LUvLELOwBy07gc= =LX/D -----END PGP SIGNATURE----- --ygr3ndkcrikak3m7--