From patchwork Fri Apr 6 18:58:25 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Randy Dunlap X-Patchwork-Id: 10327499 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 2B84660541 for ; Fri, 6 Apr 2018 18:58:45 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1BB692962F for ; Fri, 6 Apr 2018 18:58:45 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1055D29632; Fri, 6 Apr 2018 18:58:45 +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=-7.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI, T_DKIM_INVALID 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 B1D882962F for ; Fri, 6 Apr 2018 18:58:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751846AbeDFS62 (ORCPT ); Fri, 6 Apr 2018 14:58:28 -0400 Received: from bombadil.infradead.org ([198.137.202.133]:45624 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751276AbeDFS61 (ORCPT ); Fri, 6 Apr 2018 14:58:27 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=Content-Transfer-Encoding: Content-Type:MIME-Version:Date:Message-ID:Subject:From:Cc:To:Sender:Reply-To: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=Rc9e3KI0lZiMo9NG9S0vyIM5q4RCYbpkDAXnr+awbAQ=; b=NsDfvZqhODLGwN3i8rxRJZ14U 4vtKIH3YLTg4E5ObUvSJEuvIlmrZSgvu+CwgyUt978DraDTE6RnLJD4ouWAJv3RwE6V2JvmUZaRda 0zT/ZZez19OYyS+Inuxot8O0bNuwUcHN8BEG/fiqtI9YkM7avQdvutRlvLoHgxNNDvk3N3KuEGonG uzYarufVpLvh5mFF6VmWkhPPUIlkogJcsX9ULCyVyt6YV+HHT/+3hgPNBNNfs0+0MkZAMn7DzEZaI 6A38siSirw3y/gVqL/5KpQdJXXaXV+HjqIP7oPs2JkTdC/S+N+NJZcEJg/FPbgLbtkrsFjlsgvyHg +ksglwbsw==; Received: from static-50-53-52-16.bvtn.or.frontiernet.net ([50.53.52.16] helo=midway.dunlab) by bombadil.infradead.org with esmtpsa (Exim 4.90_1 #2 (Red Hat Linux)) id 1f4WZ8-000386-68; Fri, 06 Apr 2018 18:58:26 +0000 To: David Howells Cc: LKML , James Morris , "Serge E. Hallyn" , keyrings@vger.kernel.org, linux-security-module From: Randy Dunlap Subject: [PATCH] uapi/linux/keyctl.h: don't use C++ reserved keyword as a struct member name Message-ID: <1735b3a4-2792-0ce4-3bf4-94fee5b50ff6@infradead.org> Date: Fri, 6 Apr 2018 11:58:25 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 Content-Language: en-US Sender: owner-linux-security-module@vger.kernel.org Precedence: bulk List-ID: X-Virus-Scanned: ClamAV using ClamSMTP From: Randy Dunlap 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 Signed-off-by: Randy Dunlap Cc: David Howells Cc: James Morris Cc: "Serge E. Hallyn" Cc: keyrings@vger.kernel.org Cc: linux-security-module@vger.kernel.org --- include/uapi/linux/keyctl.h | 2 +- security/keys/dh.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) -- To unsubscribe from this list: send the line "unsubscribe linux-security-module" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html --- lnx-416.orig/include/uapi/linux/keyctl.h +++ lnx-416/include/uapi/linux/keyctl.h @@ -65,7 +65,7 @@ /* keyctl structures */ struct keyctl_dh_params { - __s32 private; + __s32 dh_private; __s32 prime; __s32 base; }; --- lnx-416.orig/security/keys/dh.c +++ lnx-416/security/keys/dh.c @@ -307,7 +307,7 @@ long __keyctl_dh_compute(struct keyctl_d } dh_inputs.g_size = dlen; - dlen = dh_data_from_key(pcopy.private, &dh_inputs.key); + dlen = dh_data_from_key(pcopy.dh_private, &dh_inputs.key); if (dlen < 0) { ret = dlen; goto out2;