From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752978AbcFNVHe (ORCPT ); Tue, 14 Jun 2016 17:07:34 -0400 Received: from mail-wm0-f47.google.com ([74.125.82.47]:35030 "EHLO mail-wm0-f47.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750771AbcFNVHc (ORCPT ); Tue, 14 Jun 2016 17:07:32 -0400 MIME-Version: 1.0 In-Reply-To: References: <08700e20-93c7-1d5c-5215-01cd0c0c7190@schaufler-ca.com> From: Kees Cook Date: Tue, 14 Jun 2016 14:07:30 -0700 X-Google-Sender-Auth: ZX4OOn4BwggoyG4qyfAUser_aw8 Message-ID: Subject: Re: [PATCH v3 3/3] LSM: Add context interface for proc attr To: Casey Schaufler Cc: LSM , James Morris , John Johansen , Stephen Smalley , Paul Moore , Tetsuo Handa , LKLM , James Morris Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jun 14, 2016 at 1:19 PM, Casey Schaufler wrote: > On 6/14/2016 11:57 AM, Kees Cook wrote: >> it's okay.) Also, should lsm == NULL be checked early and >> rejected/skipped so the lsm != NULL test isn't needed in both loops? > > Ah, you miss the nuance of the code. NULL is an acceptance condition, > not a rejection as it would be in most cases. Ah! Yes, got it now. Thanks! -Kees -- Kees Cook Chrome OS & Brillo Security