From: Greg KH <greg@kroah.com>
To: "Xu, Lizhi" <Lizhi.Xu@windriver.com>
Cc: Stephen Rothwell <sfr@canb.auug.org.au>,
Arnd Bergmann <arnd@arndb.de>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
Linux Next Mailing List <linux-next@vger.kernel.org>
Subject: Re: 回复: linux-next: build failure after merge of the char-misc tree
Date: Thu, 3 Jul 2025 11:28:42 +0200 [thread overview]
Message-ID: <2025070357-scrambled-exodus-a8a0@gregkh> (raw)
In-Reply-To: <BL1PR11MB5979E06DF496FA3965009DFF8643A@BL1PR11MB5979.namprd11.prod.outlook.com>
On Thu, Jul 03, 2025 at 08:55:31AM +0000, Xu, Lizhi wrote:
> Greg,
>
> In ctx_fire_notification(), the following code can fully prove that the header is followed by the payload.
> ev.msg.hdr.payload_size = sizeof(ev) - sizeof(ev.msg.hdr);
>
> I sent a second version of the patch, did you notice it? It can solve the problem reported by Stephen Rothwell.
>
> V2 Patch: https://lore.kernel.org/all/20250703075334.856445-1-lizhi.xu@windriver.com
I see that now, thank you.
But, if I had not reverted your previous one, that patch would not have
applied :(
Also, how can you "guarantee" that there is no padding between those
structure fields so that your "pointer math" is correct here? Why not
fix this up properly to use the correct way to define that you have a
"payload" at the end of a structure, AND properly define how large that
payload is with the specific variable that describes that? By doing
that, then the compiler can check when things violate those rules going
forward.
thanks,
greg k-h
next prev parent reply other threads:[~2025-07-03 9:28 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-03 7:10 linux-next: build failure after merge of the char-misc tree Stephen Rothwell
2025-07-03 8:30 ` Greg KH
2025-07-03 8:55 ` 回复: " Xu, Lizhi
2025-07-03 9:28 ` Greg KH [this message]
2025-07-03 9:44 ` 回复: " Xu, Lizhi
2025-07-03 10:03 ` Greg KH
2025-07-03 11:09 ` 回复: " Xu, Lizhi
2025-07-03 11:20 ` Greg KH
2025-07-04 1:32 ` Lizhi Xu
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=2025070357-scrambled-exodus-a8a0@gregkh \
--to=greg@kroah.com \
--cc=Lizhi.Xu@windriver.com \
--cc=arnd@arndb.de \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-next@vger.kernel.org \
--cc=sfr@canb.auug.org.au \
/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;
as well as URLs for NNTP newsgroup(s).