Skip to contentSkip to conversation

more s390 updates for 6.9 merge window

GIT PULL Merged Heiko Carstens 3 participants 3 messages Mar 19, 2024 s390

lore
Share & tools
lore

Heiko Carstens

author maintainer
#0 lore raw

Hi Linus,

please pull more s390 updates for the 6.9 merge window.

Thanks,
Heiko

The following changes since commit b0546776ad3f332e215cebc0b063ba4351971cca:

Merge tag 'printk-for-6.9' of git://git.kernel.org/pub/scm/linux/kernel/git/printk/linux (2024-03-12 20:54:50 -0700)

are available in the Git repository at:

git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux.git tags/s390-6.9-2

for you to fetch changes up to 64c3431808bdab2ccef97d7a444018c416b080b5:

s390/entry: compare gmap asce to determine guest/host fault (2024-03-17 19:08:50 +0100)

----------------------------------------------------------------
more s390 updates for 6.9 merge window

- Various virtual vs physical address usage fixes

- Add new bitwise types and helper functions and use them in s390 specific drivers and code to make it easier to find virtual vs physical address usage bugs. Right now virtual and physical addresses are identical for s390, except for module, vmalloc, and similar areas. This will be changed, hopefully with the next merge window, so that e.g. the kernel image and modules will be located close to each other, allowing for direct branches and also for some other simplifications.

As a prerequisite this requires to fix all misuses of virtual and physical addresses. As it turned out people are so used to the concept that virtual and physical addresses are the same, that new bugs got added to code which was already fixed. In order to avoid that even more code gets merged which adds such bugs add and use new bitwise types, so that sparse can be used to find such usage bugs.

Most likely the new types can go away again after some time

- Provide a simple ARCH_HAS_DEBUG_VIRTUAL implementation

- Fix kprobe branch handling: if an out-of-line single stepped relative branch instruction has a target address within a certain address area in the entry code, the program check handler may incorrectly execute cleanup code as if KVM code was executed, leading to crashes

- Fix reference counting of zcrypt card objects

- Various other small fixes and cleanups

----------------------------------------------------------------
Alexander Gordeev (2):
s390/sysinfo: allow response buffer in normal memory s390/iucv: fix receive buffer virtual vs physical address confusion

Andy Shevchenko (1):
s390/cio: use while (i--) pattern to clean up

Gerald Schaefer (1):
s390/dcssblk: fix virtual vs physical address confusion

Halil Pasic (4):
s390/cio: introduce bitwise dma types and helper functions s390/virtio_ccw: fix virtual vs physical address confusion s390/virtio_ccw: use DMA handle from DMA API s390/virtio_ccw: avoid converting dma addresses / handles

Harald Freudenberger (1):
s390/zcrypt: fix reference counting on zcrypt card objects

Heiko Carstens (22):
s390/dasd_eckd: fix virtual vs physical address confusion s390/cio: fix virtual vs physical address confusion s390/vfio_ccw: fix virtual vs physical address confusion s390/cio: use bitwise types to allow for type checking s390/dasd: remove superfluous virt_to_phys() conversion s390/dasd: use new address translation helpers s390/cio,idal: code cleanup
s390/cio,idal: remove superfluous virt_to_phys() conversion s390/cio,idal: fix virtual vs physical address confusion s390/cio: use new address translation helpers s390/scm: use new address translation helpers s390/vmur: use new address translation helpers s390/3215: use new address translation helpers s390/3270: use new address translation helpers s390/tape: fix virtual vs physical address confusion s390/zfcp: use new address translation helpers s390/qeth: use new address translation helpers s390/lcs: use new address translation helpers s390/ctcm: use new address translation helpers s390/iucv: use new address translation helpers s390/vfio_ccw_cp: use new address translation helpers s390/mm: provide simple ARCH_HAS_DEBUG_VIRTUAL support

Mete Durlu (1):
s390/vtime: fix average steal time calculation

Ricardo B. Marliere (6):
s390/zcrypt: make zcrypt_class constant s390/vmur: make vmur_class constant s390/vmlogrdr: make vmlogrdr_class constant s390/tape: make tape_class constant s390/raw3270: improve raw3270_init() readability s390/raw3270: make class3270 constant

