SPI NOR core changes: - move vendor specific code out of the core into vendor drivers. - unify all function and object names in the vendor modules. - make setup() callback optional to improve readability. - skip erase logic when the SPI_NOR_NO_ERASE flag is set at flash declaration.
Showing the changes to include (68 of 1231 files). Show all
Unified · Split
| @@ -24,14 +24,11 @@ static inline void blake2s_set_lastblock(struct blake2s_state *state) · 23 unmodified lines | ||
| 24 | 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 | 27 | /* Helper functions for BLAKE2s shared by the library and shash APIs */ |
| 31 | 28 | |
| 32 | −static inline void __blake2s_update(struct blake2s_state *state, | |
| 33 | − const u8 *in, size_t inlen, | |
| 34 | − blake2s_compress_t compress) | |
| 29 | +static __always_inline void | |
| 30 | +__blake2s_update(struct blake2s_state *state, const u8 *in, size_t inlen, | |
| 31 | + bool force_generic) | |
| 35 | 32 | { |
| 36 | 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 | 36 | return; |
| 40 | 37 | if (inlen > fill) { |
| 41 | 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 | 45 | state->buflen = 0; |
| 44 | 46 | in += fill; |
| 45 | 47 | inlen -= fill; |
| @@ -47,7 +49,12 @@ static inline void __blake2s_update(struct blake2s_state *state, · 1 unmodified line | ||
| 47 | 49 | if (inlen > BLAKE2S_BLOCK_SIZE) { |
| 48 | 50 | const size_t nblocks = DIV_ROUND_UP(inlen, BLAKE2S_BLOCK_SIZE); |
| 49 | 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 | 58 | in += BLAKE2S_BLOCK_SIZE * (nblocks - 1); |
| 52 | 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 | 62 | state->buflen += inlen; |
| 56 | 63 | } |
| 57 | 64 | |
| 58 | −static inline void __blake2s_final(struct blake2s_state *state, u8 *out, | |
| 59 | − blake2s_compress_t compress) | |
| 65 | +static __always_inline void | |
| 66 | +__blake2s_final(struct blake2s_state *state, u8 *out, bool force_generic) | |
| 60 | 67 | { |
| 61 | 68 | blake2s_set_lastblock(state); |
| 62 | 69 | memset(state->buf + state->buflen, 0, |
| 63 | 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 | 75 | cpu_to_le32_array(state->h, ARRAY_SIZE(state->h)); |
| 66 | 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 | 110 | static inline int crypto_blake2s_update(struct shash_desc *desc, |
| 101 | 111 | const u8 *in, unsigned int inlen, |
| 102 | − blake2s_compress_t compress) | |
| 112 | + bool force_generic) | |
| 103 | 113 | { |
| 104 | 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 | 117 | return 0; |
| 108 | 118 | } |
| 109 | 119 | |
| 110 | 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 | 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 | 126 | return 0; |
| 117 | 127 | } |
| 118 | 128 | |
| @@ -84,17 +84,10 @@ · 83 unmodified lines | ||
| 84 | 84 | #define DRA7_L3_MAIN_2_CLKCTRL DRA7_CLKCTRL_INDEX(0x20) |
| 85 | 85 | #define DRA7_L3_INSTR_CLKCTRL DRA7_CLKCTRL_INDEX(0x28) |
| 86 | 86 | |
| 87 | −/* iva clocks */ | |
| 88 | −#define DRA7_IVA_CLKCTRL DRA7_CLKCTRL_INDEX(0x20) | |
| 89 | −#define DRA7_SL2IF_CLKCTRL DRA7_CLKCTRL_INDEX(0x28) | |
| 90 | − | |
| 91 | 87 | /* dss clocks */ |
| 92 | 88 | #define DRA7_DSS_CORE_CLKCTRL DRA7_CLKCTRL_INDEX(0x20) |
| 93 | 89 | #define DRA7_BB2D_CLKCTRL DRA7_CLKCTRL_INDEX(0x30) |
| 94 | 90 | |
| 95 | −/* gpu clocks */ | |
| 96 | −#define DRA7_GPU_CLKCTRL DRA7_CLKCTRL_INDEX(0x20) | |
| 97 | − | |
| 98 | 91 | /* l3init clocks */ |
| 99 | 92 | #define DRA7_MMC1_CLKCTRL DRA7_CLKCTRL_INDEX(0x28) |
| 100 | 93 | #define DRA7_MMC2_CLKCTRL DRA7_CLKCTRL_INDEX(0x30) |
| @@ -267,10 +260,17 @@ · 166 unmodified lines | ||
| 267 | 260 | #define DRA7_L3INSTR_L3_MAIN_2_CLKCTRL DRA7_CLKCTRL_INDEX(0x20) |
| 268 | 261 | #define DRA7_L3INSTR_L3_INSTR_CLKCTRL DRA7_CLKCTRL_INDEX(0x28) |
| 269 | 262 | |
| 263 | +/* iva clocks */ | |
| 264 | +#define DRA7_IVA_CLKCTRL DRA7_CLKCTRL_INDEX(0x20) | |
| 265 | +#define DRA7_SL2IF_CLKCTRL DRA7_CLKCTRL_INDEX(0x28) | |
| 266 | + | |
| 270 | 267 | /* dss clocks */ |
| 271 | 268 | #define DRA7_DSS_DSS_CORE_CLKCTRL DRA7_CLKCTRL_INDEX(0x20) |
| 272 | 269 | #define DRA7_DSS_BB2D_CLKCTRL DRA7_CLKCTRL_INDEX(0x30) |
| 273 | 270 | |
| 271 | +/* gpu clocks */ | |
| 272 | +#define DRA7_GPU_CLKCTRL DRA7_CLKCTRL_INDEX(0x20) | |
| 273 | + | |
| 274 | 274 | /* l3init clocks */ |
| 275 | 275 | #define DRA7_L3INIT_MMC1_CLKCTRL DRA7_CLKCTRL_INDEX(0x28) |
| 276 | 276 | #define DRA7_L3INIT_MMC2_CLKCTRL DRA7_CLKCTRL_INDEX(0x30) |
| @@ -324,12 +324,12 @@ enum { · 323 unmodified lines | ||
| 324 | 324 | ATA_LOG_NCQ_NON_DATA = 0x12, |
| 325 | 325 | ATA_LOG_NCQ_SEND_RECV = 0x13, |
| 326 | 326 | ATA_LOG_IDENTIFY_DEVICE = 0x30, |
| 327 | + ATA_LOG_CONCURRENT_POSITIONING_RANGES = 0x47, | |
| 327 | 328 | |
| 328 | 329 | /* Identify device log pages: */ |
| 329 | 330 | ATA_LOG_SECURITY = 0x06, |
| 330 | 331 | ATA_LOG_SATA_SETTINGS = 0x08, |
| 331 | 332 | ATA_LOG_ZONED_INFORMATION = 0x09, |
| 332 | − ATA_LOG_CONCURRENT_POSITIONING_RANGES = 0x47, | |
| 333 | 333 | |
| 334 | 334 | /* Identify device SATA settings log:*/ |
| 335 | 335 | ATA_LOG_DEVSLP_OFFSET = 0x30, |
| @@ -748,7 +748,8 @@ extern bool blk_queue_can_use_dma_map_merging(struct request_queue *q, · 747 unmodified lines | ||
| 748 | 748 | |
| 749 | 749 | bool __must_check blk_get_queue(struct request_queue *); |
| 750 | 750 | extern void blk_put_queue(struct request_queue *); |
| 751 | −extern void blk_set_queue_dying(struct request_queue *); | |
| 751 | + | |
| 752 | +void blk_mark_disk_dead(struct gendisk *disk); | |
| 752 | 753 | |
| 753 | 754 | #ifdef CONFIG_BLOCK |
| 754 | 755 | /* |
| @@ -1258,6 +1259,7 @@ unsigned long disk_start_io_acct(struct gendisk *disk, unsigned int sectors, · 503 unmodified lines | ||
| 1258 | 1259 | void disk_end_io_acct(struct gendisk *disk, unsigned int op, |
| 1259 | 1260 | unsigned long start_time); |
| 1260 | 1261 | |
| 1262 | +void bio_start_io_acct_time(struct bio *bio, unsigned long start_time); | |
| 1261 | 1263 | unsigned long bio_start_io_acct(struct bio *bio); |
| 1262 | 1264 | void bio_end_io_acct_remapped(struct bio *bio, unsigned long start_time, |
| 1263 | 1265 | struct block_device *orig_bdev); |
| @@ -35,6 +35,7 @@ · 34 unmodified lines | ||
| 35 | 35 | #define CEPH_OPT_TCP_NODELAY (1<<4) /* TCP_NODELAY on TCP sockets */ |
| 36 | 36 | #define CEPH_OPT_NOMSGSIGN (1<<5) /* don't sign msgs (msgr1) */ |
| 37 | 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 | 40 | #define CEPH_OPT_DEFAULT (CEPH_OPT_TCP_NODELAY) |
| 40 | 41 | |
| @@ -383,6 +383,10 @@ struct ceph_connection_v2_info { · 382 unmodified lines | ||
| 383 | 383 | struct ceph_gcm_nonce in_gcm_nonce; |
| 384 | 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 | 390 | struct page **out_enc_pages; |
| 387 | 391 | int out_enc_page_cnt; |
| 388 | 392 | int out_enc_resid; |
| @@ -457,6 +461,7 @@ struct ceph_connection { · 68 unmodified lines | ||
| 457 | 461 | struct ceph_msg *out_msg; /* sending message (== tail of |
| 458 | 462 | out_sent) */ |
| 459 | 463 | |
| 464 | + struct page *bounce_page; | |
| 460 | 465 | u32 in_front_crc, in_middle_crc, in_data_crc; /* calculated crc */ |
| 461 | 466 | |
| 462 | 467 | struct timespec64 last_keepalive_ack; /* keepalive2 ack stamp */ |
| @@ -117,14 +117,6 @@ void ftrace_likely_update(struct ftrace_likely_data *f, int val, · 116 unmodified lines | ||
| 117 | 117 | */ |
| 118 | 118 | #define __stringify_label(n) #n |
| 119 | 119 | |
| 120 | −#define __annotate_reachable(c) ({ \ | |
| 121 | − asm volatile(__stringify_label(c) ":\n\t" \ | |
| 122 | − ".pushsection .discard.reachable\n\t" \ | |
| 123 | − ".long " __stringify_label(c) "b - .\n\t" \ | |
| 124 | − ".popsection\n\t" : : "i" (c)); \ | |
| 125 | −}) | |
| 126 | −#define annotate_reachable() __annotate_reachable(__COUNTER__) | |
| 127 | − | |
| 128 | 120 | #define __annotate_unreachable(c) ({ \ |
| 129 | 121 | asm volatile(__stringify_label(c) ":\n\t" \ |
| 130 | 122 | ".pushsection .discard.unreachable\n\t" \ |
| @@ -133,24 +125,21 @@ void ftrace_likely_update(struct ftrace_likely_data *f, int val, · 2 unmodified lines | ||
| 133 | 125 | }) |
| 134 | 126 | #define annotate_unreachable() __annotate_unreachable(__COUNTER__) |
| 135 | 127 | |
| 136 | −#define ASM_UNREACHABLE \ | |
| 137 | − "999:\n\t" \ | |
| 138 | − ".pushsection .discard.unreachable\n\t" \ | |
| 139 | − ".long 999b - .\n\t" \ | |
| 128 | +#define ASM_REACHABLE \ | |
| 129 | + "998:\n\t" \ | |
| 130 | + ".pushsection .discard.reachable\n\t" \ | |
| 131 | + ".long 998b - .\n\t" \ | |
| 140 | 132 | ".popsection\n\t" |
| 141 | 133 | |
| 142 | 134 | /* Annotate a C jump table to allow objtool to follow the code flow */ |
| 143 | 135 | #define __annotate_jump_table __section(".rodata..c_jump_table") |
| 144 | 136 | |
| 145 | 137 | #else |
| 146 | −#define annotate_reachable() | |
| 147 | 138 | #define annotate_unreachable() |
| 139 | +# define ASM_REACHABLE | |
| 148 | 140 | #define __annotate_jump_table |
| 149 | 141 | #endif |
| 150 | 142 | |
| 151 | −#ifndef ASM_UNREACHABLE | |
| 152 | −# define ASM_UNREACHABLE | |
| 153 | −#endif | |
| 154 | 143 | #ifndef unreachable |
| 155 | 144 | # define unreachable() do { \ |
| 156 | 145 | annotate_unreachable(); \ |
| @@ -111,7 +111,7 @@ struct ethtool_link_ext_state_info { · 110 unmodified lines | ||
| 111 | 111 | enum ethtool_link_ext_substate_bad_signal_integrity bad_signal_integrity; |
| 112 | 112 | enum ethtool_link_ext_substate_cable_issue cable_issue; |
| 113 | 113 | enum ethtool_link_ext_substate_module module; |
| 114 | − u8 __link_ext_substate; | |
| 114 | + u32 __link_ext_substate; | |
| 115 | 115 | }; |
| 116 | 116 | }; |
| 117 | 117 | |
| @@ -262,7 +262,7 @@ struct fb_ops { · 261 unmodified lines | ||
| 262 | 262 | |
| 263 | 263 | /* Draws a rectangle */ |
| 264 | 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 | 266 | void (*fb_copyarea) (struct fb_info *info, const struct fb_copyarea *region); |
| 267 | 267 | /* Draws a image to the display */ |
| 268 | 268 | void (*fb_imageblit) (struct fb_info *info, const struct fb_image *image); |
| @@ -1483,7 +1483,7 @@ struct super_block { · 1482 unmodified lines | ||
| 1483 | 1483 | #ifdef CONFIG_FS_VERITY |
| 1484 | 1484 | const struct fsverity_operations *s_vop; |
| 1485 | 1485 | #endif |
| 1486 | −#ifdef CONFIG_UNICODE | |
| 1486 | +#if IS_ENABLED(CONFIG_UNICODE) | |
| 1487 | 1487 | struct unicode_map *s_encoding; |
| 1488 | 1488 | __u16 s_encoding_flags; |
| 1489 | 1489 | #endif |
| @@ -224,6 +224,43 @@ static inline void fsnotify_link(struct inode *dir, struct inode *inode, · 223 unmodified lines | ||
| 224 | 224 | dir, &new_dentry->d_name, 0); |
| 225 | 225 | } |
| 226 | 226 | |
| 227 | +/* | |
| 228 | + * fsnotify_delete - @dentry was unlinked and unhashed | |
| 229 | + * | |
| 230 | + * Caller must make sure that dentry->d_name is stable. | |
| 231 | + * | |
| 232 | + * Note: unlike fsnotify_unlink(), we have to pass also the unlinked inode | |
| 233 | + * as this may be called after d_delete() and old_dentry may be negative. | |
| 234 | + */ | |
| 235 | +static inline void fsnotify_delete(struct inode *dir, struct inode *inode, | |
| 236 | + struct dentry *dentry) | |
| 237 | +{ | |
| 238 | + __u32 mask = FS_DELETE; | |
| 239 | + | |
| 240 | + if (S_ISDIR(inode->i_mode)) | |
| 241 | + mask |= FS_ISDIR; | |
| 242 | + | |
| 243 | + fsnotify_name(mask, inode, FSNOTIFY_EVENT_INODE, dir, &dentry->d_name, | |
| 244 | + 0); | |
| 245 | +} | |
| 246 | + | |
| 247 | +/** | |
| 248 | + * d_delete_notify - delete a dentry and call fsnotify_delete() | |
| 249 | + * @dentry: The dentry to delete | |
| 250 | + * | |
| 251 | + * This helper is used to guaranty that the unlinked inode cannot be found | |
| 252 | + * by lookup of this name after fsnotify_delete() event has been delivered. | |
| 253 | + */ | |
| 254 | +static inline void d_delete_notify(struct inode *dir, struct dentry *dentry) | |
| 255 | +{ | |
| 256 | + struct inode *inode = d_inode(dentry); | |
| 257 | + | |
| 258 | + ihold(inode); | |
| 259 | + d_delete(dentry); | |
| 260 | + fsnotify_delete(dir, inode, dentry); | |
| 261 | + iput(inode); | |
| 262 | +} | |
| 263 | + | |
| 227 | 264 | /* |
| 228 | 265 | * fsnotify_unlink - 'name' was unlinked |
| 229 | 266 | * |
| @@ -231,10 +268,10 @@ static inline void fsnotify_link(struct inode *dir, struct inode *inode, · 1 unmodified line | ||
| 231 | 268 | */ |
| 232 | 269 | static inline void fsnotify_unlink(struct inode *dir, struct dentry *dentry) |
| 233 | 270 | { |
| 234 | − /* Expected to be called before d_delete() */ | |
| 235 | − WARN_ON_ONCE(d_is_negative(dentry)); | |
| 271 | + if (WARN_ON_ONCE(d_is_negative(dentry))) | |
| 272 | + return; | |
| 236 | 273 | |
| 237 | − fsnotify_dirent(dir, dentry, FS_DELETE); | |
| 274 | + fsnotify_delete(dir, d_inode(dentry), dentry); | |
| 238 | 275 | } |
| 239 | 276 | |
| 240 | 277 | /* |
| @@ -258,10 +295,10 @@ static inline void fsnotify_mkdir(struct inode *dir, struct dentry *dentry) · 17 unmodified lines | ||
| 258 | 295 | */ |
| 259 | 296 | static inline void fsnotify_rmdir(struct inode *dir, struct dentry *dentry) |
| 260 | 297 | { |
| 261 | − /* Expected to be called before d_delete() */ | |
| 262 | − WARN_ON_ONCE(d_is_negative(dentry)); | |
| 298 | + if (WARN_ON_ONCE(d_is_negative(dentry))) | |
| 299 | + return; | |
| 263 | 300 | |
| 264 | − fsnotify_dirent(dir, dentry, FS_DELETE | FS_ISDIR); | |
| 301 | + fsnotify_delete(dir, d_inode(dentry), dentry); | |
| 265 | 302 | } |
| 266 | 303 | |
| 267 | 304 | /* |
| @@ -1262,6 +1262,7 @@ struct hv_device { · 1261 unmodified lines | ||
| 1262 | 1262 | struct vmbus_channel *channel; |
| 1263 | 1263 | struct kset *channels_kset; |
| 1264 | 1264 | struct device_dma_parameters dma_parms; |
| 1265 | + u64 dma_mask; | |
| 1265 | 1266 | |
| 1266 | 1267 | /* place holder to keep track of the dir for hv device in debugfs */ |
| 1267 | 1268 | struct dentry *debug_dir; |
| @@ -46,8 +46,10 @@ struct vlan_hdr { · 45 unmodified lines | ||
| 46 | 46 | * @h_vlan_encapsulated_proto: packet type ID or len |
| 47 | 47 | */ |
| 48 | 48 | struct vlan_ethhdr { |
| 49 | − unsigned char h_dest[ETH_ALEN]; | |
| 50 | − unsigned char h_source[ETH_ALEN]; | |
| 49 | + struct_group(addrs, | |
| 50 | + unsigned char h_dest[ETH_ALEN]; | |
| 51 | + unsigned char h_source[ETH_ALEN]; | |
| 52 | + ); | |
| 51 | 53 | __be16 h_vlan_proto; |
| 52 | 54 | __be16 h_vlan_TCI; |
| 53 | 55 | __be16 h_vlan_encapsulated_proto; |
| @@ -263,9 +263,11 @@ struct iomap_ioend { · 262 unmodified lines | ||
| 263 | 263 | struct list_head io_list; /* next ioend in chain */ |
| 264 | 264 | u16 io_type; |
| 265 | 265 | u16 io_flags; /* IOMAP_F_* */ |
| 266 | + u32 io_folios; /* folios added to ioend */ | |
| 266 | 267 | struct inode *io_inode; /* file being written to */ |
| 267 | 268 | size_t io_size; /* size of the extent */ |
| 268 | 269 | loff_t io_offset; /* offset in the file */ |
| 270 | + sector_t io_sector; /* start sector of ioend */ | |
| 269 | 271 | struct bio *io_bio; /* bio being built */ |
| 270 | 272 | struct bio io_inline_bio; /* MUST BE LAST! */ |
| 271 | 273 | }; |
| @@ -594,7 +594,7 @@ struct transaction_s · 593 unmodified lines | ||
| 594 | 594 | */ |
| 595 | 595 | unsigned long t_log_start; |
| 596 | 596 | |
| 597 | − /* | |
| 597 | + /* | |
| 598 | 598 | * Number of buffers on the t_buffers list [j_list_lock, no locks |
| 599 | 599 | * needed for jbd2 thread] |
| 600 | 600 | */ |
| @@ -1295,7 +1295,7 @@ struct journal_s · 694 unmodified lines | ||
| 1295 | 1295 | * Clean-up after fast commit or full commit. JBD2 calls this function |
| 1296 | 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 | 1301 | * @j_fc_replay_callback: |
| @@ -1419,9 +1419,7 @@ extern void jbd2_journal_unfile_buffer(journal_t *, struct journal_head *); · 117 unmodified lines | ||
| 1419 | 1419 | extern bool __jbd2_journal_refile_buffer(struct journal_head *); |
| 1420 | 1420 | extern void jbd2_journal_refile_buffer(journal_t *, struct journal_head *); |
| 1421 | 1421 | extern void __jbd2_journal_file_buffer(struct journal_head *, transaction_t *, int); |
| 1422 | −extern void __journal_free_buffer(struct journal_head *bh); | |
| 1423 | 1422 | extern void jbd2_journal_file_buffer(struct journal_head *, transaction_t *, int); |
| 1424 | −extern void __journal_clean_data_list(transaction_t *transaction); | |
| 1425 | 1423 | static inline void jbd2_file_log_bh(struct list_head *head, struct buffer_head *bh) |
| 1426 | 1424 | { |
| 1427 | 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 | 1484 | struct buffer_head **bh_out, |
| 1487 | 1485 | sector_t blocknr); |
| 1488 | 1486 | |
| 1489 | −/* Transaction locking */ | |
| 1490 | −extern void __wait_on_journal (journal_t *); | |
| 1491 | − | |
| 1492 | 1487 | /* Transaction cache support */ |
| 1493 | 1488 | extern void jbd2_journal_destroy_transaction_cache(void); |
| 1494 | 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 | 1538 | extern void jbd2_journal_lock_updates (journal_t *); |
| 1544 | 1539 | extern void jbd2_journal_unlock_updates (journal_t *); |
| 1545 | 1540 | |
| 1541 | +void jbd2_journal_wait_updates(journal_t *); | |
| 1542 | + | |
| 1546 | 1543 | extern journal_t * jbd2_journal_init_dev(struct block_device *bdev, |
| 1547 | 1544 | struct block_device *fs_dev, |
| 1548 | 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 | 1771 | #define BJ_Reserved 4 /* Buffer is reserved for access by journal */ |
| 1775 | 1772 | #define BJ_Types 5 |
| 1776 | 1773 | |
| 1777 | −extern int jbd_blocks_per_page(struct inode *inode); | |
| 1778 | − | |
| 1779 | 1774 | /* JBD uses a CRC32 checksum */ |
| 1780 | 1775 | #define JBD_MAX_CHECKSUM_SIZE 4 |
| 1781 | 1776 | |
| @@ -17,6 +17,8 @@ · 16 unmodified lines | ||
| 17 | 17 | #include <linux/atomic.h> |
| 18 | 18 | #include <linux/static_key.h> |
| 19 | 19 | |
| 20 | +extern unsigned long kfence_sample_interval; | |
| 21 | + | |
| 20 | 22 | /* |
| 21 | 23 | * We allocate an even number of pages, as it simplifies calculations to map |
| 22 | 24 | * address to metadata indices; effectively, the very first page serves as an |
| @@ -29,7 +29,9 @@ · 28 unmodified lines | ||
| 29 | 29 | #include <linux/refcount.h> |
| 30 | 30 | #include <linux/nospec.h> |
| 31 | 31 | #include <linux/notifier.h> |
| 32 | +#include <linux/ftrace.h> | |
| 32 | 33 | #include <linux/hashtable.h> |
| 34 | +#include <linux/instrumentation.h> | |
| 33 | 35 | #include <linux/interval_tree.h> |
| 34 | 36 | #include <linux/rbtree.h> |
| 35 | 37 | #include <linux/xarray.h> |
| @@ -368,8 +370,11 @@ struct kvm_vcpu { · 332 unmodified lines | ||
| 368 | 370 | u64 last_used_slot_gen; |
| 369 | 371 | }; |
| 370 | 372 | |
| 371 | −/* must be called with irqs disabled */ | |
| 372 | −static __always_inline void guest_enter_irqoff(void) | |
| 373 | +/* | |
| 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 | 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 | 383 | instrumentation_begin(); |
| 379 | 384 | vtime_account_guest_enter(); |
| 380 | 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 | 399 | * KVM does not hold any references to rcu protected data when it |
| 384 | 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 | 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 | 470 | instrumentation_begin(); |
| 402 | 471 | /* Flush the guest cputime we spent on the guest */ |
| 403 | 472 | vtime_account_guest_exit(); |
| 404 | 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 | 486 | static inline void guest_exit(void) |
| 408 | 487 | { |
| 409 | 488 | unsigned long flags; |
| @@ -413,6 +492,33 @@ static inline void guest_exit(void) · 3 unmodified lines | ||
| 413 | 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 | 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 | 380 | ATA_HORKAGE_MAX_TRIM_128M = (1 << 26), /* Limit max trim size to 128M */ |
| 381 | 381 | ATA_HORKAGE_NO_NCQ_ON_ATI = (1 << 27), /* Disable NCQ on ATI chipset */ |
| 382 | 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 | 385 | /* DMA mask for user DMA control: User visible values; DO NOT |
| 385 | 386 | renumber */ |
| @@ -80,7 +80,7 @@ LSM_HOOK(int, 0, sb_clone_mnt_opts, const struct super_block *oldsb, · 79 unmodified lines | ||
| 80 | 80 | unsigned long *set_kern_flags) |
| 81 | 81 | LSM_HOOK(int, 0, move_mount, const struct path *from_path, |
| 82 | 82 | const struct path *to_path) |
| 83 | −LSM_HOOK(int, 0, dentry_init_security, struct dentry *dentry, | |
| 83 | +LSM_HOOK(int, -EOPNOTSUPP, dentry_init_security, struct dentry *dentry, | |
| 84 | 84 | int mode, const struct qstr *name, const char **xattr_name, |
| 85 | 85 | void **ctx, u32 *ctxlen) |
| 86 | 86 | LSM_HOOK(int, 0, dentry_create_files_as, struct dentry *dentry, int mode, |
| @@ -219,7 +219,7 @@ struct obj_cgroup { · 218 unmodified lines | ||
| 219 | 219 | struct mem_cgroup *memcg; |
| 220 | 220 | atomic_t nr_charged_bytes; |
| 221 | 221 | union { |
| 222 | − struct list_head list; | |
| 222 | + struct list_head list; /* protected by objcg_lock */ | |
| 223 | 223 | struct rcu_head rcu; |
| 224 | 224 | }; |
| 225 | 225 | }; |
| @@ -315,7 +315,8 @@ struct mem_cgroup { · 89 unmodified lines | ||
| 315 | 315 | #ifdef CONFIG_MEMCG_KMEM |
| 316 | 316 | int kmemcg_id; |
| 317 | 317 | struct obj_cgroup __rcu *objcg; |
| 318 | − struct list_head objcg_list; /* list of inherited objcgs */ | |
| 318 | + /* list of inherited objcgs, protected by objcg_lock */ | |
| 319 | + struct list_head objcg_list; | |
| 319 | 320 | #endif |
| 320 | 321 | |
| 321 | 322 | MEMCG_PADDING(_pad2_); |
| @@ -1506,11 +1506,18 @@ static inline u8 page_kasan_tag(const struct page *page) · 1505 unmodified lines | ||
| 1506 | 1506 | |
| 1507 | 1507 | static inline void page_kasan_tag_set(struct page *page, u8 tag) |
| 1508 | 1508 | { |
| 1509 | − if (kasan_enabled()) { | |
| 1510 | − tag ^= 0xff; | |
| 1511 | − page->flags &= ~(KASAN_TAG_MASK << KASAN_TAG_PGSHIFT); | |
| 1512 | − page->flags |= (tag & KASAN_TAG_MASK) << KASAN_TAG_PGSHIFT; | |
| 1513 | − } | |
| 1509 | + unsigned long old_flags, flags; | |
| 1510 | + | |
| 1511 | + if (!kasan_enabled()) | |
| 1512 | + return; | |
| 1513 | + | |
| 1514 | + tag ^= 0xff; | |
| 1515 | + old_flags = READ_ONCE(page->flags); | |
| 1516 | + do { | |
| 1517 | + flags = old_flags; | |
| 1518 | + flags &= ~(KASAN_TAG_MASK << KASAN_TAG_PGSHIFT); | |
| 1519 | + flags |= (tag & KASAN_TAG_MASK) << KASAN_TAG_PGSHIFT; | |
| 1520 | + } while (unlikely(!try_cmpxchg(&page->flags, &old_flags, flags))); | |
| 1514 | 1521 | } |
| 1515 | 1522 | |
| 1516 | 1523 | static inline void page_kasan_tag_reset(struct page *page) |
| @@ -261,6 +261,7 @@ static_assert(sizeof(struct page) == sizeof(struct folio)); · 260 unmodified lines | ||
| 261 | 261 | static_assert(offsetof(struct page, pg) == offsetof(struct folio, fl)) |
| 262 | 262 | FOLIO_MATCH(flags, flags); |
| 263 | 263 | FOLIO_MATCH(lru, lru); |
| 264 | +FOLIO_MATCH(mapping, mapping); | |
| 264 | 265 | FOLIO_MATCH(compound_head, lru); |
| 265 | 266 | FOLIO_MATCH(index, index); |
| 266 | 267 | FOLIO_MATCH(private, private); |
| @@ -47,8 +47,6 @@ · 46 unmodified lines | ||
| 47 | 47 | #define SPINOR_OP_RDID 0x9f /* Read JEDEC ID */ |
| 48 | 48 | #define SPINOR_OP_RDSFDP 0x5a /* Read SFDP */ |
| 49 | 49 | #define SPINOR_OP_RDCR 0x35 /* Read configuration register */ |
| 50 | −#define SPINOR_OP_RDFSR 0x70 /* Read flag status register */ | |
| 51 | −#define SPINOR_OP_CLFSR 0x50 /* Clear flag status register */ | |
| 52 | 50 | #define SPINOR_OP_RDEAR 0xc8 /* Read Extended Address Register */ |
| 53 | 51 | #define SPINOR_OP_WREAR 0xc5 /* Write Extended Address Register */ |
| 54 | 52 | #define SPINOR_OP_SRSTEN 0x66 /* Software Reset Enable */ |
| @@ -86,22 +84,12 @@ · 31 unmodified lines | ||
| 86 | 84 | #define SPINOR_OP_BP 0x02 /* Byte program */ |
| 87 | 85 | #define SPINOR_OP_AAI_WP 0xad /* Auto address increment word program */ |
| 88 | 86 | |
| 89 | −/* Used for S3AN flashes only */ | |
| 90 | −#define SPINOR_OP_XSE 0x50 /* Sector erase */ | |
| 91 | −#define SPINOR_OP_XPP 0x82 /* Page program */ | |
| 92 | −#define SPINOR_OP_XRDSR 0xd7 /* Read status register */ | |
| 93 | − | |
| 94 | −#define XSR_PAGESIZE BIT(0) /* Page size in Po2 or Linear */ | |
| 95 | −#define XSR_RDY BIT(7) /* Ready */ | |
| 96 | − | |
| 97 | − | |
| 98 | 87 | /* Used for Macronix and Winbond flashes. */ |
| 99 | 88 | #define SPINOR_OP_EN4B 0xb7 /* Enter 4-byte mode */ |
| 100 | 89 | #define SPINOR_OP_EX4B 0xe9 /* Exit 4-byte mode */ |
| 101 | 90 | |
| 102 | 91 | /* Used for Spansion flashes only. */ |
| 103 | 92 | #define SPINOR_OP_BRWR 0x17 /* Bank register write */ |
| 104 | −#define SPINOR_OP_CLSR 0x30 /* Clear status register 1 */ | |
| 105 | 93 | |
| 106 | 94 | /* Used for Micron flashes only. */ |
| 107 | 95 | #define SPINOR_OP_RD_EVCR 0x65 /* Read EVCR register */ |
| @@ -135,12 +123,6 @@ · 27 unmodified lines | ||
| 135 | 123 | /* Enhanced Volatile Configuration Register bits */ |
| 136 | 124 | #define EVCR_QUAD_EN_MICRON BIT(7) /* Micron Quad I/O */ |
| 137 | 125 | |
| 138 | −/* Flag Status Register bits */ | |
| 139 | −#define FSR_READY BIT(7) /* Device status, 0 = Busy, 1 = Ready */ | |
| 140 | −#define FSR_E_ERR BIT(5) /* Erase operation status */ | |
| 141 | −#define FSR_P_ERR BIT(4) /* Program operation status */ | |
| 142 | −#define FSR_PT_ERR BIT(1) /* Protection error bit */ | |
| 143 | − | |
| 144 | 126 | /* Status Register 2 bits. */ |
| 145 | 127 | #define SR2_QUAD_EN_BIT1 BIT(1) |
| 146 | 128 | #define SR2_LB1 BIT(3) /* Security Register Lock Bit 1 */ |
| @@ -2158,7 +2158,7 @@ struct net_device { · 2157 unmodified lines | ||
| 2158 | 2158 | struct netdev_queue *_tx ____cacheline_aligned_in_smp; |
| 2159 | 2159 | unsigned int num_tx_queues; |
| 2160 | 2160 | unsigned int real_num_tx_queues; |
| 2161 | − struct Qdisc *qdisc; | |
| 2161 | + struct Qdisc __rcu *qdisc; | |
| 2162 | 2162 | unsigned int tx_queue_len; |
| 2163 | 2163 | spinlock_t tx_global_lock; |
| 2164 | 2164 | |
| @@ -2548,6 +2548,7 @@ struct packet_type { · 383 unmodified lines | ||
| 2548 | 2548 | struct net_device *); |
| 2549 | 2549 | bool (*id_match)(struct packet_type *ptype, |
| 2550 | 2550 | struct sock *sk); |
| 2551 | + struct net *af_packet_net; | |
| 2551 | 2552 | void *af_packet_priv; |
| 2552 | 2553 | struct list_head list; |
| 2553 | 2554 | }; |
| @@ -244,6 +244,13 @@ struct netfs_cache_ops { · 243 unmodified lines | ||
| 244 | 244 | int (*prepare_write)(struct netfs_cache_resources *cres, |
| 245 | 245 | loff_t *_start, size_t *_len, loff_t i_size, |
| 246 | 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 | 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 | 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 | 39 | enum nfs3_stable_how { |
| 48 | 40 | NFS_UNSTABLE = 0, |
| 49 | 41 | NFS_DATA_SYNC = 1, |
| @@ -61,7 +61,9 @@ · 60 unmodified lines | ||
| 61 | 61 | struct nfs_access_entry { |
| 62 | 62 | struct rb_node rb_node; |
| 63 | 63 | struct list_head lru; |
| 64 | − const struct cred * cred; | |
| 64 | + kuid_t fsuid; | |
| 65 | + kgid_t fsgid; | |
| 66 | + struct group_info *group_info; | |
| 65 | 67 | __u32 mask; |
| 66 | 68 | struct rcu_head rcu_head; |
| 67 | 69 | }; |
| @@ -105,6 +107,7 @@ struct nfs_open_dir_context { · 37 unmodified lines | ||
| 105 | 107 | __u64 dup_cookie; |
| 106 | 108 | pgoff_t page_index; |
| 107 | 109 | signed char duped; |
| 110 | + bool eof; | |
| 108 | 111 | }; |
| 109 | 112 | |
| 110 | 113 | /* |
| @@ -395,7 +398,7 @@ extern int nfs_post_op_update_inode_force_wcc(struct inode *inode, struct nfs_fa · 284 unmodified lines | ||
| 395 | 398 | extern int nfs_post_op_update_inode_force_wcc_locked(struct inode *inode, struct nfs_fattr *fattr); |
| 396 | 399 | extern int nfs_getattr(struct user_namespace *, const struct path *, |
| 397 | 400 | struct kstat *, u32, unsigned int); |
| 398 | −extern void nfs_access_add_cache(struct inode *, struct nfs_access_entry *); | |
| 401 | +extern void nfs_access_add_cache(struct inode *, struct nfs_access_entry *, const struct cred *); | |
| 399 | 402 | extern void nfs_access_set_mask(struct nfs_access_entry *, u32); |
| 400 | 403 | extern int nfs_permission(struct user_namespace *, struct inode *, int); |
| 401 | 404 | extern int nfs_open(struct inode *, struct file *); |
| @@ -532,8 +535,8 @@ extern int nfs_instantiate(struct dentry *dentry, struct nfs_fh *fh, · 130 unmodified lines | ||
| 532 | 535 | struct nfs_fattr *fattr); |
| 533 | 536 | extern int nfs_may_open(struct inode *inode, const struct cred *cred, int openflags); |
| 534 | 537 | extern void nfs_access_zap_cache(struct inode *inode); |
| 535 | −extern int nfs_access_get_cached(struct inode *inode, const struct cred *cred, struct nfs_access_entry *res, | |
| 536 | − bool may_block); | |
| 538 | +extern int nfs_access_get_cached(struct inode *inode, const struct cred *cred, | |
| 539 | + u32 *mask, bool may_block); | |
| 537 | 540 | |
| 538 | 541 | /* |
| 539 | 542 | * linux/fs/nfs/symlink.c |
| @@ -266,6 +266,8 @@ struct nfs_server { · 265 unmodified lines | ||
| 266 | 266 | #define NFS_CAP_ACLS (1U << 3) |
| 267 | 267 | #define NFS_CAP_ATOMIC_OPEN (1U << 4) |
| 268 | 268 | #define NFS_CAP_LGOPEN (1U << 5) |
| 269 | +#define NFS_CAP_CASE_INSENSITIVE (1U << 6) | |
| 270 | +#define NFS_CAP_CASE_PRESERVING (1U << 7) | |
| 269 | 271 | #define NFS_CAP_POSIX_LOCK (1U << 14) |
| 270 | 272 | #define NFS_CAP_UIDGID_NOMAP (1U << 15) |
| 271 | 273 | #define NFS_CAP_STATEID_NFSV41 (1U << 16) |
| @@ -282,5 +284,5 @@ struct nfs_server { · 10 unmodified lines | ||
| 282 | 284 | #define NFS_CAP_COPY_NOTIFY (1U << 27) |
| 283 | 285 | #define NFS_CAP_XATTR (1U << 28) |
| 284 | 286 | #define NFS_CAP_READ_PLUS (1U << 29) |
| 285 | − | |
| 287 | +#define NFS_CAP_FS_LOCATIONS (1U << 30) | |
| 286 | 288 | #endif |
| @@ -1194,6 +1194,8 @@ struct nfs4_server_caps_res { · 1193 unmodified lines | ||
| 1194 | 1194 | u32 has_links; |
| 1195 | 1195 | u32 has_symlinks; |
| 1196 | 1196 | u32 fh_expire_type; |
| 1197 | + u32 case_insensitive; | |
| 1198 | + u32 case_preserving; | |
| 1197 | 1199 | }; |
| 1198 | 1200 | |
| 1199 | 1201 | #define NFS4_PATHNAME_MAXCOMPONENTS 512 |
| @@ -1737,7 +1739,7 @@ struct nfs_rpc_ops { · 537 unmodified lines | ||
| 1737 | 1739 | struct nfs_fh *, struct nfs_fattr *); |
| 1738 | 1740 | int (*lookupp) (struct inode *, struct nfs_fh *, |
| 1739 | 1741 | struct nfs_fattr *); |
| 1740 | − int (*access) (struct inode *, struct nfs_access_entry *); | |
| 1742 | + int (*access) (struct inode *, struct nfs_access_entry *, const struct cred *); | |
| 1741 | 1743 | int (*readlink)(struct inode *, struct page *, unsigned int, |
| 1742 | 1744 | unsigned int); |
| 1743 | 1745 | int (*create) (struct inode *, struct dentry *, |
| @@ -1795,6 +1797,7 @@ struct nfs_rpc_ops { · 51 unmodified lines | ||
| 1795 | 1797 | struct nfs_server *(*create_server)(struct fs_context *); |
| 1796 | 1798 | struct nfs_server *(*clone_server)(struct nfs_server *, struct nfs_fh *, |
| 1797 | 1799 | struct nfs_fattr *, rpc_authflavor_t); |
| 1800 | + int (*discover_trunking)(struct nfs_server *, struct nfs_fh *); | |
| 1798 | 1801 | }; |
| 1799 | 1802 | |
| 1800 | 1803 | /* |
| @@ -26,6 +26,9 @@ void __page_table_check_pmd_set(struct mm_struct *mm, unsigned long addr, · 25 unmodified lines | ||
| 26 | 26 | pmd_t *pmdp, pmd_t pmd); |
| 27 | 27 | void __page_table_check_pud_set(struct mm_struct *mm, unsigned long addr, |
| 28 | 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 | 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 | 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 | 116 | #else |
| 104 | 117 | |
| 105 | 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 | 165 | #endif /* CONFIG_PAGE_TABLE_CHECK */ |
| 147 | 166 | #endif /* __LINUX_PAGE_TABLE_CHECK_H */ |
| @@ -693,18 +693,6 @@ struct perf_event { · 692 unmodified lines | ||
| 693 | 693 | u64 total_time_running; |
| 694 | 694 | u64 tstamp; |
| 695 | 695 | |
| 696 | − /* | |
| 697 | − * timestamp shadows the actual context timing but it can | |
| 698 | − * be safely used in NMI interrupt context. It reflects the | |
| 699 | − * context time as it was when the event was last scheduled in, | |
| 700 | − * or when ctx_sched_in failed to schedule the event because we | |
| 701 | − * run out of PMC. | |
| 702 | − * | |
| 703 | − * ctx_time already accounts for ctx->timestamp. Therefore to | |
| 704 | − * compute ctx_time for a sample, simply add perf_clock(). | |
| 705 | − */ | |
| 706 | − u64 shadow_ctx_time; | |
| 707 | − | |
| 708 | 696 | struct perf_event_attr attr; |
| 709 | 697 | u16 header_size; |
| 710 | 698 | u16 id_header_size; |
| @@ -852,6 +840,7 @@ struct perf_event_context { · 141 unmodified lines | ||
| 852 | 840 | */ |
| 853 | 841 | u64 time; |
| 854 | 842 | u64 timestamp; |
| 843 | + u64 timeoffset; | |
| 855 | 844 | |
| 856 | 845 | /* |
| 857 | 846 | * These fields let us detect when two contexts have both |
| @@ -934,6 +923,8 @@ struct bpf_perf_event_data_kern { · 76 unmodified lines | ||
| 934 | 923 | struct perf_cgroup_info { |
| 935 | 924 | u64 time; |
| 936 | 925 | u64 timestamp; |
| 926 | + u64 timeoffset; | |
| 927 | + int active; | |
| 937 | 928 | }; |
| 938 | 929 | |
| 939 | 930 | struct perf_cgroup { |
| @@ -62,6 +62,7 @@ static inline unsigned long pte_index(unsigned long address) · 61 unmodified lines | ||
| 62 | 62 | { |
| 63 | 63 | return (address >> PAGE_SHIFT) & (PTRS_PER_PTE - 1); |
| 64 | 64 | } |
| 65 | +#define pte_index pte_index | |
| 65 | 66 | |
| 66 | 67 | #ifndef pmd_index |
| 67 | 68 | static inline unsigned long pmd_index(unsigned long address) |
| @@ -86,4 +86,9 @@ extern struct pid_namespace *task_active_pid_ns(struct task_struct *tsk); · 85 unmodified lines | ||
| 86 | 86 | void pidhash_init(void); |
| 87 | 87 | void pid_idr_init(void); |
| 88 | 88 | |
| 89 | +static inline bool task_is_in_init_pid_ns(struct task_struct *tsk) | |
| 90 | +{ | |
| 91 | + return task_active_pid_ns(tsk) == &init_pid_ns; | |
| 92 | +} | |
| 93 | + | |
| 89 | 94 | #endif /* _LINUX_PID_NS_H */ |
| @@ -25,18 +25,17 @@ void psi_memstall_enter(unsigned long *flags); · 24 unmodified lines | ||
| 25 | 25 | void psi_memstall_leave(unsigned long *flags); |
| 26 | 26 | |
| 27 | 27 | int psi_show(struct seq_file *s, struct psi_group *group, enum psi_res res); |
| 28 | − | |
| 29 | −#ifdef CONFIG_CGROUPS | |
| 30 | −int psi_cgroup_alloc(struct cgroup *cgrp); | |
| 31 | −void psi_cgroup_free(struct cgroup *cgrp); | |
| 32 | −void cgroup_move_task(struct task_struct *p, struct css_set *to); | |
| 33 | − | |
| 34 | 28 | struct psi_trigger *psi_trigger_create(struct psi_group *group, |
| 35 | 29 | char *buf, size_t nbytes, enum psi_res res); |
| 36 | −void psi_trigger_replace(void **trigger_ptr, struct psi_trigger *t); | |
| 30 | +void psi_trigger_destroy(struct psi_trigger *t); | |
| 37 | 31 | |
| 38 | 32 | __poll_t psi_trigger_poll(void **trigger_ptr, struct file *file, |
| 39 | 33 | poll_table *wait); |
| 34 | + | |
| 35 | +#ifdef CONFIG_CGROUPS | |
| 36 | +int psi_cgroup_alloc(struct cgroup *cgrp); | |
| 37 | +void psi_cgroup_free(struct cgroup *cgrp); | |
| 38 | +void cgroup_move_task(struct task_struct *p, struct css_set *to); | |
| 40 | 39 | #endif |
| 41 | 40 | |
| 42 | 41 | #else /* CONFIG_PSI */ |
| @@ -141,9 +141,6 @@ struct psi_trigger { · 140 unmodified lines | ||
| 141 | 141 | * events to one per window |
| 142 | 142 | */ |
| 143 | 143 | u64 last_event_time; |
| 144 | − | |
| 145 | − /* Refcounting to prevent premature destruction */ | |
| 146 | − struct kref refcount; | |
| 147 | 144 | }; |
| 148 | 145 | |
| 149 | 146 | struct psi_group { |
| @@ -91,7 +91,7 @@ extern bool qid_valid(struct kqid qid); · 90 unmodified lines | ||
| 91 | 91 | * |
| 92 | 92 | * When there is no mapping defined for the user-namespace, type, |
| 93 | 93 | * qid tuple an invalid kqid is returned. Callers are expected to |
| 94 | − * test for and handle handle invalid kqids being returned. | |
| 94 | + * test for and handle invalid kqids being returned. | |
| 95 | 95 | * Invalid kqids may be tested for using qid_valid(). |
| 96 | 96 | */ |
| 97 | 97 | static inline struct kqid make_kqid(struct user_namespace *from, |
| @@ -619,10 +619,6 @@ struct sched_dl_entity { · 618 unmodified lines | ||
| 619 | 619 | * task has to wait for a replenishment to be performed at the |
| 620 | 620 | * next firing of dl_timer. |
| 621 | 621 | * |
| 622 | − * @dl_boosted tells if we are boosted due to DI. If so we are | |
| 623 | − * outside bandwidth enforcement mechanism (but only until we | |
| 624 | − * exit the critical section); | |
| 625 | − * | |
| 626 | 622 | * @dl_yielded tells if task gave up the CPU before consuming |
| 627 | 623 | * all its available runtime during the last job. |
| 628 | 624 | * |
| @@ -1684,7 +1680,6 @@ extern struct pid *cad_pid; · 1055 unmodified lines | ||
| 1684 | 1680 | #define PF_MEMALLOC 0x00000800 /* Allocating memory */ |
| 1685 | 1681 | #define PF_NPROC_EXCEEDED 0x00001000 /* set_user() noticed that RLIMIT_NPROC was exceeded */ |
| 1686 | 1682 | #define PF_USED_MATH 0x00002000 /* If unset the fpu must be initialized before use */ |
| 1687 | −#define PF_USED_ASYNC 0x00004000 /* Used async_schedule*(), used by module init */ | |
| 1688 | 1683 | #define PF_NOFREEZE 0x00008000 /* This thread should not be frozen */ |
| 1689 | 1684 | #define PF_FROZEN 0x00010000 /* Frozen for system suspend */ |
| 1690 | 1685 | #define PF_KSWAPD 0x00020000 /* I am kswapd */ |
| @@ -54,8 +54,8 @@ extern asmlinkage void schedule_tail(struct task_struct *prev); · 53 unmodified lines | ||
| 54 | 54 | extern void init_idle(struct task_struct *idle, int cpu); |
| 55 | 55 | |
| 56 | 56 | extern int sched_fork(unsigned long clone_flags, struct task_struct *p); |
| 57 | −extern void sched_post_fork(struct task_struct *p, | |
| 58 | − struct kernel_clone_args *kargs); | |
| 57 | +extern void sched_cgroup_fork(struct task_struct *p, struct kernel_clone_args *kargs); | |
| 58 | +extern void sched_post_fork(struct task_struct *p); | |
| 59 | 59 | extern void sched_dead(struct task_struct *p); |
| 60 | 60 | |
| 61 | 61 | void __noreturn do_task_dead(void); |
| @@ -318,7 +318,7 @@ enum skb_drop_reason { · 317 unmodified lines | ||
| 318 | 318 | SKB_DROP_REASON_NO_SOCKET, |
| 319 | 319 | SKB_DROP_REASON_PKT_TOO_SMALL, |
| 320 | 320 | SKB_DROP_REASON_TCP_CSUM, |
| 321 | − SKB_DROP_REASON_TCP_FILTER, | |
| 321 | + SKB_DROP_REASON_SOCKET_FILTER, | |
| 322 | 322 | SKB_DROP_REASON_UDP_CSUM, |
| 323 | 323 | SKB_DROP_REASON_MAX, |
| 324 | 324 | }; |
| @@ -430,15 +430,7 @@ struct platform_hibernation_ops { · 429 unmodified lines | ||
| 430 | 430 | |
| 431 | 431 | #ifdef CONFIG_HIBERNATION |
| 432 | 432 | /* kernel/power/snapshot.c */ |
| 433 | −extern void __register_nosave_region(unsigned long b, unsigned long e, int km); | |
| 434 | −static inline void __init register_nosave_region(unsigned long b, unsigned long e) | |
| 435 | −{ | |
| 436 | − __register_nosave_region(b, e, 0); | |
| 437 | −} | |
| 438 | −static inline void __init register_nosave_region_late(unsigned long b, unsigned long e) | |
| 439 | −{ | |
| 440 | − __register_nosave_region(b, e, 1); | |
| 441 | −} | |
| 433 | +extern void register_nosave_region(unsigned long b, unsigned long e); | |
| 442 | 434 | extern int swsusp_page_is_forbidden(struct page *); |
| 443 | 435 | extern void swsusp_set_page_free(struct page *); |
| 444 | 436 | extern void swsusp_unset_page_free(struct page *); |
| @@ -458,7 +450,6 @@ int pfn_is_nosave(unsigned long pfn); · 13 unmodified lines | ||
| 458 | 450 | int hibernate_quiet_exec(int (*func)(void *data), void *data); |
| 459 | 451 | #else /* CONFIG_HIBERNATION */ |
| 460 | 452 | static inline void register_nosave_region(unsigned long b, unsigned long e) {} |
| 461 | −static inline void register_nosave_region_late(unsigned long b, unsigned long e) {} | |
| 462 | 453 | static inline int swsusp_page_is_forbidden(struct page *p) { return 0; } |
| 463 | 454 | static inline void swsusp_set_page_free(struct page *p) {} |
| 464 | 455 | static inline void swsusp_unset_page_free(struct page *p) {} |
| @@ -506,14 +497,14 @@ extern void ksys_sync_helper(void); · 41 unmodified lines | ||
| 506 | 497 | |
| 507 | 498 | /* drivers/base/power/wakeup.c */ |
| 508 | 499 | extern bool events_check_enabled; |
| 509 | −extern unsigned int pm_wakeup_irq; | |
| 510 | 500 | extern suspend_state_t pm_suspend_target_state; |
| 511 | 501 | |
| 512 | 502 | extern bool pm_wakeup_pending(void); |
| 513 | 503 | extern void pm_system_wakeup(void); |
| 514 | 504 | extern void pm_system_cancel_wakeup(void); |
| 515 | −extern void pm_wakeup_clear(bool reset); | |
| 505 | +extern void pm_wakeup_clear(unsigned int irq_number); | |
| 516 | 506 | extern void pm_system_irq_wakeup(unsigned int irq_number); |
| 507 | +extern unsigned int pm_wakeup_irq(void); | |
| 517 | 508 | extern bool pm_get_wakeup_count(unsigned int *count, bool block); |
| 518 | 509 | extern bool pm_save_wakeup_count(unsigned int count); |
| 519 | 510 | extern void pm_wakep_autosleep_enabled(bool set); |
| @@ -265,7 +265,7 @@ static inline struct ctl_table_header *register_sysctl_table(struct ctl_table * · 264 unmodified lines | ||
| 265 | 265 | return NULL; |
| 266 | 266 | } |
| 267 | 267 | |
| 268 | −static inline struct sysctl_header *register_sysctl_mount_point(const char *path) | |
| 268 | +static inline struct ctl_table_header *register_sysctl_mount_point(const char *path) | |
| 269 | 269 | { |
| 270 | 270 | return NULL; |
| 271 | 271 | } |
| @@ -91,6 +91,12 @@ fwnode_usb_role_switch_get(struct fwnode_handle *node) · 90 unmodified lines | ||
| 91 | 91 | |
| 92 | 92 | static inline void usb_role_switch_put(struct usb_role_switch *sw) { } |
| 93 | 93 | |
| 94 | +static inline struct usb_role_switch * | |
| 95 | +usb_role_switch_find_by_fwnode(const struct fwnode_handle *fwnode) | |
| 96 | +{ | |
| 97 | + return NULL; | |
| 98 | +} | |
| 99 | + | |
| 94 | 100 | static inline struct usb_role_switch * |
| 95 | 101 | usb_role_switch_register(struct device *parent, |
| 96 | 102 | const struct usb_role_switch_desc *desc) |
| @@ -6,6 +6,8 @@ · 5 unmodified lines | ||
| 6 | 6 | #define RTR_SOLICITATION_INTERVAL (4*HZ) |
| 7 | 7 | #define RTR_SOLICITATION_MAX_INTERVAL (3600*HZ) /* 1 hour */ |
| 8 | 8 | |
| 9 | +#define MIN_VALID_LIFETIME (2*3600) /* 2 hours */ | |
| 10 | + | |
| 9 | 11 | #define TEMP_VALID_LIFETIME (7*86400) |
| 10 | 12 | #define TEMP_PREFERRED_LIFETIME (86400) |
| 11 | 13 | #define REGEN_MAX_RETRY (3) |
| @@ -107,8 +109,6 @@ struct inet6_ifaddr *ipv6_get_ifaddr(struct net *net, · 95 unmodified lines | ||
| 107 | 109 | int ipv6_dev_get_saddr(struct net *net, const struct net_device *dev, |
| 108 | 110 | const struct in6_addr *daddr, unsigned int srcprefs, |
| 109 | 111 | struct in6_addr *saddr); |
| 110 | −int __ipv6_get_lladdr(struct inet6_dev *idev, struct in6_addr *addr, | |
| 111 | − u32 banned_flags); | |
| 112 | 112 | int ipv6_get_lladdr(struct net_device *dev, struct in6_addr *addr, |
| 113 | 113 | u32 banned_flags); |
| 114 | 114 | bool inet_rcv_saddr_equal(const struct sock *sk, const struct sock *sk2, |
| @@ -239,6 +239,7 @@ typedef struct ax25_dev { · 238 unmodified lines | ||
| 239 | 239 | #if defined(CONFIG_AX25_DAMA_SLAVE) || defined(CONFIG_AX25_DAMA_MASTER) |
| 240 | 240 | ax25_dama_info dama; |
| 241 | 241 | #endif |
| 242 | + refcount_t refcount; | |
| 242 | 243 | } ax25_dev; |
| 243 | 244 | |
| 244 | 245 | typedef struct ax25_cb { |
| @@ -293,6 +294,17 @@ static __inline__ void ax25_cb_put(ax25_cb *ax25) · 48 unmodified lines | ||
| 293 | 294 | } |
| 294 | 295 | } |
| 295 | 296 | |
| 297 | +static inline void ax25_dev_hold(ax25_dev *ax25_dev) | |
| 298 | +{ | |
| 299 | + refcount_inc(&ax25_dev->refcount); | |
| 300 | +} | |
| 301 | + | |
| 302 | +static inline void ax25_dev_put(ax25_dev *ax25_dev) | |
| 303 | +{ | |
| 304 | + if (refcount_dec_and_test(&ax25_dev->refcount)) { | |
| 305 | + kfree(ax25_dev); | |
| 306 | + } | |
| 307 | +} | |
| 296 | 308 | static inline __be16 ax25_type_trans(struct sk_buff *skb, struct net_device *dev) |
| 297 | 309 | { |
| 298 | 310 | skb->dev = dev; |
| @@ -262,7 +262,7 @@ struct ad_system { · 261 unmodified lines | ||
| 262 | 262 | struct ad_bond_info { |
| 263 | 263 | struct ad_system system; /* 802.3ad system structure */ |
| 264 | 264 | struct bond_3ad_stats stats; |
| 265 | − u32 agg_select_timer; /* Timer to select aggregator after all adapter's hand shakes */ | |
| 265 | + atomic_t agg_select_timer; /* Timer to select aggregator after all adapter's hand shakes */ | |
| 266 | 266 | u16 aggregator_identifier; |
| 267 | 267 | }; |
| 268 | 268 | |
| @@ -346,7 +346,7 @@ static inline bool bond_uses_primary(struct bonding *bond) · 345 unmodified lines | ||
| 346 | 346 | |
| 347 | 347 | static inline struct net_device *bond_option_active_slave_get_rcu(struct bonding *bond) |
| 348 | 348 | { |
| 349 | − struct slave *slave = rcu_dereference(bond->curr_active_slave); | |
| 349 | + struct slave *slave = rcu_dereference_rtnl(bond->curr_active_slave); | |
| 350 | 350 | |
| 351 | 351 | return bond_uses_primary(bond) && slave ? slave->dev : NULL; |
| 352 | 352 | } |
| @@ -1187,6 +1187,7 @@ void dsa_unregister_switch(struct dsa_switch *ds); · 1186 unmodified lines | ||
| 1187 | 1187 | int dsa_register_switch(struct dsa_switch *ds); |
| 1188 | 1188 | void dsa_switch_shutdown(struct dsa_switch *ds); |
| 1189 | 1189 | struct dsa_switch *dsa_switch_find(int tree_index, int sw_index); |
| 1190 | +void dsa_flush_workqueue(void); | |
| 1190 | 1191 | #ifdef CONFIG_PM_SLEEP |
| 1191 | 1192 | int dsa_switch_suspend(struct dsa_switch *ds); |
| 1192 | 1193 | int dsa_switch_resume(struct dsa_switch *ds); |
| @@ -123,8 +123,20 @@ static inline struct metadata_dst *tun_dst_unclone(struct sk_buff *skb) · 122 unmodified lines | ||
| 123 | 123 | |
| 124 | 124 | memcpy(&new_md->u.tun_info, &md_dst->u.tun_info, |
| 125 | 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 | 139 | skb_dst_drop(skb); |
| 127 | − dst_hold(&new_md->dst); | |
| 128 | 140 | skb_dst_set(skb, &new_md->dst); |
| 129 | 141 | return new_md; |
| 130 | 142 | } |
| @@ -525,19 +525,18 @@ static inline void ip_select_ident_segs(struct net *net, struct sk_buff *skb, · 524 unmodified lines | ||
| 525 | 525 | { |
| 526 | 526 | struct iphdr *iph = ip_hdr(skb); |
| 527 | 527 | |
| 528 | + /* We had many attacks based on IPID, use the private | |
| 529 | + * generator as much as we can. | |
| 530 | + */ | |
| 531 | + if (sk && inet_sk(sk)->inet_daddr) { | |
| 532 | + iph->id = htons(inet_sk(sk)->inet_id); | |
| 533 | + inet_sk(sk)->inet_id += segs; | |
| 534 | + return; | |
| 535 | + } | |
| 528 | 536 | if ((iph->frag_off & htons(IP_DF)) && !skb->ignore_df) { |
| 529 | − /* This is only to work around buggy Windows95/2000 | |
| 530 | − * VJ compression implementations. If the ID field | |
| 531 | − * does not change, they drop every other packet in | |
| 532 | − * a TCP stream using header compression. | |
| 533 | − */ | |
| 534 | − if (sk && inet_sk(sk)->inet_daddr) { | |
| 535 | − iph->id = htons(inet_sk(sk)->inet_id); | |
| 536 | − inet_sk(sk)->inet_id += segs; | |
| 537 | − } else { | |
| 538 | − iph->id = 0; | |
| 539 | − } | |
| 537 | + iph->id = 0; | |
| 540 | 538 | } else { |
| 539 | + /* Unfortunately we need the big hammer to get a suitable IPID */ | |
| 541 | 540 | __ip_select_ident(net, iph, segs); |
| 542 | 541 | } |
| 543 | 542 | } |
| @@ -190,14 +190,16 @@ struct fib6_info { · 189 unmodified lines | ||
| 190 | 190 | u32 fib6_metric; |
| 191 | 191 | u8 fib6_protocol; |
| 192 | 192 | u8 fib6_type; |
| 193 | + | |
| 194 | + u8 offload; | |
| 195 | + u8 trap; | |
| 196 | + u8 offload_failed; | |
| 197 | + | |
| 193 | 198 | u8 should_flush:1, |
| 194 | 199 | dst_nocount:1, |
| 195 | 200 | dst_nopolicy:1, |
| 196 | 201 | fib6_destroying:1, |
| 197 | − offload:1, | |
| 198 | − trap:1, | |
| 199 | − offload_failed:1, | |
| 200 | − unused:1; | |
| 202 | + unused:4; | |
| 201 | 203 | |
| 202 | 204 | struct rcu_head rcu; |
| 203 | 205 | struct nexthop *nh; |
| @@ -282,7 +284,7 @@ static inline bool fib6_get_cookie_safe(const struct fib6_info *f6i, · 78 unmodified lines | ||
| 282 | 284 | fn = rcu_dereference(f6i->fib6_node); |
| 283 | 285 | |
| 284 | 286 | if (fn) { |
| 285 | − *cookie = fn->fn_sernum; | |
| 287 | + *cookie = READ_ONCE(fn->fn_sernum); | |
| 286 | 288 | /* pairs with smp_wmb() in __fib6_update_sernum_upto_root() */ |
| 287 | 289 | smp_rmb(); |
| 288 | 290 | status = true; |
| @@ -393,17 +393,20 @@ static inline void txopt_put(struct ipv6_txoptions *opt) · 392 unmodified lines | ||
| 393 | 393 | kfree_rcu(opt, rcu); |
| 394 | 394 | } |
| 395 | 395 | |
| 396 | +#if IS_ENABLED(CONFIG_IPV6) | |
| 396 | 397 | struct ip6_flowlabel *__fl6_sock_lookup(struct sock *sk, __be32 label); |
| 397 | 398 | |
| 398 | 399 | extern struct static_key_false_deferred ipv6_flowlabel_exclusive; |
| 399 | 400 | static inline struct ip6_flowlabel *fl6_sock_lookup(struct sock *sk, |
| 400 | 401 | __be32 label) |
| 401 | 402 | { |
| 402 | − if (static_branch_unlikely(&ipv6_flowlabel_exclusive.key)) | |
| 403 | + if (static_branch_unlikely(&ipv6_flowlabel_exclusive.key) && | |
| 404 | + READ_ONCE(sock_net(sk)->ipv6.flowlabel_has_excl)) | |
| 403 | 405 | return __fl6_sock_lookup(sk, label) ? : ERR_PTR(-ENOENT); |
| 404 | 406 | |
| 405 | 407 | return NULL; |
| 406 | 408 | } |
| 409 | +#endif | |
| 407 | 410 | |
| 408 | 411 | struct ipv6_txoptions *fl6_merge_options(struct ipv6_txoptions *opt_space, |
| 409 | 412 | struct ip6_flowlabel *fl, |
| @@ -350,7 +350,8 @@ static inline struct neighbour *neigh_create(struct neigh_table *tbl, · 349 unmodified lines | ||
| 350 | 350 | return __neigh_create(tbl, pkey, dev, true); |
| 351 | 351 | } |
| 352 | 352 | void neigh_destroy(struct neighbour *neigh); |
| 353 | −int __neigh_event_send(struct neighbour *neigh, struct sk_buff *skb); | |
| 353 | +int __neigh_event_send(struct neighbour *neigh, struct sk_buff *skb, | |
| 354 | + const bool immediate_ok); | |
| 354 | 355 | int neigh_update(struct neighbour *neigh, const u8 *lladdr, u8 new, u32 flags, |
| 355 | 356 | u32 nlmsg_pid); |
| 356 | 357 | void __neigh_set_probe_once(struct neighbour *neigh); |
| @@ -460,17 +461,24 @@ static inline struct neighbour * neigh_clone(struct neighbour *neigh) · 103 unmodified lines | ||
| 460 | 461 | |
| 461 | 462 | #define neigh_hold(n) refcount_inc(&(n)->refcnt) |
| 462 | 463 | |
| 463 | −static inline int neigh_event_send(struct neighbour *neigh, struct sk_buff *skb) | |
| 464 | +static __always_inline int neigh_event_send_probe(struct neighbour *neigh, | |
| 465 | + struct sk_buff *skb, | |
| 466 | + const bool immediate_ok) | |
| 464 | 467 | { |
| 465 | 468 | unsigned long now = jiffies; |
| 466 | − | |
| 469 | + | |
| 467 | 470 | if (READ_ONCE(neigh->used) != now) |
| 468 | 471 | WRITE_ONCE(neigh->used, now); |
| 469 | − if (!(neigh->nud_state&(NUD_CONNECTED|NUD_DELAY|NUD_PROBE))) | |
| 470 | − return __neigh_event_send(neigh, skb); | |
| 472 | + if (!(neigh->nud_state & (NUD_CONNECTED | NUD_DELAY | NUD_PROBE))) | |
| 473 | + return __neigh_event_send(neigh, skb, immediate_ok); | |
| 471 | 474 | return 0; |
| 472 | 475 | } |
| 473 | 476 | |
| 477 | +static inline int neigh_event_send(struct neighbour *neigh, struct sk_buff *skb) | |
| 478 | +{ | |
| 479 | + return neigh_event_send_probe(neigh, skb, true); | |
| 480 | +} | |
| 481 | + | |
| 474 | 482 | #if IS_ENABLED(CONFIG_BRIDGE_NETFILTER) |
| 475 | 483 | static inline int neigh_hh_bridge(struct hh_cache *hh, struct sk_buff *skb) |
| 476 | 484 | { |
| @@ -77,9 +77,10 @@ struct netns_ipv6 { · 76 unmodified lines | ||
| 77 | 77 | spinlock_t fib6_gc_lock; |
| 78 | 78 | unsigned int ip6_rt_gc_expire; |
| 79 | 79 | unsigned long ip6_rt_last_gc; |
| 80 | + unsigned char flowlabel_has_excl; | |
| 80 | 81 | #ifdef CONFIG_IPV6_MULTIPLE_TABLES |
| 81 | − unsigned int fib6_rules_require_fldissect; | |
| 82 | 82 | bool fib6_has_custom_rules; |
| 83 | + unsigned int fib6_rules_require_fldissect; | |
| 83 | 84 | #ifdef CONFIG_IPV6_SUBTREES |
| 84 | 85 | unsigned int fib6_routes_require_src; |
| 85 | 86 | #endif |
| @@ -370,7 +370,7 @@ static inline struct neighbour *ip_neigh_gw4(struct net_device *dev, · 369 unmodified lines | ||
| 370 | 370 | { |
| 371 | 371 | struct neighbour *neigh; |
| 372 | 372 | |
| 373 | − neigh = __ipv4_neigh_lookup_noref(dev, daddr); | |
| 373 | + neigh = __ipv4_neigh_lookup_noref(dev, (__force u32)daddr); | |
| 374 | 374 | if (unlikely(!neigh)) |
| 375 | 375 | neigh = __neigh_create(&arp_tbl, &daddr, dev, false); |
| 376 | 376 | |
| @@ -1369,6 +1369,7 @@ static inline bool tcp_checksum_complete(struct sk_buff *skb) · 1368 unmodified lines | ||
| 1369 | 1369 | |
| 1370 | 1370 | bool tcp_add_backlog(struct sock *sk, struct sk_buff *skb); |
| 1371 | 1371 | |
| 1372 | +#ifdef CONFIG_INET | |
| 1372 | 1373 | void __sk_defer_free_flush(struct sock *sk); |
| 1373 | 1374 | |
| 1374 | 1375 | static inline void sk_defer_free_flush(struct sock *sk) |
| @@ -1377,6 +1378,9 @@ static inline void sk_defer_free_flush(struct sock *sk) · 2 unmodified lines | ||
| 1377 | 1378 | return; |
| 1378 | 1379 | __sk_defer_free_flush(sk); |
| 1379 | 1380 | } |
| 1381 | +#else | |
| 1382 | +static inline void sk_defer_free_flush(struct sock *sk) {} | |
| 1383 | +#endif | |
| 1380 | 1384 | |
| 1381 | 1385 | int tcp_filter(struct sock *sk, struct sk_buff *skb); |
| 1382 | 1386 | void tcp_set_state(struct sock *sk, int state); |
| @@ -617,6 +617,7 @@ void snd_pcm_stream_unlock(struct snd_pcm_substream *substream); · 616 unmodified lines | ||
| 617 | 617 | void snd_pcm_stream_lock_irq(struct snd_pcm_substream *substream); |
| 618 | 618 | void snd_pcm_stream_unlock_irq(struct snd_pcm_substream *substream); |
| 619 | 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 | 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 | 636 | void snd_pcm_stream_unlock_irqrestore(struct snd_pcm_substream *substream, |
| 636 | 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 | 654 | * snd_pcm_group_for_each_entry - iterate over the linked substreams |
| 640 | 655 | * @s: the iterator |
| @@ -14,7 +14,7 @@ · 13 unmodified lines | ||
| 14 | 14 | EM(SKB_DROP_REASON_NO_SOCKET, NO_SOCKET) \ |
| 15 | 15 | EM(SKB_DROP_REASON_PKT_TOO_SMALL, PKT_TOO_SMALL) \ |
| 16 | 16 | EM(SKB_DROP_REASON_TCP_CSUM, TCP_CSUM) \ |
| 17 | − EM(SKB_DROP_REASON_TCP_FILTER, TCP_FILTER) \ | |
| 17 | + EM(SKB_DROP_REASON_SOCKET_FILTER, SOCKET_FILTER) \ | |
| 18 | 18 | EM(SKB_DROP_REASON_UDP_CSUM, UDP_CSUM) \ |
| 19 | 19 | EMe(SKB_DROP_REASON_MAX, MAX) |
| 20 | 20 | |
| @@ -794,6 +794,9 @@ RPC_SHOW_SOCKET · 793 unmodified lines | ||
| 794 | 794 | |
| 795 | 795 | RPC_SHOW_SOCK |
| 796 | 796 | |
| 797 | + | |
| 798 | +#include <trace/events/net_probe_common.h> | |
| 799 | + | |
| 797 | 800 | /* |
| 798 | 801 | * Now redefine the EM() and EMe() macros to map the enums to the strings |
| 799 | 802 | * that will be printed in the output. |
| @@ -816,27 +819,32 @@ DECLARE_EVENT_CLASS(xs_socket_event, · 16 unmodified lines | ||
| 816 | 819 | __field(unsigned int, socket_state) |
| 817 | 820 | __field(unsigned int, sock_state) |
| 818 | 821 | __field(unsigned long long, ino) |
| 819 | − __string(dstaddr, | |
| 820 | − xprt->address_strings[RPC_DISPLAY_ADDR]) | |
| 821 | − __string(dstport, | |
| 822 | − xprt->address_strings[RPC_DISPLAY_PORT]) | |
| 822 | + __array(__u8, saddr, sizeof(struct sockaddr_in6)) | |
| 823 | + __array(__u8, daddr, sizeof(struct sockaddr_in6)) | |
| 823 | 824 | ), |
| 824 | 825 | |
| 825 | 826 | TP_fast_assign( |
| 826 | 827 | struct inode *inode = SOCK_INODE(socket); |
| 828 | + const struct sock *sk = socket->sk; | |
| 829 | + const struct inet_sock *inet = inet_sk(sk); | |
| 830 | + | |
| 831 | + memset(__entry->saddr, 0, sizeof(struct sockaddr_in6)); | |
| 832 | + memset(__entry->daddr, 0, sizeof(struct sockaddr_in6)); | |
| 833 | + | |
| 834 | + TP_STORE_ADDR_PORTS(__entry, inet, sk); | |
| 835 | + | |
| 827 | 836 | __entry->socket_state = socket->state; |
| 828 | 837 | __entry->sock_state = socket->sk->sk_state; |
| 829 | 838 | __entry->ino = (unsigned long long)inode->i_ino; |
| 830 | − __assign_str(dstaddr, | |
| 831 | − xprt->address_strings[RPC_DISPLAY_ADDR]); | |
| 832 | − __assign_str(dstport, | |
| 833 | − xprt->address_strings[RPC_DISPLAY_PORT]); | |
| 839 | + | |
| 834 | 840 | ), |
| 835 | 841 | |
| 836 | 842 | TP_printk( |
| 837 | − "socket:[%llu] dstaddr=%s/%s " | |
| 843 | + "socket:[%llu] srcaddr=%pISpc dstaddr=%pISpc " | |
| 838 | 844 | "state=%u (%s) sk_state=%u (%s)", |
| 839 | − __entry->ino, __get_str(dstaddr), __get_str(dstport), | |
| 845 | + __entry->ino, | |
| 846 | + __entry->saddr, | |
| 847 | + __entry->daddr, | |
| 840 | 848 | __entry->socket_state, |
| 841 | 849 | rpc_show_socket_state(__entry->socket_state), |
| 842 | 850 | __entry->sock_state, |
| @@ -866,29 +874,33 @@ DECLARE_EVENT_CLASS(xs_socket_event_done, · 23 unmodified lines | ||
| 866 | 874 | __field(unsigned int, socket_state) |
| 867 | 875 | __field(unsigned int, sock_state) |
| 868 | 876 | __field(unsigned long long, ino) |
| 869 | − __string(dstaddr, | |
| 870 | − xprt->address_strings[RPC_DISPLAY_ADDR]) | |
| 871 | − __string(dstport, | |
| 872 | − xprt->address_strings[RPC_DISPLAY_PORT]) | |
| 877 | + __array(__u8, saddr, sizeof(struct sockaddr_in6)) | |
| 878 | + __array(__u8, daddr, sizeof(struct sockaddr_in6)) | |
| 873 | 879 | ), |
| 874 | 880 | |
| 875 | 881 | TP_fast_assign( |
| 876 | 882 | struct inode *inode = SOCK_INODE(socket); |
| 883 | + const struct sock *sk = socket->sk; | |
| 884 | + const struct inet_sock *inet = inet_sk(sk); | |
| 885 | + | |
| 886 | + memset(__entry->saddr, 0, sizeof(struct sockaddr_in6)); | |
| 887 | + memset(__entry->daddr, 0, sizeof(struct sockaddr_in6)); | |
| 888 | + | |
| 889 | + TP_STORE_ADDR_PORTS(__entry, inet, sk); | |
| 890 | + | |
| 877 | 891 | __entry->socket_state = socket->state; |
| 878 | 892 | __entry->sock_state = socket->sk->sk_state; |
| 879 | 893 | __entry->ino = (unsigned long long)inode->i_ino; |
| 880 | 894 | __entry->error = error; |
| 881 | − __assign_str(dstaddr, | |
| 882 | − xprt->address_strings[RPC_DISPLAY_ADDR]); | |
| 883 | − __assign_str(dstport, | |
| 884 | − xprt->address_strings[RPC_DISPLAY_PORT]); | |
| 885 | 895 | ), |
| 886 | 896 | |
| 887 | 897 | TP_printk( |
| 888 | − "error=%d socket:[%llu] dstaddr=%s/%s " | |
| 898 | + "error=%d socket:[%llu] srcaddr=%pISpc dstaddr=%pISpc " | |
| 889 | 899 | "state=%u (%s) sk_state=%u (%s)", |
| 890 | 900 | __entry->error, |
| 891 | − __entry->ino, __get_str(dstaddr), __get_str(dstport), | |
| 901 | + __entry->ino, | |
| 902 | + __entry->saddr, | |
| 903 | + __entry->daddr, | |
| 892 | 904 | __entry->socket_state, |
| 893 | 905 | rpc_show_socket_state(__entry->socket_state), |
| 894 | 906 | __entry->sock_state, |
| @@ -953,7 +965,8 @@ TRACE_EVENT(rpc_socket_nospace, · 58 unmodified lines | ||
| 953 | 965 | { BIT(XPRT_REMOVE), "REMOVE" }, \ |
| 954 | 966 | { BIT(XPRT_CONGESTED), "CONGESTED" }, \ |
| 955 | 967 | { BIT(XPRT_CWND_WAIT), "CWND_WAIT" }, \ |
| 956 | − { BIT(XPRT_WRITE_SPACE), "WRITE_SPACE" }) | |
| 968 | + { BIT(XPRT_WRITE_SPACE), "WRITE_SPACE" }, \ | |
| 969 | + { BIT(XPRT_SND_IS_COOKIE), "SND_IS_COOKIE" }) | |
| 957 | 970 | |
| 958 | 971 | DECLARE_EVENT_CLASS(rpc_xprt_lifetime_class, |
| 959 | 972 | TP_PROTO( |
| @@ -1150,8 +1163,11 @@ DECLARE_EVENT_CLASS(xprt_writelock_event, · 190 unmodified lines | ||
| 1150 | 1163 | __entry->task_id = -1; |
| 1151 | 1164 | __entry->client_id = -1; |
| 1152 | 1165 | } |
| 1153 | − __entry->snd_task_id = xprt->snd_task ? | |
| 1154 | − xprt->snd_task->tk_pid : -1; | |
| 1166 | + if (xprt->snd_task && | |
| 1167 | + !test_bit(XPRT_SND_IS_COOKIE, &xprt->state)) | |
| 1168 | + __entry->snd_task_id = xprt->snd_task->tk_pid; | |
| 1169 | + else | |
| 1170 | + __entry->snd_task_id = -1; | |
| 1155 | 1171 | ), |
| 1156 | 1172 | |
| 1157 | 1173 | TP_printk(SUNRPC_TRACE_TASK_SPECIFIER |
| @@ -1196,8 +1212,12 @@ DECLARE_EVENT_CLASS(xprt_cong_event, · 38 unmodified lines | ||
| 1196 | 1212 | __entry->task_id = -1; |
| 1197 | 1213 | __entry->client_id = -1; |
| 1198 | 1214 | } |
| 1199 | − __entry->snd_task_id = xprt->snd_task ? | |
| 1200 | − xprt->snd_task->tk_pid : -1; | |
| 1215 | + if (xprt->snd_task && | |
| 1216 | + !test_bit(XPRT_SND_IS_COOKIE, &xprt->state)) | |
| 1217 | + __entry->snd_task_id = xprt->snd_task->tk_pid; | |
| 1218 | + else | |
| 1219 | + __entry->snd_task_id = -1; | |
| 1220 | + | |
| 1201 | 1221 | __entry->cong = xprt->cong; |
| 1202 | 1222 | __entry->cwnd = xprt->cwnd; |
| 1203 | 1223 | __entry->wait = test_bit(XPRT_CWND_WAIT, &xprt->state); |
| @@ -23,8 +23,9 @@ · 22 unmodified lines | ||
| 23 | 23 | |
| 24 | 24 | #undef __get_rel_dynamic_array |
| 25 | 25 | #define __get_rel_dynamic_array(field) \ |
| 26 | − ((void *)(&__entry->__rel_loc_##field) + \ | |
| 27 | − sizeof(__entry->__rel_loc_##field) + \ | |
| 26 | + ((void *)__entry + \ | |
| 27 | + offsetof(typeof(*__entry), __rel_loc_##field) + \ | |
| 28 | + sizeof(__entry->__rel_loc_##field) + \ | |
| 28 | 29 | (__entry->__rel_loc_##field & 0xffff)) |
| 29 | 30 | |
| 30 | 31 | #undef __get_rel_dynamic_array_len |
| @@ -128,7 +128,7 @@ TRACE_MAKE_SYSTEM_STR(); · 127 unmodified lines | ||
| 128 | 128 | struct trace_event_raw_##name { \ |
| 129 | 129 | struct trace_entry ent; \ |
| 130 | 130 | tstruct \ |
| 131 | − char __data[0]; \ | |
| 131 | + char __data[]; \ | |
| 132 | 132 | }; \ |
| 133 | 133 | \ |
| 134 | 134 | static struct trace_event_class event_class_##name; |
| @@ -318,9 +318,10 @@ TRACE_MAKE_SYSTEM_STR(); · 183 unmodified lines | ||
| 318 | 318 | #define __get_str(field) ((char *)__get_dynamic_array(field)) |
| 319 | 319 | |
| 320 | 320 | #undef __get_rel_dynamic_array |
| 321 | −#define __get_rel_dynamic_array(field) \ | |
| 322 | − ((void *)(&__entry->__rel_loc_##field) + \ | |
| 323 | − sizeof(__entry->__rel_loc_##field) + \ | |
| 321 | +#define __get_rel_dynamic_array(field) \ | |
| 322 | + ((void *)__entry + \ | |
| 323 | + offsetof(typeof(*__entry), __rel_loc_##field) + \ | |
| 324 | + sizeof(__entry->__rel_loc_##field) + \ | |
| 324 | 325 | (__entry->__rel_loc_##field & 0xffff)) |
| 325 | 326 | |
| 326 | 327 | #undef __get_rel_dynamic_array_len |
| @@ -0,0 +1,35 @@ | ||
| 1 | +/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ | |
| 2 | + | |
| 3 | +#ifndef _UAPI_LINUX_CYCLADES_H | |
| 4 | +#define _UAPI_LINUX_CYCLADES_H | |
| 5 | + | |
| 6 | +#warning "Support for features provided by this header has been removed" | |
| 7 | +#warning "Please consider updating your code" | |
| 8 | + | |
| 9 | +struct cyclades_monitor { | |
| 10 | + unsigned long int_count; | |
| 11 | + unsigned long char_count; | |
| 12 | + unsigned long char_max; | |
| 13 | + unsigned long char_last; | |
| 14 | +}; | |
| 15 | + | |
| 16 | +#define CYGETMON 0x435901 | |
| 17 | +#define CYGETTHRESH 0x435902 | |
| 18 | +#define CYSETTHRESH 0x435903 | |
| 19 | +#define CYGETDEFTHRESH 0x435904 | |
| 20 | +#define CYSETDEFTHRESH 0x435905 | |
| 21 | +#define CYGETTIMEOUT 0x435906 | |
| 22 | +#define CYSETTIMEOUT 0x435907 | |
| 23 | +#define CYGETDEFTIMEOUT 0x435908 | |
| 24 | +#define CYSETDEFTIMEOUT 0x435909 | |
| 25 | +#define CYSETRFLOW 0x43590a | |
| 26 | +#define CYGETRFLOW 0x43590b | |
| 27 | +#define CYSETRTSDTR_INV 0x43590c | |
| 28 | +#define CYGETRTSDTR_INV 0x43590d | |
| 29 | +#define CYZSETPOLLCYCLE 0x43590e | |
| 30 | +#define CYZGETPOLLCYCLE 0x43590f | |
| 31 | +#define CYGETCD1400VER 0x435910 | |
| 32 | +#define CYSETWAIT 0x435912 | |
| 33 | +#define CYGETWAIT 0x435913 | |
| 34 | + | |
| 35 | +#endif /* _UAPI_LINUX_CYCLADES_H */ | |
| @@ -1133,6 +1133,7 @@ struct kvm_ppc_resize_hpt { · 1132 unmodified lines | ||
| 1133 | 1133 | #define KVM_CAP_VM_MOVE_ENC_CONTEXT_FROM 206 |
| 1134 | 1134 | #define KVM_CAP_VM_GPA_BITS 207 |
| 1135 | 1135 | #define KVM_CAP_XSAVE2 208 |
| 1136 | +#define KVM_CAP_SYS_ATTRIBUTES 209 | |
| 1136 | 1137 | |
| 1137 | 1138 | #ifdef KVM_CAP_IRQ_ROUTING |
| 1138 | 1139 | |
| @@ -1623,9 +1624,6 @@ struct kvm_enc_region { · 484 unmodified lines | ||
| 1623 | 1624 | #define KVM_S390_NORMAL_RESET _IO(KVMIO, 0xc3) |
| 1624 | 1625 | #define KVM_S390_CLEAR_RESET _IO(KVMIO, 0xc4) |
| 1625 | 1626 | |
| 1626 | −/* Available with KVM_CAP_XSAVE2 */ | |
| 1627 | −#define KVM_GET_XSAVE2 _IOR(KVMIO, 0xcf, struct kvm_xsave) | |
| 1628 | − | |
| 1629 | 1627 | struct kvm_s390_pv_sec_parm { |
| 1630 | 1628 | __u64 origin; |
| 1631 | 1629 | __u64 length; |
| @@ -2047,4 +2045,7 @@ struct kvm_stats_desc { · 415 unmodified lines | ||
| 2047 | 2045 | |
| 2048 | 2046 | #define KVM_GET_STATS_FD _IO(KVMIO, 0xce) |
| 2049 | 2047 | |
| 2048 | +/* Available with KVM_CAP_XSAVE2 */ | |
| 2049 | +#define KVM_GET_XSAVE2 _IOR(KVMIO, 0xcf, struct kvm_xsave) | |
| 2050 | + | |
| 2050 | 2051 | #endif /* __LINUX_KVM_H */ |
| @@ -106,7 +106,7 @@ enum ip_conntrack_status { · 105 unmodified lines | ||
| 106 | 106 | IPS_NAT_CLASH = IPS_UNTRACKED, |
| 107 | 107 | #endif |
| 108 | 108 | |
| 109 | − /* Conntrack got a helper explicitly attached via CT target. */ | |
| 109 | + /* Conntrack got a helper explicitly attached (ruleset, ctnetlink). */ | |
| 110 | 110 | IPS_HELPER_BIT = 13, |
| 111 | 111 | IPS_HELPER = (1 << IPS_HELPER_BIT), |
| 112 | 112 | |
| @@ -465,6 +465,8 @@ struct perf_event_attr { · 464 unmodified lines | ||
| 465 | 465 | /* |
| 466 | 466 | * User provided data if sigtrap=1, passed back to user via |
| 467 | 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 | 471 | __u64 sig_data; |
| 470 | 472 | }; |
| @@ -84,12 +84,11 @@ struct smc_diag_conninfo { · 83 unmodified lines | ||
| 84 | 84 | /* SMC_DIAG_LINKINFO */ |
| 85 | 85 | |
| 86 | 86 | struct smc_diag_linkinfo { |
| 87 | − __u8 link_id; /* link identifier */ | |
| 88 | − __u8 ibname[IB_DEVICE_NAME_MAX]; /* name of the RDMA device */ | |
| 89 | − __u8 ibport; /* RDMA device port number */ | |
| 90 | − __u8 gid[40]; /* local GID */ | |
| 91 | − __u8 peer_gid[40]; /* peer GID */ | |
| 92 | − __aligned_u64 net_cookie; /* RDMA device net namespace */ | |
| 87 | + __u8 link_id; /* link identifier */ | |
| 88 | + __u8 ibname[IB_DEVICE_NAME_MAX]; /* name of the RDMA device */ | |
| 89 | + __u8 ibport; /* RDMA device port number */ | |
| 90 | + __u8 gid[40]; /* local GID */ | |
| 91 | + __u8 peer_gid[40]; /* peer GID */ | |
| 93 | 92 | }; |
| 94 | 93 | |
| 95 | 94 | struct smc_diag_lgrinfo { |
| @@ -56,8 +56,10 @@ · 55 unmodified lines | ||
| 56 | 56 | * * |
| 57 | 57 | ****************************************************************************/ |
| 58 | 58 | |
| 59 | +#define AES_IEC958_STATUS_SIZE 24 | |
| 60 | + | |
| 59 | 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 | 63 | unsigned char subcode[147]; /* AES/IEC958 subcode bits */ |
| 62 | 64 | unsigned char pad; /* nothing */ |
| 63 | 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 | 48 | * Inserts the grant references into the mapping table of an instance |
| 49 | 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 | 58 | #define IOCTL_GNTDEV_MAP_GRANT_REF \ |
| 53 | 59 | _IOC(_IOC_NONE, 'G', 0, sizeof(struct ioctl_gntdev_map_grant_ref)) |
| @@ -1,6 +1,4 @@ | ||
| 1 | 1 | /****************************************************************************** |
| 2 | − * evtchn.h | |
| 3 | − * | |
| 4 | 2 | * Interface to /dev/xen/xenbus_backend. |
| 5 | 3 | * |
| 6 | 4 | * Copyright (c) 2011 Bastian Blank <waldi@debian.org> |