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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id CC51EC27C76 for ; Thu, 26 Jan 2023 00:23:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Mime-Version:References:In-Reply-To: Message-Id:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=fkhwjsbowI2D8UIOEiYWVOipjjni7bgi9l3PAzT1l7U=; b=26JEjhi2hxYaQX SeEHBgikt+yeryjpcSpjJcduhyQlid5rwSGamPJ/GKSkPCs8kwGKzlvU3VWIL51mUBACdbMYFyGu1 AThq58Zosgcr8R0GlztHPmjbpmBuhxw/M6RO5T08LxzppJs4OpxZlkFDrgQAPKyNWoWc20/XN+rSk lWzhS9sTWWU6dhPkphdFSsuefCjySbAqn9fnpljiQL0ZaCLoSqWugu7BBow7v73sysTXVGwDrbKf4 a+o88JaRPG7MpnyEiC3kuebFMedIYr7BouMjSam+Gq+5F3aI6MoR67Hqny1H7sFoJp7dX18mVQPNY I+Ok75pMIQLiz4AyF+kA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pKq1n-009AVl-Ke; Thu, 26 Jan 2023 00:22:07 +0000 Received: from ams.source.kernel.org ([145.40.68.75]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1pKq1k-009AVO-O1 for linux-arm-kernel@lists.infradead.org; Thu, 26 Jan 2023 00:22:06 +0000 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 3CD1CB81C5E; Thu, 26 Jan 2023 00:22:03 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 40041C4339C; Thu, 26 Jan 2023 00:22:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linux-foundation.org; s=korg; t=1674692521; bh=jgiR0d8hUFYk52IUlDU+5+WUlWzBEfGIiyIxt9qM28M=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=ULxhZQ8c8CFbkpJnZkQWozl7DcYVx5jaXu3rzUm9YEUVUUBF3LoSFC62/+TJOYZaR XqOGcbMw9b1nL+CccygWmx/zE9bKSUO+vNPz8Irpn2cZdIGClGOwo3gE90ADY2+Gol bLVO3uhuoeYOQb1698Ohp0oHoLXvcFQkBDfiZnyc= Date: Wed, 25 Jan 2023 16:21:59 -0800 From: Andrew Morton To: Suren Baghdasaryan Cc: michel@lespinasse.org, jglisse@google.com, mhocko@suse.com, vbabka@suse.cz, hannes@cmpxchg.org, mgorman@techsingularity.net, dave@stgolabs.net, willy@infradead.org, liam.howlett@oracle.com, peterz@infradead.org, ldufour@linux.ibm.com, paulmck@kernel.org, mingo@redhat.com, will@kernel.org, luto@kernel.org, songliubraving@fb.com, peterx@redhat.com, david@redhat.com, dhowells@redhat.com, hughd@google.com, bigeasy@linutronix.de, kent.overstreet@linux.dev, punit.agrawal@bytedance.com, lstoakes@gmail.com, peterjung1337@gmail.com, rientjes@google.com, axelrasmussen@google.com, joelaf@google.com, minchan@google.com, jannh@google.com, shakeelb@google.com, tatashin@google.com, edumazet@google.com, gthelen@google.com, gurua@google.com, arjunroy@google.com, soheil@google.com, hughlynch@google.com, leewalsh@google.com, posk@google.com, linux-mm@kvack.org, linux-arm-kernel@lists.infradead.org, linuxppc-dev@lists.ozlabs.org, x86@kernel.org, linux-kernel@vger.kernel.org, kernel-team@android.com Subject: Re: [PATCH v3 1/7] kernel/fork: convert vma assignment to a memcpy Message-Id: <20230125162159.a66e5ef05fecb405e85ffec9@linux-foundation.org> In-Reply-To: <20230125233554.153109-2-surenb@google.com> References: <20230125233554.153109-1-surenb@google.com> <20230125233554.153109-2-surenb@google.com> X-Mailer: Sylpheed 3.7.0 (GTK+ 2.24.33; x86_64-pc-linux-gnu) Mime-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230125_162204_980898_20809827 X-CRM114-Status: GOOD ( 14.21 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Wed, 25 Jan 2023 15:35:48 -0800 Suren Baghdasaryan wrote: > Convert vma assignment in vm_area_dup() to a memcpy() to prevent compiler > errors when we add a const modifier to vma->vm_flags. > > ... > > --- a/kernel/fork.c > +++ b/kernel/fork.c > @@ -482,7 +482,7 @@ struct vm_area_struct *vm_area_dup(struct vm_area_struct *orig) > * orig->shared.rb may be modified concurrently, but the clone > * will be reinitialized. > */ > - *new = data_race(*orig); > + memcpy(new, orig, sizeof(*new)); The data_race() removal is unchangelogged? > INIT_LIST_HEAD(&new->anon_vma_chain); > dup_anon_vma_name(orig, new); > } _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel