aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2021-05-26contentenc: add PlainOffToCipherOff helperJakob Unterwurzacher
Will be used for improving Lseek()
2021-05-26contentenc: fix CipherSizeToPlainSize non-monoticityJakob Unterwurzacher
For an illegal cipherSize, pretend we have an additional 1-byte block. See code comment for details.
2021-05-26contentenc: update commentsJakob Unterwurzacher
Also, replace one open-coded calculation with a helper function.
2021-05-26tests: contentenc: add TestSizeToSizeJakob Unterwurzacher
TestSizeToSize tests CipherSizeToPlainSize and PlainSizeToCipherSize. Fails at the moment due to CipherSizeToPlainSize non-moniticity.
2021-05-26tests: add TestFileHoleCopyJakob Unterwurzacher
Currently fails.
2021-05-26tests: re-enable TestInoReuseEvilJakob Unterwurzacher
Problem in go-fuse has long been fixed.
2021-05-26Add contrib/findholesJakob Unterwurzacher
Utility and libs to find hole/data segments using lseek.
2021-05-26syscallcompat: add GetdentsSpecial()Jakob Unterwurzacher
GetdentsSpecial calls then Getdents syscall, with normal entries and "." / ".." split into two slices.
2021-05-26tests: add TestHaveDotdotJakob Unterwurzacher
As discovered by xfstests generic/401 [1], during the move to the v2 api we seem to have lost the "." and ".." directory entries. [1]: https://github.com/rfjakob/fuse-xfstests/blob/4ef5b032bc283743d0eb58a8a28738766e664899/screenlog.0#L520
2021-05-26stupidgcm: prefer Go stdlib over OpenSSL on Apple M1Jakob Unterwurzacher
https://github.com/rfjakob/gocryptfs/issues/556
2021-05-22syscallcompat: also refactor MkdiratUser on GOOS=darwinJakob Unterwurzacher
Breakage was: +GOOS=darwin +GOARCH=amd64 +go build -tags without_openssl internal/fusefrontend/node_dir_ops.go:45:34: cannot use context (type *fuse.Context) as type *fuse.Caller in argument to syscallcompat.MkdiratUser internal/fusefrontend/node_dir_ops.go:83:35: cannot use context (type *fuse.Context) as type *fuse.Caller in argument to syscallcompat.MkdiratUser
2021-05-22syscallcompat: refactor MkdiratUser to take fuse.ContextJakob Unterwurzacher
Let's have MkdiratUser take fuse.Context like everybody else.
2021-05-22syscallcompat: deduplicate OpenatUser/MknodatUser/SymlinkatUser/MkdiratUserJakob Unterwurzacher
Turns out the whole euid switching logic can be shared when wrapping the syscall in a closure.
2021-05-18fsck: redirect go-fuse noise to syslogJakob Unterwurzacher
2021-05-18-speed: note that XChaCha20 is not selectableJakob Unterwurzacher
This is unclear to users, as seen on https://github.com/rfjakob/gocryptfs/issues/452#issuecomment-828836651
2021-05-15Merge package-source.bash & package-static.bash scriptsv2.0-beta4Jakob Unterwurzacher
2021-05-15Update README for v2.0-beta4Jakob Unterwurzacher
2021-05-15go.mod: switch to go-fuse acl branchJakob Unterwurzacher
Until https://review.gerrithub.io/c/hanwen/go-fuse/+/516154 gets merged. Commands used: go mod edit -replace github.com/hanwen/go-fuse/v2=github.com/rfjakob/go-fuse/v2@acl go mod download github.com/hanwen/go-fuse/v2 go mod tidy
2021-05-15Add -acl flag to enable ACL enforcementJakob Unterwurzacher
With test to verify that it actually works this time: Run "make root_test". Depends-on: https://github.com/rfjakob/gocryptfs/issues/536 Fixes: https://github.com/rfjakob/gocryptfs/issues/536
2021-05-15fusefrontend: fix RENAME_NOREPLACE darwin build failureJakob Unterwurzacher
Error was: internal/fusefrontend/node.go:371:2: duplicate case syscallcompat.RENAME_NOREPLACE (value 0) in switch previous case at internal/fusefrontend/node.go:368:7 Rewrite using "if"s instead.
2021-05-08fusefrontend: avoid duplicate const definitionJakob Unterwurzacher
RENAME_NOREPLACE is already defined in syscallcompat.
2021-05-08fusefrontend: reject broken RENAME_EXCHANGE and RENAME_WHITEOUTJakob Unterwurzacher
Discovered by xfstests generic/013: or implementation for RENAME_EXCHANGE and RENAME_WHITEOUT is incomplete. Reject the flags so that the caller retries with regular rename.
2021-05-07README: fix broken markdown linksJakob Unterwurzacher
2021-04-24Update README for v2.0-beta3 releasev2.0-beta3Jakob Unterwurzacher
2021-04-24go mod: switch back to mainline go-fuseJakob Unterwurzacher
Change was merged: https://github.com/hanwen/go-fuse/commit/a90e1f463c3f172a7690a6449fe5955a180dfec3 Done using: $ go mod edit -dropreplace github.com/hanwen/go-fuse/v2 $ go get github.com/hanwen/go-fuse/v2@master go: downloading github.com/hanwen/go-fuse/v2 v2.1.1-0.20210423170155-a90e1f463c3f go get: upgraded github.com/hanwen/go-fuse/v2 v2.0.4-0.20210125162859-8e0bbdb16cb7 => v2.1.1-0.20210423170155-a90e1f463c3f Related: https://github.com/rfjakob/gocryptfs/issues/549
2021-04-07Doc: update performance.txtJakob Unterwurzacher
2021-04-07fusefrontend: make dirCache work for "node itself"Jakob Unterwurzacher
"node itself" can be converted to node + child by ascending one level. Performance gains are spectacular, as will be seen in the next commit.
2021-04-05profiling/ls.bash: add -nosyslogJakob Unterwurzacher
This makes sure we actually see the dirCache stats.
2021-04-05fusefrontend: print dirCache stats after unmountJakob Unterwurzacher
2021-04-04fs: more idiomatic dirCache struct namingJakob Unterwurzacher
2021-04-03performance.txt: add dirfd caching resultsJakob Unterwurzacher
Also, add v2.0-beta2-16-geaca820. I bisected the ls performance regression to this commit.
2021-04-03fs: add initial dirfd cachingJakob Unterwurzacher
dirfd caching was temporarily removed when moving to the v2api. Add it back to gain back some lost speed.
2021-04-03tests: fusefronted: fix TestOpenBackingDirJakob Unterwurzacher
This test only worked accidentially, and would break once dirfd caching is added. fs.Mkdir(..., "dir1/dir2", ...) is illegal (child name cannot contain slashes).
2021-04-03fusefronted: replace last rn.openBackingDir() callsJakob Unterwurzacher
Use the n.prepareAtSyscall() wrapper instead. Prepares for adding caching into n.prepareAtSyscall().
2021-04-02tests: sharedstorage: wait 100ms longer for cache expiryJakob Unterwurzacher
With 1.0 seconds we see failures on Travis, example: https://travis-ci.org/github/rfjakob/gocryptfs/builds/765648739 With 1.1 seconds it seems to always work.
2021-03-30profiling: add ls.bashJakob Unterwurzacher
2021-03-30go.mod: temporarily switch to go-fuse forkJakob Unterwurzacher
Until https://review.gerrithub.io/c/hanwen/go-fuse/+/513646/2 gets merged. Commands used: go mod edit -replace github.com/hanwen/go-fuse/v2=github.com/rfjakob/go-fuse/v2@TestStaleHardlinks go mod download github.com/hanwen/go-fuse/v2 go mod tidy
2021-03-30tests: sharedstorage: add TestStaleHardlinksJakob Unterwurzacher
2021-03-27package-static.bash: add gocryptfs-xray to tarballJakob Unterwurzacher
Requested here https://github.com/rfjakob/gocryptfs/issues/558 and here https://github.com/rfjakob/gocryptfs/issues/496 Closes https://github.com/rfjakob/gocryptfs/issues/496
2021-03-27gocrypts-xray: add -version flagJakob Unterwurzacher
2021-03-27Delete obsolete script package.bashJakob Unterwurzacher
I only use package-static.bash nowadays.
2021-03-26README: fix compile instructions for Go 1.13+Jakob Unterwurzacher
"go get -d" does not download to GOPATH/src anymore: https://github.com/golang/go/issues/31529 Use explicit "git clone" to the current directory as suggested in https://github.com/golang/go/issues/31529#issuecomment-484920157 . Fixes https://github.com/rfjakob/gocryptfs/issues/553
2021-03-21Add tests/sharedstorageJakob Unterwurzacher
Towards better test coverage of shared backing storage mounts. https://github.com/rfjakob/gocryptfs/issues/525
2021-03-21test_helpers: VerifySize: don't complain about ino mismatchJakob Unterwurzacher
The inode number is not stable with `-sharedstorage`. Ignore it. Failure was like this: --- FAIL: TestFallocate (0.02s) helpers.go:229: Stat vs Fstat mismatch: st= {59 11543 1 33188 1026 1026 0 0 0 4096 8 {1616315569 838232716} {1616315569 838232716} {1616315569 838232716} [0 0 0]} st2={59 11545 1 33188 1026 1026 0 0 0 4096 8 {1616315569 838232716} {1616315569 838232716} {1616315569 838232716} [0 0 0]}
2021-03-21fusefronted: move Create() and Open() to new fileJakob Unterwurzacher
And deduplicate the code a little.
2021-03-21fusefrontend: -sharedstorage: fix TestRmwRace failureJakob Unterwurzacher
The Open() and Create() paths used different inode numbers, which broke openfiletable locking against concurred readers.
2021-03-20tests: matrix: add -sharestorage to test matrixJakob Unterwurzacher
Currently fails like this: === RUN TestRmwRace doRead 0: corrupt block #0: cipher: message authentication failed -wpanic turns this warning into a panic: doRead 0: corrupt block #0: cipher: message authentication failed panic: -wpanic turns this warning into a panic: doRead 0: corrupt block #0: cipher: message authentication failed goroutine 1293 [running]: log.(*Logger).Panic(0xc00011c230, 0xc0003b17c8, 0x1, 0x1) log/log.go:224 +0xac github.com/rfjakob/gocryptfs/internal/tlog.(*toggledLogger).Printf(0xc00007a780, 0x55a821a766a1, 0x20, 0xc0003b19f0, 0x3, 0x3) github.com/rfjakob/gocryptfs/internal/tlog/log.go:78 +0x1ef github.com/rfjakob/gocryptfs/internal/fusefrontend.(*File).doRead(0xc0001ff420, 0x0, 0x0, 0x0, 0x0, 0x1000, 0x0, 0x1, 0xc000880000, 0x1020) github.com/rfjakob/gocryptfs/internal/fusefrontend/file.go:201 +0x8c9 github.com/rfjakob/gocryptfs/internal/fusefrontend.(*File).doWrite(0xc0001ff420, 0xc000248428, 0x10, 0x30, 0xff0, 0x3, 0x18) github.com/rfjakob/gocryptfs/internal/fusefrontend/file.go:291 +0xc9e github.com/rfjakob/gocryptfs/internal/fusefrontend.(*File).Write(0xc0001ff420, 0x55a821b306a0, 0xc000fbde90, 0xc000248428, 0x10, 0x30, 0xff0, 0x7f4a00000000, 0x0) github.com/rfjakob/gocryptfs/internal/fusefrontend/file.go:378 +0x25e github.com/hanwen/go-fuse/v2/fs.(*rawBridge).Write(0xc000168140, 0xc000096000, 0xc0002483d8, 0xc000248428, 0x10, 0x30, 0x55a821ad40e0) github.com/hanwen/go-fuse/v2@v2.0.4-0.20210125162859-8e0bbdb16cb7/fs/bridge.go:819 +0x26d github.com/hanwen/go-fuse/v2/fuse.doWrite(0xc000170160, 0xc000248240) github.com/hanwen/go-fuse/v2@v2.0.4-0.20210125162859-8e0bbdb16cb7/fuse/opcode.go:191 +0x6f github.com/hanwen/go-fuse/v2/fuse.(*Server).handleRequest(0xc000170160, 0xc000248240, 0xc000000000) github.com/hanwen/go-fuse/v2@v2.0.4-0.20210125162859-8e0bbdb16cb7/fuse/server.go:472 +0x2be github.com/hanwen/go-fuse/v2/fuse.(*Server).loop(0xc000170160, 0xc000cd4101) github.com/hanwen/go-fuse/v2@v2.0.4-0.20210125162859-8e0bbdb16cb7/fuse/server.go:445 +0x198 created by github.com/hanwen/go-fuse/v2/fuse.(*Server).readRequest github.com/hanwen/go-fuse/v2@v2.0.4-0.20210125162859-8e0bbdb16cb7/fuse/server.go:312 +0x41d matrix_test.go:354: Write failed
2021-03-20tests: MountOrFatal creates mnt dir itselfJakob Unterwurzacher
Allows to drop a few Mkdir()s.
2021-03-14syscallcompat: getdents: link to #483Jakob Unterwurzacher
Give a user receiving the Getdents warning some background info.
2021-03-12tests: add TestDiskFullJakob Unterwurzacher
Also fix incomplete uid restoration in TestSupplementaryGroups and replace syscall.Setregid and friends with unix.Setregid and friends. This test is added to check if have problems handling a full disk. The ticket https://github.com/rfjakob/gocryptfs/issues/550 states that the full disk was not where the backing gocryptfs filesystem was, but this has no effect on gocryptfs, so we test the harder case.