Skip to content

Commit 82d88f8

Browse files
committed
Merge remote-tracking branch 'remotes/thuth/tags/pull-request-2021-10-15' into staging
* Check kernel command line size on s390x * Simplification of one of the SIGP instructions on s390x * Cornelia stepping down as maintainer in some subsystems * Update the dtc submodule to a proper release version # gpg: Signature made Fri 15 Oct 2021 02:11:13 AM PDT # gpg: using RSA key 27B88847EEE0250118F3EAB92ED9D774FE702DB5 # gpg: issuer "[email protected]" # gpg: Good signature from "Thomas Huth <[email protected]>" [full] # gpg: aka "Thomas Huth <[email protected]>" [full] # gpg: aka "Thomas Huth <[email protected]>" [unknown] # gpg: aka "Thomas Huth <[email protected]>" [full] * remotes/thuth/tags/pull-request-2021-10-15: dtc: Update to version 1.6.1 s390x virtio-ccw machine: step down as maintainer s390x/kvm: step down as maintainer vfio-ccw: step down as maintainer s390x: sigp: Force Set Architecture to return Invalid Parameter s390x/ipl: check kernel command line size Signed-off-by: Richard Henderson <[email protected]>
2 parents 4d1a525 + 962fde5 commit 82d88f8

File tree

4 files changed

+13
-25
lines changed

4 files changed

+13
-25
lines changed

MAINTAINERS

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -393,7 +393,6 @@ F: target/ppc/kvm.c
393393

394394
S390 KVM CPUs
395395
M: Halil Pasic <[email protected]>
396-
M: Cornelia Huck <[email protected]>
397396
M: Christian Borntraeger <[email protected]>
398397
S: Supported
399398
F: target/s390x/kvm/
@@ -408,7 +407,6 @@ F: hw/intc/s390_flic.c
408407
F: hw/intc/s390_flic_kvm.c
409408
F: include/hw/s390x/s390_flic.h
410409
F: gdb-xml/s390*.xml
411-
T: git https://gitlab.com/cohuck/qemu.git s390-next
412410
T: git https://github.com/borntraeger/qemu.git s390-next
413411
414412

@@ -1514,7 +1512,6 @@ F: tests/acceptance/machine_sparc_leon3.py
15141512
S390 Machines
15151513
-------------
15161514
S390 Virtio-ccw
1517-
M: Cornelia Huck <[email protected]>
15181515
M: Halil Pasic <[email protected]>
15191516
M: Christian Borntraeger <[email protected]>
15201517
S: Supported
@@ -1526,7 +1523,6 @@ F: hw/watchdog/wdt_diag288.c
15261523
F: include/hw/watchdog/wdt_diag288.h
15271524
F: configs/devices/s390x-softmmu/default.mak
15281525
F: tests/acceptance/machine_s390_ccw_virtio.py
1529-
T: git https://gitlab.com/cohuck/qemu.git s390-next
15301526
T: git https://github.com/borntraeger/qemu.git s390-next
15311527
15321528

@@ -1865,15 +1861,13 @@ F: docs/igd-assign.txt
18651861
F: docs/devel/vfio-migration.rst
18661862

18671863
vfio-ccw
1868-
M: Cornelia Huck <[email protected]>
18691864
M: Eric Farman <[email protected]>
18701865
M: Matthew Rosato <[email protected]>
18711866
S: Supported
18721867
F: hw/vfio/ccw.c
18731868
F: hw/s390x/s390-ccw.c
18741869
F: include/hw/s390x/s390-ccw.h
18751870
F: include/hw/s390x/vfio-ccw.h
1876-
T: git https://gitlab.com/cohuck/qemu.git s390-next
18771871
18781872

18791873
vfio-ap

dtc

Submodule dtc updated from 85e5d83 to b6910be

hw/s390x/ipl.c

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@
3838
#define KERN_IMAGE_START 0x010000UL
3939
#define LINUX_MAGIC_ADDR 0x010008UL
4040
#define KERN_PARM_AREA 0x010480UL
41+
#define KERN_PARM_AREA_SIZE 0x000380UL
4142
#define INITRD_START 0x800000UL
4243
#define INITRD_PARM_START 0x010408UL
4344
#define PARMFILE_START 0x001000UL
@@ -190,10 +191,19 @@ static void s390_ipl_realize(DeviceState *dev, Error **errp)
190191
* loader) and it won't work. For this case we force it to 0x10000, too.
191192
*/
192193
if (pentry == KERN_IMAGE_START || pentry == 0x800) {
193-
char *parm_area = rom_ptr(KERN_PARM_AREA, strlen(ipl->cmdline) + 1);
194+
size_t cmdline_size = strlen(ipl->cmdline) + 1;
195+
char *parm_area = rom_ptr(KERN_PARM_AREA, cmdline_size);
196+
194197
ipl->start_addr = KERN_IMAGE_START;
195198
/* Overwrite parameters in the kernel image, which are "rom" */
196199
if (parm_area) {
200+
if (cmdline_size > KERN_PARM_AREA_SIZE) {
201+
error_setg(errp,
202+
"kernel command line exceeds maximum size: %zu > %lu",
203+
cmdline_size, KERN_PARM_AREA_SIZE);
204+
return;
205+
}
206+
197207
strcpy(parm_area, ipl->cmdline);
198208
}
199209
} else {

target/s390x/sigp.c

Lines changed: 1 addition & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -428,26 +428,10 @@ static int handle_sigp_single_dst(S390CPU *cpu, S390CPU *dst_cpu, uint8_t order,
428428
static int sigp_set_architecture(S390CPU *cpu, uint32_t param,
429429
uint64_t *status_reg)
430430
{
431-
CPUState *cur_cs;
432-
S390CPU *cur_cpu;
433-
bool all_stopped = true;
434-
435-
CPU_FOREACH(cur_cs) {
436-
cur_cpu = S390_CPU(cur_cs);
437-
438-
if (cur_cpu == cpu) {
439-
continue;
440-
}
441-
if (s390_cpu_get_state(cur_cpu) != S390_CPU_STATE_STOPPED) {
442-
all_stopped = false;
443-
}
444-
}
445-
446431
*status_reg &= 0xffffffff00000000ULL;
447432

448433
/* Reject set arch order, with czam we're always in z/Arch mode. */
449-
*status_reg |= (all_stopped ? SIGP_STAT_INVALID_PARAMETER :
450-
SIGP_STAT_INCORRECT_STATE);
434+
*status_reg |= SIGP_STAT_INVALID_PARAMETER;
451435
return SIGP_CC_STATUS_STORED;
452436
}
453437

0 commit comments

Comments
 (0)