Sven Schnelle (3):
s390/entry: add CIF_SIE flag and remove sie64a() address check s390/entry: remove OUTSIDE macro
s390/entry: compare gmap asce to determine guest/host fault

 arch/s390/Kconfig                  |   1 +
 arch/s390/Makefile                 |   1 +
 arch/s390/configs/debug_defconfig  |   1 +
 arch/s390/include/asm/ccwdev.h     |   3 +-
 arch/s390/include/asm/cio.h        |   9 +-
 arch/s390/include/asm/dma-types.h  | 103 ++++++++++++++++++++++
 arch/s390/include/asm/eadm.h       |   5 +-
 arch/s390/include/asm/fcx.h        |  13 +--
 arch/s390/include/asm/idals.h      | 176 ++++++++++++++++++++-----------------
 arch/s390/include/asm/page.h       |  30 ++++++-
 arch/s390/include/asm/processor.h  |   2 +
 arch/s390/include/asm/ptrace.h     |   2 -
 arch/s390/include/asm/qdio.h       |  17 ++--
 arch/s390/include/asm/scsw.h       |   7 +-
 arch/s390/kernel/entry.S           |  73 +++++++--------
 arch/s390/kernel/sysinfo.c         |   2 +-
 arch/s390/kernel/vtime.c           |   4 +-
 arch/s390/mm/Makefile              |   1 +
 arch/s390/mm/fault.c               |   4 +-
 arch/s390/mm/physaddr.c            |  15 ++++
 drivers/s390/block/dasd.c          |   4 +-
 drivers/s390/block/dasd_3990_erp.c |  14 +--
 drivers/s390/block/dasd_alias.c    |   6 +-
 drivers/s390/block/dasd_eckd.c     | 118 ++++++++++++-------------
 drivers/s390/block/dasd_eer.c      |   2 +-
 drivers/s390/block/dasd_fba.c      |  32 +++----
 drivers/s390/block/dcssblk.c       |   2 +-
 drivers/s390/block/scm_blk.c       |   6 +-
 drivers/s390/char/con3215.c        |   4 +-
 drivers/s390/char/fs3270.c         |  14 +--
 drivers/s390/char/raw3270.c        |  42 +++++----
 drivers/s390/char/raw3270.h        |   2 +-
 drivers/s390/char/tape.h           |  12 ++-
 drivers/s390/char/tape_class.c     |  17 ++--
 drivers/s390/char/vmlogrdr.c       |  18 ++--
 drivers/s390/char/vmur.c           |  22 ++---
 drivers/s390/cio/ccwgroup.c        |   4 +-
 drivers/s390/cio/chsc.c            |  12 +--
 drivers/s390/cio/chsc.h            |   6 +-
 drivers/s390/cio/cio.c             |   4 +-
 drivers/s390/cio/css.c             |  25 ++++--
 drivers/s390/cio/device_fsm.c      |   8 +-
 drivers/s390/cio/device_id.c       |   2 +-
 drivers/s390/cio/device_ops.c      |   5 +-
 drivers/s390/cio/device_pgid.c     |   8 +-
 drivers/s390/cio/device_status.c   |   2 +-
 drivers/s390/cio/eadm_sch.c        |   4 +-
 drivers/s390/cio/fcx.c             |  22 ++---
 drivers/s390/cio/orb.h             |   9 +-
 drivers/s390/cio/qdio_main.c       |  12 +--
 drivers/s390/cio/qdio_setup.c      |  10 +--
 drivers/s390/cio/qdio_thinint.c    |   6 +-
 drivers/s390/cio/vfio_ccw_cp.c     |  82 +++++++++--------
 drivers/s390/cio/vfio_ccw_fsm.c    |   2 +-
 drivers/s390/crypto/zcrypt_api.c   |  39 ++++----
 drivers/s390/net/ctcm_fsms.c       |   4 +-
 drivers/s390/net/ctcm_main.c       |   2 +-
 drivers/s390/net/ctcm_mpc.c        |  20 ++---
 drivers/s390/net/lcs.c             |  12 ++-
 drivers/s390/net/qeth_core_main.c  |  24 ++---
 drivers/s390/scsi/zfcp_fsf.c       |   2 +-
 drivers/s390/scsi/zfcp_qdio.c      |   4 +-
 drivers/s390/scsi/zfcp_qdio.h      |   6 +-
 drivers/s390/virtio/virtio_ccw.c   | 170 +++++++++++++++++++++--------------
 include/net/iucv/iucv.h            |   3 +-
 net/iucv/af_iucv.c                 |   8 +-
 net/iucv/iucv.c                    |  23 +++--
 67 files changed, 771 insertions(+), 553 deletions(-)
 create mode 100644 arch/s390/include/asm/dma-types.h
 create mode 100644 arch/s390/mm/physaddr.c
#1 lore raw
Quoted 4 lines · Heiko Carstens

- Add new bitwise types and helper functions and use them in s390 specific drivers and code to make it easier to find virtual vs physical address usage bugs.

Hmm. Because you still want to be able to do arithmetic on them, this is really what "__nocast" should be used for rather than "__bitwise".

__bitwise was intended (as the name implies) for things that can only be mixed bitwise with similar types. It was _mainly_ for big-endian vs little-endian marking, where it's actually perfectly fine to do bitwise operations on two big-endian values without ever translation them to "cpu endianness", but you can't for example do normal arithmetic on them.

So __bitwise has those very specific rules that seem odd until you realize what the reason for them are.

In contrast, your types actually *would* be fine with arithmetic and logical operations being done on them, and that is what "__nocast" really was meant to be.

But we basically never had much use for __nocast in the kernel, and largely as a result __nocast was never fleshed out to work very well (and it gets lost *much* too easily), so __bitwise it is.

Oh well.

It looks like it's not a lot of arithmetic you want to allow anyway, so I guess the fact that __bitwise forces you to do some silly helper functions for that isn't too much of an issue.

Linus

merge bot Merged
#2 lore raw
In reply to Heiko Carstens
The pull request you sent on Tue, 19 Mar 2024 15:12:30 +0100:

The pull request you sent on Tue, 19 Mar 2024 15:12:30 +0100:

Quoted 1 line

git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux.git tags/s390-6.9-2

has been merged into torvalds/linux.git:
https://git.kernel.org/torvalds/c/f9c035492f2010e1e7aede1f1bd32181d7cef2dc

Thank you!

Signature · 2 lines
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/prtracker.html