From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Howells Date: Tue, 10 Apr 2018 08:47:00 +0000 Subject: Re: [PATCH] uapi/linux/keyctl.h: don't use C++ reserved keyword as a struct member name Message-Id: <19745.1523350020@warthog.procyon.org.uk> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit List-Id: References: <1735b3a4-2792-0ce4-3bf4-94fee5b50ff6@infradead.org> In-Reply-To: <1735b3a4-2792-0ce4-3bf4-94fee5b50ff6@infradead.org> To: linux-security-module@vger.kernel.org Randy Dunlap wrote: > Since this header is in "include/uapi/linux/", apparently people > want to use it in userspace programs -- even in C++ ones. > However, the header uses a C++ reserved keyword ("private"), > so change that to "dh_private" instead to allow the header file > to be used in C++ userspace. > > Fixes: https://bugzilla.kernel.org/show_bug.cgi?id1051 Ugh. Yeah. This is a UAPI breaker, but I think we have to do it, despite it being 2 years old. Maybe wrap that element in a #ifdef so it's still allowed in C? cc'ing Mat Martineau as he's the originator of the structure. David From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752426AbeDJIrE (ORCPT ); Tue, 10 Apr 2018 04:47:04 -0400 Received: from mx3-rdu2.redhat.com ([66.187.233.73]:48620 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751992AbeDJIrD (ORCPT ); Tue, 10 Apr 2018 04:47:03 -0400 Organization: Red Hat UK Ltd. Registered Address: Red Hat UK Ltd, Amberley Place, 107-111 Peascod Street, Windsor, Berkshire, SI4 1TE, United Kingdom. Registered in England and Wales under Company Registration No. 3798903 From: David Howells In-Reply-To: <1735b3a4-2792-0ce4-3bf4-94fee5b50ff6@infradead.org> References: <1735b3a4-2792-0ce4-3bf4-94fee5b50ff6@infradead.org> To: Randy Dunlap Cc: dhowells@redhat.com, LKML , James Morris , "Serge E. Hallyn" , keyrings@vger.kernel.org, linux-security-module , Mat Martineau Subject: Re: [PATCH] uapi/linux/keyctl.h: don't use C++ reserved keyword as a struct member name MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <19744.1523350020.1@warthog.procyon.org.uk> Date: Tue, 10 Apr 2018 09:47:00 +0100 Message-ID: <19745.1523350020@warthog.procyon.org.uk> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Randy Dunlap wrote: > Since this header is in "include/uapi/linux/", apparently people > want to use it in userspace programs -- even in C++ ones. > However, the header uses a C++ reserved keyword ("private"), > so change that to "dh_private" instead to allow the header file > to be used in C++ userspace. > > Fixes: https://bugzilla.kernel.org/show_bug.cgi?id=191051 Ugh. Yeah. This is a UAPI breaker, but I think we have to do it, despite it being 2 years old. Maybe wrap that element in a #ifdef so it's still allowed in C? cc'ing Mat Martineau as he's the originator of the structure. David From mboxrd@z Thu Jan 1 00:00:00 1970 From: dhowells@redhat.com (David Howells) Date: Tue, 10 Apr 2018 09:47:00 +0100 Subject: [PATCH] uapi/linux/keyctl.h: don't use C++ reserved keyword as a struct member name In-Reply-To: <1735b3a4-2792-0ce4-3bf4-94fee5b50ff6@infradead.org> References: <1735b3a4-2792-0ce4-3bf4-94fee5b50ff6@infradead.org> Message-ID: <19745.1523350020@warthog.procyon.org.uk> To: linux-security-module@vger.kernel.org List-Id: linux-security-module.vger.kernel.org Randy Dunlap wrote: > Since this header is in "include/uapi/linux/", apparently people > want to use it in userspace programs -- even in C++ ones. > However, the header uses a C++ reserved keyword ("private"), > so change that to "dh_private" instead to allow the header file > to be used in C++ userspace. > > Fixes: https://bugzilla.kernel.org/show_bug.cgi?id=191051 Ugh. Yeah. This is a UAPI breaker, but I think we have to do it, despite it being 2 years old. Maybe wrap that element in a #ifdef so it's still allowed in C? cc'ing Mat Martineau as he's the originator of the structure. David -- 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