Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag 'bcachefs-2025-04-10' of git://evilpiepirate.org/bcachefs

Pull bcachefs fixes from Kent Overstreet:
"Mostly minor fixes.

Eric Biggers' crypto API conversion is included because of long
standing sporadic crashes - mostly, but not entirely syzbot - in the
crypto API code when calling poly1305, which have been nigh impossible
to reproduce and debug.

His rework deletes the code where we've seen the crashes, so either
it'll be a fix or we'll end up with backtraces we can debug. (Thanks
Eric!)"

* tag 'bcachefs-2025-04-10' of git://evilpiepirate.org/bcachefs:
bcachefs: Use sort_nonatomic() instead of sort()
bcachefs: Remove unnecessary softdep on xxhash
bcachefs: use library APIs for ChaCha20 and Poly1305
bcachefs: Fix duplicate "ro,read_only" in opts at startup
bcachefs: Fix UAF in bchfs_read()
bcachefs: Use cpu_to_le16 for dirent lengths
bcachefs: Fix type for parameter in journal_advance_devs_to_next_bucket
bcachefs: Fix escape sequence in prt_printf

+95 -225
+2 -3
fs/bcachefs/Kconfig
··· 15 15 select ZLIB_INFLATE 16 16 select ZSTD_COMPRESS 17 17 select ZSTD_DECOMPRESS 18 - select CRYPTO 19 18 select CRYPTO_LIB_SHA256 20 - select CRYPTO_CHACHA20 21 - select CRYPTO_POLY1305 19 + select CRYPTO_LIB_CHACHA 20 + select CRYPTO_LIB_POLY1305 22 21 select KEYS 23 22 select RAID6_PQ 24 23 select XOR_BLOCKS
+2 -2
fs/bcachefs/bcachefs.h
··· 981 981 mempool_t compress_workspace[BCH_COMPRESSION_OPT_NR]; 982 982 size_t zstd_workspace_size; 983 983 984 - struct crypto_sync_skcipher *chacha20; 985 - struct crypto_shash *poly1305; 984 + struct bch_key chacha20_key; 985 + bool chacha20_key_set; 986 986 987 987 atomic64_t key_version; 988 988
+2 -3
fs/bcachefs/btree_journal_iter.c
··· 644 644 */ 645 645 static int journal_sort_key_cmp(const void *_l, const void *_r) 646 646 { 647 - cond_resched(); 648 - 649 647 const struct journal_key *l = _l; 650 648 const struct journal_key *r = _r; 651 649 ··· 687 689 688 690 static void __journal_keys_sort(struct journal_keys *keys) 689 691 { 690 - sort(keys->data, keys->nr, sizeof(keys->data[0]), journal_sort_key_cmp, NULL); 692 + sort_nonatomic(keys->data, keys->nr, sizeof(keys->data[0]), 693 + journal_sort_key_cmp, NULL); 691 694 692 695 cond_resched(); 693 696
+3 -3
fs/bcachefs/btree_node_scan.c
··· 183 183 return; 184 184 185 185 if (bch2_csum_type_is_encryption(BSET_CSUM_TYPE(&bn->keys))) { 186 - if (!c->chacha20) 186 + if (!c->chacha20_key_set) 187 187 return; 188 188 189 189 struct nonce nonce = btree_nonce(&bn->keys, 0); ··· 398 398 bch2_print_string_as_lines(KERN_INFO, buf.buf); 399 399 } 400 400 401 - sort(f->nodes.data, f->nodes.nr, sizeof(f->nodes.data[0]), found_btree_node_cmp_cookie, NULL); 401 + sort_nonatomic(f->nodes.data, f->nodes.nr, sizeof(f->nodes.data[0]), found_btree_node_cmp_cookie, NULL); 402 402 403 403 dst = 0; 404 404 darray_for_each(f->nodes, i) { ··· 418 418 } 419 419 f->nodes.nr = dst; 420 420 421 - sort(f->nodes.data, f->nodes.nr, sizeof(f->nodes.data[0]), found_btree_node_cmp_pos, NULL); 421 + sort_nonatomic(f->nodes.data, f->nodes.nr, sizeof(f->nodes.data[0]), found_btree_node_cmp_pos, NULL); 422 422 423 423 if (0 && c->opts.verbose) { 424 424 printbuf_reset(&buf);
+4 -4
fs/bcachefs/btree_write_buffer.c
··· 428 428 */ 429 429 trace_and_count(c, write_buffer_flush_slowpath, trans, slowpath, wb->flushing.keys.nr); 430 430 431 - sort(wb->flushing.keys.data, 432 - wb->flushing.keys.nr, 433 - sizeof(wb->flushing.keys.data[0]), 434 - wb_key_seq_cmp, NULL); 431 + sort_nonatomic(wb->flushing.keys.data, 432 + wb->flushing.keys.nr, 433 + sizeof(wb->flushing.keys.data[0]), 434 + wb_key_seq_cmp, NULL); 435 435 436 436 darray_for_each(wb->flushing.keys, i) { 437 437 if (!i->journal_seq)
+56 -189
fs/bcachefs/checksum.c
··· 7 7 #include "super-io.h" 8 8 9 9 #include <linux/crc32c.h> 10 - #include <linux/crypto.h> 11 10 #include <linux/xxhash.h> 12 11 #include <linux/key.h> 13 12 #include <linux/random.h> 14 13 #include <linux/ratelimit.h> 15 - #include <linux/scatterlist.h> 16 - #include <crypto/algapi.h> 17 14 #include <crypto/chacha.h> 18 - #include <crypto/hash.h> 19 15 #include <crypto/poly1305.h> 20 - #include <crypto/skcipher.h> 21 16 #include <keys/user-type.h> 22 17 23 18 /* ··· 91 96 } 92 97 } 93 98 94 - static inline int do_encrypt_sg(struct crypto_sync_skcipher *tfm, 95 - struct nonce nonce, 96 - struct scatterlist *sg, size_t len) 99 + static void bch2_chacha20_init(u32 state[CHACHA_STATE_WORDS], 100 + const struct bch_key *key, struct nonce nonce) 97 101 { 98 - SYNC_SKCIPHER_REQUEST_ON_STACK(req, tfm); 102 + u32 key_words[CHACHA_KEY_SIZE / sizeof(u32)]; 99 103 100 - skcipher_request_set_sync_tfm(req, tfm); 101 - skcipher_request_set_callback(req, 0, NULL, NULL); 102 - skcipher_request_set_crypt(req, sg, sg, len, nonce.d); 104 + BUILD_BUG_ON(sizeof(key_words) != sizeof(*key)); 105 + memcpy(key_words, key, sizeof(key_words)); 106 + le32_to_cpu_array(key_words, ARRAY_SIZE(key_words)); 103 107 104 - int ret = crypto_skcipher_encrypt(req); 105 - if (ret) 106 - pr_err("got error %i from crypto_skcipher_encrypt()", ret); 108 + BUILD_BUG_ON(sizeof(nonce) != CHACHA_IV_SIZE); 109 + chacha_init(state, key_words, (const u8 *)nonce.d); 107 110 108 - return ret; 111 + memzero_explicit(key_words, sizeof(key_words)); 109 112 } 110 113 111 - static inline int do_encrypt(struct crypto_sync_skcipher *tfm, 112 - struct nonce nonce, 113 - void *buf, size_t len) 114 + static void bch2_chacha20(const struct bch_key *key, struct nonce nonce, 115 + void *data, size_t len) 114 116 { 115 - if (!is_vmalloc_addr(buf)) { 116 - struct scatterlist sg = {}; 117 + u32 state[CHACHA_STATE_WORDS]; 117 118 118 - sg_mark_end(&sg); 119 - sg_set_page(&sg, virt_to_page(buf), len, offset_in_page(buf)); 120 - return do_encrypt_sg(tfm, nonce, &sg, len); 121 - } else { 122 - DARRAY_PREALLOCATED(struct scatterlist, 4) sgl; 123 - size_t sgl_len = 0; 124 - int ret; 125 - 126 - darray_init(&sgl); 127 - 128 - while (len) { 129 - unsigned offset = offset_in_page(buf); 130 - struct scatterlist sg = { 131 - .page_link = (unsigned long) vmalloc_to_page(buf), 132 - .offset = offset, 133 - .length = min(len, PAGE_SIZE - offset), 134 - }; 135 - 136 - if (darray_push(&sgl, sg)) { 137 - sg_mark_end(&darray_last(sgl)); 138 - ret = do_encrypt_sg(tfm, nonce, sgl.data, sgl_len); 139 - if (ret) 140 - goto err; 141 - 142 - nonce = nonce_add(nonce, sgl_len); 143 - sgl_len = 0; 144 - sgl.nr = 0; 145 - BUG_ON(darray_push(&sgl, sg)); 146 - } 147 - 148 - buf += sg.length; 149 - len -= sg.length; 150 - sgl_len += sg.length; 151 - } 152 - 153 - sg_mark_end(&darray_last(sgl)); 154 - ret = do_encrypt_sg(tfm, nonce, sgl.data, sgl_len); 155 - err: 156 - darray_exit(&sgl); 157 - return ret; 158 - } 119 + bch2_chacha20_init(state, key, nonce); 120 + chacha20_crypt(state, data, data, len); 121 + memzero_explicit(state, sizeof(state)); 159 122 } 160 123 161 - int bch2_chacha_encrypt_key(struct bch_key *key, struct nonce nonce, 162 - void *buf, size_t len) 124 + static void bch2_poly1305_init(struct poly1305_desc_ctx *desc, 125 + struct bch_fs *c, struct nonce nonce) 163 126 { 164 - struct crypto_sync_skcipher *chacha20 = 165 - crypto_alloc_sync_skcipher("chacha20", 0, 0); 166 - int ret; 167 - 168 - ret = PTR_ERR_OR_ZERO(chacha20); 169 - if (ret) { 170 - pr_err("error requesting chacha20 cipher: %s", bch2_err_str(ret)); 171 - return ret; 172 - } 173 - 174 - ret = crypto_skcipher_setkey(&chacha20->base, 175 - (void *) key, sizeof(*key)); 176 - if (ret) { 177 - pr_err("error from crypto_skcipher_setkey(): %s", bch2_err_str(ret)); 178 - goto err; 179 - } 180 - 181 - ret = do_encrypt(chacha20, nonce, buf, len); 182 - err: 183 - crypto_free_sync_skcipher(chacha20); 184 - return ret; 185 - } 186 - 187 - static int gen_poly_key(struct bch_fs *c, struct shash_desc *desc, 188 - struct nonce nonce) 189 - { 190 - u8 key[POLY1305_KEY_SIZE]; 191 - int ret; 127 + u8 key[POLY1305_KEY_SIZE] = { 0 }; 192 128 193 129 nonce.d[3] ^= BCH_NONCE_POLY; 194 130 195 - memset(key, 0, sizeof(key)); 196 - ret = do_encrypt(c->chacha20, nonce, key, sizeof(key)); 197 - if (ret) 198 - return ret; 199 - 200 - desc->tfm = c->poly1305; 201 - crypto_shash_init(desc); 202 - crypto_shash_update(desc, key, sizeof(key)); 203 - return 0; 131 + bch2_chacha20(&c->chacha20_key, nonce, key, sizeof(key)); 132 + poly1305_init(desc, key); 204 133 } 205 134 206 135 struct bch_csum bch2_checksum(struct bch_fs *c, unsigned type, ··· 149 230 150 231 case BCH_CSUM_chacha20_poly1305_80: 151 232 case BCH_CSUM_chacha20_poly1305_128: { 152 - SHASH_DESC_ON_STACK(desc, c->poly1305); 233 + struct poly1305_desc_ctx dctx; 153 234 u8 digest[POLY1305_DIGEST_SIZE]; 154 235 struct bch_csum ret = { 0 }; 155 236 156 - gen_poly_key(c, desc, nonce); 157 - 158 - crypto_shash_update(desc, data, len); 159 - crypto_shash_final(desc, digest); 237 + bch2_poly1305_init(&dctx, c, nonce); 238 + poly1305_update(&dctx, data, len); 239 + poly1305_final(&dctx, digest); 160 240 161 241 memcpy(&ret, digest, bch_crc_bytes[type]); 162 242 return ret; ··· 171 253 if (!bch2_csum_type_is_encryption(type)) 172 254 return 0; 173 255 174 - if (bch2_fs_inconsistent_on(!c->chacha20, 256 + if (bch2_fs_inconsistent_on(!c->chacha20_key_set, 175 257 c, "attempting to encrypt without encryption key")) 176 258 return -BCH_ERR_no_encryption_key; 177 259 178 - return do_encrypt(c->chacha20, nonce, data, len); 260 + bch2_chacha20(&c->chacha20_key, nonce, data, len); 261 + return 0; 179 262 } 180 263 181 264 static struct bch_csum __bch2_checksum_bio(struct bch_fs *c, unsigned type, ··· 215 296 216 297 case BCH_CSUM_chacha20_poly1305_80: 217 298 case BCH_CSUM_chacha20_poly1305_128: { 218 - SHASH_DESC_ON_STACK(desc, c->poly1305); 299 + struct poly1305_desc_ctx dctx; 219 300 u8 digest[POLY1305_DIGEST_SIZE]; 220 301 struct bch_csum ret = { 0 }; 221 302 222 - gen_poly_key(c, desc, nonce); 303 + bch2_poly1305_init(&dctx, c, nonce); 223 304 224 305 #ifdef CONFIG_HIGHMEM 225 306 __bio_for_each_segment(bv, bio, *iter, *iter) { 226 307 void *p = kmap_local_page(bv.bv_page) + bv.bv_offset; 227 308 228 - crypto_shash_update(desc, p, bv.bv_len); 309 + poly1305_update(&dctx, p, bv.bv_len); 229 310 kunmap_local(p); 230 311 } 231 312 #else 232 313 __bio_for_each_bvec(bv, bio, *iter, *iter) 233 - crypto_shash_update(desc, 314 + poly1305_update(&dctx, 234 315 page_address(bv.bv_page) + bv.bv_offset, 235 316 bv.bv_len); 236 317 #endif 237 - crypto_shash_final(desc, digest); 318 + poly1305_final(&dctx, digest); 238 319 239 320 memcpy(&ret, digest, bch_crc_bytes[type]); 240 321 return ret; ··· 257 338 { 258 339 struct bio_vec bv; 259 340 struct bvec_iter iter; 260 - DARRAY_PREALLOCATED(struct scatterlist, 4) sgl; 261 - size_t sgl_len = 0; 341 + u32 chacha_state[CHACHA_STATE_WORDS]; 262 342 int ret = 0; 263 343 264 - if (bch2_fs_inconsistent_on(!c->chacha20, 344 + if (bch2_fs_inconsistent_on(!c->chacha20_key_set, 265 345 c, "attempting to encrypt without encryption key")) 266 346 return -BCH_ERR_no_encryption_key; 267 347 268 - darray_init(&sgl); 348 + bch2_chacha20_init(chacha_state, &c->chacha20_key, nonce); 269 349 270 350 bio_for_each_segment(bv, bio, iter) { 271 - struct scatterlist sg = { 272 - .page_link = (unsigned long) bv.bv_page, 273 - .offset = bv.bv_offset, 274 - .length = bv.bv_len, 275 - }; 351 + void *p; 276 352 277 - if (darray_push(&sgl, sg)) { 278 - sg_mark_end(&darray_last(sgl)); 279 - ret = do_encrypt_sg(c->chacha20, nonce, sgl.data, sgl_len); 280 - if (ret) 281 - goto err; 282 - 283 - nonce = nonce_add(nonce, sgl_len); 284 - sgl_len = 0; 285 - sgl.nr = 0; 286 - 287 - BUG_ON(darray_push(&sgl, sg)); 353 + /* 354 + * chacha_crypt() assumes that the length is a multiple of 355 + * CHACHA_BLOCK_SIZE on any non-final call. 356 + */ 357 + if (!IS_ALIGNED(bv.bv_len, CHACHA_BLOCK_SIZE)) { 358 + bch_err_ratelimited(c, "bio not aligned for encryption"); 359 + ret = -EIO; 360 + break; 288 361 } 289 362 290 - sgl_len += sg.length; 363 + p = bvec_kmap_local(&bv); 364 + chacha20_crypt(chacha_state, p, p, bv.bv_len); 365 + kunmap_local(p); 291 366 } 292 - 293 - sg_mark_end(&darray_last(sgl)); 294 - ret = do_encrypt_sg(c->chacha20, nonce, sgl.data, sgl_len); 295 - err: 296 - darray_exit(&sgl); 367 + memzero_explicit(chacha_state, sizeof(chacha_state)); 297 368 return ret; 298 369 } 299 370 ··· 559 650 } 560 651 561 652 /* decrypt real key: */ 562 - ret = bch2_chacha_encrypt_key(&user_key, bch2_sb_key_nonce(c), 563 - &sb_key, sizeof(sb_key)); 564 - if (ret) 565 - goto err; 653 + bch2_chacha20(&user_key, bch2_sb_key_nonce(c), &sb_key, sizeof(sb_key)); 566 654 567 655 if (bch2_key_is_encrypted(&sb_key)) { 568 656 bch_err(c, "incorrect encryption key"); ··· 572 666 memzero_explicit(&sb_key, sizeof(sb_key)); 573 667 memzero_explicit(&user_key, sizeof(user_key)); 574 668 return ret; 575 - } 576 - 577 - static int bch2_alloc_ciphers(struct bch_fs *c) 578 - { 579 - if (c->chacha20) 580 - return 0; 581 - 582 - struct crypto_sync_skcipher *chacha20 = crypto_alloc_sync_skcipher("chacha20", 0, 0); 583 - int ret = PTR_ERR_OR_ZERO(chacha20); 584 - if (ret) { 585 - bch_err(c, "error requesting chacha20 module: %s", bch2_err_str(ret)); 586 - return ret; 587 - } 588 - 589 - struct crypto_shash *poly1305 = crypto_alloc_shash("poly1305", 0, 0); 590 - ret = PTR_ERR_OR_ZERO(poly1305); 591 - if (ret) { 592 - bch_err(c, "error requesting poly1305 module: %s", bch2_err_str(ret)); 593 - crypto_free_sync_skcipher(chacha20); 594 - return ret; 595 - } 596 - 597 - c->chacha20 = chacha20; 598 - c->poly1305 = poly1305; 599 - return 0; 600 669 } 601 670 602 671 #if 0 ··· 678 797 679 798 void bch2_fs_encryption_exit(struct bch_fs *c) 680 799 { 681 - if (c->poly1305) 682 - crypto_free_shash(c->poly1305); 683 - if (c->chacha20) 684 - crypto_free_sync_skcipher(c->chacha20); 800 + memzero_explicit(&c->chacha20_key, sizeof(c->chacha20_key)); 685 801 } 686 802 687 803 int bch2_fs_encryption_init(struct bch_fs *c) 688 804 { 689 805 struct bch_sb_field_crypt *crypt; 690 - struct bch_key key; 691 - int ret = 0; 806 + int ret; 692 807 693 808 crypt = bch2_sb_field_get(c->disk_sb.sb, crypt); 694 809 if (!crypt) 695 - goto out; 810 + return 0; 696 811 697 - ret = bch2_alloc_ciphers(c); 812 + ret = bch2_decrypt_sb_key(c, crypt, &c->chacha20_key); 698 813 if (ret) 699 - goto out; 700 - 701 - ret = bch2_decrypt_sb_key(c, crypt, &key); 702 - if (ret) 703 - goto out; 704 - 705 - ret = crypto_skcipher_setkey(&c->chacha20->base, 706 - (void *) &key.key, sizeof(key.key)); 707 - if (ret) 708 - goto out; 709 - out: 710 - memzero_explicit(&key, sizeof(key)); 711 - return ret; 814 + return ret; 815 + c->chacha20_key_set = true; 816 + return 0; 712 817 }
+1 -2
fs/bcachefs/checksum.h
··· 69 69 bch2_csum_to_text(out, type, expected); 70 70 } 71 71 72 - int bch2_chacha_encrypt_key(struct bch_key *, struct nonce, void *, size_t); 73 72 int bch2_request_key(struct bch_sb *, struct bch_key *); 74 73 #ifndef __KERNEL__ 75 74 int bch2_revoke_key(struct bch_sb *); ··· 155 156 if (type >= BCH_CSUM_NR) 156 157 return false; 157 158 158 - if (bch2_csum_type_is_encryption(type) && !c->chacha20) 159 + if (bch2_csum_type_is_encryption(type) && !c->chacha20_key_set) 159 160 return false; 160 161 161 162 return true;
+1 -1
fs/bcachefs/data_update.c
··· 607 607 prt_newline(out); 608 608 printbuf_indent_add(out, 2); 609 609 bch2_data_update_opts_to_text(out, m->op.c, &m->op.opts, &m->data_opts); 610 - prt_printf(out, "read_done:\t\%u\n", m->read_done); 610 + prt_printf(out, "read_done:\t%u\n", m->read_done); 611 611 bch2_write_op_to_text(out, &m->op); 612 612 printbuf_indent_sub(out, 2); 613 613 }
+2 -2
fs/bcachefs/dirent.c
··· 287 287 EBUG_ON(!dirent->v.d_casefold); 288 288 EBUG_ON(!cf_name->len); 289 289 290 - dirent->v.d_cf_name_block.d_name_len = name->len; 291 - dirent->v.d_cf_name_block.d_cf_name_len = cf_name->len; 290 + dirent->v.d_cf_name_block.d_name_len = cpu_to_le16(name->len); 291 + dirent->v.d_cf_name_block.d_cf_name_len = cpu_to_le16(cf_name->len); 292 292 memcpy(&dirent->v.d_cf_name_block.d_names[0], name->name, name->len); 293 293 memcpy(&dirent->v.d_cf_name_block.d_names[name->len], cf_name->name, cf_name->len); 294 294 memset(&dirent->v.d_cf_name_block.d_names[name->len + cf_name->len], 0,
+16 -1
fs/bcachefs/fs-io-buffered.c
··· 225 225 226 226 bch2_read_extent(trans, rbio, iter.pos, 227 227 data_btree, k, offset_into_extent, flags); 228 - swap(rbio->bio.bi_iter.bi_size, bytes); 228 + /* 229 + * Careful there's a landmine here if bch2_read_extent() ever 230 + * starts returning transaction restarts here. 231 + * 232 + * We've changed rbio->bi_iter.bi_size to be "bytes we can read 233 + * from this extent" with the swap call, and we restore it 234 + * below. That restore needs to come before checking for 235 + * errors. 236 + * 237 + * But unlike __bch2_read(), we use the rbio bvec iter, not one 238 + * on the stack, so we can't do the restore right after the 239 + * bch2_read_extent() call: we don't own that iterator anymore 240 + * if BCH_READ_last_fragment is set, since we may have submitted 241 + * that rbio instead of cloning it. 242 + */ 229 243 230 244 if (flags & BCH_READ_last_fragment) 231 245 break; 232 246 247 + swap(rbio->bio.bi_iter.bi_size, bytes); 233 248 bio_advance(&rbio->bio, bytes); 234 249 err: 235 250 if (ret &&
+2 -1
fs/bcachefs/io_read.c
··· 977 977 goto err; 978 978 } 979 979 980 - if (unlikely(bch2_csum_type_is_encryption(pick.crc.csum_type)) && !c->chacha20) { 980 + if (unlikely(bch2_csum_type_is_encryption(pick.crc.csum_type)) && 981 + !c->chacha20_key_set) { 981 982 struct printbuf buf = PRINTBUF; 982 983 bch2_read_err_msg_trans(trans, &buf, orig, read_pos); 983 984 prt_printf(&buf, "attempting to read encrypted data without encryption key\n ");
+1 -1
fs/bcachefs/journal_io.c
··· 1460 1460 1461 1461 static void journal_advance_devs_to_next_bucket(struct journal *j, 1462 1462 struct dev_alloc_list *devs, 1463 - unsigned sectors, u64 seq) 1463 + unsigned sectors, __le64 seq) 1464 1464 { 1465 1465 struct bch_fs *c = container_of(j, struct bch_fs, journal); 1466 1466
+3 -3
fs/bcachefs/recovery.c
··· 389 389 * Now, replay any remaining keys in the order in which they appear in 390 390 * the journal, unpinning those journal entries as we go: 391 391 */ 392 - sort(keys_sorted.data, keys_sorted.nr, 393 - sizeof(keys_sorted.data[0]), 394 - journal_sort_seq_cmp, NULL); 392 + sort_nonatomic(keys_sorted.data, keys_sorted.nr, 393 + sizeof(keys_sorted.data[0]), 394 + journal_sort_seq_cmp, NULL); 395 395 396 396 darray_for_each(keys_sorted, kp) { 397 397 cond_resched();
-10
fs/bcachefs/super.c
··· 70 70 #include <linux/percpu.h> 71 71 #include <linux/random.h> 72 72 #include <linux/sysfs.h> 73 - #include <crypto/hash.h> 74 73 75 74 MODULE_LICENSE("GPL"); 76 75 MODULE_AUTHOR("Kent Overstreet <kent.overstreet@gmail.com>"); 77 76 MODULE_DESCRIPTION("bcachefs filesystem"); 78 - MODULE_SOFTDEP("pre: chacha20"); 79 - MODULE_SOFTDEP("pre: poly1305"); 80 - MODULE_SOFTDEP("pre: xxhash"); 81 77 82 78 const char * const bch2_fs_flag_strs[] = { 83 79 #define x(n) #n, ··· 997 1001 998 1002 prt_str(&p, "starting version "); 999 1003 bch2_version_to_text(&p, c->sb.version); 1000 - 1001 - if (c->opts.read_only) { 1002 - prt_str(&p, " opts="); 1003 - first = false; 1004 - prt_printf(&p, "ro"); 1005 - } 1006 1004 1007 1005 for (i = 0; i < bch2_opts_nr; i++) { 1008 1006 const struct bch_option *opt = &bch2_opt_table[i];