Received: by 2002:a5d:925a:0:0:0:0:0 with SMTP id e26csp602396iol; Thu, 9 Jun 2022 09:53:26 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyvi11UTxcqefPeL0CNZKHW7+luuhslOov8C3uCWcmPnzY5j1uSU5f0ZZmgEgJUaY4YoxVO X-Received: by 2002:a17:902:e951:b0:168:b530:135b with SMTP id b17-20020a170902e95100b00168b530135bmr578050pll.93.1654793605789; Thu, 09 Jun 2022 09:53:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654793605; cv=none; d=google.com; s=arc-20160816; b=0lmiIP6wXMVmNJjizfMDquo0+Z/hKb9hfXANr/yf6Aj5NEen6ddebtFLRUu/jOAl0M LhpjRAA3oe1RAipe4wtf7dTKASmxc+mnsi9imHRvBNtHX7AI/pSVs3oIWDhoVSFDWumv HyMtuNW42v1GGPhR/5GOl/rCM1VWiKWi7nmU6vt/VWqJNKw7yZl0YNIbT/9RgBf724YH kUIf2se24ljbpiVpdE1L99Pflpt2lHuKR4SbEb7rWnsf902eOWKxe8x0b83z6pY4nw57 Ueh/p0y/BeMzrmnI+kMtxYMDmA84EK3dzTrYA45eGuEH+vLsNoWvjc5Vz+nMH6XTaeho YJPQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id; bh=2pjoQ28NVoUoLLweOE94+SVm8QoiTsHXGW5iREPR3Wg=; b=N3EGkK8RHnn3CLlZbF3FwgnSk/q6oP9XDmXnQ8KVIDye9tMv0t9lT4hqSI/RRM+pOL ZhEqHfg4HJpC2yyTrlyb/AVm/m8qOi1XTbo2oy2B34Eh8/mafJhbbfIY8xprUMH99+yz vdj5CzF88gZuPvbeGjP3qlZSfp3zMAo5D7mbKlEKfED67HLk8kzpgBuN1Mr0ROa/pd3e XLAwLUpQBspTIiLRvko6APNX6rcVtn8p4sT4bTbPjmCiAUj8btqz3oz27Km0g1v+YvEU f9WLf9HT1E/0FKXyy+8rAMK3+QrM+IiztCUh/DDDLfUqT+mCc9EHcUar6ed9wDBNAi0j eo8g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id d127-20020a636885000000b003fd8a0059a5si12160056pgc.316.2022.06.09.09.53.00; Thu, 09 Jun 2022 09:53:25 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240426AbiFIQuZ (ORCPT + 99 others); Thu, 9 Jun 2022 12:50:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47268 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242094AbiFIQuY (ORCPT ); Thu, 9 Jun 2022 12:50:24 -0400 Received: from smtp.smtpout.orange.fr (smtp10.smtpout.orange.fr [80.12.242.132]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EAAE04F9D6 for ; Thu, 9 Jun 2022 09:50:20 -0700 (PDT) Received: from [192.168.1.18] ([90.11.190.129]) by smtp.orange.fr with ESMTPA id zLMKnvUPC2ovCzLMKnxhmD; Thu, 09 Jun 2022 18:50:18 +0200 X-ME-Helo: [192.168.1.18] X-ME-Auth: YWZlNiIxYWMyZDliZWIzOTcwYTEyYzlhMmU3ZiQ1M2U2MzfzZDfyZTMxZTBkMTYyNDBjNDJlZmQ3ZQ== X-ME-Date: Thu, 09 Jun 2022 18:50:18 +0200 X-ME-IP: 90.11.190.129 Message-ID: <5cf8ad88-629c-e75a-df99-e893b8af967f@wanadoo.fr> Date: Thu, 9 Jun 2022 18:50:12 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.9.1 Subject: Re: [PATCH] crypto: x86/camellia - Replace kernel.h with the necessary inclusions Content-Language: en-CA To: Herbert Xu Cc: "David S. Miller" , Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , x86@kernel.org, "H. Peter Anvin" , linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org, linux-crypto@vger.kernel.org References: <65634fb748cc0ce2cc5bafaf904cb5f76bd4edc4.1654414362.git.christophe.jaillet@wanadoo.fr> From: Christophe JAILLET In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-3.1 required=5.0 tests=BAYES_00,NICE_REPLY_A, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org Le 09/06/2022 à 12:15, Herbert Xu a écrit : > On Sun, Jun 05, 2022 at 09:32:53AM +0200, Christophe JAILLET wrote: >> When kernel.h is used in the headers it adds a lot into dependency hell, >> especially when there are circular dependencies are involved. >> >> Replace kernel.h inclusion with the list of what is really being used. >> >> Signed-off-by: Christophe JAILLET >> --- >> arch/x86/crypto/camellia.h | 2 +- >> 1 file changed, 1 insertion(+), 1 deletion(-) >> >> diff --git a/arch/x86/crypto/camellia.h b/arch/x86/crypto/camellia.h >> index 1dcea79e8f8e..547fb7e30928 100644 >> --- a/arch/x86/crypto/camellia.h >> +++ b/arch/x86/crypto/camellia.h >> @@ -4,7 +4,7 @@ >> >> #include >> #include >> -#include >> +#include >> >> #define CAMELLIA_MIN_KEY_SIZE 16 >> #define CAMELLIA_MAX_KEY_SIZE 32 > > This is not sufficient. For example, asmlinkage isn't explicitly > defined by any of these header files so it would be relying on an > implicit inclusion which is prone to breakage. Agreed, I missed that. > > Did you audit the entire file? Yes, but I missed the asmlinkage. In fact, I've sent a few "obvious" (but nothing is never obvious at the end...) patches like that to see the interest. I've spotted a few .h file with "easy to check" content. Mostly #define, function declarations, a few u datatypes. Then, I made the #include simplification and compile tested the change. If it worked, I consider that the patch looks fine. In this particular case, I guess that the 'asmlinkage' should come from another #include when "camellia.h" is used. My goal was not to introduce some new hidden constraints related to the order of the included .h. I just wanted to make them explicit (and complete) and start to simplify things. As said, nothing is never obvious, and I'll stay away from this kind of changes :) Thanks a lot for the review. CJ > > Cheers,