Received: by 2002:a05:6a10:413:0:0:0:0 with SMTP id 19csp2295785pxp; Mon, 21 Mar 2022 16:10:01 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxLLF0JnoOAhYTInlnhNihTXuOiEXR7eGDnv1r1gwwgPHRNcEoEtefWvmA5R2IbyH1cTRbD X-Received: by 2002:a17:902:ea0b:b0:154:7f33:d558 with SMTP id s11-20020a170902ea0b00b001547f33d558mr1417125plg.1.1647904201566; Mon, 21 Mar 2022 16:10:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1647904201; cv=none; d=google.com; s=arc-20160816; b=SQrF7CVES6iY4zctToywVHfGD54KWpAAOEcPxGUMHV3cmQfW+q0mSO4NEwTEOMK0S2 t2xTK0ZDzVqjM9g04JC+pnDuKSfEt+2+NA0izBpJ5z3NBY8q8Nu1Ib5VBeaKQeXwlBzJ f5D9NuzupmxOrqtEhqNnAhG6JNJWKPp98pv+t4rQjYfQqFhCMK0K7UWM7I0UoTc8Y9vd 5pKOEAUrwzkKnjMtXHRsmHdRyPkQc5OsZ0UKyzuJHaagcKXz2ic8uSAXwsmKNDUtnvpi bIjCGdSRh80HYEXYpJRj+O2qzDb6p++fxRmFUvUWI8nPqkX8tfhpzETn8KYdmcYi8mHZ K+2A== 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=UnMhgRF0AIH86JRzfof49IzElhwq2VOeY32ugZpjZkIR7hBrzasmvIqmkLJD/luohg 92z2q8jok9j8IWdypJV0FhTs7+soSRtb3/p2DT7QM9K54m0INqrNkTiIQeq8l9aRGFia 4u3ETmG9bsKuLgbxeSBcVFoOY6y8PGXcUKaHXlv6RgUSQl8lXPLwN0H+njNn2uDinTEE LaqXjd05jF6lW8Sicqtodz+NMNoJmq5zJLVIMRihTjwmgSGC0DwWoQEx7JUhGN7/83hg DVPLYlw08okdlH2mOg2CaLlMejieoXaHOS4HvL1Xq5otsqwxnYif36Hcfp/DBjk191q6 j8lQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=qjBC5LQ8; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 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. [23.128.96.19]) by mx.google.com with ESMTPS id x5-20020a170902ea8500b00153b2d16429si11464801plb.49.2022.03.21.16.10.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 21 Mar 2022 16:10:01 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=qjBC5LQ8; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 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 63E7642B558; Mon, 21 Mar 2022 15:08:14 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1350448AbiCUOJv (ORCPT + 99 others); Mon, 21 Mar 2022 10:09:51 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35120 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1349293AbiCUODg (ORCPT ); Mon, 21 Mar 2022 10:03:36 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D9CBE17B886; Mon, 21 Mar 2022 07:00:47 -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 dfw.source.kernel.org (Postfix) with ESMTPS id F0DC8612A1; Mon, 21 Mar 2022 14:00:45 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0829AC340ED; Mon, 21 Mar 2022 14:00:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1647871245; bh=jbi74pirWmIJryKTHRKMdiKZsXWXK+wLnFhWCEPB59E=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=qjBC5LQ8B0dFqsXj71WKwOF61gm7Q5HxcILuJWgyWFkEobXYKkhJPhT8RSBRoLh+a 8+TTepPFHNYPu9SQT9x0V+emCFW4ZbrMOMnXijpbntCOj7SZapzXr8W9KvGh1BGB77 YvrJjhIN7a3Zd6ZfBpenbFW/huoAfUFFf091jVI8= 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.15 25/32] arm64: fix clang warning about TRAMP_VALIAS Date: Mon, 21 Mar 2022 14:53:01 +0100 Message-Id: <20220321133221.291123727@linuxfoundation.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220321133220.559554263@linuxfoundation.org> References: <20220321133220.559554263@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