History

Merge branch 'errata/tx2-219' into for-next/fixes

Workaround for Cavium/Marvell ThunderX2 erratum #219. * errata/tx2-219: arm64: Allow CAVIUM_TX2_ERRATUM_219 to be selected arm64: Avoid Cavium TX2 erratum 219 when switching TTBR arm64: Enable workaround for Cavium TX2 erratum 219 when running SMT arm64: KVM: Trap VM ops when ARM64_WORKAROUND_CAVIUM_TX2_219_TVM is set

Will Deacon committed 7 years ago

Commit 777d0622 parents 597399d 603afdc298 files · +2755 −1802Browse files

Showing the changes to include (13 of 298 files). Show all

Unified · Split

13 files
  1. include/linux/bitops.h +7 −0
  2. include/linux/dsa/sja1105.h +3 −1
  3. include/linux/kvm_host.h +2 −0
  4. include/linux/mii.h +9 −0
  5. include/linux/phy.h +2 −0
  6. include/linux/skbuff.h +1 −4
  7. include/linux/uaccess.h +70 −0
  8. include/trace/events/rxrpc.h +1 −1
  9. include/uapi/drm/amdgpu_drm.h +2 −0
  10. include/uapi/linux/nvme_ioctl.h +23 −0
  11. include/uapi/linux/pg.h +4 −1
  12. include/uapi/linux/sched.h +28 −2
  13. include/xen/xen-ops.h +1 −24
