Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp5065134imm; Tue, 16 Oct 2018 04:46:44 -0700 (PDT) X-Google-Smtp-Source: ACcGV63ahXrDCp7wS0ilGSdRt/Qa+PoVv0lOhikyiZACFEbqgmPRq3GpPQZBSIwHz6ZUC/zRYIlh X-Received: by 2002:a17:902:509:: with SMTP id 9-v6mr21295384plf.155.1539690404399; Tue, 16 Oct 2018 04:46:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1539690404; cv=none; d=google.com; s=arc-20160816; b=C0XcFFXicm8dgwZyMWIF1uNoGxUdrHcIsS/gBYUMQUl4gvXC+iEiKM7XTiGBIO64Ay 5yf4WMvuF0rUs/8ty8gzifwfZlFpQ3LwjOKHuF+jSwPO0TBZz0P5FMirtMq6Ry6UaTwx rIa5B97QHK7KS8Rwpf7JxCtyvbeH4kQYjDrh28pKbADe1x/vyA7f5uZa9G5eNN0WVyvz MxLzQ7U6tc7OmwbjYsJIFJ02y5NQFN+sIVr2lhxBGgFfMi0DA15QL/3Kze6+hdw7roxL aJc0iGY9v7feRzr0DvBa2xtpzqRX4i3Gy3S4F/pExKkLGpkjxY2oACMEDc38wrUUhD5F FAKQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :message-id:in-reply-to:subject:cc:to:from:date; bh=DcRHo4CuJZm77a//vXshZ1aLqNzqrxPDDYYSqwxyQec=; b=v6/pzRldVHFSnP7f0PMum2Vezm4UuXXYQ5OF07rb+QfbPeEeLBsn38LXduYqDrziL2 Y4eQzg3B8rAc10XRlmoLPKE/8ZhnIRwj8o2gXxFkVpapA+mlpWfD8C0WGJ0gke9bKgIL VZPwsDalqGraakwe++tawsRpJA+3GfWQEY47GFn6CZHikXs1kWSl84EltCmvm32HQ+zf X3A9/MJvIc9Y07BN1evdaxa4fFeMbCIiVuMJ3C0+z4c5eIN2qoNEVQItoJk/OTgKtn2X ptXt5JS35SL+rGnNAADF/z/lnKUOXlBlZGUgRvAtGxD8nicKkyNS5T/9yKPyA+O681R2 x2dg== 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=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id o9-v6si13917628pfe.283.2018.10.16.04.46.27; Tue, 16 Oct 2018 04:46:44 -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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727159AbeJPTeo (ORCPT + 99 others); Tue, 16 Oct 2018 15:34:44 -0400 Received: from mx2.suse.de ([195.135.220.15]:40454 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726760AbeJPTeo (ORCPT ); Tue, 16 Oct 2018 15:34:44 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 7D2CEAEE4; Tue, 16 Oct 2018 11:44:06 +0000 (UTC) Date: Tue, 16 Oct 2018 13:44:05 +0200 (CEST) From: Jiri Kosina To: Jann Horn cc: Casey Schaufler , Kernel Hardening , kernel list , linux-security-module , selinux@tycho.nsa.gov, Dave Hansen , deneen.t.dock@intel.com, kristen@linux.intel.com, Arjan van de Ven Subject: Re: [PATCH v5 2/5] Smack: Prepare for PTRACE_MODE_SCHED In-Reply-To: Message-ID: References: <20180926203446.2004-1-casey.schaufler@intel.com> <20180926203446.2004-3-casey.schaufler@intel.com> <99FC4B6EFCEFD44486C35F4C281DC673214625EA@ORSMSX107.amr.corp.intel.com> User-Agent: Alpine 2.21 (LSU 202 2017-01-01) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 4 Oct 2018, Jann Horn wrote: > > Well, we can't really call out into audit from scheduler code, and the > > previous versions of the patchsets didn't have PTRACE_MODE_SCHED, so it > > had to be included in PTRACE_MODE_IBPB in order to make sure we're not > > calling into audit from context switch code. > > > > Or did I misunderstand the question? > > If I understand Casey correctly, he is saying that your patch > (https://lore.kernel.org/lkml/nycvar.YFH.7.76.1809251437340.15880@cbobk.fhfr.pm/) > doesn't include PTRACE_MODE_NOAUDIT for IBPB, but the previous v6 of > your patch (https://lore.kernel.org/lkml/nycvar.YFH.7.76.1809121105330.15880@cbobk.fhfr.pm/) > did include it, and therefore Casey thinks that there is a specific > reason why you removed PTRACE_MODE_NOAUDIT, Quite honestly, I don't remember. I dont't think there is any deadlock that'd be triggered by this. > and therefore Casey is adding special-case logic for PTRACE_MODE_SCHED > to Smack when simply using PTRACE_MODE_NOAUDIT would also work. > > I think that Casey should change ptrace_may_access_sched() to use > "mode | PTRACE_MODE_SCHED | PTRACE_MODE_NOAUDIT". Agreed, that should work. Thanks, -- Jiri Kosina SUSE Labs