From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751911AbcEQVb2 (ORCPT ); Tue, 17 May 2016 17:31:28 -0400 Received: from zeniv.linux.org.uk ([195.92.253.2]:49284 "EHLO ZenIV.linux.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751072AbcEQVb1 (ORCPT ); Tue, 17 May 2016 17:31:27 -0400 Date: Tue, 17 May 2016 22:31:25 +0100 From: Al Viro To: Linus Torvalds Cc: linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-security-module@vger.kernel.org Subject: [git pull] vfs.git#work.const-path Message-ID: <20160517213125.GK14480@ZenIV.linux.org.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.6.0 (2016-04-01) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org struct path is passed by reference to a bunch of Linux S&M methods; in theory, there's nothing to stop them from modifying the damn thing and LSM community being what it is, sooner or later some enterprising soul is going to decide that it's a good idea. Let's remove the temptation and constify all of those... The following changes since commit f55532a0c0b8bb6148f4e07853b876ef73bc69ca: Linux 4.6-rc1 (2016-03-26 16:03:24 -0700) are available in the git repository at: git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs.git work.const-path for you to fetch changes up to 81cd8896a64cc34bd59f097fa619b11ab40ca7a6: constify ima_d_path() (2016-03-28 00:47:52 -0400) ---------------------------------------------------------------- Al Viro (18): [apparmor] constify struct path * in a bunch of helpers constify security_path_truncate() constify vfs_truncate() apparmor_path_truncate(): path->mnt is never NULL tomoyo: constify assorted struct path * constify chown_common/security_path_chown constify security_sb_mount() constify chmod_common/security_path_chmod apparmor: new helper - common_path_perm() apparmor: constify aa_path_link() apparmor: constify common_perm_...() constify security_path_{unlink,rmdir} constify security_path_{mkdir,mknod,symlink} apparmor: remove useless checks for NULL ->mnt constify security_path_{link,rename} constify security_path_chroot() constify security_sb_pivotroot() constify ima_d_path() fs/namei.c | 2 +- fs/open.c | 6 +-- include/linux/fs.h | 2 +- include/linux/lsm_hooks.h | 28 +++++++------- include/linux/security.h | 58 ++++++++++++++-------------- net/unix/af_unix.c | 2 +- security/apparmor/file.c | 4 +- security/apparmor/include/file.h | 4 +- security/apparmor/include/path.h | 2 +- security/apparmor/lsm.c | 83 +++++++++++++++------------------------- security/apparmor/path.c | 8 ++-- security/integrity/ima/ima.h | 2 +- security/integrity/ima/ima_api.c | 2 +- security/security.c | 28 +++++++------- security/selinux/hooks.c | 2 +- security/tomoyo/common.h | 12 +++--- security/tomoyo/file.c | 10 ++--- security/tomoyo/mount.c | 4 +- security/tomoyo/tomoyo.c | 28 +++++++------- 19 files changed, 132 insertions(+), 155 deletions(-)