Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp4431789ybl; Tue, 21 Jan 2020 20:40:10 -0800 (PST) X-Google-Smtp-Source: APXvYqzhgMvLDlenjfHR2iOL+Vwd/47KNbm6py4b8PCvsH0u95/O6I9hLrUwx9G5hbEYTMtFvkgZ X-Received: by 2002:aca:f20b:: with SMTP id q11mr5367844oih.78.1579668010638; Tue, 21 Jan 2020 20:40:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1579668010; cv=none; d=google.com; s=arc-20160816; b=QC1i+IBOsMu2ebjW3H5GKClrfRC0sXKDHWSQ0mB1Kb+VgFo8Tyr5TkTJCGV6OQH8KO Q8HYkSh6MNAycitXBEauS0VezUGiDUv2/liuu1DS7RvC21Cf0w9iDqFlrP2HN+2m4X/z RuR4t/lksPsMCR46p6s6aXF1fousaU2GqLQXyhCOrCCrUHRQEtQyUYzujw+IayY8KdRN gKbH57HUtpfGSPCw55WMPQ9GSy7KUvk1J2R5Fs1kAStMz4XHB8EcegYxVTzsF01/3Dtj jnjr7OCjdfxps72n6ner3TK0bEQA5jt5AW1YFl1rDviZqXKvMTeJqgALwnOSPmRLNruo eJAw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :message-id:in-reply-to:subject:cc:to:from:date:dkim-signature; bh=ycX70yNonSao18/YakIgQAyLjBjICvcKUYrrU7H7J6w=; b=Q+fnIKrsJPAJhXWSuXYNkgWCDUP4gX/79h5vSTdW+Ht0pRHI8K61NHIbs5v66sQLf0 uxucSHyo7G4KDacETlIFLz19SVq+tD2jkZ+51V8/Tq2RuuiNSHQAJB5nwF/S80cPLaJc P7zhEph1O7KcBoYn573yN3x0vqll2JOiwyGCIPVdH4hfF63lFAOCVNE7IojaO5vh9/zz XS0Z0IiNsfARCBvDEOeodJeRivcCvMrqL/DMeuGqpz8J9KOnvZunE2nEXy+t5tUY00zt /ffIF8h8xFtYKCPEaMKbanbbVtItJsoDSMOUe/aQO6dnDRnG1Vie+QbIh1SH17kjoxxY i4nA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sifive.com header.s=google header.b=IEZCSVXM; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l14si22678055otk.225.2020.01.21.20.39.56; Tue, 21 Jan 2020 20:40:10 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@sifive.com header.s=google header.b=IEZCSVXM; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729078AbgAVEi4 (ORCPT + 99 others); Tue, 21 Jan 2020 23:38:56 -0500 Received: from mail-io1-f66.google.com ([209.85.166.66]:41574 "EHLO mail-io1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726605AbgAVEi4 (ORCPT ); Tue, 21 Jan 2020 23:38:56 -0500 Received: by mail-io1-f66.google.com with SMTP id m25so5332795ioo.8 for ; Tue, 21 Jan 2020 20:38:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sifive.com; s=google; h=date:from:to:cc:subject:in-reply-to:message-id:references :user-agent:mime-version; bh=ycX70yNonSao18/YakIgQAyLjBjICvcKUYrrU7H7J6w=; b=IEZCSVXM1E6TtaDZHO/2X7nEvnXrThhZ40UygbwaaKpGcDDoInitSjT5Y3u0Opa3Tq /2U6r7Y8jxbFu02bMd+MKo4+stMUb1H87MWFMIS4gIvR8wEdi7oTX99lqfYKWNzv9WTx 4o+bmu41ZeoCmABxa02KYX9Lgkw851us8KTrzY9HF3kAV2PZlrAuryK7OckINcS3BD8N AzCcGHL0x7qKGW/rODXP7lP6qGpDWOkQOKkOyWit+kcdz5cJTaiE1h+YXztRq51LvbBD 45idZQ7puuNNGBabiAUTidGsxbHL+aSThb1NHKpWxca4OADoxsMsiFrHhKknFzmJIDpx Km4w== 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:in-reply-to:message-id :references:user-agent:mime-version; bh=ycX70yNonSao18/YakIgQAyLjBjICvcKUYrrU7H7J6w=; b=nFSR6DZ082WuVGpVMSkX71aEnXm31vc6duk8i/t7FSWv3fzIz8+K7yyUVoibBRmXe+ k86L0aF8qwR3ioy1Mbc3e1RZXq2iVnYJXDWkQtKSMuuZHLMcf471dH3fA83ufma9SuhM f0lPshxokwWah7g73k35LR/VXQQC5KOVgWaSmzoRiv0kN8+Sbq4ZTr4DfYRk3faSU4np nwb1C9iF0IGD8K3mhooFnBJjq0Ef5jxUApEhVlShEfBFr6r5FyGqsT/QBwWCZlRb+BJl R+CZKV+vLVtAcLAStdCJN6OYhj2G+7PMX8sPHwxbl7nJVxXj5mIqEhqHlaJPI/IhY/Zj vFLg== X-Gm-Message-State: APjAAAV0OAq0cebv2lUZTi5zIQlmp1drSYgi7d7raBBb3fP3iLzqgwzZ 9UccEJfCC2HlDfnm0Ra1qFgA+g== X-Received: by 2002:a6b:fc02:: with SMTP id r2mr5383665ioh.183.1579667934939; Tue, 21 Jan 2020 20:38:54 -0800 (PST) Received: from localhost ([64.62.168.194]) by smtp.gmail.com with ESMTPSA id j69sm13970785ilg.67.2020.01.21.20.38.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 Jan 2020 20:38:54 -0800 (PST) Date: Tue, 21 Jan 2020 20:38:51 -0800 (PST) From: Paul Walmsley X-X-Sender: paulw@viisi.sifive.com To: Zong Li cc: palmer@dabbelt.com, aou@eecs.berkeley.edu, linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 1/2] riscv: mm: add support for CONFIG_DEBUG_VIRTUAL In-Reply-To: <20200102031240.44484-2-zong.li@sifive.com> Message-ID: References: <20200102031240.44484-1-zong.li@sifive.com> <20200102031240.44484-2-zong.li@sifive.com> User-Agent: Alpine 2.21.9999 (DEB 301 2018-08-15) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 2 Jan 2020, Zong Li wrote: > This patch implements CONFIG_DEBUG_VIRTUAL to do additional checks on > virt_to_phys and __pa_symbol calls. virt_to_phys used for linear mapping > check, and __pa_symbol used for kernel symbol check. In current RISC-V, > kernel image maps to linear mapping area. If CONFIG_DEBUG_VIRTUAL is > disable, these two functions calculate the offset on the address feded > directly without any checks. Reviewed-by: Paul Walmsley Tested-by: Paul Walmsley - Paul