From patchwork Mon Jan 21 01:25:10 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tetsuo Handa X-Patchwork-Id: 10772665 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id B54561390 for ; Mon, 21 Jan 2019 07:26:25 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9BF8B299B1 for ; Mon, 21 Jan 2019 07:26:25 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 9058829A08; Mon, 21 Jan 2019 07:26:25 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1E902299B1 for ; Mon, 21 Jan 2019 07:26:25 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728222AbfAUH0X (ORCPT ); Mon, 21 Jan 2019 02:26:23 -0500 Received: from www262.sakura.ne.jp ([202.181.97.72]:11675 "EHLO www262.sakura.ne.jp" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727976AbfAUH0X (ORCPT ); Mon, 21 Jan 2019 02:26:23 -0500 Received: from fsav103.sakura.ne.jp (fsav103.sakura.ne.jp [27.133.134.230]) by www262.sakura.ne.jp (8.15.2/8.15.2) with ESMTP id x0L1PAdK046364 for ; Mon, 21 Jan 2019 10:25:10 +0900 (JST) (envelope-from penguin-kernel@i-love.sakura.ne.jp) Received: from www262.sakura.ne.jp (202.181.97.72) by fsav103.sakura.ne.jp (F-Secure/fsigk_smtp/530/fsav103.sakura.ne.jp); Mon, 21 Jan 2019 10:25:10 +0900 (JST) X-Virus-Status: clean(F-Secure/fsigk_smtp/530/fsav103.sakura.ne.jp) Received: from www262.sakura.ne.jp (localhost [127.0.0.1]) by www262.sakura.ne.jp (8.15.2/8.15.2) with ESMTP id x0L1PAjP046353 for ; Mon, 21 Jan 2019 10:25:10 +0900 (JST) (envelope-from penguin-kernel@i-love.sakura.ne.jp) Received: (from i-love@localhost) by www262.sakura.ne.jp (8.15.2/8.15.2/Submit) id x0L1PAwO046352; Mon, 21 Jan 2019 10:25:10 +0900 (JST) (envelope-from penguin-kernel@i-love.sakura.ne.jp) Message-Id: <201901210125.x0L1PAwO046352@www262.sakura.ne.jp> X-Authentication-Warning: www262.sakura.ne.jp: i-love set sender to penguin-kernel@i-love.sakura.ne.jp using -f Subject: [PATCH] apparmor: Adjust offset when accessing task blob. From: Tetsuo Handa To: linux-security-module@vger.kernel.org MIME-Version: 1.0 Date: Mon, 21 Jan 2019 10:25:10 +0900 Sender: owner-linux-security-module@vger.kernel.org Precedence: bulk List-ID: X-Virus-Scanned: ClamAV using ClamSMTP AppArmor will no longer be the only user of task blob after TOMOYO started using task blob. Signed-off-by: Tetsuo Handa Acked-by: Kees Cook --- security/apparmor/include/task.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/security/apparmor/include/task.h b/security/apparmor/include/task.h index 039c1e6..311e652 100644 --- a/security/apparmor/include/task.h +++ b/security/apparmor/include/task.h @@ -16,7 +16,7 @@ static inline struct aa_task_ctx *task_ctx(struct task_struct *task) { - return task->security; + return task->security + apparmor_blob_sizes.lbs_task; } /*