include/linux/bitops.h+7−0
@@ -4,6 +4,13 @@ · 3 unmodified lines
4#include <asm/types.h>4#include <asm/types.h>
5#include <linux/bits.h>5#include <linux/bits.h>
6 6
7/* Set bits in the first 'n' bytes when loaded from memory */
8#ifdef __LITTLE_ENDIAN
9# define aligned_byte_mask(n) ((1UL << 8*(n))-1)
10#else
11# define aligned_byte_mask(n) (~0xffUL << (BITS_PER_LONG - 8 - 8*(n)))
12#endif
13
7#define BITS_PER_TYPE(type) (sizeof(type) * BITS_PER_BYTE)14#define BITS_PER_TYPE(type) (sizeof(type) * BITS_PER_BYTE)
8#define BITS_TO_LONGS(nr) DIV_ROUND_UP(nr, BITS_PER_TYPE(long))15#define BITS_TO_LONGS(nr) DIV_ROUND_UP(nr, BITS_PER_TYPE(long))
9 16
include/linux/dsa/sja1105.h+3−1
@@ -31,6 +31,8 @@ · 30 unmodified lines
31#define SJA1105_META_SMAC 0x222222222222ull31#define SJA1105_META_SMAC 0x222222222222ull
32#define SJA1105_META_DMAC 0x0180C200000Eull32#define SJA1105_META_DMAC 0x0180C200000Eull
33 33
34#define SJA1105_HWTS_RX_EN 0
35
34/* Global tagger data: each struct sja1105_port has a reference to36/* Global tagger data: each struct sja1105_port has a reference to
35 * the structure defined in struct sja1105_private.37 * the structure defined in struct sja1105_private.
36 */38 */
@@ -42,7 +44,7 @@ struct sja1105_tagger_data { · 5 unmodified lines
42 * from taggers running on multiple ports on SMP systems44 * from taggers running on multiple ports on SMP systems
43 */45 */
44 spinlock_t meta_lock;46 spinlock_t meta_lock;
45 bool hwts_rx_en;47 unsigned long state;
46};48};
47 49
48struct sja1105_skb_cb {50struct sja1105_skb_cb {
include/linux/kvm_host.h+2−0
@@ -1090,6 +1090,7 @@ enum kvm_stat_kind { · 1089 unmodified lines
1090 1090
1091struct kvm_stat_data {1091struct kvm_stat_data {
1092 int offset;1092 int offset;
1093 int mode;
1093 struct kvm *kvm;1094 struct kvm *kvm;
1094};1095};
1095 1096
@@ -1097,6 +1098,7 @@ struct kvm_stats_debugfs_item { · 1 unmodified line
1097 const char *name;1098 const char *name;
1098 int offset;1099 int offset;
1099 enum kvm_stat_kind kind;1100 enum kvm_stat_kind kind;
1101 int mode;
1100};1102};
1101extern struct kvm_stats_debugfs_item debugfs_entries[];1103extern struct kvm_stats_debugfs_item debugfs_entries[];
1102extern struct dentry *kvm_debugfs_dir;1104extern struct dentry *kvm_debugfs_dir;
include/linux/mii.h+9−0
@@ -455,6 +455,15 @@ static inline void mii_lpa_mod_linkmode_lpa_t(unsigned long *lp_advertising, · 454 unmodified lines
455 lp_advertising, lpa & LPA_LPACK);455 lp_advertising, lpa & LPA_LPACK);
456}456}
457 457
458static inline void mii_ctrl1000_mod_linkmode_adv_t(unsigned long *advertising,
459 u32 ctrl1000)
460{
461 linkmode_mod_bit(ETHTOOL_LINK_MODE_1000baseT_Half_BIT, advertising,
462 ctrl1000 & ADVERTISE_1000HALF);
463 linkmode_mod_bit(ETHTOOL_LINK_MODE_1000baseT_Full_BIT, advertising,
464 ctrl1000 & ADVERTISE_1000FULL);
465}
466
458/**467/**
459 * linkmode_adv_to_lcl_adv_t468 * linkmode_adv_to_lcl_adv_t
460 * @advertising:pointer to linkmode advertising469 * @advertising:pointer to linkmode advertising
include/linux/phy.h+2−0
@@ -678,6 +678,7 @@ static inline bool phy_is_started(struct phy_device *phydev) · 677 unmodified lines
678 return phydev->state >= PHY_UP;678 return phydev->state >= PHY_UP;
679}679}
680 680
681void phy_resolve_aneg_pause(struct phy_device *phydev);
681void phy_resolve_aneg_linkmode(struct phy_device *phydev);682void phy_resolve_aneg_linkmode(struct phy_device *phydev);
682 683
683/**684/**
@@ -1076,6 +1077,7 @@ int genphy_config_eee_advert(struct phy_device *phydev); · 392 unmodified lines
1076int __genphy_config_aneg(struct phy_device *phydev, bool changed);1077int __genphy_config_aneg(struct phy_device *phydev, bool changed);
1077int genphy_aneg_done(struct phy_device *phydev);1078int genphy_aneg_done(struct phy_device *phydev);
1078int genphy_update_link(struct phy_device *phydev);1079int genphy_update_link(struct phy_device *phydev);
1080int genphy_read_lpa(struct phy_device *phydev);
1079int genphy_read_status(struct phy_device *phydev);1081int genphy_read_status(struct phy_device *phydev);
1080int genphy_suspend(struct phy_device *phydev);1082int genphy_suspend(struct phy_device *phydev);
1081int genphy_resume(struct phy_device *phydev);1083int genphy_resume(struct phy_device *phydev);
include/linux/skbuff.h+1−4
@@ -4160,15 +4160,12 @@ static inline void __skb_ext_copy(struct sk_buff *d, const struct sk_buff *s) {} · 4159 unmodified lines
4160static inline void skb_ext_copy(struct sk_buff *dst, const struct sk_buff *s) {}4160static inline void skb_ext_copy(struct sk_buff *dst, const struct sk_buff *s) {}
4161#endif /* CONFIG_SKB_EXTENSIONS */4161#endif /* CONFIG_SKB_EXTENSIONS */
4162 4162
4163static inline void nf_reset(struct sk_buff *skb)4163static inline void nf_reset_ct(struct sk_buff *skb)
4164{4164{
4165#if defined(CONFIG_NF_CONNTRACK) || defined(CONFIG_NF_CONNTRACK_MODULE)4165#if defined(CONFIG_NF_CONNTRACK) || defined(CONFIG_NF_CONNTRACK_MODULE)
4166 nf_conntrack_put(skb_nfct(skb));4166 nf_conntrack_put(skb_nfct(skb));
4167 skb->_nfct = 0;4167 skb->_nfct = 0;
4168#endif4168#endif
4169#if IS_ENABLED(CONFIG_BRIDGE_NETFILTER)
4170 skb_ext_del(skb, SKB_EXT_BRIDGE_NF);
4171#endif
4172}4169}
4173 4170
4174static inline void nf_reset_trace(struct sk_buff *skb)4171static inline void nf_reset_trace(struct sk_buff *skb)
include/linux/uaccess.h+70−0
@@ -231,6 +231,76 @@ __copy_from_user_inatomic_nocache(void *to, const void __user *from, · 230 unmodified lines
231 231
232#endif /* ARCH_HAS_NOCACHE_UACCESS */232#endif /* ARCH_HAS_NOCACHE_UACCESS */
233 233
234extern __must_check int check_zeroed_user(const void __user *from, size_t size);
235
236/**
237 * copy_struct_from_user: copy a struct from userspace
238 * @dst: Destination address, in kernel space. This buffer must be @ksize
239 * bytes long.
240 * @ksize: Size of @dst struct.
241 * @src: Source address, in userspace.
242 * @usize: (Alleged) size of @src struct.
243 *
244 * Copies a struct from userspace to kernel space, in a way that guarantees
245 * backwards-compatibility for struct syscall arguments (as long as future
246 * struct extensions are made such that all new fields are *appended* to the
247 * old struct, and zeroed-out new fields have the same meaning as the old
248 * struct).
249 *
250 * @ksize is just sizeof(*dst), and @usize should've been passed by userspace.
251 * The recommended usage is something like the following:
252 *
253 * SYSCALL_DEFINE2(foobar, const struct foo __user *, uarg, size_t, usize)
254 * {
255 * int err;
256 * struct foo karg = {};
257 *
258 * if (usize > PAGE_SIZE)
259 * return -E2BIG;
260 * if (usize < FOO_SIZE_VER0)
261 * return -EINVAL;
262 *
263 * err = copy_struct_from_user(&karg, sizeof(karg), uarg, usize);
264 * if (err)
265 * return err;
266 *
267 * // ...
268 * }
269 *
270 * There are three cases to consider:
271 * * If @usize == @ksize, then it's copied verbatim.
272 * * If @usize < @ksize, then the userspace has passed an old struct to a
273 * newer kernel. The rest of the trailing bytes in @dst (@ksize - @usize)
274 * are to be zero-filled.
275 * * If @usize > @ksize, then the userspace has passed a new struct to an
276 * older kernel. The trailing bytes unknown to the kernel (@usize - @ksize)
277 * are checked to ensure they are zeroed, otherwise -E2BIG is returned.
278 *
279 * Returns (in all cases, some data may have been copied):
280 * * -E2BIG: (@usize > @ksize) and there are non-zero trailing bytes in @src.
281 * * -EFAULT: access to userspace failed.
282 */
283static __always_inline __must_check int
284copy_struct_from_user(void *dst, size_t ksize, const void __user *src,
285 size_t usize)
286{
287 size_t size = min(ksize, usize);
288 size_t rest = max(ksize, usize) - size;
289
290 /* Deal with trailing bytes. */
291 if (usize < ksize) {
292 memset(dst + size, 0, rest);
293 } else if (usize > ksize) {
294 int ret = check_zeroed_user(src + size, rest);
295 if (ret <= 0)
296 return ret ?: -E2BIG;
297 }
298 /* Copy the interoperable parts of the struct. */
299 if (copy_from_user(dst, src, size))
300 return -EFAULT;
301 return 0;
302}
303
234/*304/*
235 * probe_kernel_read(): safely attempt to read from a location305 * probe_kernel_read(): safely attempt to read from a location
236 * @dst: pointer to the buffer that shall take the data306 * @dst: pointer to the buffer that shall take the data
include/trace/events/rxrpc.h+1−1
@@ -1068,7 +1068,7 @@ TRACE_EVENT(rxrpc_recvmsg, · 1067 unmodified lines
1068 ),1068 ),
1069 1069
1070 TP_fast_assign(1070 TP_fast_assign(
1071 __entry->call = call->debug_id;1071 __entry->call = call ? call->debug_id : 0;
1072 __entry->why = why;1072 __entry->why = why;
1073 __entry->seq = seq;1073 __entry->seq = seq;
1074 __entry->offset = offset;1074 __entry->offset = offset;
include/uapi/drm/amdgpu_drm.h+2−0
@@ -1003,6 +1003,8 @@ struct drm_amdgpu_info_device { · 1002 unmodified lines
1003 __u64 high_va_max;1003 __u64 high_va_max;
1004 /* gfx10 pa_sc_tile_steering_override */1004 /* gfx10 pa_sc_tile_steering_override */
1005 __u32 pa_sc_tile_steering_override;1005 __u32 pa_sc_tile_steering_override;
1006 /* disabled TCCs */
1007 __u64 tcc_disabled_mask;
1006};1008};
1007 1009
1008struct drm_amdgpu_info_hw_ip {1010struct drm_amdgpu_info_hw_ip {
include/uapi/linux/nvme_ioctl.h+23−0
@@ -45,6 +45,27 @@ struct nvme_passthru_cmd { · 44 unmodified lines
45 __u32 result;45 __u32 result;
46};46};
47 47
48struct nvme_passthru_cmd64 {
49 __u8 opcode;
50 __u8 flags;
51 __u16 rsvd1;
52 __u32 nsid;
53 __u32 cdw2;
54 __u32 cdw3;
55 __u64 metadata;
56 __u64 addr;
57 __u32 metadata_len;
58 __u32 data_len;
59 __u32 cdw10;
60 __u32 cdw11;
61 __u32 cdw12;
62 __u32 cdw13;
63 __u32 cdw14;
64 __u32 cdw15;
65 __u32 timeout_ms;
66 __u64 result;
67};
68
48#define nvme_admin_cmd nvme_passthru_cmd69#define nvme_admin_cmd nvme_passthru_cmd
49 70
50#define NVME_IOCTL_ID _IO('N', 0x40)71#define NVME_IOCTL_ID _IO('N', 0x40)
@@ -54,5 +75,7 @@ struct nvme_passthru_cmd { · 3 unmodified lines
54#define NVME_IOCTL_RESET _IO('N', 0x44)75#define NVME_IOCTL_RESET _IO('N', 0x44)
55#define NVME_IOCTL_SUBSYS_RESET _IO('N', 0x45)76#define NVME_IOCTL_SUBSYS_RESET _IO('N', 0x45)
56#define NVME_IOCTL_RESCAN _IO('N', 0x46)77#define NVME_IOCTL_RESCAN _IO('N', 0x46)
78#define NVME_IOCTL_ADMIN64_CMD _IOWR('N', 0x47, struct nvme_passthru_cmd64)
79#define NVME_IOCTL_IO64_CMD _IOWR('N', 0x48, struct nvme_passthru_cmd64)
57 80
58#endif /* _UAPI_LINUX_NVME_IOCTL_H */81#endif /* _UAPI_LINUX_NVME_IOCTL_H */
include/uapi/linux/pg.h+4−1
@@ -35,6 +35,9 @@ · 34 unmodified lines
35 35
36*/36*/
37 37
38#ifndef _UAPI_LINUX_PG_H
39#define _UAPI_LINUX_PG_H
40
38#define PG_MAGIC 'P'41#define PG_MAGIC 'P'
39#define PG_RESET 'Z'42#define PG_RESET 'Z'
40#define PG_COMMAND 'C'43#define PG_COMMAND 'C'
@@ -61,4 +64,4 @@ struct pg_read_hdr { · 20 unmodified lines
61 64
62};65};
63 66
64/* end of pg.h */67#endif /* _UAPI_LINUX_PG_H */
include/uapi/linux/sched.h+28−2
@@ -33,8 +33,31 @@ · 32 unmodified lines
33#define CLONE_NEWNET 0x40000000 /* New network namespace */33#define CLONE_NEWNET 0x40000000 /* New network namespace */
34#define CLONE_IO 0x80000000 /* Clone io context */34#define CLONE_IO 0x80000000 /* Clone io context */
35 35
36/*36#ifndef __ASSEMBLY__
37 * Arguments for the clone3 syscall37/**
38 * struct clone_args - arguments for the clone3 syscall
39 * @flags: Flags for the new process as listed above.
40 * All flags are valid except for CSIGNAL and
41 * CLONE_DETACHED.
42 * @pidfd: If CLONE_PIDFD is set, a pidfd will be
43 * returned in this argument.
44 * @child_tid: If CLONE_CHILD_SETTID is set, the TID of the
45 * child process will be returned in the child's
46 * memory.
47 * @parent_tid: If CLONE_PARENT_SETTID is set, the TID of
48 * the child process will be returned in the
49 * parent's memory.
50 * @exit_signal: The exit_signal the parent process will be
51 * sent when the child exits.
52 * @stack: Specify the location of the stack for the
53 * child process.
54 * @stack_size: The size of the stack for the child process.
55 * @tls: If CLONE_SETTLS is set, the tls descriptor
56 * is set to tls.
57 *
58 * The structure is versioned by size and thus extensible.
59 * New struct members must go at the end of the struct and
60 * must be properly 64bit aligned.
38 */61 */
39struct clone_args {62struct clone_args {
40 __aligned_u64 flags;63 __aligned_u64 flags;
@@ -46,6 +69,9 @@ struct clone_args { · 5 unmodified lines
46 __aligned_u64 stack_size;69 __aligned_u64 stack_size;
47 __aligned_u64 tls;70 __aligned_u64 tls;
48};71};
72#endif
73
74#define CLONE_ARGS_SIZE_VER0 64 /* sizeof first published struct */
49 75
50/*76/*
51 * Scheduling policies77 * Scheduling policies
include/xen/xen-ops.h+1−24
@@ -212,30 +212,7 @@ int xen_xlate_map_ballooned_pages(xen_pfn_t **pfns, void **vaddr, · 211 unmodified lines
212 212
213bool xen_running_on_version_or_later(unsigned int major, unsigned int minor);213bool xen_running_on_version_or_later(unsigned int major, unsigned int minor);
214 214
215efi_status_t xen_efi_get_time(efi_time_t *tm, efi_time_cap_t *tc);215void xen_efi_runtime_setup(void);
216efi_status_t xen_efi_set_time(efi_time_t *tm);
217efi_status_t xen_efi_get_wakeup_time(efi_bool_t *enabled, efi_bool_t *pending,
218 efi_time_t *tm);
219efi_status_t xen_efi_set_wakeup_time(efi_bool_t enabled, efi_time_t *tm);
220efi_status_t xen_efi_get_variable(efi_char16_t *name, efi_guid_t *vendor,
221 u32 *attr, unsigned long *data_size,
222 void *data);
223efi_status_t xen_efi_get_next_variable(unsigned long *name_size,
224 efi_char16_t *name, efi_guid_t *vendor);
225efi_status_t xen_efi_set_variable(efi_char16_t *name, efi_guid_t *vendor,
226 u32 attr, unsigned long data_size,
227 void *data);
228efi_status_t xen_efi_query_variable_info(u32 attr, u64 *storage_space,
229 u64 *remaining_space,
230 u64 *max_variable_size);
231efi_status_t xen_efi_get_next_high_mono_count(u32 *count);
232efi_status_t xen_efi_update_capsule(efi_capsule_header_t **capsules,
233 unsigned long count, unsigned long sg_list);
234efi_status_t xen_efi_query_capsule_caps(efi_capsule_header_t **capsules,
235 unsigned long count, u64 *max_size,
236 int *reset_type);
237void xen_efi_reset_system(int reset_type, efi_status_t status,
238 unsigned long data_size, efi_char16_t *data);
239 216
240 217
241#ifdef CONFIG_PREEMPT218#ifdef CONFIG_PREEMPT

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t