mirror of
https://github.com/torvalds/linux.git
synced 2026-07-27 17:47:41 +02:00
s390 updates for 7.2-rc4
- Fix checksum lib on machines without the vector facility where the non-vector fallback made csum_partial() calculate the checksum from address 0 instead of the provided buffer - Fix cpum_cf perf event initialization missing speculation barrier for user controlled event numbers used as generic event array indexes -----BEGIN PGP SIGNATURE----- iQEzBAABCgAdFiEE3QHqV+H2a8xAv27vjYWKoQLXFBgFAmpcDpgACgkQjYWKoQLX FBizogf/fOTDdmXPx2xp5PFadlaoVnRmycslrPDog+lVp2tl+RXlAU6mKT27gcXT 2G/PCF9SjYQSQdGztMNPCh6Az1cAo+XvhADtElumRAjlybTYlk++aallv5+buHRS Z2jEnurYVWQaQP/PpFDIUhh7Yf6ggrctXuRdYgyJv/5Siy4OQYQEpWQazQXyfOZI 506gQ2M4mD8dIJRgZygM7tQztR7K8IFDIUPzxMCiBKj9XQQBpZ0Q9SOm07nL6dtS MHcXbyd80XbvVoYNCZHquktJ4ZOvru+sA65Hd94TSHOQRDxuuiDueo6VYPPqBX5o /ENY4mFt0aD7m0lbTqMyxrUI2bDzLg== =WPyD -----END PGP SIGNATURE----- Merge tag 's390-7.2-5' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux Pull s390 fixes from Vasily Gorbik: - Fix checksum lib on machines without the vector facility where the non-vector fallback made csum_partial() calculate the checksum from address 0 instead of the provided buffer - Fix cpum_cf perf event initialization missing speculation barrier for user controlled event numbers used as generic event array indexes * tag 's390-7.2-5' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux: s390/perf_cpum_cf: Add missing array_index_nospec() to __hw_perf_event_init() s390/checksum: Fix csum_partial() without vector facility
This commit is contained in:
commit
c6859eed75
|
|
@ -15,6 +15,7 @@
|
|||
#include <linux/init.h>
|
||||
#include <linux/miscdevice.h>
|
||||
#include <linux/perf_event.h>
|
||||
#include <linux/nospec.h>
|
||||
|
||||
#include <asm/cpu_mf.h>
|
||||
#include <asm/hwctrset.h>
|
||||
|
|
@ -768,6 +769,7 @@ static int __hw_perf_event_init(struct perf_event *event, unsigned int type)
|
|||
if (!is_userspace_event(ev)) {
|
||||
if (ev >= ARRAY_SIZE(cpumf_generic_events_user))
|
||||
return -EOPNOTSUPP;
|
||||
ev = array_index_nospec(ev, ARRAY_SIZE(cpumf_generic_events_user));
|
||||
ev = cpumf_generic_events_user[ev];
|
||||
}
|
||||
} else if (!attr->exclude_kernel && attr->exclude_user) {
|
||||
|
|
@ -778,6 +780,7 @@ static int __hw_perf_event_init(struct perf_event *event, unsigned int type)
|
|||
if (!is_userspace_event(ev)) {
|
||||
if (ev >= ARRAY_SIZE(cpumf_generic_events_basic))
|
||||
return -EOPNOTSUPP;
|
||||
ev = array_index_nospec(ev, ARRAY_SIZE(cpumf_generic_events_basic));
|
||||
ev = cpumf_generic_events_basic[ev];
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ static __always_inline __wsum csum_copy(void *dst, const void *src, int len, __w
|
|||
if (!cpu_has_vx()) {
|
||||
if (copy)
|
||||
memcpy(dst, src, len);
|
||||
return cksm(dst, len, sum);
|
||||
return cksm(src, len, sum);
|
||||
}
|
||||
kernel_fpu_begin(&vxstate, KERNEL_VXR_V16V23);
|
||||
fpu_vlvgf(16, (__force u32)sum, 1);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user