From: "Darrick J. Wong" <djwong@kernel.org>
To: Avinesh Kumar <avinesh.kumar@suse.com>
Cc: fstests@vger.kernel.org, zlang@kernel.org
Subject: Re: [PATCH] xfs/083: redirect populate stderr to avoid spurious attr restore warnings
Date: Fri, 10 Jul 2026 16:46:55 -0700 [thread overview]
Message-ID: <20260710234655.GC15202@frogsfrogsfrogs> (raw)
In-Reply-To: <20260710195355.139127-1-avinesh.kumar@suse.com>
On Fri, Jul 10, 2026 at 09:53:55PM +0200, Avinesh Kumar wrote:
> From: Avinesh Kumar <avinesh.kumar@suse.com>
>
> attr 2.6.0 (CVE-2026-54371 fix)[0] makes "setfattr --restore" print warnings
> on stderr. _scratch_populate uses it, and xfs/083 only redirects stdout,
> so the warnings leak into the test output and fail it.
> Redirect stderr to $seqres.full too.
>
> +Warning: option --restore=file is unsafe without option -P (--physical) as it traverses symbolic links in pathnames
> +Warning: option --restore=file is unsafe without option -h (--no-dereference) as it dereferences symbolic link pathnames
>
> [0] https://cgit.git.savannah.nongnu.org/cgit/attr.git/commit/?id=3fb06b9ba314d37035d0877e6de313de754f1ac8
>
> Signed-off-by: Avinesh Kumar <avinesh.kumar@suse.com>
> ---
> tests/xfs/083 | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/tests/xfs/083 b/tests/xfs/083
> index 9291c8c0..48deaafa 100755
> --- a/tests/xfs/083
> +++ b/tests/xfs/083
> @@ -91,7 +91,7 @@ echo "+ create scratch fs" >> $seqres.full
> _scratch_mkfs_xfs >> $seqres.full 2>&1
>
> echo "+ populate fs image" >> $seqres.full
> -_scratch_populate >> $seqres.full
> +_scratch_populate >> $seqres.full 2>&1
That's quite an overbroad brush there -- we want any *unexpected*
errors to go to the .out file. Given there are five users of setfattr
--restore flag:
$ git grep -i attr.*--restore
common/overlay:497: _getfattr --absolute-names -d -m '^trusted.overlay.(redirect|metacopy)$' $file | sed 's/^trusted/user/' | $SETFATTR_PROG --restore=-
common/populate:154: ) | setfattr --restore -
common/populate:203: ) | setfattr --restore -
tests/generic/062:189:setfattr -h --restore=$tmp.backup1
tests/xfs/227:75: $SETFATTR_PROG --restore=$tmp.$1.attrs $2
Maaaaybe this should instead be a targeted wrapper for that?
_setfattr_restore()
{
$SETFATTR_PROG --restore=- 2> $tmp.setfattr.$$
local ret=$?
cat $tmp.setfattr.$$ | sed -e '/--restore=.*unsafe.*without/d' 1>&2
return $ret
}
--D
>
> echo "+ check fs" >> $seqres.full
> _repair_scratch_fs >> $seqres.full 2>&1 || _fail "should pass initial fsck"
> --
> 2.54.0
>
>
next prev parent reply other threads:[~2026-07-10 23:46 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-10 19:53 [PATCH] xfs/083: redirect populate stderr to avoid spurious attr restore warnings Avinesh Kumar
2026-07-10 23:46 ` Darrick J. Wong [this message]
2026-07-13 13:52 ` [PATCH v2] common: strip attr 2.6.0 --restore safety warnings Avinesh Kumar
2026-07-13 16:14 ` Darrick J. Wong
2026-07-13 19:21 ` Avinesh Kumar
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260710234655.GC15202@frogsfrogsfrogs \
--to=djwong@kernel.org \
--cc=avinesh.kumar@suse.com \
--cc=fstests@vger.kernel.org \
--cc=zlang@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.