<feed xmlns='http://www.w3.org/2005/Atom'>
<title>gocryptfs/internal/syscallcompat/sys_common.go, branch xattr_user_buffer</title>
<subtitle>Mirror of gocryptfs source code on Github</subtitle>
<id>http://nuetzlich.net/cgit/gocryptfs/atom?h=xattr_user_buffer</id>
<link rel='self' href='http://nuetzlich.net/cgit/gocryptfs/atom?h=xattr_user_buffer'/>
<link rel='alternate' type='text/html' href='http://nuetzlich.net/cgit/gocryptfs/'/>
<updated>2026-02-03T19:28:10+00:00</updated>
<entry>
<title>Use user-provided Listxattr buffer size</title>
<updated>2026-02-03T19:28:10+00:00</updated>
<author>
<name>Jakob Unterwurzacher</name>
</author>
<published>2026-02-02T21:18:25+00:00</published>
<link rel='alternate' type='text/html' href='http://nuetzlich.net/cgit/gocryptfs/commit/?id=14045511d3d91f36845a138359718c0fe7dff21c'/>
<id>urn:sha1:14045511d3d91f36845a138359718c0fe7dff21c</id>
<content type='text'>
This huge buffer showed up big time in ./profiling/ls.bash
and caused a 2x LS benchmark slowdown.

Instead of the fixed-size buffer, use the buffer size
hint the user has provided us.

We return inaccurate (larger than actual, which should be safe)
numbers when the user has provided no buffer (size probe).
</content>
</entry>
<entry>
<title>syscallcompat: Openat: always set O_CLOEXEC</title>
<updated>2024-05-17T20:14:55+00:00</updated>
<author>
<name>Jakob Unterwurzacher</name>
</author>
<published>2024-05-17T20:14:55+00:00</published>
<link rel='alternate' type='text/html' href='http://nuetzlich.net/cgit/gocryptfs/commit/?id=da873087dd7bcc54d96748a1f6e4e8ecf9e265e5'/>
<id>urn:sha1:da873087dd7bcc54d96748a1f6e4e8ecf9e265e5</id>
<content type='text'>
Let's not leak fds to logger.

Before:

	$ lsof -p $(pgrep logger)
	COMMAND    PID  USER   FD   TYPE             DEVICE  SIZE/OFF    NODE NAME
	logger  146410 jakob  cwd    DIR              253,0      4096       2 /
	logger  146410 jakob  rtd    DIR              253,0      4096       2 /
	logger  146410 jakob  txt    REG              253,0     41560 6293858 /usr/bin/logger
	logger  146410 jakob  mem    REG              253,0 229754784 6292695 /usr/lib/locale/locale-archive
	logger  146410 jakob  mem    REG              253,0    186480 6292031 /usr/lib64/libgcc_s-14-20240508.so.1
	logger  146410 jakob  mem    REG              253,0    787128 6294119 /usr/lib64/libzstd.so.1.5.6
	logger  146410 jakob  mem    REG              253,0    211424 6294587 /usr/lib64/liblzma.so.5.4.6
	logger  146410 jakob  mem    REG              253,0    131128 6302636 /usr/lib64/liblz4.so.1.9.4
	logger  146410 jakob  mem    REG              253,0     49184 6302330 /usr/lib64/libcap.so.2.69
	logger  146410 jakob  mem    REG              253,0   2476880 6295299 /usr/lib64/libc.so.6
	logger  146410 jakob  mem    REG              253,0    987256 6292058 /usr/lib64/libsystemd.so.0.38.0
	logger  146410 jakob  mem    REG              253,0    906256 6295295 /usr/lib64/ld-linux-x86-64.so.2
	logger  146410 jakob    0r  FIFO               0,14       0t0  607727 pipe
	logger  146410 jakob    1w   CHR                1,3       0t0       4 /dev/null
	logger  146410 jakob    2w   CHR                1,3       0t0       4 /dev/null
	logger  146410 jakob    3u  unix 0x0000000046d9c96b       0t0  607729 type=DGRAM (CONNECTED)
	logger  146410 jakob   10u   DIR               0,33        80    7758 /tmp/tmp.lbUiEw9P6W/a

