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=-0.6 required=3.0 tests=DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_PASS,T_DKIM_INVALID, URIBL_BLOCKED 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 5ED27C43140 for ; Thu, 21 Jun 2018 17:11:52 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 03BF521772 for ; Thu, 21 Jun 2018 17:11:52 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="LAc4PQz7" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 03BF521772 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932719AbeFURLv (ORCPT ); Thu, 21 Jun 2018 13:11:51 -0400 Received: from bombadil.infradead.org ([198.137.202.133]:33204 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752650AbeFURLt (ORCPT ); Thu, 21 Jun 2018 13:11:49 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=Content-Transfer-Encoding: Content-Type:In-Reply-To:MIME-Version:Date:Message-ID:From:References:Cc:To: Subject:Sender:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=32eLz0nF3egmtAvTTTqPZYuiIhc9ZO/oMFwzaFDDT5M=; b=LAc4PQz7A6bRuZikWIFwI13/P cbnPiMX3JgLih8m6Y55u9HQDjxeE7eE/ZrTXdlCH0cCIJyoh6Lzpg+hc3eX753oFC5yz7MDwMWPlD 0fxMYnoUo7lDF+YShEQ2MgGr9C7xGKqWlB87A9Qy8zU8vZAxiCr1AF3cVmhjdDPcLVe9nOiXKY8Sh eD/ji1I1OEJCj5RODnb/+kbzRm6IJf3fzWrAZDi2JH5F5vMw2FI28hX9rk5rmHSHe5R7szxXWfJSI Dlhv5eO1cTghPPosVR0dYTewpzJtnmruVgxFB2sMlY2G6Dlm1acqCe7cW7LN2Ps393QD7aJBQM2jt EXV3e2CeA==; Received: from static-50-53-52-16.bvtn.or.frontiernet.net ([50.53.52.16] helo=midway.dunlab) by bombadil.infradead.org with esmtpsa (Exim 4.90_1 #2 (Red Hat Linux)) id 1fW37c-0007Gl-39; Thu, 21 Jun 2018 17:11:48 +0000 Subject: Re: [PATCH -next] cred: conditionally declare groups-related functions To: Ondrej Mosnacek , Andrew Morton Cc: Stephen Rothwell , Paul Moore , Eric Paris , linux-kernel@vger.kernel.org, linux-next@vger.kernel.org, linux-audit@redhat.com References: <20180621083316.8765-1-omosnace@redhat.com> From: Randy Dunlap Message-ID: <35e430ea-6351-464d-bd31-77f94dcba9dc@infradead.org> Date: Thu, 21 Jun 2018 10:11:46 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.8.0 MIME-Version: 1.0 In-Reply-To: <20180621083316.8765-1-omosnace@redhat.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 06/21/2018 01:33 AM, Ondrej Mosnacek wrote: > The groups-related functions declared in include/linux/cred.h are > defined in kernel/groups.c, which is compiled only when > CONFIG_MULTIUSER=y. Move all these function declarations under #ifdef > CONFIG_MULTIUSER to help avoid accidental usage in contexts where > CONFIG_MULTIUSER might be disabled. > > This patch also adds a fallback for groups_search(). Currently this > function is only called from kernel/groups.c itself and > keys/permissions.c, which depends on CONFIG_MULTIUSER. However, the > audit subsystem (which does not depend on CONFIG_MULTIUSER) calls this > function in -next, so the fallback will be needed to avoid compilation > errors or ugly workarounds. > > See also: > https://lkml.org/lkml/2018/6/20/670 > https://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/audit.git/commit/?h=next&id=af85d1772e31fed34165a1b3decef340cf4080c0 > > Reported-by: Randy Dunlap > Signed-off-by: Ondrej Mosnacek Tested-by: Randy Dunlap Thanks. > --- > include/linux/cred.h | 16 +++++++++++----- > 1 file changed, 11 insertions(+), 5 deletions(-) -- ~Randy