Received: by 2002:a05:6358:700f:b0:131:369:b2a3 with SMTP id 15csp3287869rwo; Fri, 4 Aug 2023 02:24:47 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHcJ6wyqyBs61l3HcA2Ilj+gk04yJmJPPaCc8ijMCuRnXUltNmTpk6ZfW+VMqS1MtNZzRiG X-Received: by 2002:a17:903:2288:b0:1bc:4995:a1fc with SMTP id b8-20020a170903228800b001bc4995a1fcmr1157116plh.14.1691141086879; Fri, 04 Aug 2023 02:24:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691141086; cv=none; d=google.com; s=arc-20160816; b=fALT1tJt9pXyqU1Y1x5FNIGAR9aCCC0o0VumxHbmzwCE+yGPgZYi82PvFx9f3krkC6 0R+gq8qWP+OmfCj7+2bCB3BRV57RUNK3vBfCVefjzulEC5FkL0uWp5JGCl05YWwW0rWT bTzcAtRQeI6cNjVBbOnQ24A/cHHP45u5n8lldqoKJ2X3qMdfgpN9t41eb6ikLk+BXXxy 0ICaFwC+z5qmV6ynxXeQMl14JvppVC2m+wh5+txOzP+difaRlmqrdhJasY7/UDgtEN8L /a8AW6h8m3digswysKSZFZY5xQpjmrX+7AKwekrjV5hDOH5P3xkoOcH2Bn2KSswMSehK 4tiQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=+6p8ZmyjWt9EkIhx2x7mQdHkPI32JR/rPIgt/KaUyrM=; fh=zQdD7IB8dKgMqwWuOiIdraeh0heIcKo2o4a7yVXbD5w=; b=siMY7Jw4/+U6VrudOxhUSpf1+B2V0wKVT2HICsAlMFGESE4aA1O4ND/yT/3aP612j6 ab/vNwz59NQihXzfwUqQppRig7VGrENrrkkASW3QsSGCj3uBFj0RPt2mHOCoYa6RFszs Ihyiw8wkWjHUg4OAd7eZNBIe2VfHhic7NNvPuSBAHJSHfnNS2Sp21rA6jofFeHvbNQuP RH4NIfOuIaOC73X2qffl7CuXlQL2O1njrbYYgC+UzU6BuTwJNEkGgzDOzzpXcVN3rtt6 SatIMf8TjEdwhucR7NqkrPvd4Lg93NNiUiWIQF26mucQli8ghKycqaLS++/xqWjqL1E7 KSUw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ventanamicro.com header.s=google header.b=Xy7UXj5r; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id n6-20020a170903110600b001bc5169be55si309926plh.314.2023.08.04.02.24.26; Fri, 04 Aug 2023 02:24:46 -0700 (PDT) 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=@ventanamicro.com header.s=google header.b=Xy7UXj5r; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234493AbjHDITk (ORCPT + 99 others); Fri, 4 Aug 2023 04:19:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55918 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232403AbjHDITj (ORCPT ); Fri, 4 Aug 2023 04:19:39 -0400 Received: from mail-pf1-x429.google.com (mail-pf1-x429.google.com [IPv6:2607:f8b0:4864:20::429]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5F5E3E6E for ; Fri, 4 Aug 2023 01:19:38 -0700 (PDT) Received: by mail-pf1-x429.google.com with SMTP id d2e1a72fcca58-686be28e1a8so1311115b3a.0 for ; Fri, 04 Aug 2023 01:19:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ventanamicro.com; s=google; t=1691137178; x=1691741978; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=+6p8ZmyjWt9EkIhx2x7mQdHkPI32JR/rPIgt/KaUyrM=; b=Xy7UXj5rKhL+uu8tkHk9ALkF9uUbocA2LUGuUDTCT+UGGvvTrismPG1zBkJkoUphar GFIBh9B6MWwxSsxdU7gxlE57mN66vXeN52obzKwYx5CxoHQybxqezGy7NIg+855c764S XNF/oYMsJJ5Rt/2MYOeT2lTd6jXCIw8p1xhmuAbrL+ZL+sCs0RmmNBE1mk+AOBq6Eq9W F4pwgeCm+zv78ejFX6n1IKU186BdKmiIkBCc3ojk6wDZAKKAN2w8IQf6CZtDJd5Pa6Dq /f/CXnPRCEHLAkvvcZXchDfjlnHhtZnzkRvEjbeedsy/ciaI5ykfwG3vd5RKwNUEGKzl UCZg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1691137178; x=1691741978; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=+6p8ZmyjWt9EkIhx2x7mQdHkPI32JR/rPIgt/KaUyrM=; b=hl/kq1N1R6Uw1pLaU8iu78qKze4WRR/G+b4py+E1p2AxWBoqtro81OihKrzYh6Ka28 pEcInaTQa7QZzVVI7w1j7W5f9x2b1lZdMYyTuRHolm0YK1CrVEG2wtehaPHKQIh14yDV 9F1ozrLjKOLnTPANTb3nymnCLGI758CC11mK4H/Lgj1ZiicdCvHIfC933hwhdB4qpxmO UjGYvUaLEKHLdk0U+yuKdVSj5XY222POgmfIpWJuqj3kM7iic1GYgEqCfxOwJRTqKy+L g5g4K2tQZZ3r9f73DCh2ZKEy/mh4gJPxGyFyFf06MWZGAwLKASz+JI5tA3T+sJif3+1W 0HDA== X-Gm-Message-State: AOJu0YzG+xmHyv9+EBYTwrqR+ckui0TMlduEyK/yMybFPMJ76mA8zgxa +BWD9b2e4CqUq2OGN/E+RR5V9g== X-Received: by 2002:a05:6a20:938a:b0:13e:8ce5:cacd with SMTP id x10-20020a056a20938a00b0013e8ce5cacdmr944703pzh.26.1691137177799; Fri, 04 Aug 2023 01:19:37 -0700 (PDT) Received: from sunil-laptop ([106.51.190.143]) by smtp.gmail.com with ESMTPSA id e18-20020aa78c52000000b0068620bee456sm1046915pfd.209.2023.08.04.01.19.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 04 Aug 2023 01:19:37 -0700 (PDT) Date: Fri, 4 Aug 2023 13:49:24 +0530 From: Sunil V L To: Andy Shevchenko Cc: linux-doc@vger.kernel.org, linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-acpi@vger.kernel.org, linux-pci@vger.kernel.org, Jonathan Corbet , Paul Walmsley , Palmer Dabbelt , Albert Ou , Catalin Marinas , Will Deacon , "Rafael J . Wysocki" , Len Brown , Daniel Scally , Heikki Krogerus , Sakari Ailus , Greg Kroah-Hartman , Daniel Lezcano , Thomas Gleixner , Anup Patel , Marc Zyngier , Bjorn Helgaas , Robert Moore , Haibo Xu , Andrew Jones , Conor Dooley , Atish Kumar Patra , Ard Biesheuvel , Alexandre Ghiti Subject: Re: [RFC PATCH v1 04/21] RISC-V: ACPI: Enhance acpi_os_ioremap with MMIO remapping Message-ID: References: <20230803175916.3174453-1-sunilvl@ventanamicro.com> <20230803175916.3174453-5-sunilvl@ventanamicro.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED 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: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Aug 04, 2023 at 08:47:53AM +0300, Andy Shevchenko wrote: > On Thu, Aug 03, 2023 at 11:28:59PM +0530, Sunil V L wrote: > > Enhance the acpi_os_ioremap() to support opregions in MMIO > > space. Also, have strict checks using EFI memory map > > to allow remapping the RAM similar to arm64. > > > > Cc: Ard Biesheuvel > > Cc: Alexandre Ghiti > > You may use --cc to the command line when forming patches. > > Also we usually consider Cc: as a part of the tag block, meaning no blank line > should be here. > Thanks!, Andy. I specifically wanted Ard and Alex to look at this patch and hence added Cc. I was not aware that no blank line should be there. Thanks for letting me know. > > Signed-off-by: Sunil V L > > ... > > > #include > > #include > > #include > > +#include > > Can you squeeze it to have some order, like to be after io.h (taking into > account given context)? > Yeah, sure. Let me update in next version. > ... > > > + if (memblock_is_map_memory(phys) || > > + !memblock_is_region_memory(phys, size)) { > > + pr_warn(FW_BUG "requested region covers kernel memory @ %p\n", > > + &phys); > > How %p can be useful here (it's mangled), but also wouldn't this give a hint to > an attacker about the kernel memory location and diminish the KASLR protection? > (IIRC after boot we always have the same salt for the mangling the pointers when > printing, so at least theoretically it might be possible to bruteforce the > printing algo to give a clue about the kernel address.) > Okay. This is copied from arm64 version. But I think this is a good point. Let me just print the warning message without address in the next version. Thanks! Sunil