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 X-Spam-Level: X-Spam-Status: No, score=-1.0 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 69CA9C28CC0 for ; Thu, 30 May 2019 01:42:05 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 4CD5E24400 for ; Thu, 30 May 2019 01:42:05 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727376AbfE3BmE (ORCPT ); Wed, 29 May 2019 21:42:04 -0400 Received: from out03.mta.xmission.com ([166.70.13.233]:59238 "EHLO out03.mta.xmission.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727247AbfE3BmC (ORCPT ); Wed, 29 May 2019 21:42:02 -0400 Received: from in01.mta.xmission.com ([166.70.13.51]) by out03.mta.xmission.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.87) (envelope-from ) id 1hWA4v-0007nJ-B8; Wed, 29 May 2019 19:42:01 -0600 Received: from ip72-206-97-68.om.om.cox.net ([72.206.97.68] helo=x220.xmission.com) by in01.mta.xmission.com with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.87) (envelope-from ) id 1hWA4u-0002xz-TG; Wed, 29 May 2019 19:42:01 -0600 From: ebiederm@xmission.com (Eric W. Biederman) To: Jann Horn Cc: Oleg Nesterov , Andrew Morton , Kees Cook , David Howells , kernel list References: <20190529113157.227380-1-jannh@google.com> <20190529162120.GB27659@redhat.com> Date: Wed, 29 May 2019 20:41:55 -0500 In-Reply-To: (Jann Horn's message of "Wed, 29 May 2019 19:38:46 +0200") Message-ID: <87ef4gzpjw.fsf@xmission.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-XM-SPF: eid=1hWA4u-0002xz-TG;;;mid=<87ef4gzpjw.fsf@xmission.com>;;;hst=in01.mta.xmission.com;;;ip=72.206.97.68;;;frm=ebiederm@xmission.com;;;spf=neutral X-XM-AID: U2FsdGVkX18wE3UcoodFH/eDBPD7tiynOAUoebLOnZ4= X-SA-Exim-Connect-IP: 72.206.97.68 X-SA-Exim-Mail-From: ebiederm@xmission.com Subject: Re: [PATCH] ptrace: restore smp_rmb() in __ptrace_may_access() X-SA-Exim-Version: 4.2.1 (built Thu, 05 May 2016 13:38:54 -0600) X-SA-Exim-Scanned: Yes (on in01.mta.xmission.com) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Jann Horn writes: > I'm actually trying to get rid of the ->mm access in > __ptrace_may_access() entirely by moving the dumpability and the > user_ns into the signal_struct, but I don't have patches for that > ready (yet). Do you have a plan for dealing with old linux-threads style threads where you have two processes that share the same mm, but have different signal_structs. I don't think it is required to share any other structures except mm_struct when you share mm_struct. Maybe sighand_struct. Not to derail your idea. Only needing to look at signal_struct sounds very nice. I just know we have some other somewhat bizarre cases the kernel still supports. Eric