From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 75A8FC433DB for ; Fri, 12 Mar 2021 02:48:48 +0000 (UTC) Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 267A664F73 for ; Fri, 12 Mar 2021 02:48:48 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 267A664F73 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=chromium.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=desiato.20200630; h=Sender:Content-Transfer-Encoding :Content-Type:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References:Message-ID: Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=vs2YvcgJynMh2V6d0zbZG/tbbLW8UbqyjzS4ju00veY=; b=Re5TQvJJEKoye4AgoppzY/x33 vNuUGedCx224ezmvpyvzCOSIggzoJgBNMtbS5R33Ff4ENNYXrqCEQeS4wn+nbtUzqSRfrQQ4yzK7K KSmBbtJ7cHTb0pVQoqLZYECJPFpI16525KkQyWyxkVT+fNRNi9N+luvJPTiKI2tbyrxBZWixokVGD 4shyx/PaDCfbq2peUtHYF96st/3eAjqRJupFbS86o5RE2PyBc2yCOAH7M2lzhYZQgnQV5uR0Bc9+O uMtr8psVL+igIthMileCTmJZ4eb3rgPQRW1stJKNTNoCdlTX6vyurZKvZiqlGImJqiVN0S66CIRTz J0GBgI2yQ==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lKXpJ-00AVVu-3C; Fri, 12 Mar 2021 02:46:57 +0000 Received: from mail-pj1-x1031.google.com ([2607:f8b0:4864:20::1031]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lKXov-00AVOB-52 for linux-arm-kernel@lists.infradead.org; Fri, 12 Mar 2021 02:46:35 +0000 Received: by mail-pj1-x1031.google.com with SMTP id j6-20020a17090adc86b02900cbfe6f2c96so10353021pjv.1 for ; Thu, 11 Mar 2021 18:46:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=EkKsbT/Be7JGL+mLJvho9bTta6ZuIDt4k2VfVYUMdas=; b=RAWK+vGcMZyK9BG6AxoJ0QzqwZIszAK9x1UrTKvNkNwXGVrYgWz8709/k2si8eBj1W qQrtwxdfwT+VTa3J8I5zf0r4FiHh18mN89nA+qArQh8jHq5MKYponYw4RmZRp77LRLoY uRCsSXXIj7eyg+c6rlvuq9CK91J3pIa9ABX44= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=EkKsbT/Be7JGL+mLJvho9bTta6ZuIDt4k2VfVYUMdas=; b=iTvZJwKRJRHnb/3KUKkxTcEH5bAP+ngL3vYLabwgLBKVO6ak1NoyRjYvKi008Ht2pf J2L5lpt3ALiZAUMjQtkZI8HNl6CQrrkDr2EQC10tGC744pWurb18vISDuQpOUbbzAQUI S9d1ztBZppjFkIfY3JB8X2TcBwaOfXmrm6hAuqk5xOAb/lYsRz55AyjvhYHTU+48g5mO 276lOCNC6warvUczhm49xiADD2Nx3rI33ZzQnGfHHihnNKTzgKTuXkVyHF5flNSqwg2i +ETqrJIq0vU6BLkj7q3OUawn6tFc+cyhBXounCaEzC2NzsROBjXDlfIAdLvaswyDGP+U 9pFQ== X-Gm-Message-State: AOAM5303xDbhKkJkk6cm1U3oPLfoG+lgiO4UVGBUuTeXeb9XwF4jGyTF zEp7L7XQpSwQJ0dWo9S2i3tXmQ== X-Google-Smtp-Source: ABdhPJy0U15bZZKnq24TxTodYpzvMU/ZPG0N12wONWG2T01eoVgkhya4x6f+sSafSsZdieWkf5PVjQ== X-Received: by 2002:a17:90b:284:: with SMTP id az4mr2741623pjb.12.1615517191648; Thu, 11 Mar 2021 18:46:31 -0800 (PST) Received: from www.outflux.net (smtp.outflux.net. [198.145.64.163]) by smtp.gmail.com with ESMTPSA id v126sm3540349pfv.163.2021.03.11.18.46.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 11 Mar 2021 18:46:31 -0800 (PST) Date: Thu, 11 Mar 2021 18:46:30 -0800 From: Kees Cook To: Sami Tolvanen Cc: Nathan Chancellor , Nick Desaulniers , Masahiro Yamada , Will Deacon , Jessica Yu , Arnd Bergmann , Tejun Heo , bpf@vger.kernel.org, linux-hardening@vger.kernel.org, linux-arch@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kbuild@vger.kernel.org, linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 13/17] arm64: use __pa_function Message-ID: <202103111846.49925C94E@keescook> References: <20210312004919.669614-1-samitolvanen@google.com> <20210312004919.669614-14-samitolvanen@google.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20210312004919.669614-14-samitolvanen@google.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210312_024633_427688_4ABE00F8 X-CRM114-Status: GOOD ( 11.73 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Thu, Mar 11, 2021 at 04:49:15PM -0800, Sami Tolvanen wrote: > With CONFIG_CFI_CLANG, the compiler replaces function address > references with the address of the function's CFI jump table > entry. This means that __pa_symbol(function) returns the physical > address of the jump table entry, which can lead to address space > confusion as the jump table points to the function's virtual > address. Therefore, use the __pa_function() macro to ensure we are > always taking the address of the actual function instead. > > Signed-off-by: Sami Tolvanen Reviewed-by: Kees Cook -- Kees Cook _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel