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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id A68DAC4332F for ; Fri, 16 Dec 2022 15:47:56 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230520AbiLPPrz (ORCPT ); Fri, 16 Dec 2022 10:47:55 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55264 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231420AbiLPPrw (ORCPT ); Fri, 16 Dec 2022 10:47:52 -0500 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id ED71E31DF3 for ; Fri, 16 Dec 2022 07:47:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1671205624; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=LxMkecyGYG9dLIpgBNsZUPusnmfyW4vuV2TgoZY8b1I=; b=A1fXn9zjQ901DtvygIiyjjRKQzc4DqxvufQO1InD+mby2JrcmFAsrEotH/wQk55KkGvQMn CXwuC1DZ0jGVg2Q5Dbc19xL94w6zpHJmU5CMQ2JG2mpxWIC/WOaH1QwDVnRYqitkZQAYmy eLrxmaQe15/kqGhAvJIz2gQAN5NMGzI= Received: from mail-qv1-f70.google.com (mail-qv1-f70.google.com [209.85.219.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_128_GCM_SHA256) id us-mta-562-MNjvB7bkMyWV18lbKyIrjg-1; Fri, 16 Dec 2022 10:47:02 -0500 X-MC-Unique: MNjvB7bkMyWV18lbKyIrjg-1 Received: by mail-qv1-f70.google.com with SMTP id c10-20020a05621401ea00b004c72d0e92bcso1651491qvu.12 for ; Fri, 16 Dec 2022 07:47:02 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; 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=LxMkecyGYG9dLIpgBNsZUPusnmfyW4vuV2TgoZY8b1I=; b=CqbBivKo9kSPxXgV040dkFb+itgG6lHh4Ww7ubp72tXF7mkCPa82ygC1FRfk3sPmCT /VItvtyD0fuquDJVmR0na6zTz4AdwFn9It5KKDNdqxbZ4/9g7Lgg/mw5DiHCOJUhBl4O Rxvi5wAtKKcknJVvB1AbgGllC1mgQXz7MwdoealfOJmvP/Hbd4czskm8JN0zCaZlnwWs C2TXsoBI99Fp3AqYJgNukj7n/UMQ/mhS1xLk+1YYiOpHvBC4knP+9APKj/Y7g/mGLTZX 0j1uC8F35gZwIpElUin3WoXVHxIHkju3Aq2G7IenLsFnGkIsJbpRK78c99Nu4lhXp/A1 xpWA== X-Gm-Message-State: ANoB5pkOUJGxxp2HnnDULn/BZcyyqASM2yf+IbSGg6YdagF9F+44Vr+3 xQGKqKHjv/eixAsT4iu6+kjvg5JTE2I/mOtiW3WzlmoCwvSa0XZa4p/JTKYDwhFSv36uu5/gzNh I3vbKpbNAMQc8FNezs39840Ij X-Received: by 2002:a05:622a:40c5:b0:3a5:306f:b124 with SMTP id ch5-20020a05622a40c500b003a5306fb124mr45697434qtb.10.1671205622303; Fri, 16 Dec 2022 07:47:02 -0800 (PST) X-Google-Smtp-Source: AA0mqf5eK8zxu4MtCAROwOHMPjA4TRfLrCS+AsiC6Si+i4v1cyQH5maRZ4RJ3yJvRLlW+Au04FcIJQ== X-Received: by 2002:a05:622a:40c5:b0:3a5:306f:b124 with SMTP id ch5-20020a05622a40c500b003a5306fb124mr45697411qtb.10.1671205622117; Fri, 16 Dec 2022 07:47:02 -0800 (PST) Received: from x1n (bras-base-aurron9127w-grc-45-70-31-26-132.dsl.bell.ca. [70.31.26.132]) by smtp.gmail.com with ESMTPSA id a5-20020ac844a5000000b003a68af60591sm1466597qto.70.2022.12.16.07.47.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 16 Dec 2022 07:47:01 -0800 (PST) Date: Fri, 16 Dec 2022 10:46:59 -0500 From: Peter Xu To: Jeff Xu Cc: Kees Cook , jeffxu@chromium.org, skhan@linuxfoundation.org, akpm@linux-foundation.org, dmitry.torokhov@gmail.com, dverkamp@chromium.org, hughd@google.com, jorgelo@chromium.org, linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org, linux-mm@kvack.org, jannh@google.com, linux-hardening@vger.kernel.org, kernel test robot Subject: Re: [PATCH v6 3/6] mm/memfd: add MFD_NOEXEC_SEAL and MFD_EXEC Message-ID: References: <20221207154939.2532830-1-jeffxu@google.com> <20221207154939.2532830-4-jeffxu@google.com> <202212080821.5AE7EE99@keescook> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, Jeff, On Thu, Dec 08, 2022 at 02:55:45PM -0800, Jeff Xu wrote: > > > + if (!(flags & (MFD_EXEC | MFD_NOEXEC_SEAL))) { [...] > > > + pr_warn_ratelimited( > > > + "memfd_create() without MFD_EXEC nor MFD_NOEXEC_SEAL, pid=%d '%s'\n", > > > + task_pid_nr(current), get_task_comm(comm, current)); This will be frequently dumped right now with mm-unstable. Is that what it wanted to achieve? [ 10.822575] memfd_create() without MFD_EXEC nor MFD_NOEXEC_SEAL, pid=491 'systemd' [ 10.824743] memfd_create() without MFD_EXEC nor MFD_NOEXEC_SEAL, pid=495 '(sd-executor)' ... If there's already a sane default value (and also knobs for the user to change the default) not sure whether it's saner to just keep it silent as before? -- Peter Xu