From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Paul E. McKenney" Date: Tue, 10 Oct 2017 00:22:49 +0000 Subject: [PATCH RFC tip/core/rcu 15/15] keyring: Remove now-redundant smp_read_barrier_depends() Message-Id: <1507594969-8347-15-git-send-email-paulmck@linux.vnet.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit List-Id: References: <20171010001951.GA6476@linux.vnet.ibm.com> In-Reply-To: <20171010001951.GA6476@linux.vnet.ibm.com> To: linux-kernel@vger.kernel.org Cc: mingo@kernel.org, torvalds@linux-foundation.org, mark.rutland@arm.com, dhowells@redhat.com, linux-arch@vger.kernel.org, peterz@infradead.org, will.deacon@arm.com, "Paul E. McKenney" , James Morris , "Serge E. Hallyn" , keyrings@vger.kernel.org, linux-security-module@vger.kernel.org Now that the associative-array library properly heads dependency chains, the various smp_read_barrier_depends() calls in security/keys/keyring.c are no longer needed. This commit therefore removes them. Signed-off-by: Paul E. McKenney Cc: David Howells Cc: James Morris Cc: "Serge E. Hallyn" Cc: Cc: --- security/keys/keyring.c | 7 ------- 1 file changed, 7 deletions(-) diff --git a/security/keys/keyring.c b/security/keys/keyring.c index 4fa82a8a9c0e..fb44c9169125 100644 --- a/security/keys/keyring.c +++ b/security/keys/keyring.c @@ -712,7 +712,6 @@ static bool search_nested_keyrings(struct key *keyring, * doesn't contain any keyring pointers. */ shortcut = assoc_array_ptr_to_shortcut(ptr); - smp_read_barrier_depends(); if ((shortcut->index_key[0] & ASSOC_ARRAY_FAN_MASK) != 0) goto not_this_keyring; @@ -722,8 +721,6 @@ static bool search_nested_keyrings(struct key *keyring, } node = assoc_array_ptr_to_node(ptr); - smp_read_barrier_depends(); - ptr = node->slots[0]; if (!assoc_array_ptr_is_meta(ptr)) goto begin_node; @@ -735,7 +732,6 @@ static bool search_nested_keyrings(struct key *keyring, kdebug("descend"); if (assoc_array_ptr_is_shortcut(ptr)) { shortcut = assoc_array_ptr_to_shortcut(ptr); - smp_read_barrier_depends(); ptr = READ_ONCE(shortcut->next_node); BUG_ON(!assoc_array_ptr_is_node(ptr)); } @@ -743,7 +739,6 @@ static bool search_nested_keyrings(struct key *keyring, begin_node: kdebug("begin_node"); - smp_read_barrier_depends(); slot = 0; ascend_to_node: /* Go through the slots in a node */ @@ -791,14 +786,12 @@ static bool search_nested_keyrings(struct key *keyring, if (ptr && assoc_array_ptr_is_shortcut(ptr)) { shortcut = assoc_array_ptr_to_shortcut(ptr); - smp_read_barrier_depends(); ptr = READ_ONCE(shortcut->back_pointer); slot = shortcut->parent_slot; } if (!ptr) goto not_this_keyring; node = assoc_array_ptr_to_node(ptr); - smp_read_barrier_depends(); slot++; /* If we've ascended to the root (zero backpointer), we must have just -- 2.5.2 From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756019AbdJJAZy (ORCPT ); Mon, 9 Oct 2017 20:25:54 -0400 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:45248 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1755773AbdJJAWz (ORCPT ); Mon, 9 Oct 2017 20:22:55 -0400 From: "Paul E. McKenney" To: linux-kernel@vger.kernel.org Cc: mingo@kernel.org, torvalds@linux-foundation.org, mark.rutland@arm.com, dhowells@redhat.com, linux-arch@vger.kernel.org, peterz@infradead.org, will.deacon@arm.com, "Paul E. McKenney" , James Morris , "Serge E. Hallyn" , , Subject: [PATCH RFC tip/core/rcu 15/15] keyring: Remove now-redundant smp_read_barrier_depends() Date: Mon, 9 Oct 2017 17:22:49 -0700 X-Mailer: git-send-email 2.5.2 In-Reply-To: <20171010001951.GA6476@linux.vnet.ibm.com> References: <20171010001951.GA6476@linux.vnet.ibm.com> X-TM-AS-GCONF: 00 x-cbid: 17101000-0048-0000-0000-000001F32E23 X-IBM-SpamModules-Scores: X-IBM-SpamModules-Versions: BY=3.00007870; HX=3.00000241; KW=3.00000007; PH=3.00000004; SC=3.00000235; SDB=6.00928858; UDB=6.00467489; IPR=6.00709129; BA=6.00005631; NDR=6.00000001; ZLA=6.00000005; ZF=6.00000009; ZB=6.00000000; ZP=6.00000000; ZH=6.00000000; ZU=6.00000002; MB=3.00017467; XFM=3.00000015; UTC=2017-10-10 00:22:53 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 17101000-0049-0000-0000-000042D1C900 Message-Id: <1507594969-8347-15-git-send-email-paulmck@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2017-10-09_07:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 suspectscore=1 malwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1707230000 definitions=main-1710100003 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Now that the associative-array library properly heads dependency chains, the various smp_read_barrier_depends() calls in security/keys/keyring.c are no longer needed. This commit therefore removes them. Signed-off-by: Paul E. McKenney Cc: David Howells Cc: James Morris Cc: "Serge E. Hallyn" Cc: Cc: --- security/keys/keyring.c | 7 ------- 1 file changed, 7 deletions(-) diff --git a/security/keys/keyring.c b/security/keys/keyring.c index 4fa82a8a9c0e..fb44c9169125 100644 --- a/security/keys/keyring.c +++ b/security/keys/keyring.c @@ -712,7 +712,6 @@ static bool search_nested_keyrings(struct key *keyring, * doesn't contain any keyring pointers. */ shortcut = assoc_array_ptr_to_shortcut(ptr); - smp_read_barrier_depends(); if ((shortcut->index_key[0] & ASSOC_ARRAY_FAN_MASK) != 0) goto not_this_keyring; @@ -722,8 +721,6 @@ static bool search_nested_keyrings(struct key *keyring, } node = assoc_array_ptr_to_node(ptr); - smp_read_barrier_depends(); - ptr = node->slots[0]; if (!assoc_array_ptr_is_meta(ptr)) goto begin_node; @@ -735,7 +732,6 @@ static bool search_nested_keyrings(struct key *keyring, kdebug("descend"); if (assoc_array_ptr_is_shortcut(ptr)) { shortcut = assoc_array_ptr_to_shortcut(ptr); - smp_read_barrier_depends(); ptr = READ_ONCE(shortcut->next_node); BUG_ON(!assoc_array_ptr_is_node(ptr)); } @@ -743,7 +739,6 @@ static bool search_nested_keyrings(struct key *keyring, begin_node: kdebug("begin_node"); - smp_read_barrier_depends(); slot = 0; ascend_to_node: /* Go through the slots in a node */ @@ -791,14 +786,12 @@ static bool search_nested_keyrings(struct key *keyring, if (ptr && assoc_array_ptr_is_shortcut(ptr)) { shortcut = assoc_array_ptr_to_shortcut(ptr); - smp_read_barrier_depends(); ptr = READ_ONCE(shortcut->back_pointer); slot = shortcut->parent_slot; } if (!ptr) goto not_this_keyring; node = assoc_array_ptr_to_node(ptr); - smp_read_barrier_depends(); slot++; /* If we've ascended to the root (zero backpointer), we must have just -- 2.5.2 From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Paul E. McKenney" Subject: [PATCH RFC tip/core/rcu 15/15] keyring: Remove now-redundant smp_read_barrier_depends() Date: Mon, 9 Oct 2017 17:22:49 -0700 Message-ID: <1507594969-8347-15-git-send-email-paulmck@linux.vnet.ibm.com> References: <20171010001951.GA6476@linux.vnet.ibm.com> Return-path: Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:59758 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755833AbdJJAW4 (ORCPT ); Mon, 9 Oct 2017 20:22:56 -0400 Received: from pps.filterd (m0098404.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.21/8.16.0.21) with SMTP id v9A0JP2P139032 for ; Mon, 9 Oct 2017 20:22:56 -0400 Received: from e12.ny.us.ibm.com (e12.ny.us.ibm.com [129.33.205.202]) by mx0a-001b2d01.pphosted.com with ESMTP id 2dgd11ab54-1 (version=TLSv1.2 cipher=AES256-SHA bits=256 verify=NOT) for ; Mon, 09 Oct 2017 20:22:55 -0400 Received: from localhost by e12.ny.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Mon, 9 Oct 2017 20:22:54 -0400 In-Reply-To: <20171010001951.GA6476@linux.vnet.ibm.com> Sender: linux-arch-owner@vger.kernel.org List-ID: To: linux-kernel@vger.kernel.org Cc: mingo@kernel.org, torvalds@linux-foundation.org, mark.rutland@arm.com, dhowells@redhat.com, linux-arch@vger.kernel.org, peterz@infradead.org, will.deacon@arm.com, "Paul E. McKenney" , James Morris , "Serge E. Hallyn" , keyrings@vger.kernel.org, linux-security-module@vger.kernel.org Now that the associative-array library properly heads dependency chains, the various smp_read_barrier_depends() calls in security/keys/keyring.c are no longer needed. This commit therefore removes them. Signed-off-by: Paul E. McKenney Cc: David Howells Cc: James Morris Cc: "Serge E. Hallyn" Cc: Cc: --- security/keys/keyring.c | 7 ------- 1 file changed, 7 deletions(-) diff --git a/security/keys/keyring.c b/security/keys/keyring.c index 4fa82a8a9c0e..fb44c9169125 100644 --- a/security/keys/keyring.c +++ b/security/keys/keyring.c @@ -712,7 +712,6 @@ static bool search_nested_keyrings(struct key *keyring, * doesn't contain any keyring pointers. */ shortcut = assoc_array_ptr_to_shortcut(ptr); - smp_read_barrier_depends(); if ((shortcut->index_key[0] & ASSOC_ARRAY_FAN_MASK) != 0) goto not_this_keyring; @@ -722,8 +721,6 @@ static bool search_nested_keyrings(struct key *keyring, } node = assoc_array_ptr_to_node(ptr); - smp_read_barrier_depends(); - ptr = node->slots[0]; if (!assoc_array_ptr_is_meta(ptr)) goto begin_node; @@ -735,7 +732,6 @@ static bool search_nested_keyrings(struct key *keyring, kdebug("descend"); if (assoc_array_ptr_is_shortcut(ptr)) { shortcut = assoc_array_ptr_to_shortcut(ptr); - smp_read_barrier_depends(); ptr = READ_ONCE(shortcut->next_node); BUG_ON(!assoc_array_ptr_is_node(ptr)); } @@ -743,7 +739,6 @@ static bool search_nested_keyrings(struct key *keyring, begin_node: kdebug("begin_node"); - smp_read_barrier_depends(); slot = 0; ascend_to_node: /* Go through the slots in a node */ @@ -791,14 +786,12 @@ static bool search_nested_keyrings(struct key *keyring, if (ptr && assoc_array_ptr_is_shortcut(ptr)) { shortcut = assoc_array_ptr_to_shortcut(ptr); - smp_read_barrier_depends(); ptr = READ_ONCE(shortcut->back_pointer); slot = shortcut->parent_slot; } if (!ptr) goto not_this_keyring; node = assoc_array_ptr_to_node(ptr); - smp_read_barrier_depends(); slot++; /* If we've ascended to the root (zero backpointer), we must have just -- 2.5.2 From mboxrd@z Thu Jan 1 00:00:00 1970 From: paulmck@linux.vnet.ibm.com (Paul E. McKenney) Date: Mon, 9 Oct 2017 17:22:49 -0700 Subject: [PATCH RFC tip/core/rcu 15/15] keyring: Remove now-redundant smp_read_barrier_depends() In-Reply-To: <20171010001951.GA6476@linux.vnet.ibm.com> References: <20171010001951.GA6476@linux.vnet.ibm.com> Message-ID: <1507594969-8347-15-git-send-email-paulmck@linux.vnet.ibm.com> To: linux-security-module@vger.kernel.org List-Id: linux-security-module.vger.kernel.org Now that the associative-array library properly heads dependency chains, the various smp_read_barrier_depends() calls in security/keys/keyring.c are no longer needed. This commit therefore removes them. Signed-off-by: Paul E. McKenney Cc: David Howells Cc: James Morris Cc: "Serge E. Hallyn" Cc: Cc: --- security/keys/keyring.c | 7 ------- 1 file changed, 7 deletions(-) diff --git a/security/keys/keyring.c b/security/keys/keyring.c index 4fa82a8a9c0e..fb44c9169125 100644 --- a/security/keys/keyring.c +++ b/security/keys/keyring.c @@ -712,7 +712,6 @@ static bool search_nested_keyrings(struct key *keyring, * doesn't contain any keyring pointers. */ shortcut = assoc_array_ptr_to_shortcut(ptr); - smp_read_barrier_depends(); if ((shortcut->index_key[0] & ASSOC_ARRAY_FAN_MASK) != 0) goto not_this_keyring; @@ -722,8 +721,6 @@ static bool search_nested_keyrings(struct key *keyring, } node = assoc_array_ptr_to_node(ptr); - smp_read_barrier_depends(); - ptr = node->slots[0]; if (!assoc_array_ptr_is_meta(ptr)) goto begin_node; @@ -735,7 +732,6 @@ static bool search_nested_keyrings(struct key *keyring, kdebug("descend"); if (assoc_array_ptr_is_shortcut(ptr)) { shortcut = assoc_array_ptr_to_shortcut(ptr); - smp_read_barrier_depends(); ptr = READ_ONCE(shortcut->next_node); BUG_ON(!assoc_array_ptr_is_node(ptr)); } @@ -743,7 +739,6 @@ static bool search_nested_keyrings(struct key *keyring, begin_node: kdebug("begin_node"); - smp_read_barrier_depends(); slot = 0; ascend_to_node: /* Go through the slots in a node */ @@ -791,14 +786,12 @@ static bool search_nested_keyrings(struct key *keyring, if (ptr && assoc_array_ptr_is_shortcut(ptr)) { shortcut = assoc_array_ptr_to_shortcut(ptr); - smp_read_barrier_depends(); ptr = READ_ONCE(shortcut->back_pointer); slot = shortcut->parent_slot; } if (!ptr) goto not_this_keyring; node = assoc_array_ptr_to_node(ptr); - smp_read_barrier_depends(); slot++; /* If we've ascended to the root (zero backpointer), we must have just -- 2.5.2 -- To unsubscribe from this list: send the line "unsubscribe linux-security-module" in the body of a message to majordomo at vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html