From: Kris Van Hees <kris.van.hees@oracle.com>
To: Nick Alcock <nick.alcock@oracle.com>
Cc: Kris Van Hees <kris.van.hees@oracle.com>,
dtrace@lists.linux.dev, dtrace-devel@oss.oracle.com
Subject: Re: [PATCH] test: ensure casting does not affect value
Date: Thu, 1 Aug 2024 15:03:25 -0400 [thread overview]
Message-ID: <Zqvb/Z8VKR6irF8J@oracle.com> (raw)
In-Reply-To: <87o76cjd64.fsf@esperi.org.uk>
On Thu, Aug 01, 2024 at 07:44:35PM +0100, Nick Alcock wrote:
> On 31 Jul 2024, Kris Van Hees outgrape:
>
> > On systems without CTF, we do not know the type of kernel variables.
> > By doing an explicit cast to int64_t a negative int is converted into a
> > large positive integer. The proper cast is 'int' of course.
> >
> > Signed-off-by: Kris Van Hees <kris.van.hees@oracle.com>
>
> > - trace((int64_t)`crashing_cpu);
> > + trace((int)`crashing_cpu);
>
> Hm what type is it actually...
>
> ... int, but it's under arch/{x86,mips,powerpc}. Is this test going to
> break on other architectures (like arm64)?
That is why we have tst.kernel_read_neg_small_scalar.aarch64.x
> I know this is a pre-existing bug. The cast is correct, so
>
> Reviewed-by: Nick Alcock <nick.alcock@oracle.com>
>
> --
> NULL && (void)
prev parent reply other threads:[~2024-08-01 19:03 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-07-31 19:01 [PATCH] test: ensure casting does not affect value Kris Van Hees
2024-07-31 19:51 ` Eugene Loh
2024-07-31 20:04 ` Kris Van Hees
2024-08-01 18:44 ` Nick Alcock
2024-08-01 19:03 ` Kris Van Hees [this message]
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=Zqvb/Z8VKR6irF8J@oracle.com \
--to=kris.van.hees@oracle.com \
--cc=dtrace-devel@oss.oracle.com \
--cc=dtrace@lists.linux.dev \
--cc=nick.alcock@oracle.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