From patchwork Fri Jan 17 08:05:03 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: AKASHI Takahiro X-Patchwork-Id: 3502421 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 09B80C02DC for ; Fri, 17 Jan 2014 08:06:09 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 3627820179 for ; Fri, 17 Jan 2014 08:06:08 +0000 (UTC) Received: from casper.infradead.org (casper.infradead.org [85.118.1.10]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 1249E20122 for ; Fri, 17 Jan 2014 08:06:07 +0000 (UTC) Received: from merlin.infradead.org ([2001:4978:20e::2]) by casper.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1W44R8-0005Xw-Jf; Fri, 17 Jan 2014 08:05:54 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1W44R0-0001mq-6q; Fri, 17 Jan 2014 08:05:46 +0000 Received: from mail-pd0-f179.google.com ([209.85.192.179]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1W44Qw-0001mI-Su for linux-arm-kernel@lists.infradead.org; Fri, 17 Jan 2014 08:05:43 +0000 Received: by mail-pd0-f179.google.com with SMTP id q10so1648211pdj.38 for ; Fri, 17 Jan 2014 00:05:21 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=pYkZ4oV5uDyXZ2/NyA0JXuOqcbdOrNnN6M8jqgKBQS4=; b=bi0OC/D/vDR4z7LQllv8jgK+3nDKdDT1hUUvLsrJICBkat8WRWuC25PBo0MvXKyAN4 TvhPu9sgq1vtX1hOb0mm6bC2eInfRg24842kklNfCPxMKcQHTAoRUotXCCzDEDGRwzXW 2fO0QjDVXJrng5HileXfDab3gozmJVY1Rl86CQ4a2H0NbYQ6lOyUTycFa9W1wJTuKja9 FdT1/2GZchvEt93fgldVhBISbo8uc+pAaqwc2P8yxzdwecf44tZ28u5wWwj1Llc5/zyH uVtYVlAieVuEbVBrVTn4lktHn7T/2EQ6NeUlUYIErsnWYr4mLlO8Fk80L66hyG5BwUSO k7gQ== X-Gm-Message-State: ALoCoQmPYEhJyA6IpLwvC+VdClTMY56pw38A5bOwVI/OHXM2tmRYKcKK4WST0Tib87Zvtp6Vn2dJ X-Received: by 10.69.18.234 with SMTP id gp10mr489920pbd.105.1389945921447; Fri, 17 Jan 2014 00:05:21 -0800 (PST) Received: from localhost.localdomain (KD182250177246.au-net.ne.jp. [182.250.177.246]) by mx.google.com with ESMTPSA id fm1sm27656298pab.22.2014.01.17.00.05.15 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 17 Jan 2014 00:05:20 -0800 (PST) From: AKASHI Takahiro To: viro@zeniv.linux.org.uk, eparis@redhat.com, rgb@redhat.com, arndb@arndb.de Subject: [PATCH] audit: Modify a set of system calls in audit class definitions Date: Fri, 17 Jan 2014 17:05:03 +0900 Message-Id: <1389945903-4326-1-git-send-email-takahiro.akashi@linaro.org> X-Mailer: git-send-email 1.8.3.2 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20140117_030543_015686_580775C8 X-CRM114-Status: UNSURE ( 9.73 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -1.9 (-) Cc: linaro-kernel@lists.linaro.org, patches@linaro.org, catalin.marinas@arm.com, will.deacon@arm.com, AKASHI Takahiro , linux-kernel@ver.kernel.org, linux-audit@redhat.com, linux-arm-kernel@lists.infradead.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.5 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Each asm-generic/audit_xx.h defines a set of system calls for respective audit permssion class (read, write, change attribute or exec). This patch changes two entries: 1) fchown in audit_change_attr.h Make fchown included by its own because in asm-generic/unistd.h, for example, fchown always exists while chown is optional. This change is necessary at least for arm64. 2) truncate64 in audit_write.h Add missing truncate64/ftruncate64 as well as truncate/ftruncate Signed-off-by: AKASHI Takahiro Reviewed-by: Richard Guy Briggs --- include/asm-generic/audit_change_attr.h | 4 +++- include/asm-generic/audit_write.h | 6 ++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/include/asm-generic/audit_change_attr.h b/include/asm-generic/audit_change_attr.h index 89b73e5..a186553 100644 --- a/include/asm-generic/audit_change_attr.h +++ b/include/asm-generic/audit_change_attr.h @@ -4,9 +4,11 @@ __NR_chmod, __NR_fchmod, #ifdef __NR_chown __NR_chown, -__NR_fchown, __NR_lchown, #endif +#ifdef __NR_fchown +__NR_fchown, +#endif __NR_setxattr, __NR_lsetxattr, __NR_fsetxattr, diff --git a/include/asm-generic/audit_write.h b/include/asm-generic/audit_write.h index e7020c5..274575d 100644 --- a/include/asm-generic/audit_write.h +++ b/include/asm-generic/audit_write.h @@ -10,6 +10,12 @@ __NR_truncate, #ifdef __NR_truncate64 __NR_truncate64, #endif +#ifdef __NR_ftruncate +__NR_ftruncate, +#endif +#ifdef __NR_ftruncate64 +__NR_ftruncate64, +#endif #ifdef __NR_bind __NR_bind, /* bind can affect fs object only in one way... */ #endif