After:

	$ lsof -p $(pgrep logger)
	COMMAND    PID  USER   FD   TYPE             DEVICE  SIZE/OFF    NODE NAME
	logger  147982 jakob  cwd    DIR              253,0      4096       2 /
	logger  147982 jakob  rtd    DIR              253,0      4096       2 /
	logger  147982 jakob  txt    REG              253,0     41560 6293858 /usr/bin/logger
	logger  147982 jakob  mem    REG              253,0 229754784 6292695 /usr/lib/locale/locale-archive
	logger  147982 jakob  mem    REG              253,0    186480 6292031 /usr/lib64/libgcc_s-14-20240508.so.1
	logger  147982 jakob  mem    REG              253,0    787128 6294119 /usr/lib64/libzstd.so.1.5.6
	logger  147982 jakob  mem    REG              253,0    211424 6294587 /usr/lib64/liblzma.so.5.4.6
	logger  147982 jakob  mem    REG              253,0    131128 6302636 /usr/lib64/liblz4.so.1.9.4
	logger  147982 jakob  mem    REG              253,0     49184 6302330 /usr/lib64/libcap.so.2.69
	logger  147982 jakob  mem    REG              253,0   2476880 6295299 /usr/lib64/libc.so.6
	logger  147982 jakob  mem    REG              253,0    987256 6292058 /usr/lib64/libsystemd.so.0.38.0
	logger  147982 jakob  mem    REG              253,0    906256 6295295 /usr/lib64/ld-linux-x86-64.so.2
	logger  147982 jakob    0r  FIFO               0,14       0t0  609636 pipe
	logger  147982 jakob    1w   CHR                1,3       0t0       4 /dev/null
	logger  147982 jakob    2w   CHR                1,3       0t0       4 /dev/null
	logger  147982 jakob    3u  unix 0x00000000bc46d033       0t0  610344 type=DGRAM (CONNECTED)

Fixes https://github.com/rfjakob/gocryptfs/issues/846
</content>
</entry>
<entry>
<title>go mod: declare module version v2</title>
<updated>2021-08-23T13:05:15+00:00</updated>
<author>
<name>Jakob Unterwurzacher</name>
</author>
<published>2021-08-23T13:05:15+00:00</published>
<link rel='alternate' type='text/html' href='http://nuetzlich.net/cgit/gocryptfs/commit/?id=69d88505fd7f4cb0d9e4f1918de296342fe05858'/>
<id>urn:sha1:69d88505fd7f4cb0d9e4f1918de296342fe05858</id>
<content type='text'>
Our git version is v2+ for some time now, but go.mod
still declared v1. Hopefully making both match makes
https://pkg.go.dev/github.com/rfjakob/gocryptfs/v2 work.

All the import paths have been fixed like this:

  find . -name \*.go | xargs sed -i s%github.com/rfjakob/gocryptfs/%github.com/rfjakob/gocryptfs/v2/%
</content>
</entry>
<entry>
<title>syscallcompat: drop obsolete wrappers</title>
<updated>2021-06-05T13:06:30+00:00</updated>
<author>
<name>Jakob Unterwurzacher</name>
</author>
<published>2021-06-05T13:06:30+00:00</published>
<link rel='alternate' type='text/html' href='http://nuetzlich.net/cgit/gocryptfs/commit/?id=e48f2377ec46f247d4db04cf8031702d0684c086'/>
<id>urn:sha1:e48f2377ec46f247d4db04cf8031702d0684c086</id>
<content type='text'>
These are now available cross-platform in the unix
package.
</content>
</entry>
<entry>
<title>syscallcompat: add getxattr fastpaths</title>
<updated>2020-10-17T22:25:42+00:00</updated>
<author>
<name>Jakob Unterwurzacher</name>
</author>
<published>2020-10-17T22:25:42+00:00</published>
<link rel='alternate' type='text/html' href='http://nuetzlich.net/cgit/gocryptfs/commit/?id=c943ed32aaf94a4e60d96c7a513180d29b15a40a'/>
<id>urn:sha1:c943ed32aaf94a4e60d96c7a513180d29b15a40a</id>
<content type='text'>
The allocations from Lgetxattr were #1 in the tar extract
allocation profile (caused by security.capability lookups).
No more!

$ benchstat old.txt new.txt
name         old time/op  new time/op  delta
Lgetxattr-4  15.2µs ± 0%   1.8µs ± 0%   ~     (p=1.000 n=1+1)

