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=-3.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=no 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 EE846C433E0 for ; Mon, 15 Feb 2021 19:31:56 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (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 9A54261606 for ; Mon, 15 Feb 2021 19:31:56 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 9A54261606 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=soleen.com 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=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:To:Subject:Message-ID:Date:From:In-Reply-To: References:MIME-Version:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=ZDEdYiNu2nS3GVAc9l2fLuASGXx5yJTTJJvLB89K1bs=; b=mTug9A0TITTYdQZMM6ZP3zFel qGpv6KZyF/co6BtGoy3pUf/iJI1dRJVHoCL0hFpza3atMJuaRJJsT7KdZ9aVWpG//iRqiH8DMj/CN 1uAwKo28pOOrPSoXqGwiB9qj0M7OG9zf0ijG7Sk1zxcKqEhRU2I+6uXG+dbWIihSvtkVg55eW/Cq/ J5JxSqJvc+LzZ4MBYb31sitqJQ2aLSg5kYKfdSCXsWfnDAE0UEPYTsqBHd/sF2G1GpCqvJ9kUKmNo pmGmNEL+JgkSJpj7lMGCWFEFMPW/hCckNFLi06BVg0/+1rcVdUeIhcEb72n/f6GRjm7BHYpAQkZMM 2R5PVXxuQ==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1lBjaA-0001td-Cy; Mon, 15 Feb 2021 19:30:54 +0000 Received: from mail-ej1-x636.google.com ([2a00:1450:4864:20::636]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1lBja7-0001so-IW for linux-arm-kernel@lists.infradead.org; Mon, 15 Feb 2021 19:30:52 +0000 Received: by mail-ej1-x636.google.com with SMTP id jt13so13145902ejb.0 for ; Mon, 15 Feb 2021 11:30:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=soleen.com; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=lxiR1WoWj9GLqb+ePEA+WtEnFI2j4eHKFsXpipKpgxM=; b=JQ1hu1pDBShq9ZJiN4qvnQMFVY+EZcb/Uyc3r0pIKJdLe+Es6BFcZvO+kQ88XfZcIO 0vMejIWduLsOH4CyVxjG1/uB/5b+zV/id11vujkfp8afDTJCMucuJA4hmTgPqqEU3XLH xnml37igKv6E+M5bm1CJB4dC5x0cxXaE3j6mYOynmdzBXgp5n2KeXT4V20DE/qovu5bk KCrCWUoYBbbwt6hVNuD08PNrYC8iTjDyqoUdZf3eLs3y9NuDX6bdp5dAfDExVPj7GWuN /lpsT+Ma1l45fyzEDihaAImboBQeBobEkPtNiWGttTafajhigvUceqscEFGJjdYY1RgR DLXQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=lxiR1WoWj9GLqb+ePEA+WtEnFI2j4eHKFsXpipKpgxM=; b=MBqLnSIvJYYbSTdP4Aph5UY8E0txq3zto1qhk+R1sxZPfk/NI7o4BgOCVjv8+Ea3nB c3KNQm8zh0ni6Pjzvc/umZdnOpEqSOsVp//k2+jKFkZXr0ol37Y8DwArUl54fYOSztPk a2KqLE/ZMa3/zRk1xYPlLCwQwV6hBL+raopSGLMNV2Uucn8N2ERP0ReYPhhbUUbqx9eX LSwTt8XoXEAp9BpxH/Ytw9izWNhzXqBtcV1WvmgGFR4TOAT21rrVCclp5hxOcyh49d/0 1kMZG1ImYnX2EV9KkGFf6P2A+n6RfpoJrESwgvPkiVFxoaEP9VDHDYJBct4IlHICHJK9 +XJA== X-Gm-Message-State: AOAM530Q+4G1m+r2UKstC9rAfWVktiL2I2VY63misSvI2XDR+kfgDXdg tCM1S2Ts7pMNTP0u7Rg9wYWH78AC+WHiXd62bQI6pQ== X-Google-Smtp-Source: ABdhPJyPCL6TJC2gNc7DODe1EIjIDra2NShX7mUuisIJb/VCfbgQL6ETyHhzUNp0n7JS/DZgRLAM+HV7IKzVVKiS/EU= X-Received: by 2002:a17:906:43d7:: with SMTP id j23mr17038690ejn.519.1613417450162; Mon, 15 Feb 2021 11:30:50 -0800 (PST) MIME-Version: 1.0 References: <20210215192237.362706-1-pasha.tatashin@soleen.com> <20210215192237.362706-2-pasha.tatashin@soleen.com> In-Reply-To: From: Pavel Tatashin Date: Mon, 15 Feb 2021 14:30:14 -0500 Message-ID: Subject: Re: [PATCH v2 1/1] arm64: mm: correct the inside linear map boundaries during hotplug check To: Ard Biesheuvel X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210215_143051_644294_D75B3AE4 X-CRM114-Status: UNSURE ( 9.81 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Anshuman Khandual , Catalin Marinas , James Morris , Linux Kernel Mailing List , Logan Gunthorpe , Tyler Hicks , Linux ARM , Andrew Morton , Will Deacon , Mike Rapoport 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 > Can't we simply use signed arithmetic here? This expression works fine > if the quantities are all interpreted as s64 instead of u64 I was thinking about that, but I do not like the idea of using sign arithmetics for physical addresses. Also, I am worried that someone in the future will unknowingly change it to unsigns or to phys_addr_t. It is safer to have start explicitly set to 0 in case of wrap. _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel