From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755070AbcGZLiq (ORCPT ); Tue, 26 Jul 2016 07:38:46 -0400 Received: from [65.99.196.166] ([65.99.196.166]:44603 "EHLO namei.org" rhost-flags-FAIL-FAIL-OK-OK) by vger.kernel.org with ESMTP id S1751041AbcGZLio (ORCPT ); Tue, 26 Jul 2016 07:38:44 -0400 Date: Tue, 26 Jul 2016 21:38:38 +1000 (AEST) From: James Morris To: John Johansen cc: linux-kernel@vger.kernel.org, linux-security-module@vger.kernel.org, Arnd Bergmann Subject: Re: [PATCH] apparmor: fix SECURITY_APPARMOR_HASH_DEFAULT parameter handling In-Reply-To: <1469469547-8336-2-git-send-email-john.johansen@canonical.com> Message-ID: References: <1469469547-8336-1-git-send-email-john.johansen@canonical.com> <1469469547-8336-2-git-send-email-john.johansen@canonical.com> User-Agent: Alpine 2.20 (LRH 67 2015-01-07) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 25 Jul 2016, John Johansen wrote: > From: Arnd Bergmann > > The newly added Kconfig option could never work and just causes a build error > when disabled: > > security/apparmor/lsm.c:675:25: error: 'CONFIG_SECURITY_APPARMOR_HASH_DEFAULT' undeclared here (not in a function) > bool aa_g_hash_policy = CONFIG_SECURITY_APPARMOR_HASH_DEFAULT; > > The problem is that the macro undefined in this case, and we need to use the IS_ENABLED() > helper to turn it into a boolean constant. > > Another minor problem with the original patch is that the option is even offered > in sysfs when SECURITY_APPARMOR_HASH is not enabled, so this also hides the option > in that case. > > Signed-off-by: Arnd Bergmann > Fixes: 6059f71f1e94 ("apparmor: add parameter to control whether policy hashing is used") > Signed-off-by: John Johansen Please rebase this against current Linus. -- James Morris