Received: by 10.213.65.68 with SMTP id h4csp642863imn; Fri, 23 Mar 2018 12:20:55 -0700 (PDT) X-Google-Smtp-Source: AG47ELt8K6fAzbgYoIkitV2Z4WkkGMyKasi6T/eea/TDWdF3ukZr74d0Ejj2V/iuIoY0UA0c9/Ma X-Received: by 2002:a17:902:2ac3:: with SMTP id j61-v6mr13693408plb.224.1521832855600; Fri, 23 Mar 2018 12:20:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521832855; cv=none; d=google.com; s=arc-20160816; b=B42J2kBdVLwedksWEkH1wkvkbq3R99yS/2FtB3Vpf4sfSnWl7eYRbt93tGtMRlUK7K G55ylKyrVfifQIbIewM5qsRxu9PlSguJYHFTlo50F2PfqVTjdEgPn7gpw8XZxmJ3EFW8 DXADGzYWq3O8fYVzw4lHUQTlQl3t5PZR7eskTIcO8ACNLD/TN+JSIOFLS6EldSfwZln3 0yK+NTARjux1HdlHA/+DsFs3qXFC3xqbuSAt59zGEPBvpqJKmUfNpgwzICH2mfWBKRoh 90NNh+ZYaeYSgjdqlTFTdA0XtBUz9KoUnkTrL61OuONQsXNcJV1RqjcVvti5NxB7Tjib DVzg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:subject:references:in-reply-to:message-id :date:cc:to:from:arc-authentication-results; bh=4fK1ZGz2YiASEUvV4Iqq6sngN3KxmNJQAml12auwciA=; b=CKJSgFMydhNlCRt2Uq8jGPwfTjChMPkpq4JACT4+dmMy9835+G5jqKTWq2kyHX3RAE y9vJ4Z/MAX8Cg4cg1hVkQgPzpo0ZU+gqC8j+v2RvMXLbDXMh4fVUmyPoT3gj92yuxhP/ /8U272lffYNXdSLpOi0I7IlUIYF91io7qWeAArFkn5Smtj3CKI8We/U3iHczZCiWIc1U Pg9xhw2hII9l0hQrP7HQKMHMxo8CkJoeWVYG+/Rr0GtSnC5FoIWRNTuKcecB2tErlBgO WiQGJxVvBfFyexHJqwoojmLwJXLeyVZrSy0LPfdTKwkMBQ9KDD4qqLKlgI4eUEE1hjIN jvCw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g34-v6si2244250pld.24.2018.03.23.12.20.41; Fri, 23 Mar 2018 12:20:55 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752660AbeCWTTX (ORCPT + 99 others); Fri, 23 Mar 2018 15:19:23 -0400 Received: from out02.mta.xmission.com ([166.70.13.232]:50624 "EHLO out02.mta.xmission.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752090AbeCWTSF (ORCPT ); Fri, 23 Mar 2018 15:18:05 -0400 Received: from in01.mta.xmission.com ([166.70.13.51]) by out02.mta.xmission.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.87) (envelope-from ) id 1ezSCT-0007cQ-1W; Fri, 23 Mar 2018 13:18:05 -0600 Received: from 97-119-121-173.omah.qwest.net ([97.119.121.173] helo=x220.int.ebiederm.org) by in01.mta.xmission.com with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.87) (envelope-from ) id 1ezSCR-00033I-1c; Fri, 23 Mar 2018 13:18:03 -0600 From: "Eric W. Biederman" To: Linux Containers Cc: linux-kernel@vger.kernel.org, linux-api@vger.kernel.org, khlebnikov@yandex-team.ru, prakash.sangappa@oracle.com, luto@kernel.org, akpm@linux-foundation.org, oleg@redhat.com, serge.hallyn@ubuntu.com, esyr@redhat.com, jannh@google.com, linux-security-module@vger.kernel.org, Pavel Emelyanov , Nagarathnam Muthusamy , "Eric W. Biederman" Date: Fri, 23 Mar 2018 14:16:09 -0500 Message-Id: <20180323191614.32489-6-ebiederm@xmission.com> X-Mailer: git-send-email 2.14.1 In-Reply-To: <87vadmobdw.fsf_-_@xmission.com> References: <87vadmobdw.fsf_-_@xmission.com> X-XM-SPF: eid=1ezSCR-00033I-1c;;;mid=<20180323191614.32489-6-ebiederm@xmission.com>;;;hst=in01.mta.xmission.com;;;ip=97.119.121.173;;;frm=ebiederm@xmission.com;;;spf=neutral X-XM-AID: U2FsdGVkX1+IDXUY6D4KdQo3Axbz7XJ3JefL5TgeRQ8= X-SA-Exim-Connect-IP: 97.119.121.173 X-SA-Exim-Mail-From: ebiederm@xmission.com X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on sa07.xmission.com X-Spam-Level: **** X-Spam-Status: No, score=4.5 required=8.0 tests=ALL_TRUSTED,BAYES_50, DCC_CHECK_NEGATIVE,TR_Symld_Words,TVD_RCVD_IP,T_TooManySym_01,T_TooManySym_02, T_XMDrugObfuBody_04,XMNoVowels,XMSubLong autolearn=disabled version=3.4.1 X-Spam-Report: * -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP * 0.7 XMSubLong Long Subject * 1.5 XMNoVowels Alpha-numberic number with no vowels * 1.5 TR_Symld_Words too many words that have symbols inside * 0.0 TVD_RCVD_IP Message was received from an IP address * 0.8 BAYES_50 BODY: Bayes spam probability is 40 to 60% * [score: 0.5000] * -0.0 DCC_CHECK_NEGATIVE Not listed in DCC * [sa07 1397; Body=1 Fuz1=1 Fuz2=1] * 0.0 T_TooManySym_01 4+ unique symbols in subject * 0.0 T_TooManySym_02 5+ unique symbols in subject * 1.0 T_XMDrugObfuBody_04 obfuscated drug references X-Spam-DCC: XMission; sa07 1397; Body=1 Fuz1=1 Fuz2=1 X-Spam-Combo: ****;Linux Containers X-Spam-Relay-Country: X-Spam-Timing: total 243 ms - load_scoreonly_sql: 0.03 (0.0%), signal_user_changed: 2.6 (1.1%), b_tie_ro: 1.88 (0.8%), parse: 0.74 (0.3%), extract_message_metadata: 10 (4.0%), get_uri_detail_list: 1.42 (0.6%), tests_pri_-1000: 5 (2.2%), tests_pri_-950: 1.12 (0.5%), tests_pri_-900: 0.98 (0.4%), tests_pri_-400: 19 (8.0%), check_bayes: 18 (7.6%), b_tokenize: 7 (2.9%), b_tok_get_all: 6 (2.3%), b_comp_prob: 1.58 (0.7%), b_tok_touch_all: 2.6 (1.1%), b_finish: 0.54 (0.2%), tests_pri_0: 197 (80.9%), check_dkim_signature: 0.46 (0.2%), check_dkim_adsp: 3.1 (1.3%), tests_pri_500: 3.9 (1.6%), rewrite_mail: 0.00 (0.0%) Subject: [REVIEW][PATCH 06/11] msg: Move struct msg_queue into ipc/msg.c X-Spam-Flag: No X-SA-Exim-Version: 4.2.1 (built Thu, 05 May 2016 13:38:54 -0600) X-SA-Exim-Scanned: Yes (on in01.mta.xmission.com) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org All of the users are now in ipc/msg.c so make the definition local to that file to make code maintenance easier. AKA to prevent rebuilding the entire kernel when struct msg_queue changes. Signed-off-by: "Eric W. Biederman" --- include/linux/msg.h | 18 ------------------ ipc/msg.c | 17 +++++++++++++++++ 2 files changed, 17 insertions(+), 18 deletions(-) diff --git a/include/linux/msg.h b/include/linux/msg.h index 0a7eefeee0d1..9a972a296b95 100644 --- a/include/linux/msg.h +++ b/include/linux/msg.h @@ -3,7 +3,6 @@ #define _LINUX_MSG_H #include -#include #include /* one msg_msg structure for each message */ @@ -16,21 +15,4 @@ struct msg_msg { /* the actual message follows immediately */ }; -/* one msq_queue structure for each present queue on the system */ -struct msg_queue { - struct kern_ipc_perm q_perm; - time64_t q_stime; /* last msgsnd time */ - time64_t q_rtime; /* last msgrcv time */ - time64_t q_ctime; /* last change time */ - unsigned long q_cbytes; /* current number of bytes on queue */ - unsigned long q_qnum; /* number of messages in queue */ - unsigned long q_qbytes; /* max number of bytes on queue */ - pid_t q_lspid; /* pid of last msgsnd */ - pid_t q_lrpid; /* last receive pid */ - - struct list_head q_messages; - struct list_head q_receivers; - struct list_head q_senders; -} __randomize_layout; - #endif /* _LINUX_MSG_H */ diff --git a/ipc/msg.c b/ipc/msg.c index cdfab0825fce..af5a963306c4 100644 --- a/ipc/msg.c +++ b/ipc/msg.c @@ -43,6 +43,23 @@ #include #include "util.h" +/* one msq_queue structure for each present queue on the system */ +struct msg_queue { + struct kern_ipc_perm q_perm; + time64_t q_stime; /* last msgsnd time */ + time64_t q_rtime; /* last msgrcv time */ + time64_t q_ctime; /* last change time */ + unsigned long q_cbytes; /* current number of bytes on queue */ + unsigned long q_qnum; /* number of messages in queue */ + unsigned long q_qbytes; /* max number of bytes on queue */ + pid_t q_lspid; /* pid of last msgsnd */ + pid_t q_lrpid; /* last receive pid */ + + struct list_head q_messages; + struct list_head q_receivers; + struct list_head q_senders; +} __randomize_layout; + /* one msg_receiver structure for each sleeping receiver */ struct msg_receiver { struct list_head r_list; -- 2.14.1