Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp622589ybi; Fri, 31 May 2019 06:37:16 -0700 (PDT) X-Google-Smtp-Source: APXvYqzRfpjZw/3ymkTHLrFeaGWrtte4lmERUP4NwKqiNjHcgJMS1FDzfO1U3SkPB+6gL+/NhtQD X-Received: by 2002:a62:ed09:: with SMTP id u9mr9999769pfh.23.1559309836306; Fri, 31 May 2019 06:37:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559309836; cv=none; d=google.com; s=arc-20160816; b=Cw+T54zNkHP23IrcWXHoiOxoosV/2dY1ejZiyflLzty9+ztfZaW7eBshgrv4CcP6Xg pK/AHriCBlob91F0uhiizYyT29MIJ6Y4VtHkD9g2NroHMVOuhRBIUfbG9qp+gZkVnGAo 4SiGzTiSU9twzcaw1ul1+4f8zsLRxewd/W8v0xvv/7XDlQu8HF/MzMtP8lJ1TJaaVpeN acZJHC9bkVQ5G7tVG81qFs1rvLcusuGl1o7Yb755eg2UVqjWITeY8X6VKD9Y4asxD/RA +vffFpBQiChqn9P01PvoexKxWIqbX6GQba4Q5DvAW3qb1QzahSaSBLbTRXZ9gukmpzjk 5OWw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=HjWB71Z45xExySL4pHGb1WTadyI9/uoz4vTjqsDHngE=; b=UtYt2WQbMjBtJTm9WAkMM7tYxWCuiBC7bMhSLwnx+7eqT4avrDbZOty4EDC28WQ0cj d+5HNbpSqtRJEqw1CpNxvZuN1AYJhh0klsjakn0G/T7WYu65ElsLte7gVYk0h0DjLle2 V1X7ZP8Mw4TGONVdISTksw+TGEorXukPXw/dYKMDIpYpmyPt8C2siua494kfrd0GZzTd cjgVYRcSFtjucWLERDIjBaeVRyggGKWeqm/qrJsreOlmdDxXRxoTAjgf3TQCTcP7ZyDi fcpbuDmHK649/FtJ/OyyS1H2FZ6rEwIDq3aZZPKQniHxyRk6pI2PTilr5pffmNuEYnAu ZNkw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z4si6260721pgh.334.2019.05.31.06.36.57; Fri, 31 May 2019 06:37:16 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726535AbfEaNfp (ORCPT + 99 others); Fri, 31 May 2019 09:35:45 -0400 Received: from mx1.redhat.com ([209.132.183.28]:35404 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726330AbfEaNfp (ORCPT ); Fri, 31 May 2019 09:35:45 -0400 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 1F6B92EED06; Fri, 31 May 2019 13:35:40 +0000 (UTC) Received: from dhcp-27-174.brq.redhat.com (unknown [10.43.17.159]) by smtp.corp.redhat.com (Postfix) with SMTP id 77E9D17AB4; Fri, 31 May 2019 13:35:38 +0000 (UTC) Received: by dhcp-27-174.brq.redhat.com (nbSMTP-1.00) for uid 1000 oleg@redhat.com; Fri, 31 May 2019 15:35:38 +0200 (CEST) Date: Fri, 31 May 2019 15:35:36 +0200 From: Oleg Nesterov To: Jann Horn Cc: "Eric W . Biederman" , Andrew Morton , Kees Cook , David Howells , kernel list Subject: Re: [PATCH] ptrace: restore smp_rmb() in __ptrace_may_access() Message-ID: <20190531133535.GB31323@redhat.com> References: <20190529113157.227380-1-jannh@google.com> <20190530123452.GF22536@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.24 (2015-08-30) X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.29]); Fri, 31 May 2019 13:35:45 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 05/31, Jann Horn wrote: > > So I guess I should make a v2 that still adds the smp_rmb() in > __ptrace_may_access(), but gets rid of the smp_wmb() in > commit_creds()? (With a comment above the rcu_assign_pointer() that > explains the ordering?) I am fine either way, whatever you like more. If you prefer v1 (this patch), feel free to add Acked-by: Oleg Nesterov