Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp6587273ybi; Wed, 29 May 2019 09:54:40 -0700 (PDT) X-Google-Smtp-Source: APXvYqxTCGBMRDCuxVT4MPEAs5IYYnC7wNztVdjM6zvvxjrYNq1b6H+nZsXQgpNAvn4j50jASj76 X-Received: by 2002:a63:9d8d:: with SMTP id i135mr139612208pgd.245.1559148880404; Wed, 29 May 2019 09:54:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559148880; cv=none; d=google.com; s=arc-20160816; b=tWiKXgRFUUuxGAKseHFVtp34t/Fl1JkPJt7+Cr9qvXuJN7yuIFmM7LQXe/4EVC/0R9 DjwD2n86cXLHTDgMryldUjv2W/vcNvvoHDMniE3xtc1UXy5Uc7MY6L+bBpMTLECzozCo V343cIyxqJuvsVariS9XnVjI5zRdYWV08r7gS2fvLXSSSytFiHPyowgZ3AB7ZERFmOEO RU2e5LxOxVE/X1lwOT2UwZ1RrboW7vRRjHcLpqGM9fvUXvISFPnwGwLtUigcFsglNuHp msI7P4ZqEUAUc0wUBCQUguR5uaesvyLZHy5GzqoVXxdSw5TDrInlWDpta7kHig/yg0d/ eIYg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=62cNvFIcuC30Vs4emJnPJCkHc2meqeg0IuwOUNIHv1Y=; b=e1rxroLL8UQSfoxzDu5OL/DdLNW4sqNz+q/+wR3g+SM+MEq0kKuih7OGsUQyxiBG4q RW/xiUiKT7/S4GprKPhFowSMyISVCCTugrwG4HZDm7RZQRIDoiz2FJbmwRj/b1nrddKc /aEeVl8WGXDbXh7Ve5IDrK9rTuLJvpzE5sMvEjpSuFWODpzX1OTgNouvtq7iKdZ+LAL7 hO+jTEhZ4bxQ0TzyvH49jLPjpapPWYyLA3sVg5yY9EMnkOoZi4Ntk4tvlEf4ZqabaV2/ J0PQzgz9QNw+DEN3/J5jF5Pg4y4FyYq3t1Uxgny3IxUdj9ygDFZHmxbCYD4uAJK2DszD TTIg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=dp82oyom; 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=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m62si132689pgm.392.2019.05.29.09.54.22; Wed, 29 May 2019 09:54:40 -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; dkim=pass header.i=@google.com header.s=20161025 header.b=dp82oyom; 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=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726965AbfE2QCS (ORCPT + 99 others); Wed, 29 May 2019 12:02:18 -0400 Received: from mail-oi1-f194.google.com ([209.85.167.194]:38383 "EHLO mail-oi1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726140AbfE2QCS (ORCPT ); Wed, 29 May 2019 12:02:18 -0400 Received: by mail-oi1-f194.google.com with SMTP id 18so1695050oij.5 for ; Wed, 29 May 2019 09:02:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=62cNvFIcuC30Vs4emJnPJCkHc2meqeg0IuwOUNIHv1Y=; b=dp82oyombgOo4fiEI8WZqg0QChsRZspYmsbXUUYADzX2iXHaucjAyoTVGDlyRP7bwN kRKBN47yyxY4tRMx1dcUZx1YyBuEVCcnKW141ARGrJeurVxG7hWahaX8w+ufWN2L56SZ wMRMmM+bsgNHadVfreRM9VCnT+HUg3k/HKSrHtmgkGzKUeo2vHV3cUPbMCEYY70xfCPy cxMfj77p/KVMXM3WhB0yLyaeqq8jE6aoiQEQzoCDi9U0cCQnKYUmD9FzJjD/Y21PnKRq P0LFh3jOlifxUfFROrdKMkobyQahqiQEWQyfjhJffYC2Qr29wezJSdhiHr9qGNQ3uq3w kbkQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=62cNvFIcuC30Vs4emJnPJCkHc2meqeg0IuwOUNIHv1Y=; b=soo1LOO2XhvmfiQBFpJzCd0kn18GFGAeY2mrXKn3CS4/qUK4FVupmldqK0AjjYXPZI Fqt9vG4j6V5dqne+iFVEsMQ6+QyxNXJUx9a/0v3fG+QraQxcgn7LZN3uwI/3hOxkeveW YDnm72xEI97OEebP4E3tNz6LyjuOW7Awe64PcymBNYStLSNX9UunMdNCjNUu1dJPVa9S d7H03044DwSrsTyp6yaA4xTo6aFc7IlNvVybm9f/V1nIyR457D1ILBwbAQNTnRe33eIL LUp7ljZssRL0bZfl6v8WA6h2+Z4n3bbHbawIGr0JIqOJjznpiZQlRl+obh+AsARdMm+O lvJA== X-Gm-Message-State: APjAAAVfYZl5eBs7cXDbVN3BOGffYJ4Wcq8dimt2Lkndd4OlCssZQtl5 9kIpzS8UG5oF3Urjvt8COzFhHL6CRCoH2/y++gb7z09O X-Received: by 2002:aca:fd45:: with SMTP id b66mr6794311oii.157.1559145736960; Wed, 29 May 2019 09:02:16 -0700 (PDT) MIME-Version: 1.0 References: <20190529113157.227380-1-jannh@google.com> <87v9xtz1yt.fsf@xmission.com> In-Reply-To: <87v9xtz1yt.fsf@xmission.com> From: Jann Horn Date: Wed, 29 May 2019 18:01:50 +0200 Message-ID: Subject: Re: [PATCH] ptrace: restore smp_rmb() in __ptrace_may_access() To: "Eric W. Biederman" Cc: Oleg Nesterov , Andrew Morton , Kees Cook , David Howells , kernel list Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, May 29, 2019 at 5:59 PM Eric W. Biederman wrote: > Jann Horn writes: > > > Restore the read memory barrier in __ptrace_may_access() that was deleted > > a couple years ago. Also add comments on this barrier and the one it pairs > > with to explain why they're there (as far as I understand). > > My bad. > > When I made that change I could not figure out what that barrier was > for, and it did not appear necessary. > > Do you happen to know of any real world problems? No, this is just from reading the code and trying to make other changes to it. (I'm trying to figure out how to finally deal with some of the other issues in the ptrace access check, so I've been staring at that code a lot over the last couple days.)