From: sashiko-bot@kernel.org
To: "Shirong Zhao" <shxzhaosr@163.com>
Cc: "Vasily Gorbik" <gor@linux.ibm.com>,
linux-s390@vger.kernel.org, "Heiko Carstens" <hca@linux.ibm.com>,
"Alexander Gordeev" <agordeev@linux.ibm.com>,
"Christian Borntraeger" <borntraeger@linux.ibm.com>
Subject: Re: [PATCH] s390/3270: return -ENOTTY for unknown ioctls in fs3270_ioctl()
Date: Mon, 05 Oct 2026 06:02:42 +0000 [thread overview]
Message-ID: <20261005060242.92CDC1F000FF@smtp.kernel.org> (raw)
In-Reply-To: <20261005055825.20-1-shxzhaosr@163.com>
> fs3270_ioctl() initializes rc to 0 and its cmd switch has no default
> branch, so an unrecognized ioctl command returns success without doing
> anything. Follow the ioctl convention and reject unknown commands with
> -ENOTTY.
>
> Verified against Linux 7.3-rc6 (a90ee4305c4a5df72c11b31dacfdc76e00fcf78a),
> the current mainline master: rc is initialised to 0, the switch covers
> TUBICMD, TUBOCMD, TUBGETI, TUBGETO and TUBGETMOD only and has no default
> branch, so an unknown command returns success without doing anything. The
> file is byte-identical between 7.3-rc5 and 7.3-rc6.
>
> Sibling audit (same snapshot, all NOT bugs -- do not re-report):
> - drivers/s390/char/keyboard.c:kbd_ioctl HAS default -> -ENOIOCTLCMD;
> do_kdsk/do_kdgkb lack default but only reachable via whitelisted
> cmds from kbd_ioctl, harmless.
> - drivers/char/nvram.c:nvram_misc_ioctl inits ret=-ENOTTY, safe.
> - drivers/misc/tps6594-pfsm.c inits ret=-ENOIOCTLCMD, safe.
> - drivers/misc/pci_endpoint_test.c inits ret=-EINVAL, safe (error).
> Only fs3270 inits 0 -> true positive.
>
> Signed-off-by: Shirong Zhao <shxzhaosr@163.com>
Sashiko has reviewed this patch and found no issues. It looks great!
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261005055825.20-1-shxzhaosr@163.com?part=1
next prev parent reply other threads:[~2026-10-05 6:02 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-05 5:58 [PATCH] s390/3270: return -ENOTTY for unknown ioctls in fs3270_ioctl() Shirong Zhao
2026-10-05 6:02 ` sashiko-bot [this message]
2026-10-05 8:38 ` Heiko Carstens
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=20261005060242.92CDC1F000FF@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=agordeev@linux.ibm.com \
--cc=borntraeger@linux.ibm.com \
--cc=gor@linux.ibm.com \
--cc=hca@linux.ibm.com \
--cc=linux-s390@vger.kernel.org \
--cc=sashiko-reviews@lists.linux.dev \
--cc=shxzhaosr@163.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