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: <20250721114117.GB231115@mit.edu>
Date: Mon, 21 Jul 2025 07:41:17 -0400
From: "Theodore Ts'o" <tytso@....edu>
To: "Darrick J. Wong" <djwong@...nel.org>
Cc: Sam James <sam@...too.org>, linux-ext4@...r.kernel.org
Subject: Re: [PATCH 2/5] fuse2fs: stop aliasing stderr with ff->err_fp

On Sun, Jul 20, 2025 at 10:42:34PM -0700, Darrick J. Wong wrote:
> Oh wait no it turns out that libfuse obliterates std{in,out,err} in
> fuse_daemonize() by opening /dev/null and using that exact trick.  So
> the only reason why I was ever getting any FUSE2FS debug output
> throughout *any* of the fuse+iomap development sprints was that glibc
> lets you assign stdout/stderr directly.
> 
> freopen also won't work (at least on glibc) because its freopen
> implementation uses the dup2 trick which will be undone by libfuse.
> 
> GREAT!  I only got to debug my program because OF A WEIRD GLIBC QUIRK!!

So either we need to find some way to inhibit fuse_daemonize() and
then have fuse2fs handling doing the daemonization.  Or maybe we can
arrange to have some kind callback to set up stdout/stderr after
fuse_main() is called?  fuse_daemonize() is called from fuse_main(),
right?

						- Ted

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