Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp3093282imm; Sun, 17 Jun 2018 10:51:20 -0700 (PDT) X-Google-Smtp-Source: ADUXVKLQca134Wb7c4otElVjMd2TyyA2E3ZXqwkoCkmPcBLay8/YytES4AUUyIymXoU7It9deK1w X-Received: by 2002:a63:b609:: with SMTP id j9-v6mr8565790pgf.335.1529257880494; Sun, 17 Jun 2018 10:51:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1529257880; cv=none; d=google.com; s=arc-20160816; b=vZCDXc8YzDSXlHBLeOhbpk4SZ+x4M58vrSc7auVR275RzT18UFyZku6jSRrtMbRzL0 V/M0fWGr+dICp8DCyUEGmChiVNcdskB+GH9YQWDsN2f3jbs8BDBd1NbfxqnkYpOo8Q1X x7WtBM8U5S1skeCf1fWI74VUZMnt328BfNHb/rYF7v4U87pfpT4W2n2H8BjLYEc8hZ4B x6TqtNgbB2opDUClG+ahjr2pAhKM/apkhsQkrkypo8wVCMUKIlU9wAx93VjkTIjDl0Yb 5ilSIMU0YJ2E6Iz1uADa1qCjR64sqUDDFLVMETslsgRlpPf2aizOlyRXQEZe0YEsy7vY tLMw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :arc-authentication-results; bh=ZRPW0j7eYlNHkO+1KvWJIKyhGIGkZcpi/U+p/Zbuqjo=; b=hWR6M9epHLeLtGS02hNR4BWtHjgV0Y5O1PFpJIDtWTJeREXFPxrmmnqGd+EM+1FAoi F8JtXkgKFTkn3Xg57FbnNPWsgQ56jO0qZyP+Na3a0U2zThW9RpE+PRSk21WCEP7XJUBC GTTNZLIccUcIvyunpdW9QY+syR/Z7V/QK0TtpwYlNHZe57l5Zj6BVQDtjJ/HpBZQzFAc Xmv9OoHRxZVrU3yW3pgi2BIBkH3tdT10ujq4lV212nGxquv5zoV67xBG0kmx3Zi94aGb jTqlN2C/TvSiXNR6EHhISZ/SXB3zKBPuJNIEaOWdXMUknzv7CZtU7vBJGkRZAPE2HSrQ hBaQ== 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 b10-v6si12710518pls.501.2018.06.17.10.50.52; Sun, 17 Jun 2018 10:51:20 -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 S1754317AbeFQRuP (ORCPT + 99 others); Sun, 17 Jun 2018 13:50:15 -0400 Received: from mail-lf0-f68.google.com ([209.85.215.68]:38946 "EHLO mail-lf0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752077AbeFQRuN (ORCPT ); Sun, 17 Jun 2018 13:50:13 -0400 Received: by mail-lf0-f68.google.com with SMTP id t2-v6so14904982lfd.6; Sun, 17 Jun 2018 10:50:13 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=ZRPW0j7eYlNHkO+1KvWJIKyhGIGkZcpi/U+p/Zbuqjo=; b=frQfeJ20lPWv7GxONsYaNPevMyGZ+o3Eq4iFOWmzsJ13egojRgLB0XOPS7l6JYhDJT gGJe68kfS5ZghZFwe1cQCYtUM8RIRR2WaSnCm5zRh4Myy8tFhe4bDpVKg8nEoaTQjofr ilmT09TxW4xL4vNiqsRiBW5jJXhqM64lFXwbr4s70fV0rMrNL2LhsQ4eiafxYd6yOtdC fO+LBGhnuct/GovSMAtBvAME1U9150awbyiJc20MU6vmYjFT5waRO0vFClrwrDlwzXBX Y/91OV2ny2UXzE2c0zAa0+JBp3xZi72vqwQJGHcIgRnE9dzFN3z27JCpwRvMwGiigDlb XI3A== X-Gm-Message-State: APt69E0a9InvCjXZirE3GBcmKoc80JfYd/cnGCQgijB6e5Q4+gkqdu5I 9awsbVe4n7EIXfbDX4Loszc= X-Received: by 2002:a19:188a:: with SMTP id 10-v6mr5843315lfy.26.1529257812389; Sun, 17 Jun 2018 10:50:12 -0700 (PDT) Received: from green.intra.ispras.ru (bran.ispras.ru. [83.149.199.196]) by smtp.googlemail.com with ESMTPSA id p28-v6sm2431487lfh.24.2018.06.17.10.50.11 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sun, 17 Jun 2018 10:50:11 -0700 (PDT) From: efremov@linux.com To: Herbert Xu Cc: "David S. Miller" , linux-crypto@vger.kernel.org, linux-kernel@vger.kernel.org, ldv-project@linuxtesting.org, Denis Efremov Subject: [PATCH] crypto: skcipher: remove static declaration of export function Date: Sun, 17 Jun 2018 20:49:59 +0300 Message-Id: <20180617174959.29864-1-efremov@linux.com> X-Mailer: git-send-email 2.17.1 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The function skcipher_walk_next declared as static and marked as EXPORT_SYMBOL. It's a bit confusing since export symbol means that we want others to use this function. The area of visibility for such function is its .c file and all other modules. Other *.c files of the same module can't use it, despite all other modules can. Relying on that such behavior was not the original intention, the patch just removes the static keyword. Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Denis Efremov --- crypto/skcipher.c | 4 +--- include/crypto/internal/skcipher.h | 1 + 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/crypto/skcipher.c b/crypto/skcipher.c index 0fe2a2923ad0..d28d2f2be562 100644 --- a/crypto/skcipher.c +++ b/crypto/skcipher.c @@ -44,8 +44,6 @@ struct skcipher_walk_buffer { u8 buffer[]; }; -static int skcipher_walk_next(struct skcipher_walk *walk); - static inline void skcipher_unmap(struct scatter_walk *walk, void *vaddr) { if (PageHighMem(scatterwalk_page(walk))) @@ -335,7 +333,7 @@ static int skcipher_next_fast(struct skcipher_walk *walk) return 0; } -static int skcipher_walk_next(struct skcipher_walk *walk) +int skcipher_walk_next(struct skcipher_walk *walk) { unsigned int bsize; unsigned int n; diff --git a/include/crypto/internal/skcipher.h b/include/crypto/internal/skcipher.h index e42f7063f245..8602684d912b 100644 --- a/include/crypto/internal/skcipher.h +++ b/include/crypto/internal/skcipher.h @@ -154,6 +154,7 @@ int skcipher_walk_aead_encrypt(struct skcipher_walk *walk, int skcipher_walk_aead_decrypt(struct skcipher_walk *walk, struct aead_request *req, bool atomic); void skcipher_walk_complete(struct skcipher_walk *walk, int err); +int skcipher_walk_next(struct skcipher_walk *walk); static inline void ablkcipher_request_complete(struct ablkcipher_request *req, int err) -- 2.17.1