bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] fix NFSv4 acl detection on F39


From: Ondrej Valousek
Subject: Re: [PATCH] fix NFSv4 acl detection on F39
Date: Tue, 16 May 2023 05:05:31 +0000

Ok I eventually realised you did it this way on purpose and even the buffer should be big enough for most cases as trivial nfs4 ACL is typically bigger than any list of xattrs we might ever receive.

Sorry for the noise then...
Ondrej

Zasláno z Outlooku pro Android

From: Paul Eggert <eggert@cs.ucla.edu>
Sent: Monday, May 15, 2023 11:32:00 PM
To: Ondrej Valousek <ondrej.valousek.xm@renesas.com>
Cc: Gnulib bugs <bug-gnulib@gnu.org>
Subject: Re: [PATCH] fix NFSv4 acl detection on F39
 
On 2023-05-15 12:43, Ondrej Valousek wrote:
> You feed listxattr() with a buffer sized like trivial_NFS4_attr_buf - that just does not seem to be correct right? That trivial_NFS4_attr_buf serves smth completely different.

All that listxattr needs is a nonzero-sized buffer. It's OK for a union
to hold unrelated objects so long as it doesn't hold them at the same
time, which is the case here.

The code could allocate two distinct stack buffers of different types,
but that'd use more stack space and put more pressure on caches. It
could even allocate the distinct buffers in non-overlapping compound
statements, but GCC isn't good about optimizating that and anyway the
code would get trickier in a different way.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]