Fix tagged_ptr not being initialized when TBI is not enabled.
Dan Carpenter dan.carpenter@oracle.com Signed-off-by: Andrey Konovalov andreyknvl@google.com --- tools/testing/selftests/arm64/tags_test.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/tools/testing/selftests/arm64/tags_test.c b/tools/testing/selftests/arm64/tags_test.c index 22a1b266e373..5701163460ef 100644 --- a/tools/testing/selftests/arm64/tags_test.c +++ b/tools/testing/selftests/arm64/tags_test.c @@ -14,15 +14,17 @@ int main(void) { static int tbi_enabled = 0; - struct utsname *ptr, *tagged_ptr; + unsigned long tag = 0; + struct utsname *ptr; int err;
if (prctl(PR_SET_TAGGED_ADDR_CTRL, PR_TAGGED_ADDR_ENABLE, 0, 0, 0) == 0) tbi_enabled = 1; ptr = (struct utsname *)malloc(sizeof(*ptr)); if (tbi_enabled) - tagged_ptr = (struct utsname *)SET_TAG(ptr, 0x42); - err = uname(tagged_ptr); + tag = 0x42; + ptr = (struct utsname *)SET_TAG(ptr, tag); + err = uname(ptr); free(ptr);
return err;
On Mon, Aug 19, 2019 at 3:14 PM Andrey Konovalov andreyknvl@google.com wrote:
Fix tagged_ptr not being initialized when TBI is not enabled.
Dan Carpenter dan.carpenter@oracle.com Signed-off-by: Andrey Konovalov andreyknvl@google.com
tools/testing/selftests/arm64/tags_test.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/tools/testing/selftests/arm64/tags_test.c b/tools/testing/selftests/arm64/tags_test.c index 22a1b266e373..5701163460ef 100644 --- a/tools/testing/selftests/arm64/tags_test.c +++ b/tools/testing/selftests/arm64/tags_test.c @@ -14,15 +14,17 @@ int main(void) { static int tbi_enabled = 0;
struct utsname *ptr, *tagged_ptr;
unsigned long tag = 0;
struct utsname *ptr; int err; if (prctl(PR_SET_TAGGED_ADDR_CTRL, PR_TAGGED_ADDR_ENABLE, 0, 0, 0) == 0) tbi_enabled = 1; ptr = (struct utsname *)malloc(sizeof(*ptr)); if (tbi_enabled)
tagged_ptr = (struct utsname *)SET_TAG(ptr, 0x42);
err = uname(tagged_ptr);
tag = 0x42;
ptr = (struct utsname *)SET_TAG(ptr, tag);
err = uname(ptr); free(ptr); return err;
-- 2.23.0.rc1.153.gdeed80330f-goog
Hi Will,
This is supposed to go on top of the TBI related patches that you have added to the arm tree.
Thanks!
On Mon, Aug 19, 2019 at 03:14:42PM +0200, Andrey Konovalov wrote:
Fix tagged_ptr not being initialized when TBI is not enabled.
Dan Carpenter dan.carpenter@oracle.com
Guessing this was Reported-by, or has Dan introduced his own tag now? ;)
Got a link to the report?
Will
On Mon, Aug 19, 2019 at 5:03 PM Will Deacon will@kernel.org wrote:
On Mon, Aug 19, 2019 at 03:14:42PM +0200, Andrey Konovalov wrote:
Fix tagged_ptr not being initialized when TBI is not enabled.
Dan Carpenter dan.carpenter@oracle.com
Guessing this was Reported-by, or has Dan introduced his own tag now? ;)
Oops, yes, Reported-by :)
Got a link to the report?
https://www.spinics.net/lists/linux-kselftest/msg09446.html
Will
On Mon, Aug 19, 2019 at 05:16:37PM +0200, Andrey Konovalov wrote:
On Mon, Aug 19, 2019 at 5:03 PM Will Deacon will@kernel.org wrote:
On Mon, Aug 19, 2019 at 03:14:42PM +0200, Andrey Konovalov wrote:
Fix tagged_ptr not being initialized when TBI is not enabled.
Dan Carpenter dan.carpenter@oracle.com
Guessing this was Reported-by, or has Dan introduced his own tag now? ;)
Oops, yes, Reported-by :)
Got a link to the report?
Thanks, I'll fix up the commit message and push this out later on. If you get a chance, would you be able to look at the pending changes from Catalin[1], please?
Will
[1] https://lkml.kernel.org/r/20190815154403.16473-1-catalin.marinas@arm.com
On Mon, Aug 19, 2019 at 5:39 PM Will Deacon will@kernel.org wrote:
On Mon, Aug 19, 2019 at 05:16:37PM +0200, Andrey Konovalov wrote:
On Mon, Aug 19, 2019 at 5:03 PM Will Deacon will@kernel.org wrote:
On Mon, Aug 19, 2019 at 03:14:42PM +0200, Andrey Konovalov wrote:
Fix tagged_ptr not being initialized when TBI is not enabled.
Dan Carpenter dan.carpenter@oracle.com
Guessing this was Reported-by, or has Dan introduced his own tag now? ;)
Oops, yes, Reported-by :)
Got a link to the report?
Thanks, I'll fix up the commit message and push this out later on. If you get a chance, would you be able to look at the pending changes from Catalin[1], please?
Will
[1] https://lkml.kernel.org/r/20190815154403.16473-1-catalin.marinas@arm.com
Sure! I didn't realize some actioned is required from me on those. I'll add my Acked-by's. Thanks!
linux-kselftest-mirror@lists.linaro.org