$ ./benchmark.bash
Testing gocryptfs at /tmp/benchmark.bash.H8p: gocryptfs v2.0-beta1-4-g95ea738-dirty; go-fuse v2.0.4-0.20200908172753-0b6cbc515082 =&gt; github.com/rfjakob/go-fuse/v2 v2.0.4-0.20201015204057-88b12c99f8af; 2020-10-18 go1.15.3 linux/amd64
/tmp/benchmark.bash.H8p.mnt is a mountpoint
WRITE: 262144000 bytes (262 MB, 250 MiB) copied, 0,520109 s, 504 MB/s
READ:  262144000 bytes (262 MB, 250 MiB) copied, 0,255672 s, 1,0 GB/s
UNTAR: 30,238
MD5:   12,721
LS:    10,038
RM:    16,536
</content>
</entry>
<entry>
<title>syscallcompat: retry ops on EINTR</title>
<updated>2020-10-13T22:35:16+00:00</updated>
<author>
<name>Jakob Unterwurzacher</name>
</author>
<published>2020-10-13T22:35:16+00:00</published>
<link rel='alternate' type='text/html' href='http://nuetzlich.net/cgit/gocryptfs/commit/?id=af4c1fb7a3f428ff704af22294ad955d05ed41dd'/>
<id>urn:sha1:af4c1fb7a3f428ff704af22294ad955d05ed41dd</id>
<content type='text'>
Retry operations that have been shown to throw EINTR
errors on CIFS.

Todo: Solution for this pain in the back:

	warning: unix.Getdents returned errno 2 in the middle of data
	rm: cannot remove 'linux-3.0.old3/Documentation/ABI/removed': Input/output error

Progress towards fixing https://github.com/rfjakob/gocryptfs/issues/483 .
</content>
</entry>
<entry>
<title>syscallcompat: Openat: retry on EINTR</title>
<updated>2020-10-10T23:31:09+00:00</updated>
<author>
<name>Jakob Unterwurzacher</name>
</author>
<published>2020-10-10T23:31:09+00:00</published>
<link rel='alternate' type='text/html' href='http://nuetzlich.net/cgit/gocryptfs/commit/?id=803fdf410bb57d34ef09357ec4924646978c20b5'/>
<id>urn:sha1:803fdf410bb57d34ef09357ec4924646978c20b5</id>
<content type='text'>
Towards fixing https://github.com/rfjakob/gocryptfs/issues/507
</content>
</entry>
<entry>
<title>v2api: implement Lookup()</title>
<updated>2020-06-21T10:01:34+00:00</updated>
<author>
<name>Jakob Unterwurzacher</name>
</author>
<published>2020-06-11T21:39:27+00:00</published>
<link rel='alternate' type='text/html' href='http://nuetzlich.net/cgit/gocryptfs/commit/?id=6aa9f5636f03392b5da5fc19dc4ea908e2e55e26'/>
<id>urn:sha1:6aa9f5636f03392b5da5fc19dc4ea908e2e55e26</id>
<content type='text'>
Compiles, but untested otherwise. No caching.
</content>
</entry>
<entry>
<title>Revert "syscallcompat: drop Faccessat AT_SYMLINK_NOFOLLOW helper"</title>
<updated>2019-01-20T12:10:59+00:00</updated>
<author>
<name>Jakob Unterwurzacher</name>
</author>
<published>2019-01-20T12:10:59+00:00</published>
<link rel='alternate' type='text/html' href='http://nuetzlich.net/cgit/gocryptfs/commit/?id=3d6b2685fb926b40b4eb528a8cbdc3871444d492'/>
<id>urn:sha1:3d6b2685fb926b40b4eb528a8cbdc3871444d492</id>
<content type='text'>
Breaks mounting on MacOS: unix.Faccessat on Darwin does NOT (yet)
support AT_SYMLINK_NOFOLLOW. See d44fe89ba4f3252c5bd00c4f7730197732f2a26a .

This reverts commit 0805a63df1b5f915b228727f6074c2506922d0ad.
</content>
</entry>
<entry>
<title>syscallcompat: drop Faccessat AT_SYMLINK_NOFOLLOW helper</title>
<updated>2019-01-20T11:59:59+00:00</updated>
<author>
<name>Jakob Unterwurzacher</name>
</author>
<published>2019-01-20T11:59:59+00:00</published>
<link rel='alternate' type='text/html' href='http://nuetzlich.net/cgit/gocryptfs/commit/?id=0805a63df1b5f915b228727f6074c2506922d0ad'/>
<id>urn:sha1:0805a63df1b5f915b228727f6074c2506922d0ad</id>
<content type='text'>
unix.Faccessat has added support for AT_SYMLINK_NOFOLLOW in July 2018,
https://github.com/golang/sys/commit/bd9dbc187b6e1dacfdd2722a87e83093c2d7bd6e#diff-341484dbbe3180cd7a31ef2ad2d679b6
which means we no longer need our own helper.

Closes https://github.com/rfjakob/gocryptfs/issues/347
</content>
</entry>
</feed>
