lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:   Tue, 14 May 2019 18:33:48 +0200
From:   David Sterba <dsterba@...e.cz>
To:     linux-crypto@...r.kernel.org
Cc:     linux-kernel@...r.kernel.org
Subject: Can crypto API provide information about hw acceleration?

Hi,

Q: is there a way to query the crypto layer whether a given algorithm
(digest, crypto) is accelerated by the driver?

This information can be used to decide if eg. a checksum should can be
calculated right away or offloaded to a thread. This is done in btrfs,
(fs/btrfs/disk-io.c:check_async_write).

At this moment it contains a static check for a cpu feature, and only
for x86. I briefly searched the arch/ directory for implementations of
crc32c that possibly use hw aid and there are several of them. Adding a
static check a-la x86 for the other architectures (arm, ppc, mips,
sparc, s390) is wrong, so I'm looking for a clean solution.

The struct shash_alg definition of the algorithms does not say anything
about the acceleration. The closest thing is the cra_priority, but I
don't know if this is reliable information. The default implementations
seem to have 100, and acceleated 200 or 300.

This would be probably sufficient, but I'd like a confirmation from
crypto people.

Thanks.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