Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755040AbbG1CmR (ORCPT ); Mon, 27 Jul 2015 22:42:17 -0400 Received: from mail-ig0-f176.google.com ([209.85.213.176]:36178 "EHLO mail-ig0-f176.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754446AbbG1CmP (ORCPT ); Mon, 27 Jul 2015 22:42:15 -0400 MIME-Version: 1.0 In-Reply-To: References: <20150724005330.GA15227@www.outflux.net> Date: Mon, 27 Jul 2015 19:42:15 -0700 X-Google-Sender-Auth: 0pnbNQduXn3ML4Dgb97J3HH28RM Message-ID: Subject: Re: [PATCH] LSM: LoadPin for module and firmware loading restrictions From: Kees Cook To: James Morris Cc: linux-security-module , James Morris , Casey Schaufler , LKML Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1213 Lines: 36 On Mon, Jul 27, 2015 at 7:36 PM, James Morris wrote: > On Mon, 27 Jul 2015, Kees Cook wrote: > >> On Sun, Jul 26, 2015 at 9:26 PM, James Morris wrote: >> > On Thu, 23 Jul 2015, Kees Cook wrote: >> > >> >> + >> >> +/* >> >> + * Return an allocated string that has been escaped of special characters >> >> + * and double quotes, making it safe to log in quotes. >> >> + */ >> >> +static char *kstrdup_quotable(char *src) >> >> +{ >> > >> > Do you think these should go into a library? >> >> Possibly. There are some other areas of code that almost do the same >> thing, but not exactly. Perhaps I'll first change Yama around to use >> it, then send these again. > > Ok. Is this the same code being used in ChromeOS? Essentially, yes. As the kernels used by Chrome OS don't have LSM stacking, we merged a bunch of functionality into a single LSM. LoadPin is a logical subset of that LSM. -Kees -- Kees Cook Chrome OS Security -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/