Received: by 2002:a05:6a10:413:0:0:0:0 with SMTP id 19csp2248984pxp; Mon, 21 Mar 2022 14:58:09 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwLuvks8oM/woCOlsgqr93FEoAyxrcbceqzHOd0Ps4eKzfxqrzA/l5cu5pGUTq8C0iw3ikh X-Received: by 2002:a05:6a00:1a16:b0:4f9:fd7a:367 with SMTP id g22-20020a056a001a1600b004f9fd7a0367mr26187597pfv.45.1647899888997; Mon, 21 Mar 2022 14:58:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1647899888; cv=none; d=google.com; s=arc-20160816; b=nNkyN9bKBzWzD0lFbcn61vJyH1i5czpCUj7HzCpirCHRV2V6zD5jkQ7u5hNuyCMm8U Pz9pDRFLA/sNeOKvIyxV56po31n2eVYHR+oNhpyEn6QrOBMlPtAyUVst9SD8+ZfqXeZG Rg2OwKx+4B3p6bC4rnx/szlVuypPrgcOFb1Mbb/NuKYbEfFUl6JvCgUBhfcSSN+RbJCN FMxjxmdgThfRp5aiG4AsNozTpkM7M0lM7AA/kODkBwwSvvQ5gTbJQV2WpgMNJjSPhd6t mYkuwdvvTYyaH7i/jo30PtwqgB9sAYTzw/5qLlVUE8im3JQgCiuaqsKmDokTE1cBxNnP 22Vw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=O+5k8PtHwGKyL1Cs6D0Vh6qXLi6xB1B9Jw66/TmtIxQ=; b=0fWsa3FMSYs+oz0THDFFCS5xKFXb/LjiVS1FGxWJjgecC8uIxTII7u1V++xooQt0rh hWjc+Z4ZYg19i1xZK6HevKO52kqUa0mFPfJ7cBDVVbZgWqV2nhbiDIumgm3/2yXednYZ X16U6r6p7VB60YPge+almVfYvjVaVTongjZnNTv2NWGb6vMZGLcmCzTLpT9uNgSJ5jso gjpSLPazEZrxcZ7QBjHr4dRML9gfReYVAtj3ZChv+xnqPF6PbPiOFopUT4DzEvRwIKLA GtdhklmSmFczWiyfGa5Ggcjgmyxn/TSwYiXefk51TgZgJwk3MGMDUmnsa1vDzp4ETq0i aMHA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=fYafc3GE; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id j1-20020a170902c3c100b00153ff064711si10664364plj.144.2022.03.21.14.58.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 21 Mar 2022 14:58:08 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=fYafc3GE; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 456FC68986; Mon, 21 Mar 2022 14:23:52 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1348994AbiCUOFD (ORCPT + 99 others); Mon, 21 Mar 2022 10:05:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59282 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1349119AbiCUN7P (ORCPT ); Mon, 21 Mar 2022 09:59:15 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 39C5010CC; Mon, 21 Mar 2022 06:57:49 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id C15BFB816CC; Mon, 21 Mar 2022 13:57:47 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 10F37C340E8; Mon, 21 Mar 2022 13:57:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1647871066; bh=jbi74pirWmIJryKTHRKMdiKZsXWXK+wLnFhWCEPB59E=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=fYafc3GE6Dk9sq1GN64lwXnQWTSnpbCkojE0uTiv0oC3OETOlqCBoapwccsi/OBkn +Rk4nHTj2poDo/JIAoiObNA2fpQBvC0cnzuH4H7qxv62jmJ9j7KETQyeBpMGW/hgR7 9fr7nEGI3IvHScfP9TrBPDCNG8Vt4Ho78NgWXqUE= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Arnd Bergmann , James Morse , Catalin Marinas , Sasha Levin Subject: [PATCH 5.4 11/17] arm64: fix clang warning about TRAMP_VALIAS Date: Mon, 21 Mar 2022 14:52:47 +0100 Message-Id: <20220321133217.483718656@linuxfoundation.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220321133217.148831184@linuxfoundation.org> References: <20220321133217.148831184@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-3.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Arnd Bergmann [ Upstream commit 7f34b43e07cb512b28543fdcb9f35d1fbfda9ebc ] The newly introduced TRAMP_VALIAS definition causes a build warning with clang-14: arch/arm64/include/asm/vectors.h:66:31: error: arithmetic on a null pointer treated as a cast from integer to pointer is a GNU extension [-Werror,-Wnull-pointer-arithmetic] return (char *)TRAMP_VALIAS + SZ_2K * slot; Change the addition to something clang does not complain about. Fixes: bd09128d16fa ("arm64: Add percpu vectors for EL1") Signed-off-by: Arnd Bergmann Acked-by: James Morse Link: https://lore.kernel.org/r/20220316183833.1563139-1-arnd@kernel.org Signed-off-by: Catalin Marinas Signed-off-by: Sasha Levin --- arch/arm64/include/asm/vectors.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/arm64/include/asm/vectors.h b/arch/arm64/include/asm/vectors.h index f64613a96d53..bc9a2145f419 100644 --- a/arch/arm64/include/asm/vectors.h +++ b/arch/arm64/include/asm/vectors.h @@ -56,14 +56,14 @@ enum arm64_bp_harden_el1_vectors { DECLARE_PER_CPU_READ_MOSTLY(const char *, this_cpu_vector); #ifndef CONFIG_UNMAP_KERNEL_AT_EL0 -#define TRAMP_VALIAS 0 +#define TRAMP_VALIAS 0ul #endif static inline const char * arm64_get_bp_hardening_vector(enum arm64_bp_harden_el1_vectors slot) { if (arm64_kernel_unmapped_at_el0()) - return (char *)TRAMP_VALIAS + SZ_2K * slot; + return (char *)(TRAMP_VALIAS + SZ_2K * slot); WARN_ON_ONCE(slot == EL1_VECTOR_KPTI); -- 2.34.1