Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 3F0DBC4332F for ; Sun, 6 Nov 2022 00:12:25 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 2DBAA85211; Sun, 6 Nov 2022 01:12:23 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=canonical.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=canonical.com header.i=@canonical.com header.b="qn62Muyu"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 32DF985215; Sun, 6 Nov 2022 01:12:22 +0100 (CET) Received: from smtp-relay-internal-0.canonical.com (smtp-relay-internal-0.canonical.com [185.125.188.122]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id AA31C8520D for ; Sun, 6 Nov 2022 01:12:19 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=canonical.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=heinrich.schuchardt@canonical.com Received: from mail-wm1-f71.google.com (mail-wm1-f71.google.com [209.85.128.71]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by smtp-relay-internal-0.canonical.com (Postfix) with ESMTPS id DBD8F423EB for ; Sun, 6 Nov 2022 00:12:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1667693538; bh=XBoRsRBDAgNeOnR+8PpALqdJTJSQ0o+XrROD5npS84I=; h=Message-ID:Date:MIME-Version:To:From:Subject:Content-Type; b=qn62MuyucXB1pJKpoA7YdHzfzgsjhGcP7hqwQ+ofuQiv0IcBkFeWTikRnF9TTFsde vfKYlJiDpSABLz5J9IzKqUtQ9q/kJycfCJiOvHhPfUbs/Hd5KLu+TJ293IMy3/OPif JS6DRyH52FCCFN8BUKme4NLPaxDWaxo4G+Qe5lsu5+E7wR9I/Mgvx4DRPhczi+I9cf h5P+vdWJlVzmcKAEmokBelGvBXL/pSQb2utItwXqwXc1uwNek/xvOsYEG+hAZ+44eD 6OkqVhA4IvITPd1n3izvzVA0bwEgdO0bkf2Jh1TyNzyaGIZLbC7oh2MD/u1jpaaeI0 ECG+SChS3Espw== Received: by mail-wm1-f71.google.com with SMTP id r187-20020a1c44c4000000b003c41e9ae97dso6385211wma.6 for ; Sat, 05 Nov 2022 17:12:18 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:subject:from:to:content-language :user-agent:mime-version:date:message-id:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=XBoRsRBDAgNeOnR+8PpALqdJTJSQ0o+XrROD5npS84I=; b=pru7MouUTqd981ZgGk2lu2lBpR/XarLHFhFcSjnv3OaCoBnjSHgpDc1CoPyHD5ifRB R4vaQaX+jLqOFZH9d5PTpb8BUAcShIy/brbBCXrOtNxpikQbU1HS8CswQ5k9vdi6IDUa JxbLFs9lFf8odDa9UwMX+e2oUzxn5uokC8oQlEa/FTWq3zs5Kb/a3m15ez/lxz4LEPal yJxV01QL9ljHVmqV2tHmmAd9fnWX4WKB07eOTunYEvbusYRnJz+UIZ8Mx7tpMVp2w/YO np7EUsLO5jqlaTKVihY9pLbkvej1AeqL7beCYZDKKD4wN/w3bSyARQ1xYscoJKMbNd55 i3kg== X-Gm-Message-State: ACrzQf1ubSv/3UEw8vyKhdfaF3wtTIE/pW1Zzn058DTEFhtOgdh6k0TB sKbxjrbqp1oiCZV1iViZ8qUSzawOBjNwNYIVQDwlmqXOTlfDZKhPTcDgPl7oq72savffdqVIKvG zf7l44zZdMX4l6qgz072f/118U/VdesM= X-Received: by 2002:adf:f051:0:b0:236:70db:20d9 with SMTP id t17-20020adff051000000b0023670db20d9mr27126966wro.91.1667693538429; Sat, 05 Nov 2022 17:12:18 -0700 (PDT) X-Google-Smtp-Source: AMsMyM62rfOCm47HeKM4HZv8eVbORJLiwV/w2mxC8o8LF4wn4eaW2ZplNi8k9jgokUnaNPEU3xK5ow== X-Received: by 2002:adf:f051:0:b0:236:70db:20d9 with SMTP id t17-20020adff051000000b0023670db20d9mr27126954wro.91.1667693538182; Sat, 05 Nov 2022 17:12:18 -0700 (PDT) Received: from [192.168.123.94] (ip-084-118-157-002.um23.pools.vodafone-ip.de. [84.118.157.2]) by smtp.gmail.com with ESMTPSA id j15-20020a5d604f000000b00236705daefesm3305704wrt.39.2022.11.05.17.12.16 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 05 Nov 2022 17:12:16 -0700 (PDT) Message-ID: <483c1ab9-4aeb-d5ea-d3cb-9bb5216b2596@canonical.com> Date: Sun, 6 Nov 2022 01:12:15 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.4.2 Content-Language: en-US To: Ilias Apalodimas From: Heinrich Schuchardt Subject: [BUG] efi_check_allocated() only checks start address Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.6 at phobos.denx.de X-Virus-Status: Clean AllocatePages() and FreePages() call efi_check_allocated() to check if a memory address is allocated or not. The function should consider the number of pages in the request and either check if the full range is deallocated or the full range is allocated. https://source.denx.de/u-boot/custodians/u-boot-efi/-/issues/7 Best regards Heinrich