Skip to content

Commit ac92c27

Browse files
committed
Merge tag 's390-6.4-2' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux
Pull s390 fixes from Alexander Gordeev: - Add check whether the required facilities are installed before using the s390-specific ChaCha20 implementation - Key blobs for s390 protected key interface IOCTLs commands PKEY_VERIFYKEY2 and PKEY_VERIFYKEY3 may contain clear key material. Zeroize copies of these keys in kernel memory after creating protected keys - Set CONFIG_INIT_STACK_NONE=y in defconfigs to avoid extra overhead of initializing all stack variables by default - Make sure that when a new channel-path is enabled all subchannels are evaluated: with and without any devices connected on it - When SMT thread CPUs are added to CPU topology masks the nr_cpu_ids limit is not checked and could be exceeded. Respect the nr_cpu_ids limit and avoid a warning when CONFIG_DEBUG_PER_CPU_MAPS is set - The pointer to IPL Parameter Information Block is stored in the absolute lowcore as a virtual address. Save it as the physical address for later use by dump tools - Fix a Queued Direct I/O (QDIO) problem on z/VM guests using QIOASSIST with dedicated (pass through) QDIO-based devices such as FCP, real OSA or HiperSockets - s390's struct statfs and struct statfs64 contain padding, which field-by-field copying does not set. Initialize the respective structures with zeros before filling them and copying to userspace - Grow s390 compat_statfs64, statfs and statfs64 structures f_spare array member to cover padding and simplify things - Remove obsolete SCHED_BOOK and SCHED_DRAWER configs - Remove unneeded S390_CCW_IOMMU and S390_AP_IOM configs * tag 's390-6.4-2' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux: s390/iommu: get rid of S390_CCW_IOMMU and S390_AP_IOMMU s390/Kconfig: remove obsolete configs SCHED_{BOOK,DRAWER} s390/uapi: cover statfs padding by growing f_spare statfs: enforce statfs[64] structure initialization s390/qdio: fix do_sqbs() inline assembly constraint s390/ipl: fix IPIB virtual vs physical address confusion s390/topology: honour nr_cpu_ids when adding CPUs s390/cio: include subchannels without devices also for evaluation s390/defconfigs: set CONFIG_INIT_STACK_NONE=y s390/pkey: zeroize key blobs s390/crypto: use vector instructions only if available for ChaCha20
2 parents 4ffd96c + 0f1cbf9 commit ac92c27

File tree

15 files changed

+34
-55
lines changed

15 files changed

+34
-55
lines changed

Documentation/s390/vfio-ap.rst

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -551,7 +551,6 @@ These are the steps:
551551
* IOMMU_SUPPORT
552552
* S390
553553
* ZCRYPT
554-
* S390_AP_IOMMU
555554
* VFIO
556555
* KVM
557556

arch/s390/Kconfig

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -469,19 +469,11 @@ config SCHED_SMT
469469
config SCHED_MC
470470
def_bool n
471471

472-
config SCHED_BOOK
473-
def_bool n
474-
475-
config SCHED_DRAWER
476-
def_bool n
477-
478472
config SCHED_TOPOLOGY
479473
def_bool y
480474
prompt "Topology scheduler support"
481475
select SCHED_SMT
482476
select SCHED_MC
483-
select SCHED_BOOK
484-
select SCHED_DRAWER
485477
help
486478
Topology scheduler support improves the CPU scheduler's decision
487479
making when dealing with machines that have multi-threading,
@@ -716,7 +708,6 @@ config EADM_SCH
716708
config VFIO_CCW
717709
def_tristate n
718710
prompt "Support for VFIO-CCW subchannels"
719-
depends on S390_CCW_IOMMU
720711
depends on VFIO
721712
select VFIO_MDEV
722713
help
@@ -728,7 +719,7 @@ config VFIO_CCW
728719
config VFIO_AP
729720
def_tristate n
730721
prompt "VFIO support for AP devices"
731-
depends on S390_AP_IOMMU && KVM
722+
depends on KVM
732723
depends on VFIO
733724
depends on ZCRYPT
734725
select VFIO_MDEV

