From: Balbir Singh <bsingharora@gmail.com>
To: Michael Ellerman <mpe@ellerman.id.au>, linuxppc-dev@ozlabs.org
Subject: Re: [RFC PATCH 2/3] powerpc/pseries: Define & use a type for the plpar_hcall() retvals
Date: Wed, 19 Oct 2016 01:17:11 +1100 [thread overview]
Message-ID: <b922cd6c-a44d-6950-93d7-6645fd1f7fac@gmail.com> (raw)
In-Reply-To: <1476780032-21643-2-git-send-email-mpe@ellerman.id.au>
On 18/10/16 19:40, Michael Ellerman wrote:
> We have now had two nasty stack corruption bugs caused by incorrect
> sizing of the return buffer for plpar_hcall()/plpar_hcall9().
>
> To avoid any more such bugs, define a type which encodes the size of the
> return buffer, and change the argument of plpar_hcall() to be of that
> type, meaning the compiler will check for us that we passed the right
> size buffer.
>
> There isn't an easy way to do this incrementally, without introducing a
> new function name, eg. plpar_hcall_with_struct(), which is ugly as hell.
> So just do it in one tree-wide change.
>
Conceptually looks god, but I think we need to abstract the return values
as well. I'll test and see if I can send you something on top of this
Balbir
next prev parent reply other threads:[~2016-10-18 14:17 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-10-18 8:40 [RFC PATCH 1/3] cxl: Split _CXL_LOOP_HCALL9 out into a separate macro Michael Ellerman
2016-10-18 8:40 ` [RFC PATCH 2/3] powerpc/pseries: Define & use a type for the plpar_hcall() retvals Michael Ellerman
2016-10-18 14:17 ` Balbir Singh [this message]
2016-10-19 11:47 ` Michael Ellerman
2016-10-19 13:59 ` Balbir Singh
2016-10-19 14:38 ` David Laight
2016-10-18 8:40 ` [RFC PATCH 3/3] powerpc/pseries: Define & use a type for the plpar_hcall9() retvals Michael Ellerman
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=b922cd6c-a44d-6950-93d7-6645fd1f7fac@gmail.com \
--to=bsingharora@gmail.com \
--cc=linuxppc-dev@ozlabs.org \
--cc=mpe@ellerman.id.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).