Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp186214pxf; Tue, 6 Apr 2021 19:00:09 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyIAc/+DKhKf0iMhW3kaehskPF1zv++HOAnl4NzLbABA6uCO+BnN2Wko5cuAfsmUnl0bfi5 X-Received: by 2002:a05:6e02:964:: with SMTP id q4mr927009ilt.85.1617760809285; Tue, 06 Apr 2021 19:00:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1617760809; cv=none; d=google.com; s=arc-20160816; b=vKXA4yFo62weFWhAOXRMgNMnOI1GCcbbt3z2Y48sPVOXOcOmzRdJ5Zgx/xd3QaDVls hKqzRNNiDZ79Z569yEYMIPu6TKo6no82sJ0ouVMPoN/Sx6mHkLG0rG6be3/5zjdbGeIS dYG2HD+paYGDB1fHuiJGtnxqcwd+yAYetdvN0hNvkMJBhduwZpqn07oMOw2p1M1rovVy P7PYqfQO68D9M/HBZhHqV2uAA1b446qfGjwQFcdXahnuArL+pUEmkhriEv9KghnddP0U Fa0Qo/UY/b/cTaMKzmQMuWCudaQIQ+1ioHJ0W2OyDqY8tZ6pMATthP48QYbu5IWeslrW JMpA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=OdkHMhHeE8sCWZJmxMxJ/vyl6yll6k9ZiFKfqw7sui0=; b=hkp0KArvdt5spbJAAfoBeQ6YzXZcKwbVaNcnQqKUgGYZPJ+raUU8EaddPz14zWyh6k XbMBVILvA7Blizy/Gd7sg91FB+Rmp/4F8u3lGIjhSRS4ujOFaUl5EXUkrvU9v06/+5oe ujBaalsGrRIlYXkEeHNfBSwaYNK7R6VsTAr/5cF0zEfotbjRMAydi7yxlohAJ/zsaBs6 +RZN8giX7p9YgZlWRwdXxzJHTs9P9DC9+F6JReRvE/ztnWDlA2E2wn1fcUW1HMVzLsaX j6S4B7fpNZTGupta3NI7Sf4GK262qP2yyGuO8DgSIsHU4/QqfsCz6Q4o2kNnTW80s3Av Zklw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id n29si19428299ioz.104.2021.04.06.18.59.56; Tue, 06 Apr 2021 19:00:09 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S243571AbhDFNTB (ORCPT + 99 others); Tue, 6 Apr 2021 09:19:01 -0400 Received: from elvis.franken.de ([193.175.24.41]:59104 "EHLO elvis.franken.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S243603AbhDFNSu (ORCPT ); Tue, 6 Apr 2021 09:18:50 -0400 Received: from uucp (helo=alpha) by elvis.franken.de with local-bsmtp (Exim 3.36 #1) id 1lTlbK-0006qP-01; Tue, 06 Apr 2021 15:18:38 +0200 Received: by alpha.franken.de (Postfix, from userid 1000) id CDF68C24D9; Tue, 6 Apr 2021 15:02:04 +0200 (CEST) Date: Tue, 6 Apr 2021 15:02:04 +0200 From: Thomas Bogendoerfer To: Florian Fainelli Cc: linux-mips@vger.kernel.org, Randy Dunlap , Jiaxun Yang , Vlastimil Babka , Huacai Chen , Andrew Morton , Jinyang He , Kees Cook , Liangliang Huang , Anshuman Khandual , Michel Lespinasse , Daniel Jordan , open list Subject: Re: [PATCH v4] MIPS: Add support for CONFIG_DEBUG_VIRTUAL Message-ID: <20210406130204.GC9505@alpha.franken.de> References: <20210331032228.21251-1-f.fainelli@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210331032228.21251-1-f.fainelli@gmail.com> User-Agent: Mutt/1.10.1 (2018-07-13) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Mar 30, 2021 at 08:22:07PM -0700, Florian Fainelli wrote: > Provide hooks to intercept bad usages of virt_to_phys() and > __pa_symbol() throughout the kernel. To make this possible, we need to > rename the current implement of virt_to_phys() into > __virt_to_phys_nodebug() and wrap it around depending on > CONFIG_DEBUG_VIRTUAL. > > A similar thing is needed for __pa_symbol() which is now aliased to > __phys_addr_symbol() whose implementation is either the direct return of > RELOC_HIDE or goes through the debug version. > > Signed-off-by: Florian Fainelli > --- > Changes in v4: > > - properly address sparse warning in arch/mips/kernel/vdso.c and > eliminate it entirely > > Changes in v3: > > - added missing SDPX license tag in physaddr.c > > Changes in v2: > - fixed sparse warning in arch/mips/kernel/vdso.c > > arch/mips/Kconfig | 1 + > arch/mips/include/asm/io.h | 14 ++++++++- > arch/mips/include/asm/page.h | 9 +++++- > arch/mips/kernel/vdso.c | 5 ++-- > arch/mips/mm/Makefile | 2 ++ > arch/mips/mm/physaddr.c | 56 ++++++++++++++++++++++++++++++++++++ > 6 files changed, 83 insertions(+), 4 deletions(-) > create mode 100644 arch/mips/mm/physaddr.c applied to mips-next. Thomas. -- Crap can work. Given enough thrust pigs will fly, but it's not necessarily a good idea. [ RFC1925, 2.3 ]