From patchwork Wed Apr 6 01:44:53 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Randy Dunlap X-Patchwork-Id: 12803375 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 871BAC433EF for ; Wed, 6 Apr 2022 13:04:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229991AbiDFNG0 (ORCPT ); Wed, 6 Apr 2022 09:06:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60020 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231740AbiDFNGM (ORCPT ); Wed, 6 Apr 2022 09:06:12 -0400 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BB064301299; Tue, 5 Apr 2022 18:44:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Content-Transfer-Encoding: MIME-Version:Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To:Content-Type: Content-ID:Content-Description:In-Reply-To:References; bh=CDt6O1qEIdlN6ztswL/r+3cOb6tC6ktRTDJ0omZJKrQ=; b=qPsGmF5ZPZE2DUAk22ClY4MeTT nF8oxwYaifG12VYjqBpWuT9bOZx9MFD8fNtiItf5hmuTT/9S+r4lzFaU0qUywZnG4BLASwdy2hwi9 85KS5nUxJ0jvXgxds2u5+uIAYbabEOLSnsN4AI2kJ8jqFFBDDdyzkrAOKPd1xfuhKotTBWJr8VDQD qNmURL5qlrbpOVpDmNi+PBeEPxFhtLtNDo7grok8bL8qT8OlH9LJHD1f2JG57k9Dy2kO0KmLuoJr0 8RSwHJlANh0Cos+mZzmuwrN/QJGsNEH+7a4dndpGYW/55xfPuJ8XiqoBRSLgrZ1ExvNtJUbxF7ss8 6gL6mwew==; Received: from [2601:1c0:6280:3f0::aa0b] (helo=bombadil.infradead.org) by bombadil.infradead.org with esmtpsa (Exim 4.94.2 #2 (Red Hat Linux)) id 1nbuj8-003G2g-5q; Wed, 06 Apr 2022 01:44:54 +0000 From: Randy Dunlap To: linux-kernel@vger.kernel.org Cc: Randy Dunlap , Jann Horn , David Howells , Jarkko Sakkinen , keyrings@vger.kernel.org, James Morris , "Serge E. Hallyn" , linux-security-module@vger.kernel.org Subject: [PATCH v2] keys: remove __user annotation from function prototype Date: Tue, 5 Apr 2022 18:44:53 -0700 Message-Id: <20220406014453.32091-1-rdunlap@infradead.org> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: keyrings@vger.kernel.org Remove a missed __user annotation from the prototype for keyring_read(). This cures a sparse warning when it complains about the difference in the prototype and the function definition. security/keys/keyring.c:481:13: sparse: long static [signed] [toplevel] keyring_read( ... ) security/keys/keyring.c:81:13: sparse: long static [addressable] [signed] [toplevel] keyring_read( ... ) Fixes: 796e46f9e2cb ("keys: Remove outdated __user annotations"). Signed-off-by: Randy Dunlap Cc: Jann Horn Cc: David Howells Cc: Jarkko Sakkinen Cc: keyrings@vger.kernel.org Cc: James Morris Cc: "Serge E. Hallyn" Cc: linux-security-module@vger.kernel.org Reviewed-by: Jarkko Sakkinen --- v2: rebase/resend; add more Cc:s security/keys/keyring.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/security/keys/keyring.c +++ b/security/keys/keyring.c @@ -79,7 +79,7 @@ static void keyring_revoke(struct key *k static void keyring_destroy(struct key *keyring); static void keyring_describe(const struct key *keyring, struct seq_file *m); static long keyring_read(const struct key *keyring, - char __user *buffer, size_t buflen); + char *buffer, size_t buflen); struct key_type key_type_keyring = { .name = "keyring",