s390 fixes for 6.10-rc7

- Fix and add physical to virtual address translations in dasd and
   virtio_ccw drivers. For virtio_ccw this is just a minimal fix.
   More code cleanup will follow.
 
 - Small defconfig updates
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEECMNfWEw3SLnmiLkZIg7DeRspbsIFAmaGrwoACgkQIg7DeRsp
 bsI6VxAAlGcZEERzkbDNyEOpuEsTb6pgGQ4EvJKsBlDS53d6kO4FLPZGxAiL7mJi
 GgtZg7ydABRU55ZPRRbJ2g5vtHAN8PqFsFzgxxIsCPWZUDj/wyRL5y+4lz4/q8ZJ
 AXy/Tk4Ck9qvZF1nPqdxLBPONeDqv7bgEIPiFYhPlq+HesAl+DKsd0oYg7Ur9Sk4
 IMvsr0Rc063h7sZAwL8VgwsZxeA8UF5g+OKuoa6huPlu0gvIADlTUa1rUuKn8s5b
 o39zoRMSGUZ1wpLWQasnHf4qYY4xhbBv5Uw8HWxoGXsw6DXXkKrcd9VhdSJY7P+E
 CYV0N5EwFYsQjGH07XOWbks9pAyFVpyz8sMlzhlHBQziFa6kyRxkAVHabGNNXJKj
 XtMb5MjjngGa4qhZ4SuHBuT9bzO4IGn2qW8aigEvhX5ti6hZMw4ypLt78Y2WqbXJ
 yZD37Cj8aUDw2EVbNHDBSwPjTaAsOFYtIVstbWD4tvR/JeBI5wESGQQJmkDFRrVI
 HIE21dCgDiQ+uT7EmnhJux3OWniKIlMDV/Ibcw91nc0ICENdsYa5N0uOoqx1goMR
 Ob3n+D5GReUESfmBOazC8SxDfMOMWJj9zOEavcxZSbF3k6Giw9PYo0xl2LUx4nCK
 qrc8s4I7rPcNoBJGzkhF3YNqd8u5rHuta3BpEWkNfnw9fmOVdO8=
 =A26e
 -----END PGP SIGNATURE-----

Merge tag 's390-6.10-8' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux

Pull s390 fixes from Heiko Carstens:

 - Fix and add physical to virtual address translations in dasd and
   virtio_ccw drivers. For virtio_ccw this is just a minimal fix.
   More code cleanup will follow.

 - Small defconfig updates

* tag 's390-6.10-8' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux:
  s390/dasd: Fix invalid dereferencing of indirect CCW data pointer
  s390/vfio_ccw: Fix target addresses of TIC CCWs
  s390: Update defconfigs
This commit is contained in:
Linus Torvalds 2024-07-04 09:46:15 -07:00
commit d470e9f57d
5 changed files with 12 additions and 13 deletions

View File

@ -601,17 +601,16 @@ CONFIG_WATCHDOG=y
CONFIG_WATCHDOG_NOWAYOUT=y
CONFIG_SOFT_WATCHDOG=m
CONFIG_DIAG288_WATCHDOG=m
CONFIG_DRM=m
CONFIG_DRM_VIRTIO_GPU=m
CONFIG_FB=y
# CONFIG_FB_DEVICE is not set
CONFIG_FRAMEBUFFER_CONSOLE=y
CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY=y
# CONFIG_HID_SUPPORT is not set
# CONFIG_USB_SUPPORT is not set
CONFIG_INFINIBAND=m
CONFIG_INFINIBAND_USER_ACCESS=m
CONFIG_MLX4_INFINIBAND=m
CONFIG_MLX5_INFINIBAND=m
CONFIG_SYNC_FILE=y
CONFIG_VFIO=m
CONFIG_VFIO_PCI=m
CONFIG_MLX5_VFIO_PCI=m

View File

@ -592,17 +592,16 @@ CONFIG_WATCHDOG_CORE=y
CONFIG_WATCHDOG_NOWAYOUT=y
CONFIG_SOFT_WATCHDOG=m
CONFIG_DIAG288_WATCHDOG=m
CONFIG_DRM=m
CONFIG_DRM_VIRTIO_GPU=m
CONFIG_FB=y
# CONFIG_FB_DEVICE is not set
CONFIG_FRAMEBUFFER_CONSOLE=y
CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY=y
# CONFIG_HID_SUPPORT is not set
# CONFIG_USB_SUPPORT is not set
CONFIG_INFINIBAND=m
CONFIG_INFINIBAND_USER_ACCESS=m
CONFIG_MLX4_INFINIBAND=m
CONFIG_MLX5_INFINIBAND=m
CONFIG_SYNC_FILE=y
CONFIG_VFIO=m
CONFIG_VFIO_PCI=m
CONFIG_MLX5_VFIO_PCI=m

View File

@ -4906,7 +4906,7 @@ dasd_eckd_free_cp(struct dasd_ccw_req *cqr, struct request *req)
ccw++;
if (dst) {
if (ccw->flags & CCW_FLAG_IDA)
cda = *((char **)dma32_to_virt(ccw->cda));
cda = dma64_to_virt(*((dma64_t *)dma32_to_virt(ccw->cda)));
else
cda = dma32_to_virt(ccw->cda);
if (dst != cda) {
@ -5525,7 +5525,7 @@ dasd_eckd_dump_ccw_range(struct dasd_device *device, struct ccw1 *from,
/* get pointer to data (consider IDALs) */
if (from->flags & CCW_FLAG_IDA)
datap = (char *)*((addr_t *)dma32_to_virt(from->cda));
datap = dma64_to_virt(*((dma64_t *)dma32_to_virt(from->cda)));
else
datap = dma32_to_virt(from->cda);

View File

@ -585,7 +585,7 @@ dasd_fba_free_cp(struct dasd_ccw_req *cqr, struct request *req)
ccw++;
if (dst) {
if (ccw->flags & CCW_FLAG_IDA)
cda = *((char **)dma32_to_virt(ccw->cda));
cda = dma64_to_virt(*((dma64_t *)dma32_to_virt(ccw->cda)));
else
cda = dma32_to_virt(ccw->cda);
if (dst != cda) {

View File

@ -490,13 +490,14 @@ static int ccwchain_fetch_tic(struct ccw1 *ccw,
struct channel_program *cp)
{
struct ccwchain *iter;
u32 cda, ccw_head;
u32 offset, ccw_head;
list_for_each_entry(iter, &cp->ccwchain_list, next) {
ccw_head = iter->ch_iova;
if (is_cpa_within_range(ccw->cda, ccw_head, iter->ch_len)) {
cda = (u64)iter->ch_ccw + dma32_to_u32(ccw->cda) - ccw_head;
ccw->cda = u32_to_dma32(cda);
/* Calculate offset of TIC target */
offset = dma32_to_u32(ccw->cda) - ccw_head;
ccw->cda = virt_to_dma32((void *)iter->ch_ccw + offset);
return 0;
}
}
@ -914,7 +915,7 @@ void cp_update_scsw(struct channel_program *cp, union scsw *scsw)
* in the ioctl directly. Path status changes etc.
*/
list_for_each_entry(chain, &cp->ccwchain_list, next) {
ccw_head = (u32)(u64)chain->ch_ccw;
ccw_head = dma32_to_u32(virt_to_dma32(chain->ch_ccw));
/*
* On successful execution, cpa points just beyond the end
* of the chain.