arch/s390/configs/debug_defconfig

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -591,8 +591,6 @@ CONFIG_VIRTIO_BALLOON=m
591591
CONFIG_VIRTIO_INPUT=y
592592
CONFIG_VHOST_NET=m
593593
CONFIG_VHOST_VSOCK=m
594-
CONFIG_S390_CCW_IOMMU=y
595-
CONFIG_S390_AP_IOMMU=y
596594
CONFIG_EXT4_FS=y
597595
CONFIG_EXT4_FS_POSIX_ACL=y
598596
CONFIG_EXT4_FS_SECURITY=y
@@ -703,6 +701,7 @@ CONFIG_IMA_DEFAULT_HASH_SHA256=y
703701
CONFIG_IMA_WRITE_POLICY=y
704702
CONFIG_IMA_APPRAISE=y
705703
CONFIG_LSM="yama,loadpin,safesetid,integrity,selinux,smack,tomoyo,apparmor"
704+
CONFIG_INIT_STACK_NONE=y
706705
CONFIG_CRYPTO_USER=m
707706
# CONFIG_CRYPTO_MANAGER_DISABLE_TESTS is not set
708707
CONFIG_CRYPTO_PCRYPT=m

arch/s390/configs/defconfig

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -580,8 +580,6 @@ CONFIG_VIRTIO_BALLOON=m
580580
CONFIG_VIRTIO_INPUT=y
581581
CONFIG_VHOST_NET=m
582582
CONFIG_VHOST_VSOCK=m
583-
CONFIG_S390_CCW_IOMMU=y
584-
CONFIG_S390_AP_IOMMU=y
585583
CONFIG_EXT4_FS=y
586584
CONFIG_EXT4_FS_POSIX_ACL=y
587585
CONFIG_EXT4_FS_SECURITY=y
@@ -686,6 +684,7 @@ CONFIG_IMA_DEFAULT_HASH_SHA256=y
686684
CONFIG_IMA_WRITE_POLICY=y
687685
CONFIG_IMA_APPRAISE=y
688686
CONFIG_LSM="yama,loadpin,safesetid,integrity,selinux,smack,tomoyo,apparmor"
687+
CONFIG_INIT_STACK_NONE=y
689688
CONFIG_CRYPTO_FIPS=y
690689
CONFIG_CRYPTO_USER=m
691690
# CONFIG_CRYPTO_MANAGER_DISABLE_TESTS is not set

arch/s390/configs/zfcpdump_defconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ CONFIG_ZFCP=y
6767
# CONFIG_MISC_FILESYSTEMS is not set
6868
# CONFIG_NETWORK_FILESYSTEMS is not set
6969
CONFIG_LSM="yama,loadpin,safesetid,integrity"
70+
CONFIG_INIT_STACK_NONE=y
7071
# CONFIG_ZLIB_DFLTCC is not set
7172
CONFIG_XZ_DEC_MICROLZMA=y
7273
CONFIG_PRINTK_TIME=y

