From: Heiko Carstens <hca@linux.ibm.com>
To: Ilya Leoshkevich <iii@linux.ibm.com>
Cc: sashiko-reviews@lists.linux.dev,
Christian Borntraeger <borntraeger@linux.ibm.com>,
linux-s390@vger.kernel.org, Vasily Gorbik <gor@linux.ibm.com>,
Alexander Gordeev <agordeev@linux.ibm.com>
Subject: Re: [PATCH v3 1/2] s390/ebcdic: Add character classes for the invariant subset of EBCDIC
Date: Mon, 31 Aug 2026 15:37:20 +0200 [thread overview]
Message-ID: <20260831133720.34274Baf-hca@linux.ibm.com> (raw)
In-Reply-To: <43d49c51-0a9c-40fa-8967-2439331972bc@linux.ibm.com>
On Mon, Aug 31, 2026 at 02:14:19PM +0200, Ilya Leoshkevich wrote:
> > > +const __u8 _ebctype_inv[256] = {
> > > + _C, _C, _C, _C, _C, _C|_S, _C, _C, /* 0x00-0x07 */
> > > + _C, _C, _C, _C|_S, _C|_S, _C|_S, _C, _C, /* 0x08-0x0f */
> > > + _C, _C, _C, _C, _C, _C|_S, _C, _C, /* 0x10-0x17 */
> > > + _C, _C, _C, _C, _C, _C, _C, _C, /* 0x18-0x1f */
> > > + _C, _C, _C, _C, _C, _C|_S, _C, _C, /* 0x20-0x27 */
> > > + _C, _C, _C, _C, _C, _C, _C, _C, /* 0x28-0x2f */
> > > + 0, 0, _C, _C, _C, _C, _C, _C, /* 0x30-0x37 */
> > > + _C, _C, _C, _C, _C, _C, 0, _C, /* 0x38-0x3f */
> > > + _S|_SP, 0, 0, 0, 0, 0, 0, 0, /* 0x40-0x47 */
> > > + 0, 0, _P, _P, _P, _P, _P, _P, /* 0x48-0x4f */
> >
> > [Severity: Medium]
> > Does this array incorrectly include variant EBCDIC characters?
> >
> > 0x4A is mapped as _P (invariant punctuation) here, but isn't it a variant
> > character (e.g., '¢' in US 037, '[' in German 273)?
I guess this is indeed wrong, and 0x4a should be mapped to "0"?
> > > + _P, _U|_X, _U|_X, _U|_X, _U|_X, _U|_X, _U|_X, _U, /* 0xc0-0xc7 */
> >
> > [Severity: Medium]
> > Is 0xC0 also a variant character?
> >
> > It is classified as _P here, but it can represent '{' in US 037 or 'Ä'
> > in German 273.
> >
> > This seems to violate the definition of the invariant subset and could lead
> > to missed warnings for garbled boot parameters.
>
> This is a naming and not a functional issue. The IBM037 punctuation
> marks must be present in the table for the series to make sense.
>
> I guess a 100% proper name here would be something along the lines of
> "invariant with IBM037 punctuation" or "IBM037 without weird
> characters", but I don't think it's that important: one can look up
> the Wikipedia reference in the commit message to get to the exact table
> I used here.
>
> I will defer it to the maintainers, whether I need to change comments,
> names, or the commit message here.
For 0xc0 I don't see a problem - it matches what we have in lib/ctype.c, which
also maps "{" to _P.
That only leaves the question above about 0x4a.
next prev parent reply other threads:[~2026-08-31 13:37 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-28 13:59 [PATCH v3 0/2] s390: Warn if kernel command line contains non-printable EBCDIC Ilya Leoshkevich
2026-08-28 13:59 ` [PATCH v3 1/2] s390/ebcdic: Add character classes for the invariant subset of EBCDIC Ilya Leoshkevich
2026-08-28 14:09 ` sashiko-bot
2026-08-31 12:14 ` Ilya Leoshkevich
2026-08-31 13:37 ` Heiko Carstens [this message]
2026-08-28 13:59 ` [PATCH v3 2/2] s390: Warn if kernel command line contains non-printable EBCDIC characters Ilya Leoshkevich
2026-08-28 14:22 ` sashiko-bot
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=20260831133720.34274Baf-hca@linux.ibm.com \
--to=hca@linux.ibm.com \
--cc=agordeev@linux.ibm.com \
--cc=borntraeger@linux.ibm.com \
--cc=gor@linux.ibm.com \
--cc=iii@linux.ibm.com \
--cc=linux-s390@vger.kernel.org \
--cc=sashiko-reviews@lists.linux.dev \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.