The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: Vasily Gorbik <gor@linux.ibm.com>
To: Niklas Schnelle <schnelle@linux.ibm.com>
Cc: Gerd Bayer <gbayer@linux.ibm.com>,
	Tobias Schumacher <ts@linux.ibm.com>,
	Matthew Rosato <mjrosato@linux.ibm.com>,
	Ramesh Errabolu <ramesh@linux.ibm.com>,
	Benjamin Block <bblock@linux.ibm.com>,
	Julian Ruess <julianr@linux.ibm.com>,
	Farhan Ali <alifm@linux.ibm.com>,
	Simona Vetter <simona.vetter@ffwll.ch>,
	Halil Pasic <pasic@linux.ibm.com>,
	Gerald Schaefer <gerald.schaefer@linux.ibm.com>,
	Peter Oberparleiter <oberpar@linux.ibm.com>,
	Christian Borntraeger <borntraeger@linux.ibm.com>,
	Heiko Carstens <hca@linux.ibm.com>,
	Alexander Gordeev <agordeev@linux.ibm.com>,
	Sven Schnelle <svens@linux.ibm.com>,
	linux-s390@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] s390/pci: Fix s390_pci_mmio_write syscall error return without MIO
Date: Thu, 23 Jul 2026 11:16:02 +0200	[thread overview]
Message-ID: <ttimf2q@ub.hpns> (raw)
In-Reply-To: <20260722-b4-syscall_mmio_ret_fix_upstream-v1-1-6de516b33001@linux.ibm.com>

On Wed, Jul 22, 2026 at 03:08:34PM +0200, Niklas Schnelle wrote:
> On a machine without PCI memory-I/O (MIO) support or when running with
> pci=nomio the s390 specific PCI MMIO write syscall checks if the MMIO
> cookie is above ZPCI_IOMAP_ADDR_BASE as a sanity check before even
> trying to perform the MMIO. If this check fails the return value was
> left unchanged and thus 0 from prior operations falsely indicating
> success. This could potentially confuse user-space into falsely
> believing the MMIO, on a mapping not valid for MMIO was successful.
> 
> Fix this by setting the return value to -EFAULT prior to the check
> following the same pattern as elsewhere in the same function.
> 
> Cc: stable@vger.kernel.org
> Reviewed-by: Julian Ruess <julianr@linux.ibm.com>
> Reviewed-by: Farhan Ali <alifm@linux.ibm.com>
> Fixes: a67a88b0b8de ("s390/pci: remove races against pte updates")
> Signed-off-by: Niklas Schnelle <schnelle@linux.ibm.com>
> ---
>  arch/s390/pci/pci_mmio.c | 1 +
>  1 file changed, 1 insertion(+)

Applied, thank you!

      reply	other threads:[~2026-07-23  9:16 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-22 13:08 [PATCH] s390/pci: Fix s390_pci_mmio_write syscall error return without MIO Niklas Schnelle
2026-07-23  9:16 ` Vasily Gorbik [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ttimf2q@ub.hpns \
    --to=gor@linux.ibm.com \
    --cc=agordeev@linux.ibm.com \
    --cc=alifm@linux.ibm.com \
    --cc=bblock@linux.ibm.com \
    --cc=borntraeger@linux.ibm.com \
    --cc=gbayer@linux.ibm.com \
    --cc=gerald.schaefer@linux.ibm.com \
    --cc=hca@linux.ibm.com \
    --cc=julianr@linux.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-s390@vger.kernel.org \
    --cc=mjrosato@linux.ibm.com \
    --cc=oberpar@linux.ibm.com \
    --cc=pasic@linux.ibm.com \
    --cc=ramesh@linux.ibm.com \
    --cc=schnelle@linux.ibm.com \
    --cc=simona.vetter@ffwll.ch \
    --cc=svens@linux.ibm.com \
    --cc=ts@linux.ibm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox