[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 3/6] tools/pygrub: Restrict depriv operation with RLIMIT_AS



On 22/11/2023 20:16, Andrew Cooper wrote:
On 06/11/2023 3:05 pm, Alejandro Vallejo wrote:
diff --git a/tools/pygrub/src/pygrub b/tools/pygrub/src/pygrub
index 327cf51774..b96bdfd849 100755
--- a/tools/pygrub/src/pygrub
+++ b/tools/pygrub/src/pygrub
@@ -75,6 +80,11 @@ def downgrade_rlimits():
      resource.setrlimit(resource.RLIMIT_CORE,     (0, 0))
      resource.setrlimit(resource.RLIMIT_MEMLOCK,  (0, 0))
+ max_ram_usage = LIMIT_AS
+    if "PYGRUB_MAX_RAM_USAGE_MB" in os.environ.keys():

With the .keys() dropped as per patch 2.5/6,

Acked-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>

Happy to do this on commit.

Sure

Cheers,
Alejandro



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.