Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp2929901rwb; Fri, 16 Dec 2022 08:08:54 -0800 (PST) X-Google-Smtp-Source: AA0mqf7kkCzkZg91cwMEsAdgHtopMUvAnbuAAntE/cuGovYvFMKvvceGVPUaGDSMFFr4WNknCZw/ X-Received: by 2002:a17:906:57c9:b0:7c0:e0da:10b9 with SMTP id u9-20020a17090657c900b007c0e0da10b9mr28851395ejr.44.1671206934267; Fri, 16 Dec 2022 08:08:54 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1671206934; cv=none; d=google.com; s=arc-20160816; b=jD82LT7z+0ifbhYDepseIHMKhDsoGShgSHYt9CDY8Oc1rlxOkq14n2txZvecTd/Gvc DMDV2fJjJ1Nky25T+d7FejwjPBZdnh53KKfGdbQDQnviEhJG7/qBcA0DQXYT5awfN8uZ qXA6M0iUBmrplvTqsFv/ByQ5Psc8HKt+apuzcRzXFL6D/0NAPZcg0OwTyIj80KkszrAJ Xck5U1OjC/LHO2/H0sljivbU2zCBEhWOukiWp/FH+HB4SkBq0t6gToPOX40OQOCkwagx pbxyRh5bB/rGmWFWPTz7GTM0AhnKRo1p6kcnOHrshrx1uJIPGMPd5OQLhWAr3+XbNygO SBew== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=LxMkecyGYG9dLIpgBNsZUPusnmfyW4vuV2TgoZY8b1I=; b=GabcKnZUrIlcGuPNFjQcOk3ZbjoY6yjbtAdnKe3Xe/tMAAjT1pddaoIFqaAII7vhSw hl27uG7O29x1QVoRdLnh/UfEfVphUbepQEZ4JBgmH2eF1uskeu0vloO4ckNfHQXmQfyI bZA21ZSLSkLDoorc9V4TG4D+1heUM9wyx+tFCkrVcoIidP43HYUD0XVr7EXRIdeVlM3h wWH/uQVq4CAvzb3DA+OKcEsPiq0jJp169UzUXn96sf0HxE3UGZBgaGhjbmMnOGOr4IKG 4hBKEZQsYX+IIi4qyVVmPHRMJn1h60kePFroh228OiaD/ow1U6aoNzu8zXkzC/GvPB5Y reJA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=A1fXn9zj; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id f10-20020a170906084a00b007c1479b6a78si2006271ejd.816.2022.12.16.08.08.38; Fri, 16 Dec 2022 08:08:54 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=A1fXn9zj; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231429AbiLPPry (ORCPT + 68 others); Fri, 16 Dec 2022 10:47:54 -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-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: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_NONE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net 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