Back to home page

OSCL-LXR

 
 

    


0001 #!/bin/bash
0002 # SPDX-License-Identifier: GPL-2.0
0003 #
0004 # Copyright (C) 2022 Red Hat, Inc.
0005 # Author: Vladis Dronov <vdronoff@gmail.com>
0006 #
0007 # This script runs (via instmod) test-cipher.ko module which invokes
0008 # generic and s390-native ChaCha20 encryprion algorithms with different
0009 # size of data. Check 'dmesg' for results.
0010 #
0011 # The insmod error is expected:
0012 # insmod: ERROR: could not insert module test_cipher.ko: Operation not permitted
0013 
0014 lsmod | grep chacha | cut -f1 -d' ' | xargs rmmod
0015 modprobe chacha_generic
0016 modprobe chacha_s390
0017 
0018 # run encryption for different data size, including whole block(s) +/- 1
0019 insmod test_cipher.ko size=63
0020 insmod test_cipher.ko size=64
0021 insmod test_cipher.ko size=65
0022 insmod test_cipher.ko size=127
0023 insmod test_cipher.ko size=128
0024 insmod test_cipher.ko size=129
0025 insmod test_cipher.ko size=511
0026 insmod test_cipher.ko size=512
0027 insmod test_cipher.ko size=513
0028 insmod test_cipher.ko size=4096
0029 insmod test_cipher.ko size=65611
0030 insmod test_cipher.ko size=6291456
0031 insmod test_cipher.ko size=62914560
0032 
0033 # print test logs
0034 dmesg | tail -170