Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751843AbdCCLJz (ORCPT ); Fri, 3 Mar 2017 06:09:55 -0500 Received: from LGEAMRELO13.lge.com ([156.147.23.53]:38553 "EHLO lgeamrelo13.lge.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751824AbdCCLJx (ORCPT ); Fri, 3 Mar 2017 06:09:53 -0500 X-Original-SENDERIP: 156.147.1.125 X-Original-MAILFROM: hyc.lee@gmail.com X-Original-SENDERIP: 10.177.225.40 X-Original-MAILFROM: hyc.lee@gmail.com Message-ID: <58B947A9.5020007@gmail.com> Date: Fri, 03 Mar 2017 19:38:33 +0900 From: Hyunchul Lee User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.3.0 MIME-Version: 1.0 To: Richard Weinberger CC: kernel-team@lge.com, Artem Bityutskiy , adrian.hunter@intel.com, linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-mtd@lists.infradead.org, Hyunchul Lee Subject: Re: [PATCH] ubifs: add CONFIG_UBIFS_FS_SECURITY to disable/enable security labels References: <1488527043-7195-1-git-send-email-hyc.lee@gmail.com> In-Reply-To: Content-Type: text/plain; charset=iso-8859-15 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1343 Lines: 37 Hi, Richard On 03/03/2017 04:56 PM, Richard Weinberger wrote: > Hyunchul Lee, > > Am 03.03.2017 um 08:44 schrieb Hyunchul Lee: >> From: Hyunchul Lee >> >> When write syscall is called, every time security label is searched to >> determine that file's privileges should be changed. >> If LSM(Linux Security Model) is not used, this is useless. >> >> So introduce CONFIG_UBIFS_SECURITY to disable security labels. it's default >> value is "y". > > Can you please explain what the benefit is and why UBIFS needs this (and why not > all other filesystems)? > I guess some performance issue, do you have numbers? no, i don't have issues and profile result. but, every time when i write 4KB blocks, ubifs_xattr_get is called with "security.capabilties" for each 4KB write. so i think that it is useless if LSM isn't used. <7>[92028.334484] xattr_get:610: UBIFS DBG gen (pid 25746): xattr 'capability', ino 70 ('rand_5'), buf size 0 <7>[92028.334485] ubifs_lookup_level0:1183: UBIFS DBG tnc (pid 25746): search key (70, xentry, 0x10888ae6) <7>[92028.334486] ubifs_lookup_level0:1221: UBIFS DBG tnc (pid 25746): found 0, lvl 0, n 6 and some file system such as ext4 and f2fs have a kernel config to disable security labels. (EXT4_FS_SECURITY, F2FS_FS_SECURITY) > > Thanks, > //richard > Thanks, Hyunchul