arch/s390/crypto/chacha-glue.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ void chacha_crypt_arch(u32 *state, u8 *dst, const u8 *src,
8282
* it cannot handle a block of data or less, but otherwise
8383
* it can handle data of arbitrary size
8484
*/
85-
if (bytes <= CHACHA_BLOCK_SIZE || nrounds != 20)
85+
if (bytes <= CHACHA_BLOCK_SIZE || nrounds != 20 || !MACHINE_HAS_VX)
8686
chacha_crypt_generic(state, dst, src, bytes, nrounds);
8787
else
8888
chacha20_crypt_s390(state, dst, src, bytes,

arch/s390/include/asm/compat.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ struct compat_statfs64 {
112112
u32 f_namelen;
113113
u32 f_frsize;
114114
u32 f_flags;
115-
u32 f_spare[4];
115+
u32 f_spare[5];
116116
};
117117

118118
/*

arch/s390/include/uapi/asm/statfs.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ struct statfs {
3030
unsigned int f_namelen;
3131
unsigned int f_frsize;
3232
unsigned int f_flags;
33-
unsigned int f_spare[4];
33+
unsigned int f_spare[5];
3434
};
3535

3636
struct statfs64 {
@@ -45,7 +45,7 @@ struct statfs64 {
4545
unsigned int f_namelen;
4646
unsigned int f_frsize;
4747
unsigned int f_flags;
48-
unsigned int f_spare[4];
48+
unsigned int f_spare[5];
4949
};
5050

5151
#endif

arch/s390/kernel/ipl.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1935,14 +1935,13 @@ static struct shutdown_action __refdata dump_action = {
19351935

19361936
static void dump_reipl_run(struct shutdown_trigger *trigger)
19371937
{
1938-
unsigned long ipib = (unsigned long) reipl_block_actual;
19391938
struct lowcore *abs_lc;
19401939
unsigned int csum;
19411940

19421941
csum = (__force unsigned int)
19431942
csum_partial(reipl_block_actual, reipl_block_actual->hdr.len, 0);
19441943
abs_lc = get_abs_lowcore();
1945-
abs_lc->ipib = ipib;
1944+
abs_lc->ipib = __pa(reipl_block_actual);
19461945
abs_lc->ipib_checksum = csum;
19471946
put_abs_lowcore(abs_lc);
19481947
dump_run(trigger);

arch/s390/kernel/topology.c

Lines changed: 17 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ static void cpu_group_map(cpumask_t *dst, struct mask_info *info, unsigned int c
9595
static void cpu_thread_map(cpumask_t *dst, unsigned int cpu)
9696
{
9797
static cpumask_t mask;
98-
int i;
98+
unsigned int max_cpu;
9999

100100
cpumask_clear(&mask);
101101
if (!cpumask_test_cpu(cpu, &cpu_setup_mask))
@@ -104,9 +104,10 @@ static void cpu_thread_map(cpumask_t *dst, unsigned int cpu)
104104
if (topology_mode != TOPOLOGY_MODE_HW)
105105
goto out;
106106
cpu -= cpu % (smp_cpu_mtid + 1);
107-
for (i = 0; i <= smp_cpu_mtid; i++) {
108-
if (cpumask_test_cpu(cpu + i, &cpu_setup_mask))
109-
cpumask_set_cpu(cpu + i, &mask);
107+
max_cpu = min(cpu + smp_cpu_mtid, nr_cpu_ids - 1);
108+
for (; cpu <= max_cpu; cpu++) {
109+
if (cpumask_test_cpu(cpu, &cpu_setup_mask))
110+
cpumask_set_cpu(cpu, &mask);
110111
}
111112
out:
112113
cpumask_copy(dst, &mask);
@@ -123,25 +124,26 @@ static void add_cpus_to_mask(struct topology_core *tl_core,
123124
unsigned int core;
124125

125126
for_each_set_bit(core, &tl_core->mask, TOPOLOGY_CORE_BITS) {
126-
unsigned int rcore;
127-
int lcpu, i;
127+
unsigned int max_cpu, rcore;
128+
int cpu;
128129

129130
rcore = TOPOLOGY_CORE_BITS - 1 - core + tl_core->origin;
130-
lcpu = smp_find_processor_id(rcore << smp_cpu_mt_shift);
131-
if (lcpu < 0)
131+
cpu = smp_find_processor_id(rcore << smp_cpu_mt_shift);
132+
if (cpu < 0)
132133
continue;
133-
for (i = 0; i <= smp_cpu_mtid; i++) {
134-
topo = &cpu_topology[lcpu + i];
134+
max_cpu = min(cpu + smp_cpu_mtid, nr_cpu_ids - 1);
135+
for (; cpu <= max_cpu; cpu++) {
136+
topo = &cpu_topology[cpu];
135137
topo->drawer_id = drawer->id;
136138
topo->book_id = book->id;
137139
topo->socket_id = socket->id;
138140
topo->core_id = rcore;
139-
topo->thread_id = lcpu + i;
141+
topo->thread_id = cpu;
140142
topo->dedicated = tl_core->d;
141-
cpumask_set_cpu(lcpu + i, &drawer->mask);
142-
cpumask_set_cpu(lcpu + i, &book->mask);
143-
cpumask_set_cpu(lcpu + i, &socket->mask);
144-
smp_cpu_set_polarization(lcpu + i, tl_core->pp);
143+
cpumask_set_cpu(cpu, &drawer->mask);
144+
cpumask_set_cpu(cpu, &book->mask);
145+
cpumask_set_cpu(cpu, &socket->mask);
146+
smp_cpu_set_polarization(cpu, tl_core->pp);
145147
}
146148
}
147149
}

0 commit comments

Comments
 (0)