Received: by 2002:a05:7412:37c9:b0:e2:908c:2ebd with SMTP id jz9csp1504863rdb; Wed, 20 Sep 2023 10:55:10 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEtHszZpSlf5M2xHjxOzdeou6d/0jmRKUGiaC6QLlpTuAkJC38zeeeaoGaK7GvlzIiftVBW X-Received: by 2002:a17:90b:17cd:b0:26d:689f:4253 with SMTP id me13-20020a17090b17cd00b0026d689f4253mr8447515pjb.6.1695232510227; Wed, 20 Sep 2023 10:55:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695232510; cv=none; d=google.com; s=arc-20160816; b=gr/tGl4bOBjkR2LGgzFcOvC7T+LoX61HQtqEhDyFcQcNgWW+9xK3k/7xu8TrICQC5O pH80eGTQGgejTBXxaYWlFvKC58tMEU/7tPvtdSix/1GTXMdKYQoKjbR/ks5+u9nw5TYY HOSVp2k4zjq9/RZMUEDif6G/OXnX360RsYzo/Rd9Hct8/VIvjxvx1N3x/cERTVlaiSAT ZxL9Qspw7f21SD8dAtQlHX6ANURK/D4EWwSNS6sjM1zzHlo+UvqA8gaaoCEpW2MHGvLo WOmOdaCwpC6qfxY/JENC+5O/2IZQR4ARacc1nXH3kedg4jZ5F6eHT80DbZJw0LiF0Kdp q/xw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:in-reply-to:date:subject :cc:to:from:user-agent:references:feedback-id:dkim-signature :dkim-signature; bh=dRx230nt4NjZWtPiovmpTS2FKilrb+bo4roUw7JE65U=; fh=roQ21oFjw1YL1geyMDpK5fllZXTq9btQXXC/LYiEqMk=; b=YIePqUNmMvDCDZb3a45klyjhU9PwgtmAEoDRKpoqsnSOQMJWtBkErlRf0CmfwgSsXJ A0wWx912IZ7vjADBaengTNFtHWuD/2HafCBVxk/mFgA6x3KCdIvH5fhzRDPqtusOwWgP QwijC/CZLgaZ4pCKXfeYZ4J3aVCPviAsnr8fjnNQT0lRJvJxfyXid+3oWMHrNSytRBJW AGJgWiISTf63n1aQvy7haGY0vln48NUqHW8OYTp2wSZH1da3f0HgKNrVudKwApCbCQH5 B2vl2nQVOKvh937B1WG+heiaeue3Ep34EnK82p0JLPXoGG9nygGltfzslKSoZeh4vygu UZpw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@devkernel.io header.s=fm3 header.b=RdvBM4aT; dkim=pass header.i=@messagingengine.com header.s=fm2 header.b=oj5YYpNd; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from fry.vger.email (fry.vger.email. [23.128.96.38]) by mx.google.com with ESMTPS id m14-20020a637d4e000000b00563f4e46f7esi11901619pgn.287.2023.09.20.10.54.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Sep 2023 10:55:10 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) client-ip=23.128.96.38; Authentication-Results: mx.google.com; dkim=pass header.i=@devkernel.io header.s=fm3 header.b=RdvBM4aT; dkim=pass header.i=@messagingengine.com header.s=fm2 header.b=oj5YYpNd; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by fry.vger.email (Postfix) with ESMTP id DED7B801B727; Wed, 20 Sep 2023 09:29:34 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at fry.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234593AbjITQ3b (ORCPT + 99 others); Wed, 20 Sep 2023 12:29:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34656 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233691AbjITQ33 (ORCPT ); Wed, 20 Sep 2023 12:29:29 -0400 Received: from wout2-smtp.messagingengine.com (wout2-smtp.messagingengine.com [64.147.123.25]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 25580C2 for ; Wed, 20 Sep 2023 09:29:22 -0700 (PDT) Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.west.internal (Postfix) with ESMTP id 1C1D03200959; Wed, 20 Sep 2023 12:29:20 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute3.internal (MEProxy); Wed, 20 Sep 2023 12:29:20 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=devkernel.io; h= cc:cc:content-type:content-type:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:sender :subject:subject:to:to; s=fm3; t=1695227359; x=1695313759; bh=dR x230nt4NjZWtPiovmpTS2FKilrb+bo4roUw7JE65U=; b=RdvBM4aT024PvV0gRj APTMtWxLswJw6xGUQbAqFsxLDnkQOF1fZ71Xq9uVHmIOS4CFTuxLYv9Nk4UXeEJT ROqeM5so1Ym+iFtOy/cxiRXq32ORPAkt+RdevW7LHtljjnIEC5kQhG6lp52t0YME jELUAKixn6ikFyY7xom8KBhE4+Qd8NiEqHmjXi/t7+vZ2J3dP3HQLibr9grfZuez EBuogKVlbLpokyZjpa3bGOZfIogIAYGeB0vXmZx6nPuXHYJ+tHT1CGoive0fQq16 hxvhtlHXbnY407PcGdQWxzHqx5YGT0F1EgrYdfMg3I8NcYRRXPqBBZ/nwaTFbUGI n8OQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:sender:subject :subject:to:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm2; t=1695227359; x=1695313759; bh=dRx230nt4NjZW tPiovmpTS2FKilrb+bo4roUw7JE65U=; b=oj5YYpNdpnmimqf6QHwn9hCnXiZfG LIhxpErSJ8pwPrY7oNxlWxrX8zN0cR7ooCNFfLt+MleJHz/OpV6K3gsoffqPWmqT ZZ8p2+EeiWIE6ORx3r+O/eeQET/j3PWvFZjprFt6j48bMHz/0WBOGhiF+lH0LUuv nkBqt13dWrIdtt2g7WYVqxGMYn8nyCckgynKMOJ05dh1NilKwJeDiF6QLkBVxs4Z gB9+7SIlHXwtkm7pSlSaH2O2Iv+XXI177YfQHDAkAatoE0wMIOMWx5M92rUuIflz T1Jx2qoD3OvFDC+ZbukvsjbZ7QelCQCaG8uF+dWH5Ve+JaEDFg9pA36CA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedviedrudekfedguddtfecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enfghrlhcuvffnffculddvfedmnecujfgurhepfhgfhffvvefuffgjkfggtgesthdtredt tdertdenucfhrhhomhepufhtvghfrghnucftohgvshgthhcuoehshhhrseguvghvkhgvrh hnvghlrdhioheqnecuggftrfgrthhtvghrnhepveelgffghfehudeitdehjeevhedthfet vdfhledutedvgeeikeeggefgudeguedtnecuvehluhhsthgvrhfuihiivgeptdenucfrrg hrrghmpehmrghilhhfrhhomhepshhhrhesuggvvhhkvghrnhgvlhdrihho X-ME-Proxy: Feedback-ID: i84614614:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 20 Sep 2023 12:29:18 -0400 (EDT) References: <20230919205158.1897353-1-shr@devkernel.io> <20230919205158.1897353-2-shr@devkernel.io> User-agent: mu4e 1.10.1; emacs 28.2.50 From: Stefan Roesch To: David Hildenbrand Cc: kernel-team@fb.com, akpm@linux-foundation.org, hannes@cmpxchg.org, riel@surriel.com, linux-kernel@vger.kernel.org, linux-mm@kvack.org, Carl Klemm Subject: Re: [PATCH v1 1/2] mm/ksm: support fork/exec for prctl Date: Wed, 20 Sep 2023 09:29:00 -0700 In-reply-to: Message-ID: MIME-Version: 1.0 Content-Type: text/plain X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on fry.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (fry.vger.email [0.0.0.0]); Wed, 20 Sep 2023 09:29:35 -0700 (PDT) David Hildenbrand writes: > On 19.09.23 22:51, Stefan Roesch wrote: >> A process can enable KSM with the prctl system call. When the process is >> forked the KSM flag is inherited by the child process. However if the >> process is executing an exec system call directly after the fork, the >> KSM setting is cleared. This patch addresses this problem. >> Signed-off-by: Stefan Roesch >> Reported-by: Carl Klemm >> --- >> include/linux/sched/coredump.h | 7 +++++-- >> 1 file changed, 5 insertions(+), 2 deletions(-) >> diff --git a/include/linux/sched/coredump.h b/include/linux/sched/coredump.h >> index 0ee96ea7a0e9..205aa9917394 100644 >> --- a/include/linux/sched/coredump.h >> +++ b/include/linux/sched/coredump.h >> @@ -87,8 +87,11 @@ static inline int get_dumpable(struct mm_struct *mm) >> #define MMF_DISABLE_THP_MASK (1 << MMF_DISABLE_THP) >> +#define MMF_VM_MERGE_ANY 29 >> +#define MMF_VM_MERGE_ANY_MASK (1 << MMF_VM_MERGE_ANY) >> + >> #define MMF_INIT_MASK (MMF_DUMPABLE_MASK | MMF_DUMP_FILTER_MASK |\ >> - MMF_DISABLE_THP_MASK | MMF_HAS_MDWE_MASK) >> + MMF_DISABLE_THP_MASK | MMF_HAS_MDWE_MASK |\ >> + MMF_VM_MERGE_ANY_MASK) >> -#define MMF_VM_MERGE_ANY 29 >> #endif /* _LINUX_SCHED_COREDUMP_H */ > > Fixes: tag? > Added fixes tag > Reviewed-by: David Hildenbrand