lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <13d4a021-908e-4dff-874d-d4cbdcdd71d4@redhat.com>
Date: Tue, 2 Dec 2025 16:12:36 -0600
From: Eric Sandeen <sandeen@...hat.com>
To: Dominique Martinet <asmadeus@...ewreck.org>
Cc: Remi Pommarel <repk@...plefau.lt>, v9fs@...ts.linux.dev,
 linux-fsdevel@...r.kernel.org, linux-kernel@...r.kernel.org,
 ericvh@...nel.org, lucho@...kov.net, linux_oss@...debyte.com, eadavis@...com
Subject: Re: [PATCH V3 4/4] 9p: convert to the new mount API

On 12/1/25 7:04 PM, Dominique Martinet wrote:
> Eric Sandeen wrote on Mon, Dec 01, 2025 at 04:36:58PM -0600:
>> I suppose it would be a terrible hack to just extend the enum to include
>> hexadecimal "strings" like this, right.... ;)
> 
> Yeah, that might work for all intent and purposes but we'll get someone
> who mounted with cache=0x3 next... :)
> 
>> I think the right approach would be to just reinstate get_cache_mode() to
>> do open-coded parsing as before, and get rid of the enum for the cache
>> option.
> 
> This sounds good to me!
> 
>> Would you like me to send a patch 5/4, or an updated 4/4 to implement this,
>> or would you rather do it yourself if you think you have a better chance
>> of getting it right than I do?
> 
> No strong feeling either way but I think a 5/4 would be better to
> clarify why we do this -- I could probably do it as well but I'd
> definietly appreciate if you could do it (and I'll just have to make
> time to test at the end!)

Working on this, but something that confuses me about the current
(not for-next) code:

If I mount with "cache=loose" I see this in /proc/mounts:

127.0.0.1 /mnt 9p rw,relatime,uname=fsgqa,aname=/tmp/9,cache=f,access=user,trans=tcp 0 0

note the "cache=f" thanks to show_options printing "cache=%x"

"mount -o cache=f" is rejected, though, because "f" is not a parseable
number.

Shouldn't it be printing "cache=0xf" instead of "cache=f?"

(for some reason, though, in my test "remount -o,ro" does still work even with
"cache=f" in /proc/mounts but that seems to be a side effect of mount.9p trying
to use the new mount API when it shouldn't, or ...???)

I'll send my fix-up patch with a (maybe?) extra bugfix of printing
"cache=0x%x" in show_options, and you can see what you think... it could
be moved into a pure bugfix patch first if you agree.

thanks,
-Eric


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