From: Harald Freudenberger <freude@linux.ibm.com>
To: Heiko Carstens <hca@linux.ibm.com>
Cc: dengler@linux.ibm.com, fcallies@linux.ibm.com,
linux-s390@vger.kernel.org, Vasily Gorbik <gor@linux.ibm.com>,
Alexander Gordeev <agordeev@linux.ibm.com>
Subject: Re: [PATCH v1 1/2] s390/cpacf: Rework cpacf_kma() to return condition code
Date: Tue, 06 Oct 2026 16:16:42 +0200 [thread overview]
Message-ID: <48014bf5d6cff03b25de57bb6474e71e@linux.ibm.com> (raw)
In-Reply-To: <20261006133931.17402Ee9-hca@linux.ibm.com>
On 2026-10-06 15:39, Heiko Carstens wrote:
> On Tue, Oct 06, 2026 at 03:29:28PM +0200, Harald Freudenberger wrote:
>> On 2026-10-06 10:30, Heiko Carstens wrote:
>> > On Mon, Oct 05, 2026 at 04:14:15PM +0200, Harald Freudenberger wrote:
>> > ...
>> > > better readability. Additionally add an kmsan_unpoison_memory()
>> > > statement to reflect the updated memory by hardware.
>> > ...
>> > > @@ -731,12 +739,16 @@ static inline void cpacf_kma(unsigned long
>> > > func, void *param, u8 *dest,
>> > > " lgr 0,%[fc]\n"
>> > > " lgr 1,%[pba]\n"
>> > > "0: .insn rrf,%[opc] << 16,%[dst],%[src],%[aad],0\n"
>> > > - " brc 1,0b" /* handle partial completion */
>> > > - : [dst] "+&d" (d.pair), [src] "+&d" (s.pair),
>> > > + " brc 1,0b\n" /* handle partial completion */
>> > > + CC_IPM(cc)
>> > > + : CC_OUT(cc, cc), [dst] "+&d" (d.pair), [src] "+&d" (s.pair),
>> > > [aad] "+&d" (a.pair)
>> > > : [fc] "d" (func), [pba] "d" ((unsigned long)param),
>> > > [opc] "i" (CPACF_KMA)
>> > > - : "cc", "memory", "0", "1");
>> > > + : CC_CLOBBER_LIST("memory", "0", "1"));
>> > > +
>> > > + kmsan_unpoison_memory(dest, src_len - s.odd);
>> >
>> > Since you added explicit instrumentation here it would sense so add
>> > kasan/kcsan instrumentation by adding an instrument_write() call.
>
> That should have been "...it would make sense to..."
>
>> I have no idea what you mean here...
>
> See include/linux/instrumented.h - you can the kernel about
> memory accesses also kasan and kcsan. Your patch only adds
> that for kmsan. See arch/s390/include/asm/fpu-insn.h for many
> examples. I'm aware that such annotations are currently missing
> for many of our inline asms. But since you are at it.
>
> Up to you if you want to add it or not. Just a suggestion.
>
Ok thanks. But I would prefer to have this seperate from this kma
rework.
It would make sense to have that notations then for all the inline
functions
in cpacf.h.
>> > Also, given that this is in-kernel crypto, shouldn't this series go
>> > via the crypto tree?
>>
>> Well, this is to be negotiated. I first wanted to collect an RB
>> statement.
>
> It would be helpful if you would add information like that in the
> cover-letter. This saves both of us a bit of time.
Ok - will do. I avoided to have direct address people in the cover
letter.
But when you are ok with that, let's run it that way next time.
next prev parent reply other threads:[~2026-10-06 14:16 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-05 14:14 [PATCH v1 0/2] Rework cpacf_kma() function Harald Freudenberger
2026-10-05 14:14 ` [PATCH v1 1/2] s390/cpacf: Rework cpacf_kma() to return condition code Harald Freudenberger
2026-10-05 14:23 ` sashiko-bot
2026-10-06 7:48 ` Holger Dengler
2026-10-06 8:30 ` Heiko Carstens
2026-10-06 13:29 ` Harald Freudenberger
2026-10-06 13:39 ` Heiko Carstens
2026-10-06 14:16 ` Harald Freudenberger [this message]
2026-10-06 15:13 ` Heiko Carstens
2026-10-05 14:14 ` [PATCH v1 2/2] s390/crypto: Handle cpacf_kma() return code Harald Freudenberger
2026-10-05 14:20 ` sashiko-bot
2026-10-06 7:52 ` Holger Dengler
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=48014bf5d6cff03b25de57bb6474e71e@linux.ibm.com \
--to=freude@linux.ibm.com \
--cc=agordeev@linux.ibm.com \
--cc=dengler@linux.ibm.com \
--cc=fcallies@linux.ibm.com \
--cc=gor@linux.ibm.com \
--cc=hca@linux.ibm.com \
--cc=linux-s390@vger.kernel.org \
/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