From: Dan Carpenter <dan.carpenter@oracle.com>
To: andreyknvl@google.com
Cc: linux-kselftest@vger.kernel.org
Subject: [bug report] selftests, arm64: add a selftest for passing tagged pointers to kernel
Date: Thu, 15 Aug 2019 11:18:03 +0300 [thread overview]
Message-ID: <20190815081803.GA27238@mwanda> (raw)
Hello Andrey Konovalov,
The patch 9ce1263033cd: "selftests, arm64: add a selftest for passing
tagged pointers to kernel" from Jul 23, 2019, leads to the following
static checker warning:
./tools/testing/selftests/arm64/tags_test.c:25 main()
error: uninitialized symbol 'tagged_ptr'.
tools/testing/selftests/arm64/tags_test.c
14 int main(void)
15 {
16 static int tbi_enabled = 0;
17 struct utsname *ptr, *tagged_ptr;
^^^^^^^^^^
18 int err;
19
20 if (prctl(PR_SET_TAGGED_ADDR_CTRL, PR_TAGGED_ADDR_ENABLE, 0, 0, 0) == 0)
21 tbi_enabled = 1;
22 ptr = (struct utsname *)malloc(sizeof(*ptr));
23 if (tbi_enabled)
24 tagged_ptr = (struct utsname *)SET_TAG(ptr, 0x42);
^^^^^^^^^^^^^^^
No else path.
25 err = uname(tagged_ptr);
26 free(ptr);
27
28 return err;
29 }
regards,
dan carpenter
next reply other threads:[~2019-08-15 8:18 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-08-15 8:18 Dan Carpenter [this message]
2019-08-19 13:22 ` [bug report] selftests, arm64: add a selftest for passing tagged pointers to kernel Andrey Konovalov
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=20190815081803.GA27238@mwanda \
--to=dan.carpenter@oracle.com \
--cc=andreyknvl@google.com \
--cc=linux-kselftest@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