No conflicts.
Showing the changes to include (22 of 328 files). Show all
Unified · Split
| @@ -24,14 +24,11 @@ static inline void blake2s_set_lastblock(struct blake2s_state *state) · 23 unmodified lines | |||
| 24 | state->f[0] = -1; | 24 | state->f[0] = -1; |
| 25 | } | 25 | } |
| 26 | 26 | ||
| 27 | typedef void (*blake2s_compress_t)(struct blake2s_state *state, | ||
| 28 | const u8 *block, size_t nblocks, u32 inc); | ||
| 29 | |||
| 30 | /* Helper functions for BLAKE2s shared by the library and shash APIs */ | 27 | /* Helper functions for BLAKE2s shared by the library and shash APIs */ |
| 31 | 28 | ||
| 32 | static inline void __blake2s_update(struct blake2s_state *state, | 29 | static __always_inline void |
| 33 | const u8 *in, size_t inlen, | 30 | __blake2s_update(struct blake2s_state *state, const u8 *in, size_t inlen, |
| 34 | blake2s_compress_t compress) | 31 | bool force_generic) |
| 35 | { | 32 | { |
| 36 | const size_t fill = BLAKE2S_BLOCK_SIZE - state->buflen; | 33 | const size_t fill = BLAKE2S_BLOCK_SIZE - state->buflen; |
| 37 | 34 | ||
| @@ -39,7 +36,12 @@ static inline void __blake2s_update(struct blake2s_state *state, · 1 unmodified line | |||
| 39 | return; | 36 | return; |
| 40 | if (inlen > fill) { | 37 | if (inlen > fill) { |
| 41 | memcpy(state->buf + state->buflen, in, fill); | 38 | memcpy(state->buf + state->buflen, in, fill); |
| 42 | (*compress)(state, state->buf, 1, BLAKE2S_BLOCK_SIZE); | 39 | if (force_generic) |
| 40 | blake2s_compress_generic(state, state->buf, 1, | ||
| 41 | BLAKE2S_BLOCK_SIZE); | ||
| 42 | else | ||
| 43 | blake2s_compress(state, state->buf, 1, | ||
| 44 | BLAKE2S_BLOCK_SIZE); | ||
| 43 | state->buflen = 0; | 45 | state->buflen = 0; |
| 44 | in += fill; | 46 | in += fill; |
| 45 | inlen -= fill; | 47 | inlen -= fill; |
| @@ -47,7 +49,12 @@ static inline void __blake2s_update(struct blake2s_state *state, · 1 unmodified line | |||
| 47 | if (inlen > BLAKE2S_BLOCK_SIZE) { | 49 | if (inlen > BLAKE2S_BLOCK_SIZE) { |
| 48 | const size_t nblocks = DIV_ROUND_UP(inlen, BLAKE2S_BLOCK_SIZE); | 50 | const size_t nblocks = DIV_ROUND_UP(inlen, BLAKE2S_BLOCK_SIZE); |
| 49 | /* Hash one less (full) block than strictly possible */ | 51 | /* Hash one less (full) block than strictly possible */ |
| 50 | (*compress)(state, in, nblocks - 1, BLAKE2S_BLOCK_SIZE); | 52 | if (force_generic) |
| 53 | blake2s_compress_generic(state, in, nblocks - 1, | ||
| 54 | BLAKE2S_BLOCK_SIZE); | ||
| 55 | else | ||
| 56 | blake2s_compress(state, in, nblocks - 1, | ||
| 57 | BLAKE2S_BLOCK_SIZE); | ||
| 51 | in += BLAKE2S_BLOCK_SIZE * (nblocks - 1); | 58 | in += BLAKE2S_BLOCK_SIZE * (nblocks - 1); |
| 52 | inlen -= BLAKE2S_BLOCK_SIZE * (nblocks - 1); | 59 | inlen -= BLAKE2S_BLOCK_SIZE * (nblocks - 1); |
| 53 | } | 60 | } |
| @@ -55,13 +62,16 @@ static inline void __blake2s_update(struct blake2s_state *state, · 1 unmodified line | |||
| 55 | state->buflen += inlen; | 62 | state->buflen += inlen; |
| 56 | } | 63 | } |
| 57 | 64 | ||
| 58 | static inline void __blake2s_final(struct blake2s_state *state, u8 *out, | 65 | static __always_inline void |
| 59 | blake2s_compress_t compress) | 66 | __blake2s_final(struct blake2s_state *state, u8 *out, bool force_generic) |
| 60 | { | 67 | { |
| 61 | blake2s_set_lastblock(state); | 68 | blake2s_set_lastblock(state); |
| 62 | memset(state->buf + state->buflen, 0, | 69 | memset(state->buf + state->buflen, 0, |
| 63 | BLAKE2S_BLOCK_SIZE - state->buflen); /* Padding */ | 70 | BLAKE2S_BLOCK_SIZE - state->buflen); /* Padding */ |
| 64 | (*compress)(state, state->buf, 1, state->buflen); | 71 | if (force_generic) |
| 72 | blake2s_compress_generic(state, state->buf, 1, state->buflen); | ||
| 73 | else | ||
| 74 | blake2s_compress(state, state->buf, 1, state->buflen); | ||
| 65 | cpu_to_le32_array(state->h, ARRAY_SIZE(state->h)); | 75 | cpu_to_le32_array(state->h, ARRAY_SIZE(state->h)); |
| 66 | memcpy(out, state->h, state->outlen); | 76 | memcpy(out, state->h, state->outlen); |
| 67 | } | 77 | } |
| @@ -99,20 +109,20 @@ static inline int crypto_blake2s_init(struct shash_desc *desc) · 31 unmodified lines | |||
| 99 | 109 | ||
| 100 | static inline int crypto_blake2s_update(struct shash_desc *desc, | 110 | static inline int crypto_blake2s_update(struct shash_desc *desc, |
| 101 | const u8 *in, unsigned int inlen, | 111 | const u8 *in, unsigned int inlen, |
| 102 | blake2s_compress_t compress) | 112 | bool force_generic) |
| 103 | { | 113 | { |
| 104 | struct blake2s_state *state = shash_desc_ctx(desc); | 114 | struct blake2s_state *state = shash_desc_ctx(desc); |
| 105 | 115 | ||
| 106 | __blake2s_update(state, in, inlen, compress); | 116 | __blake2s_update(state, in, inlen, force_generic); |
| 107 | return 0; | 117 | return 0; |
| 108 | } | 118 | } |
| 109 | 119 | ||
| 110 | static inline int crypto_blake2s_final(struct shash_desc *desc, u8 *out, | 120 | static inline int crypto_blake2s_final(struct shash_desc *desc, u8 *out, |
| 111 | blake2s_compress_t compress) | 121 | bool force_generic) |
| 112 | { | 122 | { |
| 113 | struct blake2s_state *state = shash_desc_ctx(desc); | 123 | struct blake2s_state *state = shash_desc_ctx(desc); |
| 114 | 124 | ||
| 115 | __blake2s_final(state, out, compress); | 125 | __blake2s_final(state, out, force_generic); |
| 116 | return 0; | 126 | return 0; |
| 117 | } | 127 | } |
| 118 | 128 | ||
| @@ -324,12 +324,12 @@ enum { · 323 unmodified lines | |||
| 324 | ATA_LOG_NCQ_NON_DATA = 0x12, | 324 | ATA_LOG_NCQ_NON_DATA = 0x12, |
| 325 | ATA_LOG_NCQ_SEND_RECV = 0x13, | 325 | ATA_LOG_NCQ_SEND_RECV = 0x13, |
| 326 | ATA_LOG_IDENTIFY_DEVICE = 0x30, | 326 | ATA_LOG_IDENTIFY_DEVICE = 0x30, |
| 327 | ATA_LOG_CONCURRENT_POSITIONING_RANGES = 0x47, | ||
| 327 | 328 | ||
| 328 | /* Identify device log pages: */ | 329 | /* Identify device log pages: */ |
| 329 | ATA_LOG_SECURITY = 0x06, | 330 | ATA_LOG_SECURITY = 0x06, |
| 330 | ATA_LOG_SATA_SETTINGS = 0x08, | 331 | ATA_LOG_SATA_SETTINGS = 0x08, |
| 331 | ATA_LOG_ZONED_INFORMATION = 0x09, | 332 | ATA_LOG_ZONED_INFORMATION = 0x09, |
| 332 | ATA_LOG_CONCURRENT_POSITIONING_RANGES = 0x47, | ||
| 333 | 333 | ||
| 334 | /* Identify device SATA settings log:*/ | 334 | /* Identify device SATA settings log:*/ |
| 335 | ATA_LOG_DEVSLP_OFFSET = 0x30, | 335 | ATA_LOG_DEVSLP_OFFSET = 0x30, |
| @@ -35,6 +35,7 @@ · 34 unmodified lines | |||
| 35 | #define CEPH_OPT_TCP_NODELAY (1<<4) /* TCP_NODELAY on TCP sockets */ | 35 | #define CEPH_OPT_TCP_NODELAY (1<<4) /* TCP_NODELAY on TCP sockets */ |
| 36 | #define CEPH_OPT_NOMSGSIGN (1<<5) /* don't sign msgs (msgr1) */ | 36 | #define CEPH_OPT_NOMSGSIGN (1<<5) /* don't sign msgs (msgr1) */ |
| 37 | #define CEPH_OPT_ABORT_ON_FULL (1<<6) /* abort w/ ENOSPC when full */ | 37 | #define CEPH_OPT_ABORT_ON_FULL (1<<6) /* abort w/ ENOSPC when full */ |
| 38 | #define CEPH_OPT_RXBOUNCE (1<<7) /* double-buffer read data */ | ||
| 38 | 39 | ||
| 39 | #define CEPH_OPT_DEFAULT (CEPH_OPT_TCP_NODELAY) | 40 | #define CEPH_OPT_DEFAULT (CEPH_OPT_TCP_NODELAY) |
| 40 | 41 | ||
| @@ -383,6 +383,10 @@ struct ceph_connection_v2_info { · 382 unmodified lines | |||
| 383 | struct ceph_gcm_nonce in_gcm_nonce; | 383 | struct ceph_gcm_nonce in_gcm_nonce; |
| 384 | struct ceph_gcm_nonce out_gcm_nonce; | 384 | struct ceph_gcm_nonce out_gcm_nonce; |
| 385 | 385 | ||
| 386 | struct page **in_enc_pages; | ||
| 387 | int in_enc_page_cnt; | ||
| 388 | int in_enc_resid; | ||
| 389 | int in_enc_i; | ||
| 386 | struct page **out_enc_pages; | 390 | struct page **out_enc_pages; |
| 387 | int out_enc_page_cnt; | 391 | int out_enc_page_cnt; |
| 388 | int out_enc_resid; | 392 | int out_enc_resid; |
| @@ -457,6 +461,7 @@ struct ceph_connection { · 68 unmodified lines | |||
| 457 | struct ceph_msg *out_msg; /* sending message (== tail of | 461 | struct ceph_msg *out_msg; /* sending message (== tail of |
| 458 | out_sent) */ | 462 | out_sent) */ |
| 459 | 463 | ||
| 464 | struct page *bounce_page; | ||
| 460 | u32 in_front_crc, in_middle_crc, in_data_crc; /* calculated crc */ | 465 | u32 in_front_crc, in_middle_crc, in_data_crc; /* calculated crc */ |
| 461 | 466 | ||
| 462 | struct timespec64 last_keepalive_ack; /* keepalive2 ack stamp */ | 467 | struct timespec64 last_keepalive_ack; /* keepalive2 ack stamp */ |
| @@ -262,7 +262,7 @@ struct fb_ops { · 261 unmodified lines | |||
| 262 | 262 | ||
| 263 | /* Draws a rectangle */ | 263 | /* Draws a rectangle */ |
| 264 | void (*fb_fillrect) (struct fb_info *info, const struct fb_fillrect *rect); | 264 | void (*fb_fillrect) (struct fb_info *info, const struct fb_fillrect *rect); |
| 265 | /* Copy data from area to another. Obsolete. */ | 265 | /* Copy data from area to another */ |
| 266 | void (*fb_copyarea) (struct fb_info *info, const struct fb_copyarea *region); | 266 | void (*fb_copyarea) (struct fb_info *info, const struct fb_copyarea *region); |
| 267 | /* Draws a image to the display */ | 267 | /* Draws a image to the display */ |
| 268 | void (*fb_imageblit) (struct fb_info *info, const struct fb_image *image); | 268 | void (*fb_imageblit) (struct fb_info *info, const struct fb_image *image); |
| @@ -263,9 +263,11 @@ struct iomap_ioend { · 262 unmodified lines | |||
| 263 | struct list_head io_list; /* next ioend in chain */ | 263 | struct list_head io_list; /* next ioend in chain */ |
| 264 | u16 io_type; | 264 | u16 io_type; |
| 265 | u16 io_flags; /* IOMAP_F_* */ | 265 | u16 io_flags; /* IOMAP_F_* */ |
| 266 | u32 io_folios; /* folios added to ioend */ | ||
| 266 | struct inode *io_inode; /* file being written to */ | 267 | struct inode *io_inode; /* file being written to */ |
| 267 | size_t io_size; /* size of the extent */ | 268 | size_t io_size; /* size of the extent */ |
| 268 | loff_t io_offset; /* offset in the file */ | 269 | loff_t io_offset; /* offset in the file */ |
| 270 | sector_t io_sector; /* start sector of ioend */ | ||
| 269 | struct bio *io_bio; /* bio being built */ | 271 | struct bio *io_bio; /* bio being built */ |
| 270 | struct bio io_inline_bio; /* MUST BE LAST! */ | 272 | struct bio io_inline_bio; /* MUST BE LAST! */ |
| 271 | }; | 273 | }; |
| @@ -594,7 +594,7 @@ struct transaction_s · 593 unmodified lines | |||
| 594 | */ | 594 | */ |
| 595 | unsigned long t_log_start; | 595 | unsigned long t_log_start; |
| 596 | 596 | ||
| 597 | /* | 597 | /* |
| 598 | * Number of buffers on the t_buffers list [j_list_lock, no locks | 598 | * Number of buffers on the t_buffers list [j_list_lock, no locks |
| 599 | * needed for jbd2 thread] | 599 | * needed for jbd2 thread] |
| 600 | */ | 600 | */ |
| @@ -1295,7 +1295,7 @@ struct journal_s · 694 unmodified lines | |||
| 1295 | * Clean-up after fast commit or full commit. JBD2 calls this function | 1295 | * Clean-up after fast commit or full commit. JBD2 calls this function |
| 1296 | * after every commit operation. | 1296 | * after every commit operation. |
| 1297 | */ | 1297 | */ |
| 1298 | void (*j_fc_cleanup_callback)(struct journal_s *journal, int); | 1298 | void (*j_fc_cleanup_callback)(struct journal_s *journal, int full, tid_t tid); |
| 1299 | 1299 | ||
| 1300 | /** | 1300 | /** |
| 1301 | * @j_fc_replay_callback: | 1301 | * @j_fc_replay_callback: |
| @@ -1419,9 +1419,7 @@ extern void jbd2_journal_unfile_buffer(journal_t *, struct journal_head *); · 117 unmodified lines | |||
| 1419 | extern bool __jbd2_journal_refile_buffer(struct journal_head *); | 1419 | extern bool __jbd2_journal_refile_buffer(struct journal_head *); |
| 1420 | extern void jbd2_journal_refile_buffer(journal_t *, struct journal_head *); | 1420 | extern void jbd2_journal_refile_buffer(journal_t *, struct journal_head *); |
| 1421 | extern void __jbd2_journal_file_buffer(struct journal_head *, transaction_t *, int); | 1421 | extern void __jbd2_journal_file_buffer(struct journal_head *, transaction_t *, int); |
| 1422 | extern void __journal_free_buffer(struct journal_head *bh); | ||
| 1423 | extern void jbd2_journal_file_buffer(struct journal_head *, transaction_t *, int); | 1422 | extern void jbd2_journal_file_buffer(struct journal_head *, transaction_t *, int); |
| 1424 | extern void __journal_clean_data_list(transaction_t *transaction); | ||
| 1425 | static inline void jbd2_file_log_bh(struct list_head *head, struct buffer_head *bh) | 1423 | static inline void jbd2_file_log_bh(struct list_head *head, struct buffer_head *bh) |
| 1426 | { | 1424 | { |
| 1427 | list_add_tail(&bh->b_assoc_buffers, head); | 1425 | list_add_tail(&bh->b_assoc_buffers, head); |
| @@ -1486,9 +1484,6 @@ extern int jbd2_journal_write_metadata_buffer(transaction_t *transaction, · 58 unmodified lines | |||
| 1486 | struct buffer_head **bh_out, | 1484 | struct buffer_head **bh_out, |
| 1487 | sector_t blocknr); | 1485 | sector_t blocknr); |
| 1488 | 1486 | ||
| 1489 | /* Transaction locking */ | ||
| 1490 | extern void __wait_on_journal (journal_t *); | ||
| 1491 | |||
| 1492 | /* Transaction cache support */ | 1487 | /* Transaction cache support */ |
| 1493 | extern void jbd2_journal_destroy_transaction_cache(void); | 1488 | extern void jbd2_journal_destroy_transaction_cache(void); |
| 1494 | extern int __init jbd2_journal_init_transaction_cache(void); | 1489 | extern int __init jbd2_journal_init_transaction_cache(void); |
| @@ -1543,6 +1538,8 @@ extern int jbd2_journal_flush(journal_t *journal, unsigned int flags); · 48 unmodified lines | |||
| 1543 | extern void jbd2_journal_lock_updates (journal_t *); | 1538 | extern void jbd2_journal_lock_updates (journal_t *); |
| 1544 | extern void jbd2_journal_unlock_updates (journal_t *); | 1539 | extern void jbd2_journal_unlock_updates (journal_t *); |
| 1545 | 1540 | ||
| 1541 | void jbd2_journal_wait_updates(journal_t *); | ||
| 1542 | |||
| 1546 | extern journal_t * jbd2_journal_init_dev(struct block_device *bdev, | 1543 | extern journal_t * jbd2_journal_init_dev(struct block_device *bdev, |
| 1547 | struct block_device *fs_dev, | 1544 | struct block_device *fs_dev, |
| 1548 | unsigned long long start, int len, int bsize); | 1545 | unsigned long long start, int len, int bsize); |
| @@ -1774,8 +1771,6 @@ static inline unsigned long jbd2_log_space_left(journal_t *journal) · 225 unmodified lines | |||
| 1774 | #define BJ_Reserved 4 /* Buffer is reserved for access by journal */ | 1771 | #define BJ_Reserved 4 /* Buffer is reserved for access by journal */ |
| 1775 | #define BJ_Types 5 | 1772 | #define BJ_Types 5 |
| 1776 | 1773 | ||
| 1777 | extern int jbd_blocks_per_page(struct inode *inode); | ||
| 1778 | |||
| 1779 | /* JBD uses a CRC32 checksum */ | 1774 | /* JBD uses a CRC32 checksum */ |
| 1780 | #define JBD_MAX_CHECKSUM_SIZE 4 | 1775 | #define JBD_MAX_CHECKSUM_SIZE 4 |
| 1781 | 1776 | ||
| @@ -29,7 +29,9 @@ · 28 unmodified lines | |||
| 29 | #include <linux/refcount.h> | 29 | #include <linux/refcount.h> |
| 30 | #include <linux/nospec.h> | 30 | #include <linux/nospec.h> |
| 31 | #include <linux/notifier.h> | 31 | #include <linux/notifier.h> |
| 32 | #include <linux/ftrace.h> | ||
| 32 | #include <linux/hashtable.h> | 33 | #include <linux/hashtable.h> |
| 34 | #include <linux/instrumentation.h> | ||
| 33 | #include <linux/interval_tree.h> | 35 | #include <linux/interval_tree.h> |
| 34 | #include <linux/rbtree.h> | 36 | #include <linux/rbtree.h> |
| 35 | #include <linux/xarray.h> | 37 | #include <linux/xarray.h> |
| @@ -368,8 +370,11 @@ struct kvm_vcpu { · 332 unmodified lines | |||
| 368 | u64 last_used_slot_gen; | 370 | u64 last_used_slot_gen; |
| 369 | }; | 371 | }; |
| 370 | 372 | ||
| 371 | /* must be called with irqs disabled */ | 373 | /* |
| 372 | static __always_inline void guest_enter_irqoff(void) | 374 | * Start accounting time towards a guest. |
| 375 | * Must be called before entering guest context. | ||
| 376 | */ | ||
| 377 | static __always_inline void guest_timing_enter_irqoff(void) | ||
| 373 | { | 378 | { |
| 374 | /* | 379 | /* |
| 375 | * This is running in ioctl context so its safe to assume that it's the | 380 | * This is running in ioctl context so its safe to assume that it's the |
| @@ -378,7 +383,18 @@ static __always_inline void guest_enter_irqoff(void) · 2 unmodified lines | |||
| 378 | instrumentation_begin(); | 383 | instrumentation_begin(); |
| 379 | vtime_account_guest_enter(); | 384 | vtime_account_guest_enter(); |
| 380 | instrumentation_end(); | 385 | instrumentation_end(); |
| 386 | } | ||
| 381 | 387 | ||
| 388 | /* | ||
| 389 | * Enter guest context and enter an RCU extended quiescent state. | ||
| 390 | * | ||
| 391 | * Between guest_context_enter_irqoff() and guest_context_exit_irqoff() it is | ||
| 392 | * unsafe to use any code which may directly or indirectly use RCU, tracing | ||
| 393 | * (including IRQ flag tracing), or lockdep. All code in this period must be | ||
| 394 | * non-instrumentable. | ||
| 395 | */ | ||
| 396 | static __always_inline void guest_context_enter_irqoff(void) | ||
| 397 | { | ||
| 382 | /* | 398 | /* |
| 383 | * KVM does not hold any references to rcu protected data when it | 399 | * KVM does not hold any references to rcu protected data when it |
| 384 | * switches CPU into a guest mode. In fact switching to a guest mode | 400 | * switches CPU into a guest mode. In fact switching to a guest mode |
| @@ -394,16 +410,79 @@ static __always_inline void guest_enter_irqoff(void) · 9 unmodified lines | |||
| 394 | } | 410 | } |
| 395 | } | 411 | } |
| 396 | 412 | ||
| 397 | static __always_inline void guest_exit_irqoff(void) | 413 | /* |
| 414 | * Deprecated. Architectures should move to guest_timing_enter_irqoff() and | ||
| 415 | * guest_state_enter_irqoff(). | ||
| 416 | */ | ||
| 417 | static __always_inline void guest_enter_irqoff(void) | ||
| 418 | { | ||
| 419 | guest_timing_enter_irqoff(); | ||
| 420 | guest_context_enter_irqoff(); | ||
| 421 | } | ||
| 422 | |||
| 423 | /** | ||
| 424 | * guest_state_enter_irqoff - Fixup state when entering a guest | ||
| 425 | * | ||
| 426 | * Entry to a guest will enable interrupts, but the kernel state is interrupts | ||
| 427 | * disabled when this is invoked. Also tell RCU about it. | ||
| 428 | * | ||
| 429 | * 1) Trace interrupts on state | ||
| 430 | * 2) Invoke context tracking if enabled to adjust RCU state | ||
| 431 | * 3) Tell lockdep that interrupts are enabled | ||
| 432 | * | ||
| 433 | * Invoked from architecture specific code before entering a guest. | ||
| 434 | * Must be called with interrupts disabled and the caller must be | ||
| 435 | * non-instrumentable. | ||
| 436 | * The caller has to invoke guest_timing_enter_irqoff() before this. | ||
| 437 | * | ||
| 438 | * Note: this is analogous to exit_to_user_mode(). | ||
| 439 | */ | ||
| 440 | static __always_inline void guest_state_enter_irqoff(void) | ||
| 441 | { | ||
| 442 | instrumentation_begin(); | ||
| 443 | trace_hardirqs_on_prepare(); | ||
| 444 | lockdep_hardirqs_on_prepare(CALLER_ADDR0); | ||
| 445 | instrumentation_end(); | ||
| 446 | |||
| 447 | guest_context_enter_irqoff(); | ||
| 448 | lockdep_hardirqs_on(CALLER_ADDR0); | ||
| 449 | } | ||
| 450 | |||
| 451 | /* | ||
| 452 | * Exit guest context and exit an RCU extended quiescent state. | ||
| 453 | * | ||
| 454 | * Between guest_context_enter_irqoff() and guest_context_exit_irqoff() it is | ||
| 455 | * unsafe to use any code which may directly or indirectly use RCU, tracing | ||
| 456 | * (including IRQ flag tracing), or lockdep. All code in this period must be | ||
| 457 | * non-instrumentable. | ||
| 458 | */ | ||
| 459 | static __always_inline void guest_context_exit_irqoff(void) | ||
| 398 | { | 460 | { |
| 399 | context_tracking_guest_exit(); | 461 | context_tracking_guest_exit(); |
| 462 | } | ||
| 400 | 463 | ||
| 464 | /* | ||
| 465 | * Stop accounting time towards a guest. | ||
| 466 | * Must be called after exiting guest context. | ||
| 467 | */ | ||
| 468 | static __always_inline void guest_timing_exit_irqoff(void) | ||
| 469 | { | ||
| 401 | instrumentation_begin(); | 470 | instrumentation_begin(); |
| 402 | /* Flush the guest cputime we spent on the guest */ | 471 | /* Flush the guest cputime we spent on the guest */ |
| 403 | vtime_account_guest_exit(); | 472 | vtime_account_guest_exit(); |
| 404 | instrumentation_end(); | 473 | instrumentation_end(); |
| 405 | } | 474 | } |
| 406 | 475 | ||
| 476 | /* | ||
| 477 | * Deprecated. Architectures should move to guest_state_exit_irqoff() and | ||
| 478 | * guest_timing_exit_irqoff(). | ||
| 479 | */ | ||
| 480 | static __always_inline void guest_exit_irqoff(void) | ||
| 481 | { | ||
| 482 | guest_context_exit_irqoff(); | ||
| 483 | guest_timing_exit_irqoff(); | ||
| 484 | } | ||
| 485 | |||
| 407 | static inline void guest_exit(void) | 486 | static inline void guest_exit(void) |
| 408 | { | 487 | { |
| 409 | unsigned long flags; | 488 | unsigned long flags; |
| @@ -413,6 +492,33 @@ static inline void guest_exit(void) · 3 unmodified lines | |||
| 413 | local_irq_restore(flags); | 492 | local_irq_restore(flags); |
| 414 | } | 493 | } |
| 415 | 494 | ||
| 495 | /** | ||
| 496 | * guest_state_exit_irqoff - Establish state when returning from guest mode | ||
| 497 | * | ||
| 498 | * Entry from a guest disables interrupts, but guest mode is traced as | ||
| 499 | * interrupts enabled. Also with NO_HZ_FULL RCU might be idle. | ||
| 500 | * | ||
| 501 | * 1) Tell lockdep that interrupts are disabled | ||
| 502 | * 2) Invoke context tracking if enabled to reactivate RCU | ||
| 503 | * 3) Trace interrupts off state | ||
| 504 | * | ||
| 505 | * Invoked from architecture specific code after exiting a guest. | ||
| 506 | * Must be invoked with interrupts disabled and the caller must be | ||
| 507 | * non-instrumentable. | ||
| 508 | * The caller has to invoke guest_timing_exit_irqoff() after this. | ||
| 509 | * | ||
| 510 | * Note: this is analogous to enter_from_user_mode(). | ||
| 511 | */ | ||
| 512 | static __always_inline void guest_state_exit_irqoff(void) | ||
| 513 | { | ||
| 514 | lockdep_hardirqs_off(CALLER_ADDR0); | ||
| 515 | guest_context_exit_irqoff(); | ||
| 516 | |||
| 517 | instrumentation_begin(); | ||
| 518 | trace_hardirqs_off_finish(); | ||
| 519 | instrumentation_end(); | ||
| 520 | } | ||
| 521 | |||
| 416 | static inline int kvm_vcpu_exiting_guest_mode(struct kvm_vcpu *vcpu) | 522 | static inline int kvm_vcpu_exiting_guest_mode(struct kvm_vcpu *vcpu) |
| 417 | { | 523 | { |
| 418 | /* | 524 | /* |
| @@ -380,6 +380,7 @@ enum { · 379 unmodified lines | |||
| 380 | ATA_HORKAGE_MAX_TRIM_128M = (1 << 26), /* Limit max trim size to 128M */ | 380 | ATA_HORKAGE_MAX_TRIM_128M = (1 << 26), /* Limit max trim size to 128M */ |
| 381 | ATA_HORKAGE_NO_NCQ_ON_ATI = (1 << 27), /* Disable NCQ on ATI chipset */ | 381 | ATA_HORKAGE_NO_NCQ_ON_ATI = (1 << 27), /* Disable NCQ on ATI chipset */ |
| 382 | ATA_HORKAGE_NO_ID_DEV_LOG = (1 << 28), /* Identify device log missing */ | 382 | ATA_HORKAGE_NO_ID_DEV_LOG = (1 << 28), /* Identify device log missing */ |
| 383 | ATA_HORKAGE_NO_LOG_DIR = (1 << 29), /* Do not read log directory */ | ||
| 383 | 384 | ||
| 384 | /* DMA mask for user DMA control: User visible values; DO NOT | 385 | /* DMA mask for user DMA control: User visible values; DO NOT |
| 385 | renumber */ | 386 | renumber */ |
| @@ -244,6 +244,13 @@ struct netfs_cache_ops { · 243 unmodified lines | |||
| 244 | int (*prepare_write)(struct netfs_cache_resources *cres, | 244 | int (*prepare_write)(struct netfs_cache_resources *cres, |
| 245 | loff_t *_start, size_t *_len, loff_t i_size, | 245 | loff_t *_start, size_t *_len, loff_t i_size, |
| 246 | bool no_space_allocated_yet); | 246 | bool no_space_allocated_yet); |
| 247 | |||
| 248 | /* Query the occupancy of the cache in a region, returning where the | ||
| 249 | * next chunk of data starts and how long it is. | ||
| 250 | */ | ||
| 251 | int (*query_occupancy)(struct netfs_cache_resources *cres, | ||
| 252 | loff_t start, size_t len, size_t granularity, | ||
| 253 | loff_t *_data_start, size_t *_data_len); | ||
| 247 | }; | 254 | }; |
| 248 | 255 | ||
| 249 | struct readahead_control; | 256 | struct readahead_control; |
| @@ -36,14 +36,6 @@ static inline void nfs_copy_fh(struct nfs_fh *target, const struct nfs_fh *sourc · 35 unmodified lines | |||
| 36 | memcpy(target->data, source->data, source->size); | 36 | memcpy(target->data, source->data, source->size); |
| 37 | } | 37 | } |
| 38 | 38 | ||
| 39 | |||
| 40 | /* | ||
| 41 | * This is really a general kernel constant, but since nothing like | ||
| 42 | * this is defined in the kernel headers, I have to do it here. | ||
| 43 | */ | ||
| 44 | #define NFS_OFFSET_MAX ((__s64)((~(__u64)0) >> 1)) | ||
| 45 | |||
| 46 | |||
| 47 | enum nfs3_stable_how { | 39 | enum nfs3_stable_how { |
| 48 | NFS_UNSTABLE = 0, | 40 | NFS_UNSTABLE = 0, |
| 49 | NFS_DATA_SYNC = 1, | 41 | NFS_DATA_SYNC = 1, |
| @@ -107,6 +107,7 @@ struct nfs_open_dir_context { · 106 unmodified lines | |||
| 107 | __u64 dup_cookie; | 107 | __u64 dup_cookie; |
| 108 | pgoff_t page_index; | 108 | pgoff_t page_index; |
| 109 | signed char duped; | 109 | signed char duped; |
| 110 | bool eof; | ||
| 110 | }; | 111 | }; |
| 111 | 112 | ||
| 112 | /* | 113 | /* |
| @@ -26,6 +26,9 @@ void __page_table_check_pmd_set(struct mm_struct *mm, unsigned long addr, · 25 unmodified lines | |||
| 26 | pmd_t *pmdp, pmd_t pmd); | 26 | pmd_t *pmdp, pmd_t pmd); |
| 27 | void __page_table_check_pud_set(struct mm_struct *mm, unsigned long addr, | 27 | void __page_table_check_pud_set(struct mm_struct *mm, unsigned long addr, |
| 28 | pud_t *pudp, pud_t pud); | 28 | pud_t *pudp, pud_t pud); |
| 29 | void __page_table_check_pte_clear_range(struct mm_struct *mm, | ||
| 30 | unsigned long addr, | ||
| 31 | pmd_t pmd); | ||
| 29 | 32 | ||
| 30 | static inline void page_table_check_alloc(struct page *page, unsigned int order) | 33 | static inline void page_table_check_alloc(struct page *page, unsigned int order) |
| 31 | { | 34 | { |
| @@ -100,6 +103,16 @@ static inline void page_table_check_pud_set(struct mm_struct *mm, · 68 unmodified lines | |||
| 100 | __page_table_check_pud_set(mm, addr, pudp, pud); | 103 | __page_table_check_pud_set(mm, addr, pudp, pud); |
| 101 | } | 104 | } |
| 102 | 105 | ||
| 106 | static inline void page_table_check_pte_clear_range(struct mm_struct *mm, | ||
| 107 | unsigned long addr, | ||
| 108 | pmd_t pmd) | ||
| 109 | { | ||
| 110 | if (static_branch_likely(&page_table_check_disabled)) | ||
| 111 | return; | ||
| 112 | |||
| 113 | __page_table_check_pte_clear_range(mm, addr, pmd); | ||
| 114 | } | ||
| 115 | |||
| 103 | #else | 116 | #else |
| 104 | 117 | ||
| 105 | static inline void page_table_check_alloc(struct page *page, unsigned int order) | 118 | static inline void page_table_check_alloc(struct page *page, unsigned int order) |
| @@ -143,5 +156,11 @@ static inline void page_table_check_pud_set(struct mm_struct *mm, · 37 unmodified lines | |||
| 143 | { | 156 | { |
| 144 | } | 157 | } |
| 145 | 158 | ||
| 159 | static inline void page_table_check_pte_clear_range(struct mm_struct *mm, | ||
| 160 | unsigned long addr, | ||
| 161 | pmd_t pmd) | ||
| 162 | { | ||
| 163 | } | ||
| 164 | |||
| 146 | #endif /* CONFIG_PAGE_TABLE_CHECK */ | 165 | #endif /* CONFIG_PAGE_TABLE_CHECK */ |
| 147 | #endif /* __LINUX_PAGE_TABLE_CHECK_H */ | 166 | #endif /* __LINUX_PAGE_TABLE_CHECK_H */ |
| @@ -62,6 +62,7 @@ static inline unsigned long pte_index(unsigned long address) · 61 unmodified lines | |||
| 62 | { | 62 | { |
| 63 | return (address >> PAGE_SHIFT) & (PTRS_PER_PTE - 1); | 63 | return (address >> PAGE_SHIFT) & (PTRS_PER_PTE - 1); |
| 64 | } | 64 | } |
| 65 | #define pte_index pte_index | ||
| 65 | 66 | ||
| 66 | #ifndef pmd_index | 67 | #ifndef pmd_index |
| 67 | static inline unsigned long pmd_index(unsigned long address) | 68 | static inline unsigned long pmd_index(unsigned long address) |
| @@ -123,8 +123,20 @@ static inline struct metadata_dst *tun_dst_unclone(struct sk_buff *skb) · 122 unmodified lines | |||
| 123 | 123 | ||
| 124 | memcpy(&new_md->u.tun_info, &md_dst->u.tun_info, | 124 | memcpy(&new_md->u.tun_info, &md_dst->u.tun_info, |
| 125 | sizeof(struct ip_tunnel_info) + md_size); | 125 | sizeof(struct ip_tunnel_info) + md_size); |
| 126 | #ifdef CONFIG_DST_CACHE | ||
| 127 | /* Unclone the dst cache if there is one */ | ||
| 128 | if (new_md->u.tun_info.dst_cache.cache) { | ||
| 129 | int ret; | ||
| 130 | |||
| 131 | ret = dst_cache_init(&new_md->u.tun_info.dst_cache, GFP_ATOMIC); | ||
| 132 | if (ret) { | ||
| 133 | metadata_dst_free(new_md); | ||
| 134 | return ERR_PTR(ret); | ||
| 135 | } | ||
| 136 | } | ||
| 137 | #endif | ||
| 138 | |||
| 126 | skb_dst_drop(skb); | 139 | skb_dst_drop(skb); |
| 127 | dst_hold(&new_md->dst); | ||
| 128 | skb_dst_set(skb, &new_md->dst); | 140 | skb_dst_set(skb, &new_md->dst); |
| 129 | return new_md; | 141 | return new_md; |
| 130 | } | 142 | } |
| @@ -617,6 +617,7 @@ void snd_pcm_stream_unlock(struct snd_pcm_substream *substream); · 616 unmodified lines | |||
| 617 | void snd_pcm_stream_lock_irq(struct snd_pcm_substream *substream); | 617 | void snd_pcm_stream_lock_irq(struct snd_pcm_substream *substream); |
| 618 | void snd_pcm_stream_unlock_irq(struct snd_pcm_substream *substream); | 618 | void snd_pcm_stream_unlock_irq(struct snd_pcm_substream *substream); |
| 619 | unsigned long _snd_pcm_stream_lock_irqsave(struct snd_pcm_substream *substream); | 619 | unsigned long _snd_pcm_stream_lock_irqsave(struct snd_pcm_substream *substream); |
| 620 | unsigned long _snd_pcm_stream_lock_irqsave_nested(struct snd_pcm_substream *substream); | ||
| 620 | 621 | ||
| 621 | /** | 622 | /** |
| 622 | * snd_pcm_stream_lock_irqsave - Lock the PCM stream | 623 | * snd_pcm_stream_lock_irqsave - Lock the PCM stream |
| @@ -635,6 +636,20 @@ unsigned long _snd_pcm_stream_lock_irqsave(struct snd_pcm_substream *substream); · 12 unmodified lines | |||
| 635 | void snd_pcm_stream_unlock_irqrestore(struct snd_pcm_substream *substream, | 636 | void snd_pcm_stream_unlock_irqrestore(struct snd_pcm_substream *substream, |
| 636 | unsigned long flags); | 637 | unsigned long flags); |
| 637 | 638 | ||
| 639 | /** | ||
| 640 | * snd_pcm_stream_lock_irqsave_nested - Single-nested PCM stream locking | ||
| 641 | * @substream: PCM substream | ||
| 642 | * @flags: irq flags | ||
| 643 | * | ||
| 644 | * This locks the PCM stream like snd_pcm_stream_lock_irqsave() but with | ||
| 645 | * the single-depth lockdep subclass. | ||
| 646 | */ | ||
| 647 | #define snd_pcm_stream_lock_irqsave_nested(substream, flags) \ | ||
| 648 | do { \ | ||
| 649 | typecheck(unsigned long, flags); \ | ||
| 650 | flags = _snd_pcm_stream_lock_irqsave_nested(substream); \ | ||
| 651 | } while (0) | ||
| 652 | |||
| 638 | /** | 653 | /** |
| 639 | * snd_pcm_group_for_each_entry - iterate over the linked substreams | 654 | * snd_pcm_group_for_each_entry - iterate over the linked substreams |
| 640 | * @s: the iterator | 655 | * @s: the iterator |
| @@ -1624,9 +1624,6 @@ struct kvm_enc_region { · 1623 unmodified lines | |||
| 1624 | #define KVM_S390_NORMAL_RESET _IO(KVMIO, 0xc3) | 1624 | #define KVM_S390_NORMAL_RESET _IO(KVMIO, 0xc3) |
| 1625 | #define KVM_S390_CLEAR_RESET _IO(KVMIO, 0xc4) | 1625 | #define KVM_S390_CLEAR_RESET _IO(KVMIO, 0xc4) |
| 1626 | 1626 | ||
| 1627 | /* Available with KVM_CAP_XSAVE2 */ | ||
| 1628 | #define KVM_GET_XSAVE2 _IOR(KVMIO, 0xcf, struct kvm_xsave) | ||
| 1629 | |||
| 1630 | struct kvm_s390_pv_sec_parm { | 1627 | struct kvm_s390_pv_sec_parm { |
| 1631 | __u64 origin; | 1628 | __u64 origin; |
| 1632 | __u64 length; | 1629 | __u64 length; |
| @@ -2048,4 +2045,7 @@ struct kvm_stats_desc { · 415 unmodified lines | |||
| 2048 | 2045 | ||
| 2049 | #define KVM_GET_STATS_FD _IO(KVMIO, 0xce) | 2046 | #define KVM_GET_STATS_FD _IO(KVMIO, 0xce) |
| 2050 | 2047 | ||
| 2048 | /* Available with KVM_CAP_XSAVE2 */ | ||
| 2049 | #define KVM_GET_XSAVE2 _IOR(KVMIO, 0xcf, struct kvm_xsave) | ||
| 2050 | |||
| 2051 | #endif /* __LINUX_KVM_H */ | 2051 | #endif /* __LINUX_KVM_H */ |
| @@ -106,7 +106,7 @@ enum ip_conntrack_status { · 105 unmodified lines | |||
| 106 | IPS_NAT_CLASH = IPS_UNTRACKED, | 106 | IPS_NAT_CLASH = IPS_UNTRACKED, |
| 107 | #endif | 107 | #endif |
| 108 | 108 | ||
| 109 | /* Conntrack got a helper explicitly attached via CT target. */ | 109 | /* Conntrack got a helper explicitly attached (ruleset, ctnetlink). */ |
| 110 | IPS_HELPER_BIT = 13, | 110 | IPS_HELPER_BIT = 13, |
| 111 | IPS_HELPER = (1 << IPS_HELPER_BIT), | 111 | IPS_HELPER = (1 << IPS_HELPER_BIT), |
| 112 | 112 | ||
| @@ -465,6 +465,8 @@ struct perf_event_attr { · 464 unmodified lines | |||
| 465 | /* | 465 | /* |
| 466 | * User provided data if sigtrap=1, passed back to user via | 466 | * User provided data if sigtrap=1, passed back to user via |
| 467 | * siginfo_t::si_perf_data, e.g. to permit user to identify the event. | 467 | * siginfo_t::si_perf_data, e.g. to permit user to identify the event. |
| 468 | * Note, siginfo_t::si_perf_data is long-sized, and sig_data will be | ||
| 469 | * truncated accordingly on 32 bit architectures. | ||
| 468 | */ | 470 | */ |
| 469 | __u64 sig_data; | 471 | __u64 sig_data; |
| 470 | }; | 472 | }; |
| @@ -56,8 +56,10 @@ · 55 unmodified lines | |||
| 56 | * * | 56 | * * |
| 57 | ****************************************************************************/ | 57 | ****************************************************************************/ |
| 58 | 58 | ||
| 59 | #define AES_IEC958_STATUS_SIZE 24 | ||
| 60 | |||
| 59 | struct snd_aes_iec958 { | 61 | struct snd_aes_iec958 { |
| 60 | unsigned char status[24]; /* AES/IEC958 channel status bits */ | 62 | unsigned char status[AES_IEC958_STATUS_SIZE]; /* AES/IEC958 channel status bits */ |
| 61 | unsigned char subcode[147]; /* AES/IEC958 subcode bits */ | 63 | unsigned char subcode[147]; /* AES/IEC958 subcode bits */ |
| 62 | unsigned char pad; /* nothing */ | 64 | unsigned char pad; /* nothing */ |
| 63 | unsigned char dig_subframe[4]; /* AES/IEC958 subframe bits */ | 65 | unsigned char dig_subframe[4]; /* AES/IEC958 subframe bits */ |
| @@ -47,7 +47,13 @@ struct ioctl_gntdev_grant_ref { · 46 unmodified lines | |||
| 47 | /* | 47 | /* |
| 48 | * Inserts the grant references into the mapping table of an instance | 48 | * Inserts the grant references into the mapping table of an instance |
| 49 | * of gntdev. N.B. This does not perform the mapping, which is deferred | 49 | * of gntdev. N.B. This does not perform the mapping, which is deferred |
| 50 | * until mmap() is called with @index as the offset. | 50 | * until mmap() is called with @index as the offset. @index should be |
| 51 | * considered opaque to userspace, with one exception: if no grant | ||
| 52 | * references have ever been inserted into the mapping table of this | ||
| 53 | * instance, @index will be set to 0. This is necessary to use gntdev | ||
| 54 | * with userspace APIs that expect a file descriptor that can be | ||
| 55 | * mmap()'d at offset 0, such as Wayland. If @count is set to 0, this | ||
| 56 | * ioctl will fail. | ||
| 51 | */ | 57 | */ |
| 52 | #define IOCTL_GNTDEV_MAP_GRANT_REF \ | 58 | #define IOCTL_GNTDEV_MAP_GRANT_REF \ |
| 53 | _IOC(_IOC_NONE, 'G', 0, sizeof(struct ioctl_gntdev_map_grant_ref)) | 59 | _IOC(_IOC_NONE, 'G', 0, sizeof(struct ioctl_gntdev_map_grant_ref)) |
| @@ -1,6 +1,4 @@ | |||
| 1 | /****************************************************************************** | 1 | /****************************************************************************** |
| 2 | * evtchn.h | ||
| 3 | * | ||
| 4 | * Interface to /dev/xen/xenbus_backend. | 2 | * Interface to /dev/xen/xenbus_backend. |
| 5 | * | 3 | * |
| 6 | * Copyright (c) 2011 Bastian Blank <waldi@debian.org> | 4 | * Copyright (c) 2011 Bastian Blank <waldi@debian.org> |