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 Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id DD3D7C001DF for ; Thu, 3 Aug 2023 14:41:29 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 6E0B828026E; Thu, 3 Aug 2023 10:41:29 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 690B028022C; Thu, 3 Aug 2023 10:41:29 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 5324A28026E; Thu, 3 Aug 2023 10:41:29 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0015.hostedemail.com [216.40.44.15]) by kanga.kvack.org (Postfix) with ESMTP id 442F228022C for ; Thu, 3 Aug 2023 10:41:29 -0400 (EDT) Received: from smtpin03.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay10.hostedemail.com (Postfix) with ESMTP id 02663C11E6 for ; Thu, 3 Aug 2023 14:41:28 +0000 (UTC) X-FDA: 81083056698.03.D58D262 Received: from mail-qt1-f179.google.com (mail-qt1-f179.google.com [209.85.160.179]) by imf18.hostedemail.com (Postfix) with ESMTP id 0C1191C0014 for ; Thu, 3 Aug 2023 14:41:25 +0000 (UTC) Authentication-Results: imf18.hostedemail.com; dkim=pass header.d=google.com header.s=20221208 header.b=s5ZpE5m0; spf=pass (imf18.hostedemail.com: domain of jeffxu@google.com designates 209.85.160.179 as permitted sender) smtp.mailfrom=jeffxu@google.com; dmarc=pass (policy=reject) header.from=google.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1691073686; h=from:from:sender: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:dkim-signature; bh=+ShBENNpfd+ej/Z7XuAdwo6IW6qOMuqNvx/9JpslxY4=; b=2iFAJv+fq7TSs0RmONTXK10s+Tw/+HjkOhUkkcLbev/5dAK6WhyiR/ceKTtAv8mBclSIX3 HNv3BEDRRnPCmPrx8wpwr06ZR6NqKogEdVC4u2ezKy3pA6cHpXTyAvwles/fXHkmgFHR9w +tevnW1jAuL8J5K8ibQ8hHBbZJYqa7k= ARC-Authentication-Results: i=1; imf18.hostedemail.com; dkim=pass header.d=google.com header.s=20221208 header.b=s5ZpE5m0; spf=pass (imf18.hostedemail.com: domain of jeffxu@google.com designates 209.85.160.179 as permitted sender) smtp.mailfrom=jeffxu@google.com; dmarc=pass (policy=reject) header.from=google.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1691073686; a=rsa-sha256; cv=none; b=bhgQxX3x4tRm4qKnidvxwGU0defdsYMCHhglANUAWdf7ugJCmegfVPHOwt3aq31irBN9e5 zlXE5pwdBV8+fppQjRA12D3x2rC2aQp5Y9Uq6pzw4MLUiFAkJcrnc8CMtxeNXrhiyom70O GyALyOXJtghXc9MVfXA3lYpTue+rvws= Received: by mail-qt1-f179.google.com with SMTP id d75a77b69052e-40c72caec5cso324941cf.0 for ; Thu, 03 Aug 2023 07:41:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20221208; t=1691073685; x=1691678485; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=+ShBENNpfd+ej/Z7XuAdwo6IW6qOMuqNvx/9JpslxY4=; b=s5ZpE5m0z9BXLeriOh+7nPRPLhqXRRKn5iZFATBCfTAXWocOgUXQ62NUWrmwKzv9wF gVKc9xwOyq3UcexbeqzDlKJkPBkzs3Mw8AjS/rnCiEX8LvG+6c1g5tSIg/tdmjWWLqdW JtmhyMiw4nKfk7X0mD4bW2Z3VAxPJnfgAKY3z+3k9G2rwedwUCr60fRzqUYemQ4i9vnr htnfaMq1gC5ffcNGo/SQpST/Yr5ZnGV5J983X+fTGOabESW85OgdU8oSxIaWvAtM4TR+ VkiA0zPvsx2yS1NGio0nsvfkttySjR03SmbwQl6NTkn3M/MQhTi4j8zhiOWBVMAq1Edl Uz/Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1691073685; x=1691678485; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=+ShBENNpfd+ej/Z7XuAdwo6IW6qOMuqNvx/9JpslxY4=; b=IpucFIFR2S+aaqecuZxN7ItvEIxOrQioEWkLEZ9t35ptB3kZSGaDa7EpwOVtcgUpVB HtIyU7pumuxVCTWX+gJ7F5oH3fwq01601FlBZFSDTQMANcu22zZ3kvdcVt5J1E05CJv9 9gL3JAw+lU8QK9gNEx8qvH5KSTTuE4jJtrGeCtGMD+0lo1I03MHyA33TNTydmG74KaNv K7kXFYl9qFU3NFCkGJPazw4iJU2zknv/AAybQ+xzCR7OGzySMLiKVbIIdNP9TqjR4geS B6u7AuM3Nd1JJnc0I++Lv90Ocu4W/bi8gX7zkEF5HOH6lxj+cYIFf9M+42oY2ZskL2gI KD0Q== X-Gm-Message-State: ABy/qLYBd4CMkwZHe8yfmXgCnH4Jsz5C9MYWO9gyVH//6s3O33R1jRxi 2NNzAiKyC1C32LIh7+hi4eIo9Jw+wI63MOpW2L8CUA== X-Google-Smtp-Source: APBJJlGuNWoix/N0KU1hBW0OxkHI1UWTpOUCR1dXG41QDMR7tEB/2x44GxuWEnxTbceRyOmzYsfUY8dqAt9909stuko= X-Received: by 2002:a05:622a:5cb:b0:403:f5b8:2bd2 with SMTP id d11-20020a05622a05cb00b00403f5b82bd2mr1210807qtb.9.1691073684458; Thu, 03 Aug 2023 07:41:24 -0700 (PDT) MIME-Version: 1.0 References: <20230713143406.14342-1-cyphar@cyphar.com> <20230801.032503-medium.noises.extinct.omen-CStYZUqcNLCS@cyphar.com> <20230802.211829-obedient.verb.pointed.walk-inxghgNcxn@cyphar.com> <20230803.043622-chrome.spruce.spotty.wine-lWgM90I146nT@cyphar.com> In-Reply-To: <20230803.043622-chrome.spruce.spotty.wine-lWgM90I146nT@cyphar.com> From: Jeff Xu Date: Thu, 3 Aug 2023 07:40:48 -0700 Message-ID: Subject: Re: [RFC PATCH 0/3] memfd: cleanups for vm.memfd_noexec To: Aleksa Sarai Cc: Jeff Xu , Andrew Morton , Shuah Khan , Kees Cook , Daniel Verkamp , Luis Chamberlain , YueHaibing , Christian Brauner , linux-mm@kvack.org, linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org, linux-hardening@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Rspamd-Queue-Id: 0C1191C0014 X-Rspam-User: X-Stat-Signature: gd8t37y9grgygguaqp6enuh3yb897b7m X-Rspamd-Server: rspam01 X-HE-Tag: 1691073685-28384 X-HE-Meta: U2FsdGVkX1+nJf1znbCLHUXro2U9VxDGDDTUYYNcbM2WHtatFE3PM6e2Kht3spb3jYWKY7JgGf57qiGSx5q1er1jTEgabXUyt24xqH6421jc3H/r0yqpyPgzFFTFYCAQIHuplz/z+KPrvnQoVZKJx/K2Dk1TI3UjAFkce2byOoBIiiPhyLyvP0YQlpkAqfjji5qBsqTpA6PV6oRzzEEQDfbbFF8lUqddb53ywad/ILaCf+XbtzP5VtoIcc244SeJ0r/fN2ff2ZEnKICPFG3B9BdLbnmzLfEL+51jArthjM+HHcsztQRLGzGE1PtL8WHQAbgo5orJgX3mmZxmuUfb9ZWTyHS9bE2gpSYUD4bA6mtfkRUz7i/6kl7KNW3qn/xgzwj/3hBh234tdvIACHY6rEt7ZXhupNoa/HJ+QLa2eYrxrlndiGSYdpScg5zYkFprsmlQaplrVRmprA3sf0DqedPBACV58+dAqN3AeLjiI3n4p03ijDy+2fFG38UkdHYLoRLZpkluS5164vjVyYoywuUAwVuzK3sNs9MyEGuN4wZ2jpmUg4uZsaeRuOkPF6OPX99UWXE2hO331lJT5y7xqtdBMDlwXRg7k6YSbiVHfCYMlgDGAu4Eay05kHk7DLYklyJGwXWI0tdG0mT6NuoHJlq/tLS5ZB5ZsMZ2tntrnbqQ2UDgPy6VBGu0Q1brCzb1Z5NrGJS+YoKhMzgJ+IKl9mf8lAWVo3axbSiqZAvKlH8tEl9fjuUkodC/xqR8BUsadXcUyatIg8qsYvrNJNv6hfQnVjgVjXPfJXPeRvgJSbp+Tvq1gDF7syudvJzOeCmq8haPVWWg4ltnUtwzIk6hnDeI13UF9v84gnADqOyebJ5PTulEyqWeMibNPKsv0W1H2VJsAkbOq4PGibeu/nFnB8aHR1AnLv6O0j89mKXAWcCFhRPkbY7bqte4CvUPYlye5KjOOq7KmXQK4bBZRpH eGv699sb wpnB2Q9N22XeiVkcrTHv3TY7DCj7rKNIcc2C9z1mwwQKc6TLFmEZKHvEdlPquBW+a2m6hgb0vf7kIK+PJGRmiFebWZ9Y19+cuiubNqtT/pOho2cm+YwY/q3BJFHL9jjdXR8Ai/3hZdZ+hrWfQeJM4U3YA72XEigJj1KIFRpD6sGqWvufxwgq+uLqcSli5SDOadIs+CvfSL3InZ8jD5YryNYERwgbn5GpYYqb9uew5I8GXNd+a2q5OSVJdCJD7rbi2Aq7/7MquJg8l4MAkjUu3mcM/fyjsCZx+xFSBXBZN/usi1+r3VPYsZtvutRhUtUfZz+/772b8+KaUa/y0O+1QOTo9VxTPu6+jNwfITmAHLfZNOPO7Yy1DeJdK4bLwpUFD+YMisk+JtjAj8IJo5u0wJ4JnJwPZXJF5IEV7PWjef0444TQa7/Kf3tdOHkm58z9hJe6pyuaZQVRBpi+OgTWOVeWZOypTCd79BiDzmtleKyHxy0sgc2RjTgerGkF+L+23PXbdCPeKFcFyRTa6sU+b+d9adg== X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Wed, Aug 2, 2023 at 9:40=E2=80=AFPM Aleksa Sarai wro= te: > > On 2023-08-02, Jeff Xu wrote: > > On Wed, Aug 2, 2023 at 2:39=E2=80=AFPM Aleksa Sarai = wrote: > > > > > > On 2023-08-02, Jeff Xu wrote: > > > > On Tue, Aug 1, 2023 at 6:05=E2=80=AFPM Aleksa Sarai wrote: > > > > > > > > > This thread is getting longer with different topics, I will try to > > > > respond with trimmed interleaved replies [1] > > > > There are 3 topics (logging/'migration/ratcheting), this response w= ill > > > > be regarding ratcheting. > > > > > > The migration and ratcheting topics are interconnected because the > > > migration issue makes ratcheting an even more severe issue. But I'll > > > respond to each thread separately. > > > > > > > [1] https://www.kernel.org/doc/html/latest/process/submitting-patch= es.html?highlight=3Dsigned%20off#use-trimmed-interleaved-replies-in-email-d= iscussions > > > > > > > > > > > > > > > > > > * The ratcheting mechanism for vm.memfd_noexec doesn't m= ake sense as a > > > > > > > > > security mechanism because a CAP_SYS_ADMIN capable use= r can create > > > > > > > > > executable binaries in a hidden tmpfs very easily, not= to mention the > > > > > > > > > many other things they can do. > > > > > > > > > > > > > > > > > By further limiting CAP_SYS_ADMIN, an attacker can't modify= this > > > > > > > > sysctl even after compromising some system service with hig= h > > > > > > > > privilege, YAMA has the same approach for ptrace_scope=3D3 > > > > > > > > > > > > > > Personally, I also think this behaviour from YAMA is a little= goofy too, > > > > > > > but given that it only locks the most extreme setting and the= re is no > > > > > > > way to get around the most extreme setting, I guess it makes = some sense > > > > > > > (not to mention it's an LSM and so there is an argument that = it should > > > > > > > be possible to lock out privileged users from modifying it). > > > > > > > There are many other security sysctls, and very few have this= behaviour > > > > > > > because it doesn't make much sense in most cases. > > > > > > > > > > > > > > > In addition, this sysctl is pid_name spaced, this means chi= ld > > > > > > > > pid_namespace will alway have the same or stricter security= setting > > > > > > > > than its parent, this allows admin to maintain a tree like = view. If we > > > > > > > > allow the child pid namespace to elevate its setting, then = the > > > > > > > > system-wide setting is no longer meaningful. > > > > > > > > > > > > > > "no longer meaningful" is too strong of a statement imho. It = is still > > > > > > > useful for constraining non-root processes and presumably Chr= omeOS > > > > > > > disallows random processes to do CLONE_NEWUSER (otherwise the= protection > > > > > > > of this sysctl is pointless) so in practice for ChromeOS ther= e is no > > > > > > > change in the attack surface. > > > > > > > > > > > > > > (FWIW, I think tying this to the user namespace would've made= more sense > > > > > > > since this is about privilege restrictions, but that ship has= sailed.) > > > > > > > > > > > > > The reason that this sysctl is a PID namespace is that I hope a > > > > > > container and host can have different sysctl values, e.g. host = will > > > > > > allow runc's use of X mfd, while a container doesn't want X mf= d. . > > > > > > To clarify what you meant, do you mean this: when a container i= s in > > > > > > its own pid_namespace, and has "=3D2", the programs inside the = container > > > > > > can still use CLONE_NEWUSER to break out "=3D2" ? > > > > > > > > > > With the current implementation, this is not possible. My point w= as that > > > > > even if it were possible to lower the sysctl, ChromeOS presumably > > > > > already blocks the operations that a user would be able to use to= create > > > > > a memfd (an unprivileged user cannot CLONE_NEWPID to modify the s= ysctl > > > > > without CLONE_NEWUSER, which is presumably blocked on ChromeOS du= e to > > > > > the other security concerns). > > > > > > > > > > > > > > > > > > The code sample shared in this patch set indicates that the= attacker > > > > > > > > already has the ability of creating tmpfs and executing com= plex steps, > > > > > > > > at that point, it doesn't matter if the code execution is f= rom memfd > > > > > > > > or not. For a safe by default system such as ChromeOS, atta= ckers won't > > > > > > > > easily run arbitrary code, memfd is one of the open doors f= or that, so > > > > > > > > we are disabling executable memfd in ChromeOS. In other wor= ds: if an > > > > > > > > attacker can already execute the arbitrary code as sample g= iven in > > > > > > > > ChromeOS, without using executable memfd, then memfd is no= longer the > > > > > > > > thing we need to worry about, the arbitrary code execution = is already > > > > > > > > achieved by the attacker. Even though I use ChromeOS as an = example, I > > > > > > > > think the same type of threat model applies to any system t= hat wants > > > > > > > > to disable executable memfd entirely. > > > > > > > > > > > > > > I understand the threat model this sysctl is blocking, my poi= nt is that > > > > > > > blocking CAP_SYS_ADMIN from modifying the setting doesn't mak= e sense > > > > > > > from that threat model. An attacker that manages to trick som= e process > > > > > > > into creating a memfd with an executable payload is not going= to be able > > > > > > > to change the sysctl setting (unless there's a confused deput= y with > > > > > > > CAP_SYS_ADMIN, in which case you have much bigger issues). > > > > > > > > > > > > > It is the reverse. An attacker that manages to trick some > > > > > > CAP_SYSADMIN processes into changing this sysctl value (i.e. lo= wer the > > > > > > setting to 0 if no ratcheting), will be able to continue to use= mfd as > > > > > > part of the attack chain. > > > > > > In chromeOS, an attacker that can change sysctl might not nece= ssarily > > > > > > gain full arbitrary code execution already. As I mentioned prev= iously, > > > > > > the main threat model here is to prevent arbitrary code execut= ion > > > > > > through mfd. If an attacker already gains arbitrary code execu= tion, > > > > > > at that point, we no longer worry about mfd. > > > > > > > > > > If an attacker can trick a privileged process into writing to arb= itrary > > > > > sysctls, the system has much bigger issues than arbitrary (presum= ably > > > > > unprivileged) code execution. On the other hand, requiring you to= reboot > > > > > a server due to a misconfigured sysctl *is* broken. > > > > > > > > > > Again, at the very least, not even allowing capable(CAP_SYS_ADMIN= ) to > > > > > change the setting is actually broken. > > > > > > > > > > > > If a CAP_SYS_ADMIN-capable user wants to change the sysctl, b= locking it > > > > > > > doesn't add any security because that process could create a = memfd-like > > > > > > > fd to execute without issues. > > > > > > >What practical attack does this ratcheting > > > > > > > mechanism protect against? (This is a question you can answer= with the > > > > > > > YAMA sysctl, but not this one AFAICS.) > > > > > > > > > > > > > > But even if you feel that allowing this in child user namespa= ces is > > > > > > > unsafe or undesirable, it's absolutely necessary that > > > > > > > capable(CAP_SYS_ADMIN) should be able to un-brick the running= system by > > > > > > > changing the sysctl. The alternative is that you need to rebo= ot your > > > > > > > server in order to un-set a sysctl that broke some applicatio= n you run. > > > > > > > > > > > > > > > > > > > > Also, by the same token, this ratcheting mechanism doesn't ma= ke sense > > > > > > > with =3D1 *at all* because it could break programs in a way t= hat would > > > > > > > require a reboot but it's not a "security setting" (and the Y= AMA sysctl > > > > > > > mentioned only locks the sysctl at the highest setting). > > > > > > > > > > > > > I think a system should use "=3D0" when it is unsure about its = program's > > > > > > need or not need executable memfd. Technically, it is not that = this > > > > > > sysctl breaks the user, but the admin made the mistake to set = the > > > > > > wrong sysctl value, and an admin should know what they are doin= g for a > > > > > > sysctl. Yes. rebooting increases the steps to undo the mistake,= but > > > > > > that could be an incentive for the admin to fully test its prog= rams > > > > > > before turning on this sysctl - and avoid unexpected runtime er= rors. > > > > > > > > > > I don't think this stance is really acceptable -- if an admin tha= t has > > > > > privileges to load kernel modules is not able to disable a sysctl= that > > > > > can break working programs without rebooting there is > > > > > > > > > > When this sysctl was first proposed a few years ago (when kernel = folks > > > > > found out that runc was using executable memfds), my understandin= g is > > > > > that the long-term goal was to switch programs to have > > > > > non-executable-memfds by default on most distributions. Making it > > > > > impossible for an admin to lower the sysctl value flies in the fa= ce of > > > > > this goal. > > > > > > > > > > At the very least, being unable to lower the sysctl from =3D1 to = =3D0 is > > > > > just broken (even if you use the yama example -- yama only locks = the > > > > > sysctl at highest possible setting, not on lower settings). But i= n my > > > > > view, having this sysctl ratchet at all doesn't make sense. > > > > > > > > > To reiterate/summarize the current mechanism for vm.memfd_noexec > > > > > > > > 1> It is a pid namespace sysctl, init ns and child pid ns can have > > > > different setting values. > > > > 2> child pid ns inherits parent's pid ns's sysctl at the time of fo= rk. > > > > 3> There are 3 values for the sysctl, each higher value is more > > > > restrictive than the lower one. Once set, doesn't allow downgrading= . > > > > > > > > It can be used as following: > > > > 1> > > > > init ns: vm.memfd_noexec =3D 2 (at boot time) > > > > Not allow executable memfd for the entire system, including its con= tainers. > > > > > > > > 2> > > > > init ns: vm.memfd_noexec =3D 0 or 1 > > > > container (child init namespace) vm.memfd_noexec =3D 2. > > > > The host allows runc's usage of executable memfd during container > > > > creation. Inside the container, executable memfd is not allowed. > > > > > > > > The inherence + not allow downgrading is to reason with how > > > > vm.memfd_noexec is applied in the process tree. > > > > Without it, essentially we are losing the hierarchy view across the > > > > process tree and a process can evaluate its capability by modifyin= g > > > > the setting. I think that is a less secure approach I would not > > > > prefer. > > > > > > If you really want the hierarchical aspect, we can implement it so th= at > > > it's _actually_ hierarchical like so: > > > > > > * By default, your setting is the same as your parent (this is check= ed > > > by going up the pidns tree -- a-la cgroups). This is less efficien= t > > > but you want a hierarchy, so we can do it this way instead. > > > * If you set a specific setting, that takes precedence but only if i= t's > > > a greater or equal setting to your parent. > > > * Trying to set a lower setting than your parent fails regardless of > > > privileges. > > > > > > This will allow *privileged users* to lower the setting, but only if > > > the parent pidns also has a lower setting. This allows a system admin= to > > > enforce the setting. It seems to me that this fulfils all the > > > requirements you have. > > > > > > Most importantly, this would allow for a hierarchical view without > > > having a sysctl that will break systems and nobody will use. I need t= o > > > re-iterate this point -- nobody is going to use this sysctl as it > > > currently works because it ratchets in a way that admins cannot undo.= In > > > practice this would mean you would need to reboot your whole datacent= er > > > if you didn't catch that an update to one of you dependencies didn't > > > pass a required *noop* flag to memfd_create(). > > > > > Yes. I agree this is another way to implement a hierarchical view, > > which is a little more costly, because it goes up the process tree. > > The maximum height is 32 namespaces, it's not that bad. I'm working on a > v2 that implements it this way instead. > > I also just figured out that there is a flaw with the current > implementation's "hierarchy" -- if you create a pid namespace and then > change vm.memfd_noexec, the limit doesn't apply to the child pidns. This > makes sense given the implementation, but it means that the "tree view" > you talked about doesn't actually apply to your implementation. > That is by design. The return on investment of implementing dynamic propagation isn't high, i.e. vm.memfd_noexec is something that needs to be fully tested before set and changing it at runtime is not recommended in production, downgrade requires reboot/restart. On the host side, the kernel cmd line now supports setting sysctl, and it can be applied from boot time. These combined factors make me choose the current implementation. Simplicity is something I value greatly. feature richness can be achieved, but sometimes with the cost of complexity. > > I respectfully disagree that nobody will use the current sysctl > > though, I can still see that a container might want this, e.g. a > > small container that doesn't require a lot of refactoring to add NX, > > and restarting container usually isn't a problem, and container might > > like the fact that downgrade is denied at run time. > > I should've specified that I was talking about using the setting on the > host (which is presumably the goal -- at the very least I presume the > goal is to get distributions to use =3D1 at some point). > > Also, funnily enough, container runtimes use executable memfds. :P > Yes. runc uses executable memfd. Current implementation considered runc's case at host. As I said, containers that don't require executable memfd can migrate their code and set "vm.memfd_noexec =3D 2", which I hope is easier to do than on host. > -- > Aleksa Sarai > Senior Software Engineer (Containers) > SUSE Linux GmbH >