Received: by 2002:a05:6358:e9c4:b0:b2:91dc:71ab with SMTP id hc4csp2932628rwb; Sat, 6 Aug 2022 08:58:00 -0700 (PDT) X-Google-Smtp-Source: AA6agR7A+IKsWg70E9O4FJ0Xg1GC8UiyYY/oVi5l79+dq1FzVeJ+BrRChKK37fNuTqio6/xVOpiz X-Received: by 2002:a05:6402:40d0:b0:43f:8f56:6b0e with SMTP id z16-20020a05640240d000b0043f8f566b0emr7724065edb.380.1659801480024; Sat, 06 Aug 2022 08:58:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1659801480; cv=none; d=google.com; s=arc-20160816; b=KAqDMP9oHTRmAuzHtRNVdYZf/pYw0ExkMRhE5TtNT17xjKlFXrnrdUNUsIp7s8r/FH +ygENJKZ7b20E/Sx/MlNAg07Vi7jtNV2ays1TSjEuD+uchlcHJuqbJBu+2pgwshnpNek dD1jYpH7WDxz9dKeUe7WYQwAMKp2up6+aCUxGhon/DltYDkwtnLNHR7p+0DJrEUekwXR 9o4kz2FGoAArLk9uRXG+klglKAs+uZLCWKHEqO/SooDOaKQ2tt0W1ZD0Eashaoa5vjX4 4uQZ/UaHndb0Es40/AR58VnfJVEM/WxRce5xX1ZO12NbqwohfTJCsA4m7KjMNkZ22OMU 4Tdw== 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:cc :references:to:content-language:subject:user-agent:mime-version:date :message-id; bh=TwxSZndOCWhMQQ+vHH3OZZy47+nTo/auLvYMlG92vRM=; b=iwH0WZ2CVOq4rWCTkIRIYlLJ5AJ8sI3z84i4vMLsC18w7uVHhhHI27tRSfCzSw1oZ2 rvJ0HggbagNSuOHhBQibrmHCg9YiD6riRJZXloaOxmPJOeeqO7OHJ1dMt9MYGxEihiqy W4sYAkdqRYb4Y0Nu57V1j4mXMh/iS6Lpaac3n0jtGaEWCn5ppvjIGgbPZoZBSePXKIJI 43bPvZHbAk+uir854OOUm4/s0of7hTsbmymcoiAk4QyQg4fM5TcOtid8tsNG6Ip0x4pZ 9TrT45OJMGzXQAfasw8AxtnsHZ9hCbQjUzsjrFyGAeOrw5g5SRcICmVTwf3emnuDOYc6 w2dg== 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 d12-20020a50c88c000000b0043d85ca3de4si2059378edh.435.2022.08.06.08.57.19; Sat, 06 Aug 2022 08:58:00 -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 S231352AbiHFPpb (ORCPT + 99 others); Sat, 6 Aug 2022 11:45:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56948 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231283AbiHFPpa (ORCPT ); Sat, 6 Aug 2022 11:45:30 -0400 Received: from pegase2.c-s.fr (pegase2.c-s.fr [93.17.235.10]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0C972CE18 for ; Sat, 6 Aug 2022 08:45:27 -0700 (PDT) Received: from localhost (mailhub3.si.c-s.fr [172.26.127.67]) by localhost (Postfix) with ESMTP id 4M0Rck0MFHz9sl1; Sat, 6 Aug 2022 17:45:26 +0200 (CEST) X-Virus-Scanned: amavisd-new at c-s.fr Received: from pegase2.c-s.fr ([172.26.127.65]) by localhost (pegase2.c-s.fr [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 2Kq1ANbQhRFG; Sat, 6 Aug 2022 17:45:25 +0200 (CEST) Received: from messagerie.si.c-s.fr (messagerie.si.c-s.fr [192.168.25.192]) by pegase2.c-s.fr (Postfix) with ESMTP id 4M0Rcj6VGMz9skJ; Sat, 6 Aug 2022 17:45:25 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by messagerie.si.c-s.fr (Postfix) with ESMTP id C98A88B76C; Sat, 6 Aug 2022 17:45:25 +0200 (CEST) X-Virus-Scanned: amavisd-new at c-s.fr Received: from messagerie.si.c-s.fr ([127.0.0.1]) by localhost (messagerie.si.c-s.fr [127.0.0.1]) (amavisd-new, port 10023) with ESMTP id Ui3-ODUsv8Bd; Sat, 6 Aug 2022 17:45:25 +0200 (CEST) Received: from [192.168.234.210] (unknown [192.168.234.210]) by messagerie.si.c-s.fr (Postfix) with ESMTP id 7E0F28B765; Sat, 6 Aug 2022 17:45:25 +0200 (CEST) Message-ID: Date: Sat, 6 Aug 2022 17:45:25 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.11.0 Subject: talitos b0030000.crypto: length exceeds h/w max limit Content-Language: fr-FR To: =?UTF-8?Q?Stephan_M=c3=bcller?= , Herbert Xu , "David S. Miller" References: <4d9e644d-3d2d-518a-3d05-2539c69d88c1@c-s.fr> <1955828.3d07pK88Qj@tauon.chronox.de> <326109a3-bb5c-eac4-1340-70c179a3ad2a@c-s.fr> <10231361.cnp4CI42qt@positron.chronox.de> Cc: Linux Crypto Mailing List From: Christophe Leroy In-Reply-To: <10231361.cnp4CI42qt@positron.chronox.de> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,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 Hi, Le 31/07/2019 à 09:11, Stephan Müller a écrit : >>>>> If I remember correctly, the implementation with vmsplice was slower by >>>>> a >>>>> factor of 10 compared to sendmsg on the ISO image on an x86 system. >>>> >>>> At the time being I have an issue with this fix, because the talitos >>>> driver only accepts 32k bytes at a time. With vmsplice, data is handed >>>> over to the driver by blocks of PAGE_SIZE (16k in my case). With >>>> sendmsg(), data is handed over to the driver with a single block. >>> >>> Ok. But wouldn't your driver need to process the data in the chunk size >>> your hardware requires? >> >> Sure it needs to process the data in the chunk size the HW requires, but >> do you know if there is a way to tell the core than the driver doesn't >> accepts chunks of more than 32kbytes, or shall the driver be able to >> handle data of any size ? > > Coming back to this: Were you able to find a fix? As far as I know the problem still exists. We want to upgrade libkcapi on our target, but still facing the issue with libkcapi newer than 1.1.3 : When a file is bigger than 32 Kb, hashing operation (md5 or sha256) fails and the kernel prints the following message: [ 2369.772999] talitos b0030000.crypto: length exceeds h/w max limit Is there a way to tell crypto kernel core that a given driver has a fixed limit and that data shall be sent in chunks ? Or is it the responsibility of the driver to cut off the data in acceptable chunks ? I guess the Talitos driver is not the only driver with such a limit, so something centralised must exist to handle it ? Thanks Christophe