Message ID | 20230206084020.174506-8-bhe@redhat.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp2122232wrn; Mon, 6 Feb 2023 00:45:28 -0800 (PST) X-Google-Smtp-Source: AK7set/5s+HLbNj/MlE7EX10HbtAVABm07jr52fSDaU+ObX+H5FA8+kFma+F+yf0lp5ZkhgqdUJl X-Received: by 2002:a17:90b:3e87:b0:22b:f763:78d6 with SMTP id rj7-20020a17090b3e8700b0022bf76378d6mr20221225pjb.38.1675673127720; Mon, 06 Feb 2023 00:45:27 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1675673127; cv=none; d=google.com; s=arc-20160816; b=JbrPWrnr8MY4ZIHkacXg960o6PBlQf+977mdwmWoBuRXZkJoKOJ1hf4DxmuT1a/1Ri h8w+BW9f/3L9VExvnpUDFNfSPARhh+am2rpH2R/s7GWhXJfgJR3GKPhMb/5Tmz/kzx7+ FN5NOdP6l1Om/GXPLj+k+wyVwkWmFSVJ7b4y2ZJPo4PkxDSCChvc2uyBG0/XJj08zroU x9sch6/Oqtq4p9qmJBd0+fO6dB9WxuZf+Revks7XYbsSk+2vNLt7yV9Lg+ptm8laFW4w pvN4PSD9bk1M5/pQIPSOj5nLxQimKaYz/r+CDQiV/fzoGPrwaIGNjRRcqHlkDNZF7ICd cRAw== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=yf8UeWDRzlFUhfaCSIXW0vSnsYH1u1H+pSaVUFMvrEs=; b=Afq5rUEHxQy7y7szzUU+Tmb/DAmyzw4JWT+/slkhsdm1yI1NVnkKlm4MrLgSwQnOXu 9epUEdjnhMJQjAJZ0mTER19iJURNlfdfZIcbWHCowuKNGEAXYhDanu8O0m58Dr8r46aI tWj+UL3p4zsF0Ejai5PGVjMZ6NpDwl5xh3uOw0p9MBX5zefnkibrmv+V+YTbEZokSpFD 30pz5FewdUELHUSvHp1vO9eerld40b5q95DFseuCOSU7MKvbCcIuR8irBffHcHQeDFqq JWMhzKbbBoWG0oTCX87upiq0WHAdD4DF8Avoyvyz9IPZepxNHVLBgILpn6gs4EGX6ROC cw/w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=gcuyEw2o; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id y5-20020a17090aa40500b0022c67694b0asi15722468pjp.186.2023.02.06.00.45.15; Mon, 06 Feb 2023 00:45:27 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=gcuyEw2o; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229740AbjBFImT (ORCPT <rfc822;kmanaouilinux@gmail.com> + 99 others); Mon, 6 Feb 2023 03:42:19 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56254 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230089AbjBFIl4 (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Mon, 6 Feb 2023 03:41:56 -0500 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 65C0318161 for <linux-kernel@vger.kernel.org>; Mon, 6 Feb 2023 00:41:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1675672863; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=yf8UeWDRzlFUhfaCSIXW0vSnsYH1u1H+pSaVUFMvrEs=; b=gcuyEw2oezmiLmw34rfCVgPahCCjLNavr4YYrTLgr/bSuKVenyNj5JJniWGtL1GHFYcbln vlUE7jZa1qpplkp5h9gEtY0tY94vR2Gjgx4NniwIlUy84RsG9lAKwtk2j1e2DqZvekYUgJ Lft5yQTFmAcMEisWDUYXs1TQrKPlyQ4= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-128-6zunQOeMP6WEHO3AFKzI_w-1; Mon, 06 Feb 2023 03:41:01 -0500 X-MC-Unique: 6zunQOeMP6WEHO3AFKzI_w-1 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 54393100F907; Mon, 6 Feb 2023 08:41:01 +0000 (UTC) Received: from MiWiFi-R3L-srv.redhat.com (ovpn-12-71.pek2.redhat.com [10.72.12.71]) by smtp.corp.redhat.com (Postfix) with ESMTP id 6B3632166B29; Mon, 6 Feb 2023 08:40:57 +0000 (UTC) From: Baoquan He <bhe@redhat.com> To: linux-kernel@vger.kernel.org Cc: linux-mm@kvack.org, akpm@linux-foundation.org, stephen.s.brennan@oracle.com, urezki@gmail.com, lstoakes@gmail.com, error27@gmail.com, Baoquan He <bhe@redhat.com> Subject: [PATCH v5 7/7] sh: mm: set VM_IOREMAP flag to the vmalloc area Date: Mon, 6 Feb 2023 16:40:20 +0800 Message-Id: <20230206084020.174506-8-bhe@redhat.com> In-Reply-To: <20230206084020.174506-1-bhe@redhat.com> References: <20230206084020.174506-1-bhe@redhat.com> MIME-Version: 1.0 Content-type: text/plain Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 3.1 on 10.11.54.6 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_NONE autolearn=ham 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: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1757070625705919250?= X-GMAIL-MSGID: =?utf-8?q?1757070625705919250?= |
Series |
mm/vmalloc.c: allow vread() to read out vm_map_ram areas
|
|
Commit Message
Baoquan He
Feb. 6, 2023, 8:40 a.m. UTC
Currently, for vmalloc areas with flag VM_IOREMAP set, except of the specific alignment clamping in __get_vm_area_node(), they will be 1) Shown as ioremap in /proc/vmallocinfo; 2) Ignored by /proc/kcore reading via vread() So for the ioremap in __sq_remap() of sh, we should set VM_IOREMAP in flag to make it handled correctly as above. Signed-off-by: Baoquan He <bhe@redhat.com> Reviewed-by: Lorenzo Stoakes <lstoakes@gmail.com> Reviewed-by: Uladzislau Rezki (Sony) <urezki@gmail.com> --- arch/sh/kernel/cpu/sh4/sq.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/sh/kernel/cpu/sh4/sq.c b/arch/sh/kernel/cpu/sh4/sq.c index a76b94e41e91..27f2e3da5aa2 100644 --- a/arch/sh/kernel/cpu/sh4/sq.c +++ b/arch/sh/kernel/cpu/sh4/sq.c @@ -103,7 +103,7 @@ static int __sq_remap(struct sq_mapping *map, pgprot_t prot) #if defined(CONFIG_MMU) struct vm_struct *vma; - vma = __get_vm_area_caller(map->size, VM_ALLOC, map->sq_addr, + vma = __get_vm_area_caller(map->size, VM_IOREMAP, map->sq_addr, SQ_ADDRMAX, __builtin_return_address(0)); if (!vma) return -ENOMEM;