From nobody Fri Sep 01 08:14:40 2023 X-Original-To: dev-commits-src-all@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 4RcW6918zJz4sDbv; Fri, 1 Sep 2023 08:14:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RcW690dc1z3KPt; Fri, 1 Sep 2023 08:14:41 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1693556081; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=gwreUuqGI8guUuB/P+A/aQhEr/2hvoid1gur57Idyyc=; b=fjelrMiuVOewBgBDqJtdJVJkH5vBcx61nFCX3iTb1qrm9k8YiK9LkALWyl+UDeqytLSdKA xcXn8m1R8fd6yYwEvC+4aqfHZJWKV7CeiUtHKEwCrzW8RrvVa5mzaKkCF4TCAEFcL2fE7q gMwygDyUl/OxHkDm3w42K2sVlvLcnKY13w6kcrjb7M2L9y8PHWP75AnMNtVeXk2RKdFmaN mZLGZzfSSKxnuKpRaUaOdF3UPdXHJO7H648kTkVT64TFYY4M+60IU383RHd1jFYOwr3T2b oQeg/+431OMk65Rbcn7xG35MCE02HZAKafW+xqsygZirvw/Io4OKuwwT8zhNMQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1693556081; a=rsa-sha256; cv=none; b=Nr2bfdbE3KUirI70vJCDOU1MN5QIMm7pH5h6htils7UWc2YdlRb2tpKefgLNsmf0hr6Z7M gePajlMkO1sdCY8cQAiIPEyG0zsp2JgNzLQnveG5/zTfqUK++VSwvph1ilNEhe8U1zTOLT t15DabN1WH/U1CHxkULOqiEudczkjN7PnfNNK1LGdw+5u4k1FO+4HIESCGvW7l4dgGqQzz tWj02K516iXDk8mLznVZBLrDAnPNIaGrhkdB81uKK4aAC+OMQTrR9Y3UYuYy0OFfWgebDD 86iLECpmK9eQ3obEZugQvgZvuPOxuR28bptKsHDpkVsPld7wKCDiw3nj4xFXaA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1693556081; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=gwreUuqGI8guUuB/P+A/aQhEr/2hvoid1gur57Idyyc=; b=C+0v1VvlqKUm04MSd1Lk1I4RWev/FgY4uGFdrU069YhTNswkbcsEFQIBhmZ8vcfgKkN/UU Q+MUyfjav4cVDhdf9NFh88HS1H1RhUv42ccXgw+Ucj2YnyyT72oUDSpGI0rop6MrhdlY+h QMy799n4OsSvH1URw+ryz06PX/Z0Dl1uiHhjZa5gOhynfwLQPauvSNO+dqpoA4w3yjsleq 6R0I/cI2UOE+k3tNtzRsoEQrstlSxLEMasZ16FYPI3cur8Pjz89hgnICylkyejizEcYU8n 93+vF+j0FgVL+8U8G5Aqy5FKe1ZWouwNDUtLLPpmc4nDO3UtpGDHTtCTQnVSoQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RcW686pMlztTw; Fri, 1 Sep 2023 08:14:40 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 3818Ee5Y008331; Fri, 1 Sep 2023 08:14:40 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3818Ee5F008328; Fri, 1 Sep 2023 08:14:40 GMT (envelope-from git) Date: Fri, 1 Sep 2023 08:14:40 GMT Message-Id: <202309010814.3818Ee5F008328@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Dmitry Chagin Subject: git: 4d59b790553e - main - linux(4): Return ENODATA from getxattr syscalls instead of EPERM List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dchagin X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 4d59b790553ef75b9a4b6a673eab3354f3d012b3 Auto-Submitted: auto-generated The branch main has been updated by dchagin: URL: https://cgit.FreeBSD.org/src/commit/?id=4d59b790553ef75b9a4b6a673eab3354f3d012b3 commit 4d59b790553ef75b9a4b6a673eab3354f3d012b3 Author: Dmitry Chagin AuthorDate: 2023-09-01 08:10:12 +0000 Commit: Dmitry Chagin CommitDate: 2023-09-01 08:10:12 +0000 linux(4): Return ENODATA from getxattr syscalls instead of EPERM On Linux ENODATA mean the named attribute does not exist, or the process has no access to this attribute. Reported by: zirias Tested by: zirias MFC after: 1 week --- sys/compat/linux/linux_xattr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/compat/linux/linux_xattr.c b/sys/compat/linux/linux_xattr.c index 901123684154..b9717c62133c 100644 --- a/sys/compat/linux/linux_xattr.c +++ b/sys/compat/linux/linux_xattr.c @@ -285,7 +285,7 @@ getxattr(struct thread *td, struct getxattr_args *args) else error = kern_extattr_get_fd(td, args->fd, attrnamespace, attrname, args->value, args->size); - return (error); + return (error == EPERM ? ENOATTR : error); } int