From patchwork Mon Aug 19 13:14:42 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrey Konovalov X-Patchwork-Id: 11100967 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id A8A1D912 for ; Mon, 19 Aug 2019 13:14:59 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 96B6628488 for ; Mon, 19 Aug 2019 13:14:59 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 8A7BE2832B; Mon, 19 Aug 2019 13:14:59 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id E4CA028785 for ; Mon, 19 Aug 2019 13:14:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:To:From:Subject:Mime-Version:Message-Id :Date:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=CjlncpuqYm5K5JgzqAo5ipd29QfVegVT52kRUxzf3kw=; b=azCLv0xAbmWWcp ZbGStnI4h1Gr+UE/urlUbB87Fd5K/t5dRAGdfgSjT5G8sTGOTujFArCroUz+8s4T8/WJEjDIW5PLw D5aYRzr/UW1YYVE2h9vcNeUrsMpih7a3MqhSuiwDnWVtiY6ioxWNHKlVt+khpBOGCs+z2PsA/8Fvm GCt/0BN5E+ljnihSGg53hWItWx5MA0admm9D+QufwjY5GG7JQoEn9ba1Ugf7d+VwsDoLdcVIK25UY l/0ettZ7lW0LzfEHDm7gpD+/2ulcShr6fiugJZ+4crliy3wA97tr9j2MD2en8mdSFVUXg7C8ruKhL a/fmmTI6uN49/hhbuSFQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92 #3 (Red Hat Linux)) id 1hzhUu-0007Jt-CV; Mon, 19 Aug 2019 13:14:56 +0000 Received: from mail-yw1-xc4a.google.com ([2607:f8b0:4864:20::c4a]) by bombadil.infradead.org with esmtps (Exim 4.92 #3 (Red Hat Linux)) id 1hzhUr-0007Iw-6A for linux-arm-kernel@lists.infradead.org; Mon, 19 Aug 2019 13:14:54 +0000 Received: by mail-yw1-xc4a.google.com with SMTP id o201so3046488ywo.14 for ; Mon, 19 Aug 2019 06:14:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=date:message-id:mime-version:subject:from:to:cc; bh=oNoDUi1hsmNzzodU0R6ojKZvjIC3JQAmU+NA/+7Uaps=; b=ouW48h7HGbpdNdCReL1nk2+dvRXfxgklc1nbCP+Q9JJOIGCVyS3fqahBo1S2d8316M OZxTJFVIgB1yHxwjdFezXxDGLz9wKstEmjea5fp8x0waRP2D4PtWy/8cEd94ITbDy+AB ohMM7RCZVEao1hTKwgkNZsuSnXQ52npfKzrCB8hagDJHWUZyqV94tepmovte0/cp0h4L SvPXvaVH6Kvmqsu415sDgkqDdnh0pnuy5EbzAZl/JGrx9UiwjWAucl5+kBCOYUeFDUvr 0QJUC5x7f/83eUXVQvxdzpHaeshvsSjN84YEl5sN0EdVOxlMEIgfFzUzZo6IFB3/q633 zoEw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:message-id:mime-version:subject:from:to:cc; bh=oNoDUi1hsmNzzodU0R6ojKZvjIC3JQAmU+NA/+7Uaps=; b=AzmLX5758qKThom32oR3AwSp0YlMbFntQatk6Jad4AjdKNyOoSx4nALb3Syr0F7K0O MsD/1QmTrNkqqUIoUiCVlesaT64GYhdV7arMQnEDXviYjKwZWmJLHJwqFidvGjZGxRyJ TpxE26CPvMv+TAbh7buEcm1+a58h3Je8UrL7DBp05MCHhxkMxWqbzZTELTEwZsKqKmg6 e2PzrbIrXUCrBzXsUwBvMuq3mgvMXfmp4pX5xlTIHvosSQXa1GjVYlOTGjJ9wdKRSkMu UR0ut9A8/G6YjnHCUR6/9ALCFOmLxQBJzfBj975IlkmSmt6dCDkw4OAYsIGQCqh2WzQA wFWA== X-Gm-Message-State: APjAAAU7oK7WS2MnZ4t/ivJnJ+guCqDXqx2jGw73I8nXH7XsSh6XBMtF P8tJZk4RZOISNTH42OLUoumuv9L46rcEthtcJAx0nwTBxeBmDkLrRvK4qHyYrhx1J6CXHtFtuJQ aZcb1y4xkDBH5L7CzUDZAOzNkB3s93HN1PcyMl3cZVRUVYj5nzJjH0qbJ3322iA7kv4/LL7SZ/0 IqX5TyablSiCkNiqE= X-Google-Smtp-Source: APXvYqwFX5U5jD7RsGf0G3vM/9ehnT3AiWsZaEFsyMkoc/hovIoyUTjRlHyWf2f4E//56cQouSUIEdq8hx31clIz X-Received: by 2002:a81:6c85:: with SMTP id h127mr16796224ywc.111.1566220491100; Mon, 19 Aug 2019 06:14:51 -0700 (PDT) Date: Mon, 19 Aug 2019 15:14:42 +0200 Message-Id: <00eb8ba84205c59cac01b1b47615116a461c302c.1566220355.git.andreyknvl@google.com> Mime-Version: 1.0 X-Mailer: git-send-email 2.23.0.rc1.153.gdeed80330f-goog Subject: [PATCH ARM] selftests, arm64: fix uninitialized symbol in tags_test.c From: Andrey Konovalov To: linux-arm-kernel@lists.infradead.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org, amd-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org, linux-rdma@vger.kernel.org, linux-media@vger.kernel.org, kvm@vger.kernel.org, linux-kselftest@vger.kernel.org, Will Deacon X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190819_061453_250786_FF41018B X-CRM114-Status: GOOD ( 12.18 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Mark Rutland , Szabolcs Nagy , Catalin Marinas , Kostya Serebryany , Khalid Aziz , Felix Kuehling , Vincenzo Frascino , Jacob Bramley , Leon Romanovsky , Christoph Hellwig , Jason Gunthorpe , Dave Martin , Evgeniy Stepanov , Kevin Brodsky , Kees Cook , Ruben Ayrapetyan , Andrey Konovalov , Ramana Radhakrishnan , Alex Williamson , Mauro Carvalho Chehab , Dmitry Vyukov , Greg Kroah-Hartman , Yishai Hadas , Jens Wiklander , Dan Carpenter , Lee Smith , Alexander Deucher , Andrew Morton , enh , Robin Murphy , Christian Koenig , Luc Van Oostenryck Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Fix tagged_ptr not being initialized when TBI is not enabled. Dan Carpenter Signed-off-by: Andrey Konovalov --- 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;