Re: [PATCH v2] vio: make remove callback return void
On Wed, Feb 24, 2021 at 11:17 AM Uwe Kleine-König wrote: > > The driver core ignores the return value of struct bus_type::remove() > because there is only little that can be done. To simplify the quest to > make this function return void, let struct vio_driver::remove() return > void, too. All users already unconditionally return 0, this commit makes > it obvious that returning an error code is a bad idea and makes it > obvious for future driver authors that returning an error code isn't > intended. > > Note there are two nominally different implementations for a vio bus: > one in arch/sparc/kernel/vio.c and the other in > arch/powerpc/platforms/pseries/vio.c. I didn't care to check which > driver is using which of these busses (or if even some of them can be > used with both) and simply adapt all drivers and the two bus codes in > one go. Applied over current git kernel, boots on my sparc64 LDOM (sunvdc block driver which uses vio). Linux ttip 5.11.0-10201-gc03c21ba6f4e-dirty #189 SMP Wed Feb 24 13:48:37 MSK 2021 sparc64 GNU/Linux boot logs (and kernel config) on [1] for "5.11.0-10201-gc03c21ba6f4e-dirty". Up to you to add "tested-by". Thanks. 1. https://github.com/mator/sparc64-dmesg PS: going to check with ppc64 later as well on LPAR (uses vio).
Re: [RFT PATCH 0/3] crypto: sparc - convert to skcipher API
On Sat, Oct 12, 2019 at 7:47 AM Eric Biggers wrote: > > This series converts the glue code for the SPARC64 crypto opcodes > implementations of AES, Camellia, DES, and 3DES modes from the > deprecated "blkcipher" API to the "skcipher" API. This is needed in > order for the blkcipher API to be removed. > > I've compiled this patchset, and the conversion is very similar to that > which has been done for many other crypto drivers. But I don't have the > hardware to test it, nor are SPARC64 crypto opcodes supported by QEMU. > So I really need someone with the hardware to test it. You can do so by > setting: > > CONFIG_CRYPTO_AES_SPARC64=y > CONFIG_CRYPTO_CAMELLIA_SPARC64=y > CONFIG_CRYPTO_DES_SPARC64=y > # CONFIG_CRYPTO_MANAGER_DISABLE_TESTS is not set > CONFIG_DEBUG_KERNEL=y > CONFIG_CRYPTO_MANAGER_EXTRA_TESTS=y > CONFIG_CRYPTO_AES=y > CONFIG_CRYPTO_CAMELLIA=y > CONFIG_CRYPTO_DES=y > CONFIG_CRYPTO_CBC=y > CONFIG_CRYPTO_CTR=y > CONFIG_CRYPTO_ECB=y > > Then boot and check for crypto self-test failures by running > 'dmesg | grep alg'. > > If there are test failures, please also check whether they were already > failing prior to this patchset. Eric, just a quick report. Attached /proc/crypto files before and after patch applied. As i can see there's no selftests failure , kernel boots normally. Thanks. name : md5 driver : md5-sparc64 module : md5_sparc64 priority : 300 refcnt : 1 selftest : passed internal : no type : shash blocksize: 64 digestsize : 16 name : sha512 driver : sha512-sparc64 module : sha512_sparc64 priority : 300 refcnt : 1 selftest : passed internal : no type : shash blocksize: 128 digestsize : 64 name : sha384 driver : sha384-generic module : sha512_generic priority : 100 refcnt : 1 selftest : passed internal : no type : shash blocksize: 128 digestsize : 48 name : sha512 driver : sha512-generic module : sha512_generic priority : 100 refcnt : 1 selftest : passed internal : no type : shash blocksize: 128 digestsize : 64 name : sha384 driver : sha384-sparc64 module : sha512_sparc64 priority : 300 refcnt : 1 selftest : passed internal : no type : shash blocksize: 128 digestsize : 48 name : sha256 driver : sha256-sparc64 module : sha256_sparc64 priority : 300 refcnt : 1 selftest : passed internal : no type : shash blocksize: 64 digestsize : 32 name : sha224 driver : sha224-sparc64 module : sha256_sparc64 priority : 300 refcnt : 1 selftest : passed internal : no type : shash blocksize: 64 digestsize : 28 name : sha1 driver : sha1-sparc64 module : sha1_sparc64 priority : 300 refcnt : 1 selftest : passed internal : no type : shash blocksize: 64 digestsize : 20 name : crc32c driver : crc32c-sparc64 module : crc32c_sparc64 priority : 300 refcnt : 4 selftest : passed internal : no type : shash blocksize: 1 digestsize : 4 name : gcm(aes) driver : gcm_base(ctr(aes-generic),ghash-generic) module : kernel priority : 100 refcnt : 2 selftest : passed internal : no type : aead async: no blocksize: 1 ivsize : 12 maxauthsize : 16 geniv: name : gcm(aes) driver : gcm_base(ctr-aes-sparc64,ghash-generic) module : kernel priority : 200 refcnt : 1 selftest : passed internal : no type : aead async: no blocksize: 1 ivsize : 12 maxauthsize : 16 geniv: name : jitterentropy_rng driver : jitterentropy_rng module : kernel priority : 100 refcnt : 1 selftest : passed internal : no type : rng seedsize : 0 name : cbc(camellia) driver : cbc(camellia-generic) module : kernel priority : 100 refcnt : 1 selftest : passed internal : no type : skcipher async: no blocksize: 16 min keysize : 16 max keysize : 32 ivsize : 16 chunksize: 16 walksize : 16 name : cbc(camellia) driver : cbc-camellia-sparc64 module : kernel priority : 300 refcnt : 1 selftest : passed internal : no type : skcipher async: no blocksize: 16 min keysize : 16 max keysize : 32 ivsize : 16 chunksize: 16 walksize : 16 name : ecb(camellia) driver : ecb(camellia-generic) module : kernel priority : 100 refcnt : 1 selftest : passed internal : no type : skcipher async: no blocksize: 16 min keysize : 16 max keysize : 32 ivsize : 0 chunksize: 16 walksize : 16 name : ecb(camellia)
Re: [sparc64] crc32c misbehave
A bit more on testing machines: kernel on T5 ldom ttip is git kernel: Linux ttip 4.12.0-rc3-00011-gf511c0b17b08 #327 SMP Wed May 31 12:54:02 MSK 2017 sparc64 GNU/Linux kernel on v215 is debian sid kernel: Linux v215 4.9.0-3-sparc64-smp #1 SMP Debian 4.9.25-1 (2017-05-02) sparc64 GNU/Linux mator@ttip:~$ gcc -v Using built-in specs. COLLECT_GCC=gcc COLLECT_LTO_WRAPPER=/usr/lib/gcc/sparc64-linux-gnu/6/lto-wrapper Target: sparc64-linux-gnu Configured with: ../src/configure -v --with-pkgversion='Debian 6.3.0-18' --with-bugurl=file:///usr/share/doc/gcc-6/README.Bugs --enable-languages=c,ada,c++,java,go,d,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-6 --program-prefix=sparc64-linux-gnu- --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-libquadmath --enable-plugin --enable-default-pie --with-system-zlib --disable-browser-plugin --enable-java-awt=gtk --enable-gtk-cairo --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-6-sparc64/jre --enable-java-home --with-jvm-root-dir=/usr/lib/jvm/java-1.5.0-gcj-6-sparc64 --with-jvm-jar-dir=/usr/lib/jvm-exports/java-1.5.0-gcj-6-sparc64 --with-arch-directory=sparc64 --with-ecj-jar=/usr/share/java/eclipse-ecj.jar --enable-objc-gc=auto --enable-multiarch --enable-targets=all --with-cpu-32=ultrasparc --with-long-double-128 --enable-multilib --enable-checking=release --build=sparc64-linux-gnu --host=sparc64-linux-gnu --target=sparc64-linux-gnu Thread model: posix gcc version 6.3.0 20170516 (Debian 6.3.0-18)
Re: [sparc64] crc32c misbehave
Hello! While debugging occasional crc32c checksum errors with xfs disk reads on sparc64 (T5 [sun4v] 3.6 GHz CPU ldom, debian unstable/sid), Eric have found that crc32c sometimes returns wrong checksum for data. Eric made a simple test kernel module (included), which produce the following results on my sparc64 machines: # cat test3.c #include #include #include #include #define CRC_SEED (~(u32)0) static int __init mymodule_init (void) { char data[512]; u32 oldcrc = 0xd00dface, crc = 0xdeadbeef; int i; u64 nsec; memset(data, 0, 512); nsec = ktime_get_ns(); for (i = 0; i < 100; i++) { crc = crc32c(CRC_SEED, data, 512); if (i > 0 && crc != oldcrc) printk("i: %d: oldcrc: 0x%x, crc: 0x%x\n", i, oldcrc, crc); oldcrc = crc; } nsec = ktime_get_ns() - nsec; printk("Loop done in %lld nsec\n", nsec); return 0; } static void __exit mymodule_exit (void) { printk ("Module uninitialized successfully \n"); } module_init(mymodule_init); module_exit(mymodule_exit); MODULE_LICENSE("GPL"); root@ttip# modprobe libcrc32c root@ttip# for i in `seq 1 100`; do echo -n "$i "; insmod ./test3.ko; sleep 1; rmmod test3; done # journalctl -k -f CONFIG_CRYPTO_CRC32C = M CONFIG_CRYPTO_CRC32C_SPARC64 = M # lsmod| grep crc crc32test 1557 0 libcrc32c 1382 3 nf_conntrack,xfs,nf_nat crc32c_generic 2528 0 crc16 1745 1 ext4 crc32c_sparc64 3493 3 May 31 12:35:13 ttip kernel: Module uninitialized successfully May 31 12:35:13 ttip kernel: Loop done in 139269659 nsec May 31 12:35:14 ttip kernel: Module uninitialized successfully May 31 12:35:15 ttip kernel: Loop done in 139650571 nsec May 31 12:35:16 ttip kernel: Module uninitialized successfully May 31 12:35:16 ttip kernel: Loop done in 139559959 nsec May 31 12:35:17 ttip kernel: Module uninitialized successfully May 31 12:35:17 ttip kernel: Loop done in 139212192 nsec May 31 12:35:18 ttip kernel: Module uninitialized successfully May 31 12:35:18 ttip kernel: Loop done in 139619805 nsec May 31 12:35:19 ttip kernel: Module uninitialized successfully May 31 12:35:20 ttip kernel: Loop done in 139558722 nsec May 31 12:35:21 ttip kernel: Module uninitialized successfully May 31 12:35:21 ttip kernel: i: 34706: oldcrc: 0xcf03123f, crc: 0x0 May 31 12:35:21 ttip kernel: i: 34707: oldcrc: 0x0, crc: 0xcf03123f May 31 12:35:36 ttip kernel: Module uninitialized successfully May 31 12:35:37 ttip kernel: i: 695650: oldcrc: 0xcf03123f, crc: 0x0 May 31 12:35:37 ttip kernel: i: 695651: oldcrc: 0x0, crc: 0xcf03123f May 31 12:36:24 ttip kernel: Module uninitialized successfully May 31 12:36:24 ttip kernel: i: 664460: oldcrc: 0xcf03123f, crc: 0x0 May 31 12:36:24 ttip kernel: i: 664461: oldcrc: 0x0, crc: 0xcf03123f another run with kernel CONFIG_CRYPTO_CRC32C = M CONFIG_CRYPTO_CRC32C_SPARC64 is not set # lsmod | grep crc libcrc32c 1382 3 nf_conntrack,xfs,nf_nat crc32c_generic 2528 3 crc16 1745 1 ext4 May 31 12:57:26 ttip kernel: test3: loading out-of-tree module taints kernel. May 31 12:57:26 ttip kernel: Loop done in 439555353 nsec May 31 12:57:27 ttip kernel: Module uninitialized successfully May 31 12:57:28 ttip kernel: Loop done in 44064 nsec May 31 12:57:29 ttip kernel: Module uninitialized successfully May 31 12:57:29 ttip kernel: Loop done in 439476126 nsec May 31 12:57:30 ttip kernel: Module uninitialized successfully May 31 12:57:31 ttip kernel: Loop done in 440995512 nsec May 31 12:57:32 ttip kernel: Module uninitialized successfully May 31 12:57:33 ttip kernel: Loop done in 439825440 nsec May 31 12:57:34 ttip kernel: Module uninitialized successfully May 31 12:57:34 ttip kernel: i: 293384: oldcrc: 0xcf03123f, crc: 0x0 May 31 12:57:34 ttip kernel: i: 293385: oldcrc: 0x0, crc: 0xcf03123f May 31 12:57:34 ttip kernel: Loop done in 439500110 nsec May 31 12:57:35 ttip kernel: Module uninitialized successfully May 31 13:02:26 ttip kernel: i: 293577: oldcrc: 0xcf03123f, crc: 0x0 May 31 13:02:26 ttip kernel: i: 293578: oldcrc: 0x0, crc: 0xcf03123f May 31 13:02:26 ttip kernel: i: 515055: oldcrc: 0xcf03123f, crc: 0x0 May 31 13:02:26 ttip kernel: i: 515056: oldcrc: 0x0, crc: 0xcf03123f May 31 13:03:15 ttip kernel: Module uninitialized successfully May 31 13:03:15 ttip kernel: i: 259986: oldcrc: 0xcf03123f, crc: 0x0 May 31 13:03:15 ttip kernel: i: 259987: oldcrc: 0x0, crc: 0xcf03123f May 31 13:03:16 ttip kernel: Loop done in 449601790 nsec cycle loading (for i in `seq 1 100`) crc32test module (CONFIG_CRC32_SELFTEST) shows all tests as passed (no errors). running on older (1.5 GHz cpu) sparc64 (sun4u) v215 machine hit wrong crc error immidiatelly: # lsmod | grep crc crc16 1591 1 ext4 libcrc32c 1234 1 raid456 crc32c_generic 2270 1 root@v215# journalctl -k -b May 31 14:32:13 v215 kernel: systemd: 28 output lines suppressed due to ratelimiting May 31 14:36:34 v215 kernel: test3: loading out-of-tree module taints kernel. May 31 14:36:35 v
[sparc64] cryptomgr_test OOPS kernel 4.9.0+
Hello! Disabling kernel config option CRYPTO_MANAGER_DISABLE_TESTS i.e. enable run-time self tests, makes kernel unbootable: tested with git kernels v4.9-8648-g5cc60aeedf31 and v4.9-12259-g7c0f6ba682b9 SILO Version 1.4.14 boot: Allocated 64 Megs of memory at 0x4000 for kernel Uncompressing image... Loaded kernel version 4.9.0 Loading initial ramdisk (14000758 bytes at 0x7400 phys, 0x40C0 virt)... / [0.00] PROMLIB: Sun IEEE Boot Prom 'OBP 4.38.5 2016/06/22 19:36' [0.00] PROMLIB: Root node compatible: sun4v [0.00] Linux version 4.9.0+ (mator@ttip) (gcc version 6.2.1 20161215 (Debian 6.2.1-7) ) #38 SMP Sun Dec 25 13:35:48 MSK 2016 [0.00] debug: skip boot console de-registration. [0.00] bootconsole [earlyprom0] enabled [0.00] ARCH: SUN4V [0.00] Ethernet address: 00:14:4f:fa:06:f2 [0.00] MM: PAGE_OFFSET is 0xfff8 (max_phys_bits == 47) [0.00] MM: VMALLOC [0x0001 --> 0x0006] [0.00] MM: VMEMMAP [0x0006 --> 0x000c] [0.00] Kernel: Using 5 locked TLB entries for main kernel image. [0.00] Remapping the kernel... [0.00] done. [0.00] kmemleak: Kernel memory leak detector disabled [0.00] OF stdout device is: /virtual-devices@100/console@1 [0.00] PROM: Built device tree with 85327 bytes of memory. [0.00] MDESC: Size is 35552 bytes. [0.00] PLATFORM: banner-name [SPARC T5-2] [0.00] PLATFORM: name [ORCL,SPARC-T5-2] [0.00] PLATFORM: hostid [84fa06f2] [0.00] PLATFORM: serial# [0035260e] [0.00] PLATFORM: stick-frequency [3b9aca00] [0.00] PLATFORM: mac-address [144ffa06f2] [0.00] PLATFORM: watchdog-resolution [1000 ms] [0.00] PLATFORM: watchdog-max-timeout [3153600 ms] [0.00] PLATFORM: max-cpus [1024] [0.00] Top of RAM: 0x82f93a000, Total RAM: 0x7ff35 [0.00] Memory hole size: 773MB [0.00] Allocated 24576 bytes for kernel page tables. [0.00] Zone ranges: [0.00] Normal [mem 0x3040-0x00082f939fff] [0.00] Movable zone start for each node [0.00] Early memory node ranges [0.00] node 0: [mem 0x3040-0x6fe7] [0.00] node 0: [mem 0x6ff0-0x6ff25fff] [0.00] node 0: [mem 0x7000-0x00082f87] [0.00] node 0: [mem 0x00082f90-0x00082f921fff] [0.00] node 0: [mem 0x00082f932000-0x00082f939fff] [0.00] Initmem setup node 0 [mem 0x3040-0x00082f939fff] [0.00] Booting Linux... [0.00] CPU CAPS: [flush,stbar,swap,muldiv,v9,blkinit,n2,mul32] [0.00] CPU CAPS: [div32,v8plus,popc,vis,vis2,ASIBlkInit,fmaf,vis3] [0.00] CPU CAPS: [hpc,ima,pause,cbcond,aes,des,kasumi,camellia] [0.00] CPU CAPS: [md5,sha1,sha256,sha512,mpmul,montmul,montsqr,crc32c] [0.00] percpu: Embedded 11 pages/cpu @fff800082d00 s46024 r8192 d35896 u131072 [0.00] SUN4V: Mondo queue sizes [cpu(131072) dev(16384) r(8192) nr(256)] [0.00] Built 1 zonelists in Zone order, mobility grouping on. Total pages: 4155828 [0.00] Kernel command line: root=/dev/vdiska2 ro zswap.enabled=1 keep_bootcon noresume [0.00] log_buf_len individual max cpu contribution: 4096 bytes [0.00] log_buf_len total cpu_extra contributions: 1044480 bytes [0.00] log_buf_len min size: 131072 bytes [0.00] log_buf_len: 2097152 bytes [0.00] early log buf free: 126208(96%) [0.00] PID hash table entries: 4096 (order: 2, 32768 bytes) [0.00] Dentry cache hash table entries: 4194304 (order: 12, 33554432 bytes) [0.00] Inode-cache hash table entries: 2097152 (order: 11, 16777216 bytes) [0.00] Sorting __ex_table... [0.00] Memory: 33114224K/33541440K available (6603K kernel code, 894K rwdata, 1824K rodata, 608K init, 9985K bss, 427216K reserved, 0K cma-reserved) [0.00] Running RCU self tests [0.00] Hierarchical RCU implementation. [0.00] RCU lockdep checking is enabled. [0.00] Build-time adjustment of leaf fanout to 64. [0.00] NR_IRQS:2048 nr_irqs:2048 1 [0.00] SUN4V: Using IRQ API major 3, cookie only virqs enabled [11059882.082988] clocksource: stick: mask: 0x max_cycles: 0x1cd42e4dffb, max_idle_ns: 881590591483 ns [11059882.083097] clocksource: mult[80] shift[23] [11059882.083148] clockevent: mult[8000] shift[31] [11059882.085633] Console: colour dummy device 80x25 [11059882.085696] console [tty0] enabled [11059882.085740] Lock dependency validator: Copyright (c) 2006 Red Hat, Inc., Ingo Molnar [11059882.085819] ... MAX_LOCKDEP_SUBCLASSES: 8 [11059882.085866] ... MAX_LOCK_DEPTH: 48 [11059882.085912] ... MAX_LOCKDEP_KEYS:8191 [11059882.085962] ... CLASSHASH_SIZE: 409
Re: [PATCH v6 1/2] sparc: fix a building error reported by kbuild
Guys, so was it fixed or not? I can not compile current git kernel: linux-2.6$ git desc v4.9-11937-g52bce91165e5 linux-2.6$ git status On branch master Your branch is up-to-date with 'origin/master'. nothing to commit, working tree clean linux-2.6$ git log --oneline arch/sparc/include/asm/topology_64.h | head -1 541cc39433a8 sparc: fix a building error reported by kbuild linux-2.6$ make CHK include/config/kernel.release CHK include/generated/uapi/linux/version.h CHK include/generated/utsrelease.h CHK include/generated/bounds.h CHK include/generated/timeconst.h CHK include/generated/asm-offsets.h CALLscripts/checksyscalls.sh :1316:2: warning: #warning syscall pkey_mprotect not implemented [-Wcpp] :1319:2: warning: #warning syscall pkey_alloc not implemented [-Wcpp] :1322:2: warning: #warning syscall pkey_free not implemented [-Wcpp] CHK include/generated/compile.h GEN usr/initramfs_data.cpio".gz" AS usr/initramfs_data.o LD usr/built-in.o CHK kernel/config_data.h CC [M] drivers/crypto/virtio/virtio_crypto_mgr.o In file included from ./arch/sparc/include/asm/topology.h:4:0, from ./include/linux/topology.h:35, from ./include/linux/gfp.h:8, from ./include/linux/kmod.h:22, from ./include/linux/module.h:13, from drivers/crypto/virtio/virtio_crypto_mgr.c:21: drivers/crypto/virtio/virtio_crypto_common.h: In function ‘virtio_crypto_get_current_node’: ./arch/sparc/include/asm/topology_64.h:45:44: error: implicit declaration of function ‘cpu_data’ [-Werror=implicit-function-declaration] #define topology_physical_package_id(cpu) (cpu_data(cpu).proc_id) ^ drivers/crypto/virtio/virtio_crypto_common.h:119:9: note: in expansion of macro ‘topology_physical_package_id’ node = topology_physical_package_id(cpu); ^~~~ ./arch/sparc/include/asm/topology_64.h:45:57: error: request for member ‘proc_id’ in something not a structure or union #define topology_physical_package_id(cpu) (cpu_data(cpu).proc_id) ^ drivers/crypto/virtio/virtio_crypto_common.h:119:9: note: in expansion of macro ‘topology_physical_package_id’ node = topology_physical_package_id(cpu); ^~~~ cc1: some warnings being treated as errors scripts/Makefile.build:293: recipe for target 'drivers/crypto/virtio/virtio_crypto_mgr.o' failed make[3]: *** [drivers/crypto/virtio/virtio_crypto_mgr.o] Error 1 scripts/Makefile.build:551: recipe for target 'drivers/crypto/virtio' failed make[2]: *** [drivers/crypto/virtio] Error 2 scripts/Makefile.build:551: recipe for target 'drivers/crypto' failed make[1]: *** [drivers/crypto] Error 2 Makefile:988: recipe for target 'drivers' failed make: *** [drivers] Error 2 linux-2.6$ -- To unsubscribe from this list: send the line "unsubscribe linux-crypto" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [sparc] niagara2 cpu, opcodes not available message?
On Wed, Jun 8, 2016 at 8:30 PM, Anatoly Pugachev wrote: > Hello! > > Can someone please tell, why do we get a bunch of the following > messages on niagara2 cpu hardware (SPARC Enterprise T5120, T5220, > T5140, and T5240 servers) > > Asking, because I see the following lines on kernel boot (removing > first field boot time stamp in cut): > > mator@nvg5120:~/linux-sparc-boot-logs/t5120$ grep opcode > dmesg-4.7.0-rc2+.log | cut -f2- -d' ' | sort | uniq -c > 4 aes_sparc64: sparc64 aes opcodes not available. > 7 camellia_sparc64: sparc64 camellia opcodes not available. > 37 crc32c_sparc64: sparc64 crc32c opcode not available. > 5 des_sparc64: sparc64 des opcodes not available. > 4 md5_sparc64: sparc64 md5 opcode not available. > 1 sha1_sparc64: sparc64 sha1 opcode not available. > 2 sha256_sparc64: sparc64 sha256 opcode not available. > 3 sha512_sparc64: sparc64 sha512 opcode not available. > > Can we probably remove this functionality/messages from niagara2 cpus, > if it does not support it anyway? Wasn't clear at all, I mean can we please change pr_info in arch/sparc/crypto/ to pr_debug in xx_sparc64_mod_init() functions? Thanks. -- To unsubscribe from this list: send the line "unsubscribe linux-crypto" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[sparc] niagara2 cpu, opcodes not available message?
Hello! Can someone please tell, why do we get a bunch of the following messages on niagara2 cpu hardware (SPARC Enterprise T5120, T5220, T5140, and T5240 servers) Asking, because I see the following lines on kernel boot (removing first field boot time stamp in cut): mator@nvg5120:~/linux-sparc-boot-logs/t5120$ grep opcode dmesg-4.7.0-rc2+.log | cut -f2- -d' ' | sort | uniq -c 4 aes_sparc64: sparc64 aes opcodes not available. 7 camellia_sparc64: sparc64 camellia opcodes not available. 37 crc32c_sparc64: sparc64 crc32c opcode not available. 5 des_sparc64: sparc64 des opcodes not available. 4 md5_sparc64: sparc64 md5 opcode not available. 1 sha1_sparc64: sparc64 sha1 opcode not available. 2 sha256_sparc64: sparc64 sha256 opcode not available. 3 sha512_sparc64: sparc64 sha512 opcode not available. But linux kernel sources ( linux-2.6/arch/sparc/kernel/setup_64.c ) define crypto_hwcaps only for CPUs with the following capabilities: static const char *crypto_hwcaps[] = { "aes", "des", "kasumi", "camellia", "md5", "sha1", "sha256", "sha512", "mpmul", "montmul", "montsqr", "crc32c", }; and we don't have them in niagara2 cpu CAPS: mator@nvg5120:~/linux-sparc-boot-logs/t5120$ grep CAPS dmesg-4.7.0-rc2+.log [0.00] CPU CAPS: [flush,stbar,swap,muldiv,v9,blkinit,n2,mul32] [0.00] CPU CAPS: [div32,v8plus,popc,vis,vis2,ASIBlkInit] mator@nvg5120:~/linux-sparc-boot-logs/t5120$ egrep '^cpu|pmu' /proc/cpuinfo cpu : UltraSparc T2 (Niagara2) pmu : niagara2 cpucaps : flush,stbar,swap,muldiv,v9,blkinit,n2,mul32,div32,v8plus,popc,vis,vis2,ASIBlkInit compare, for example, with sparc CPU which support crypto (T5 cpu, landau is machine name): mator@landau:~$ grep CAPS dmesg-4.6.1.txt [0.00] CPU CAPS: [flush,stbar,swap,muldiv,v9,blkinit,n2,mul32] [0.00] CPU CAPS: [div32,v8plus,popc,vis,vis2,ASIBlkInit,fmaf,vis3] [0.00] CPU CAPS: [hpc,ima,pause,cbcond,aes,des,kasumi,camellia] [0.00] CPU CAPS: [md5,sha1,sha256,sha512,mpmul,montmul,montsqr,crc32c] mator@landau:~$ egrep '^cpu|pmu' /proc/cpuinfo cpu : UltraSparc T5 (Niagara5) pmu : niagara5 cpucaps : flush,stbar,swap,muldiv,v9,blkinit,n2,mul32,div32,v8plus,popc,vis,vis2,ASIBlkInit,fmaf,vis3,hpc,ima,pause,cbcond,aes,des,kasumi,camellia,md5,sha1,sha256,sha512,mpmul,montmul,montsqr,crc32c mator@landau:~$ grep opcode dmesg-4.6.1.txt [8537574.887049] aes_sparc64: Using sparc64 aes opcodes optimized AES implementation [8537574.887611] crc32c_sparc64: Using sparc64 crc32c opcode optimized CRC32C implementation [8537576.577455] sha1_sparc64: Using sparc64 sha1 opcode optimized SHA-1 implementation [8537576.578928] sha256_sparc64: Using sparc64 sha256 opcode optimized SHA-256/SHA-224 implementation [8537576.580908] sha512_sparc64: Using sparc64 sha512 opcode optimized SHA-512/SHA-384 implementation [8537576.582964] md5_sparc64: Using sparc64 md5 opcode optimized MD5 implementation [8537576.596984] des_sparc64: Using sparc64 des opcodes optimized DES implementation [8537576.600503] camellia_sparc64: Using sparc64 camellia opcodes optimized CAMELLIA implementation I don't understand why niagara2 cpu getting HWCAP_SPARC_CRYPTO flag if it does not support it. Can we probably remove this functionality/messages from niagara2 cpus, if it does not support it anyway? mator@nvg5120:~$ lsmod | grep -c sparc64 0 mator@landau:~$ lsmod | grep -c sparc64 9 Thanks. -- To unsubscribe from this list: send the line "unsubscribe linux-crypto" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: booting sun sparc T5120 with "nosmp" kernel causes OOPS in n2_crypto module
tried to boot git kernel ( 4.6.0+ , git commit ecc5fbd5ef472a4c659dc56a5739b3f041c0530c ) with "nosmp" , got n2_crypto OOPS as well ext4 OOPS (unable to finish boot , mount / fs) , boot log : SPARC Enterprise T5120, No Keyboard Copyright (c) 1998, 2016, Oracle and/or its affiliates. All rights reserved. OpenBoot 4.33.6.g, 16256 MB memory available, Serial #78400024. Ethernet address 0:14:4f:ac:4a:18, Host ID: 84ac4a18. Boot device: disk1 File and args: SILO Version 1.4.14 boot: 6 Allocated 64 Megs of memory at 0x4000 for kernel Uncompressing image... Loaded kernel version 4.6.0 Loading initial ramdisk (17830856 bytes at 0xC80 phys, 0x40C0 virt)... | [0.00] PROMLIB: Sun IEEE Boot Prom 'OBP 4.33.6.g 2016/03/11 06:05' [0.00] PROMLIB: Root node compatible: sun4v [0.00] Linux version 4.6.0+ (mator@nvg5120) (gcc version 5.3.1 20160509 (Debian 5.3.1-19) ) #1 SMP Wed May 25 22:17:28 MSK 2016 [0.00] bootconsole [earlyprom0] enabled [0.00] ARCH: SUN4V [0.00] Ethernet address: 00:14:4f:ac:4a:18 [0.00] MM: PAGE_OFFSET is 0x8000 (max_phys_bits == 39) [0.00] MM: VMALLOC [0x0001 --> 0x6000] [0.00] MM: VMEMMAP [0x6000 --> 0xc000] [0.00] Kernel: Using 3 locked TLB entries for main kernel image. [0.00] Remapping the kernel... done. [0.00] OF stdout device is: /virtual-devices@100/console@1 [0.00] PROM: Built device tree with 195069 bytes of memory. [0.00] MDESC: Size is 61728 bytes. [0.00] PLATFORM: banner-name [SPARC Enterprise T5120] [0.00] PLATFORM: name [SUNW,SPARC-Enterprise-T5120] [0.00] PLATFORM: hostid [84ac4a18] [0.00] PLATFORM: serial# [00ab4130] [0.00] PLATFORM: stick-frequency [457646c0] [0.00] PLATFORM: mac-address [144fac4a18] [0.00] PLATFORM: watchdog-resolution [1000 ms] [0.00] PLATFORM: watchdog-max-timeout [3153600 ms] [0.00] PLATFORM: max-cpus [64] [0.00] Top of RAM: 0x3ffb16000, Total RAM: 0x3f76ac000 [0.00] Memory hole size: 132MB [0.00] Allocated 16384 bytes for kernel page tables. [0.00] Zone ranges: [0.00] Normal [mem 0x0840-0x0003ffb15fff] [0.00] Movable zone start for each node [0.00] Early memory node ranges [0.00] node 0: [mem 0x0840-0x0003ffa89fff] [0.00] node 0: [mem 0x0003ffa9a000-0x0003ffaadfff] [0.00] node 0: [mem 0x0003ffb08000-0x0003ffb15fff] [0.00] Initmem setup node 0 [mem 0x0840-0x0003ffb15fff] [0.00] Booting Linux... [0.00] CPU CAPS: [flush,stbar,swap,muldiv,v9,blkinit,n2,mul32] [0.00] CPU CAPS: [div32,v8plus,popc,vis,vis2,ASIBlkInit] [0.00] percpu: Embedded 10 pages/cpu @8003ff00 s37720 r8192 d36008 u131072 [0.00] SUN4V: Mondo queue sizes [cpu(8192) dev(16384) r(8192) nr(256)] [0.00] Built 1 zonelists in Zone order, mobility grouping on. Total pages: 2061296 [0.00] Kernel command line: root=/dev/mapper/vg1-root ro nosmp [0.00] log_buf_len individual max cpu contribution: 4096 bytes [0.00] log_buf_len total cpu_extra contributions: 258048 bytes [0.00] log_buf_len min size: 131072 bytes [0.00] log_buf_len: 524288 bytes [0.00] early log buf free: 127696(97%) [0.00] PID hash table entries: 4096 (order: 2, 32768 bytes) [0.00] Dentry cache hash table entries: 2097152 (order: 11, 16777216 bytes) [0.00] Inode-cache hash table entries: 1048576 (order: 10, 8388608 bytes) [0.00] Sorting __ex_table... [0.00] Memory: 16429712K/16636592K available (5626K kernel code, 737K rwdata, 1408K rodata, 464K init, 750K bss, 206880K reserved, 0K cma-reserved) [0.00] Hierarchical RCU implementation. [0.00] Build-time adjustment of leaf fanout to 64. [0.00] RCU restricting CPUs from NR_CPUS=256 to nr_cpu_ids=64. [0.00] RCU: Adjusting geometry for rcu_fanout_leaf=64, nr_cpu_ids=64 [0.00] NR_IRQS:2048 nr_irqs:2048 1 [0.00] SUN4V: Using IRQ API major 1, cookie only virqs disabled [1319829.255759] clocksource: stick: mask: 0x max_cycles: 0x10cc5ac4c8a, max_idle_ns: 440795218862 ns [1319829.257796] clocksource: mult[dbabc5] shift[24] [1319829.258492] clockevent: mult[952b25d1] shift[31] [1319829.261610] Console: colour dummy device 80x25 [1319829.262298] console [tty0] enabled [1319829.262589] bootconsole [earlyprom0] disabled [0.00] PROMLIB: Sun IEEE Boot Prom 'OBP 4.33.6.g 2016/03/11 06:05' [0.00] PROMLIB: Root node compatible: sun4v [0.00] Linux version 4.6.0+ (mator@nvg5120) (gcc version 5.3.1 20160509 (Debian 5.3.1-19) ) #1 SMP Wed May 25 22:17:28 MSK 2016 [0.00] bootconsole [earlyprom0] enabled [0.00] ARCH: SUN4V [0.00]
Re: booting sun sparc T5120 with "nosmp" kernel 4.5.4 causes OOPS in n2_crypto module
(re-sent in plain text) Hello! Tried to boot T5120 with nosmp kernel option, gives OOPS in n2_crypto module: May 24 13:11:48 nvg5120 kernel: Kernel command line: root=/dev/mapper/vg1-root ro nosmp ... May 24 13:11:48 nvg5120 kernel: Loading compiled-in X.509 certificates May 24 13:11:48 nvg5120 kernel: Kernel unaligned access at TPC[739430] mpi_read_buffer+0xd0/0x120 May 24 13:11:48 nvg5120 kernel: Loaded X.509 cert 'Debian Project: Ben Hutchings: 008a018dca80932630' May 24 13:11:48 nvg5120 kernel: rtc-sun4v rtc-sun4v: setting system clock to 2016-05-24 10:11:26 UTC (1464084686) May 24 13:11:48 nvg5120 kernel: aes_sparc64: module verification failed: signature and/or required key missing - tainting kernel May 24 13:11:48 nvg5120 kernel: aes_sparc64: sparc64 aes opcodes not available. ... May 24 13:11:50 nvg5120 kernel: sha256_sparc64: sparc64 sha256 opcode not available. May 24 13:11:50 nvg5120 kernel: n2rng.c:v0.2 (July 27, 2011) May 24 13:11:50 nvg5120 kernel: n2rng f0286a1c: Registered RNG HVAPI major 2 minor 0 May 24 13:11:50 nvg5120 kernel: n2rng f0286a1c: Found single-unit RNG, units: 1 May 24 13:11:50 nvg5120 kernel: n2rng f0286a1c: Selftest passed on unit 0 May 24 13:11:50 nvg5120 kernel: n2rng f0286a1c: RNG ready May 24 13:11:50 nvg5120 kernel: des_sparc64: sparc64 des opcodes not available. May 24 13:11:50 nvg5120 kernel: des_sparc64: sparc64 des opcodes not available. May 24 13:11:50 nvg5120 kernel: des_sparc64: sparc64 des opcodes not available. May 24 13:11:50 nvg5120 kernel: sha1_sparc64: sparc64 sha1 opcode not available. May 24 13:11:50 nvg5120 kernel: des_sparc64: sparc64 des opcodes not available. May 24 13:11:50 nvg5120 kernel: n2_crypto: n2_crypto.c:v0.2 (July 28, 2011) May 24 13:11:50 nvg5120 kernel: n2_crypto: Found N2CP at /virtual-devices@100/n2cp@7 May 24 13:11:50 nvg5120 kernel: n2_crypto: Registered NCS HVAPI version 2.0 May 24 13:11:50 nvg5120 kernel: genirq: Flags mismatch irq 1. (cwq-0) vs. (cwq-0) May 24 13:11:50 nvg5120 kernel: [ cut here ] May 24 13:11:50 nvg5120 kernel: WARNING: CPU: 0 PID: 260 at /build/linux-c06pcb/linux-4.5.4/kernel/irq/manage.c:1449 __free_irq+0xac/0x2a0() May 24 13:11:50 nvg5120 kernel: Trying to free already-free IRQ 1 May 24 13:11:50 nvg5120 kernel: Modules linked in: n2_crypto(E+) n2_rng(E+) sha512_sparc64(E+) rng_core(E) des_generic(E) autofs4(E) ext4(E) ecb(E) May 24 13:11:50 nvg5120 kernel: CPU: 0 PID: 260 Comm: systemd-udevd Tainted: GE 4.5.0-2-sparc64-smp #1 Debian 4.5.4-1 May 24 13:11:50 nvg5120 kernel: Call Trace: May 24 13:11:50 nvg5120 kernel: [004669d0] warn_slowpath_common+0x70/0xc0 May 24 13:11:50 nvg5120 kernel: [00466a50] warn_slowpath_fmt+0x30/0x40 May 24 13:11:50 nvg5120 kernel: [004bdd0c] __free_irq+0xac/0x2a0 May 24 13:11:50 nvg5120 kernel: [004bdfa0] free_irq+0x40/0x80 May 24 13:11:50 nvg5120 kernel: [10aae24c] spu_list_destroy+0xec/0x100 [n2_crypto] May 24 13:11:50 nvg5120 kernel: [10aafc98] spu_mdesc_scan+0x298/0x4a0 [n2_crypto] May 24 13:11:50 nvg5120 kernel: [10ab0204] n2_crypto_probe+0x1a4/0x680 [n2_crypto] May 24 13:11:50 nvg5120 kernel: [007c95f4] platform_drv_probe+0x34/0xc0 May 24 13:11:50 nvg5120 kernel: [007c708c] driver_probe_device+0x24c/0x460 May 24 13:11:50 nvg5120 kernel: [007c7328] __driver_attach+0x88/0xa0 May 24 13:11:50 nvg5120 kernel: [007c497c] bus_for_each_dev+0x5c/0xa0 May 24 13:11:50 nvg5120 kernel: [007c669c] driver_attach+0x1c/0x40 May 24 13:11:50 nvg5120 kernel: [007c60b0] bus_add_driver+0x1f0/0x2a0 May 24 13:11:50 nvg5120 kernel: [007c7db4] driver_register+0x74/0x120 May 24 13:11:50 nvg5120 kernel: [007c97c4] __platform_register_drivers+0x64/0x160 May 24 13:11:50 nvg5120 kernel: [10ab6014] n2_init+0x14/0x24 [n2_crypto] May 24 13:11:50 nvg5120 kernel: ---[ end trace 7aa1f0163177edff ]--- May 24 13:11:50 nvg5120 kernel: camellia_sparc64: sparc64 camellia opcodes not available. Full boot logs, "nosmp" and usual (smp) are in [1]. 1. https://bugzilla.kernel.org/show_bug.cgi?id=118831 -- To unsubscribe from this list: send the line "unsubscribe linux-crypto" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [crypto / sparc64] cryptomgr_test OOPS
On Thu, May 5, 2016 at 6:00 PM, Tadeusz Struk wrote: > On 05/05/2016 02:40 AM, Anatoly Pugachev wrote: >> sure, based on your cryptodev git, just tried 4.3 (6a13feb , good) >> kernel in attempt to find (bisect) when RSA code break, already tested >> 4.5 (44d1b6d , bad) , 4.4 (afd2ff9 , bad). >> Going to try your patch soon (when I'm back home). >> So far 4.3 passes RSA stage without OOPS, but for other reason does >> not boot to login prompt. Boot log exempt (4.3), this is with >> CONFIG_CRYPTO_RSA=y : > > Anatoly, could you also give this a try please: > Thanks > > diff --git a/crypto/testmgr.c b/crypto/testmgr.c > index b86883a..770970ff 100644 > --- a/crypto/testmgr.c > +++ b/crypto/testmgr.c > @@ -1805,8 +1805,8 @@ static int do_test_rsa(struct crypto_akcipher *tfm, > goto free_req; > > sg_init_table(src_tab, 2); > - sg_set_buf(&src_tab[0], vecs->m, 8); > - sg_set_buf(&src_tab[1], vecs->m + 8, vecs->m_size - 8); > + sg_set_buf(&src_tab[0], vecs->m, 4); > + sg_set_buf(&src_tab[1], vecs->m + 4, vecs->m_size - 4); > sg_init_one(&dst, outbuf_enc, out_len_max); > akcipher_request_set_crypt(req, src_tab, &dst, vecs->m_size, >out_len_max); Tadeusz, do you still want to test it , after I have reported that Herbert patch works? Thanks. -- To unsubscribe from this list: send the line "unsubscribe linux-crypto" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [crypto / sparc64] cryptomgr_test OOPS
On Thu, May 5, 2016 at 11:42 AM, Herbert Xu wrote: > On Wed, May 04, 2016 at 05:49:04PM +0300, Anatoly Pugachev wrote: >> >> just tested cryptodev ( >> http://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git >> ) kernel, same OOPS, but kernel version is 4.6.0-rc2+ . >> kernel OOPS message - https://paste.fedoraproject.org/362554/23732641/ > > Anatoly, could you please test this patch on top of cryptodev? > Thanks! > > ---8<--- > Subject: crypto: testmgr - Use kmalloc memory for RSA input > > As akcipher uses an SG interface, you must not use vmalloc memory > as input for it. This patch fixes testmgr to copy the vmalloc > test vectors to kmalloc memory before running the test. > > This patch also removes a superfluous sg_virt call in do_test_rsa. Herbert, this patch, applied to your cryptodev git kernel, fixes OOPS and my debian sparc64 installation boots successfully: [5684721.625447] Unpacking initramfs... [5684721.858235] Freeing initrd memory: 11720K (fff800203400 - fff8002034b72000) [5684721.867127] futex hash table entries: 65536 (order: 9, 4194304 bytes) [5684721.868551] audit: initializing netlink subsys (disabled) [5684721.868640] audit: type=2000 audit(0.476:1): initialized [5684721.868868] Initialise system trusted keyring [5684721.869765] workingset: timestamp_bits=45 max_order=21 bucket_order=0 [5684721.869879] zbud: loaded [5684721.920120] Key type asymmetric registered [5684721.920173] Asymmetric key parser 'x509' registered [5684721.920582] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 252) [5684721.921249] io scheduler noop registered [5684721.921297] io scheduler deadline registered [5684721.921628] io scheduler cfq registered (default) [5684721.922101] f029b808: ttyS0 at I/O 0x0 (irq = 1, base_baud = 115200) is a SUN4V HCONS [5684721.922352] console [ttyHV0] enabled [5684721.923480] sunvdc.c:v1.2 (November 24, 2014) Thanks. -- To unsubscribe from this list: send the line "unsubscribe linux-crypto" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [crypto / sparc64] cryptomgr_test OOPS
On Thu, May 5, 2016 at 11:42 AM, Herbert Xu wrote: > On Wed, May 04, 2016 at 05:49:04PM +0300, Anatoly Pugachev wrote: >> >> just tested cryptodev ( >> http://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git >> ) kernel, same OOPS, but kernel version is 4.6.0-rc2+ . >> kernel OOPS message - https://paste.fedoraproject.org/362554/23732641/ > > Anatoly, could you please test this patch on top of cryptodev? Herbert, sure, based on your cryptodev git, just tried 4.3 (6a13feb , good) kernel in attempt to find (bisect) when RSA code break, already tested 4.5 (44d1b6d , bad) , 4.4 (afd2ff9 , bad). Going to try your patch soon (when I'm back home). So far 4.3 passes RSA stage without OOPS, but for other reason does not boot to login prompt. Boot log exempt (4.3), this is with CONFIG_CRYPTO_RSA=y : [0.00] PROMLIB: Sun IEEE Boot Prom 'OBP 4.38.3 2015/11/11 10:38' [0.00] PROMLIB: Root node compatible: sun4v [0.00] Initializing cgroup subsys cpuset [0.00] Initializing cgroup subsys cpu [0.00] Initializing cgroup subsys cpuacct [0.00] Linux version 4.3.0+ (mator@ttip) (gcc version 6.0.1 20160423 (prerelease) (Debian 6.0.1-2) ) #4 SMP Thu May 5 05:26:2 8 EDT 2016 [0.00] debug: skip boot console de-registration. [0.00] bootconsole [earlyprom0] enabled [0.00] ARCH: SUN4V [0.00] Ethernet address: 00:14:4f:f8:be:54 [0.00] MM: PAGE_OFFSET is 0xfff8 (max_phys_bits == 47) [0.00] MM: VMALLOC [0x0001 --> 0x0006] [0.00] MM: VMEMMAP [0x0006 --> 0x000c] [0.00] Kernel: Using 3 locked TLB entries for main kernel image. [0.00] Remapping the kernel... done. [0.00] OF stdout device is: /virtual-devices@100/console@1 [0.00] PROM: Built device tree with 76231 bytes of memory. [0.00] MDESC: Size is 35264 bytes. [0.00] PLATFORM: banner-name [SPARC T5-2] [0.00] PLATFORM: name [ORCL,SPARC-T5-2] [0.00] PLATFORM: hostid [84f8be54] [0.00] PLATFORM: serial# [0035260e] [0.00] PLATFORM: stick-frequency [3b9aca00] [0.00] PLATFORM: mac-address [144ff8be54] [0.00] PLATFORM: watchdog-resolution [1000 ms] [0.00] PLATFORM: watchdog-max-timeout [3153600 ms] [0.00] PLATFORM: max-cpus [1024] [0.00] Top of RAM: 0x20afff, Total RAM: 0x2ffa06000 [0.00] Memory hole size: 121605MB [0.00] Allocated 32768 bytes for kernel page tables. [0.00] Zone ranges: [0.00] Normal [mem 0x3040-0x0020affe] [0.00] Movable zone start for each node [0.00] Early memory node ranges [0.00] node 0: [mem 0x3040-0x6fe7] [0.00] node 0: [mem 0x6ff0-0x6ff25fff] [0.00] node 0: [mem 0x7000-0x0002afff] [0.00] node 0: [mem 0x00203000-0x0020aff3] [0.00] node 0: [mem 0x0020affc-0x0020affd5fff] [0.00] node 0: [mem 0x0020affe6000-0x0020affe] [0.00] Initmem setup node 0 [mem 0x3040-0x0020affe] [0.00] Booting Linux... [0.00] CPU CAPS: [flush,stbar,swap,muldiv,v9,blkinit,n2,mul32] [0.00] CPU CAPS: [div32,v8plus,popc,vis,vis2,ASIBlkInit,fmaf,vis3] [0.00] CPU CAPS: [hpc,ima,pause,cbcond,aes,des,kasumi,camellia] [0.00] CPU CAPS: [md5,sha1,sha256,sha512,mpmul,montmul,montsqr,crc32c] [0.00] PERCPU: Embedded 8 pages/cpu @fff80020ae40 s28184 r8192 d29160 u65536 [0.00] SUN4V: Mondo queue sizes [cpu(131072) dev(16384) r(8192) nr(256)] [0.00] Built 1 zonelists in Zone order, mobility grouping on. Total pages: 1558281 [0.00] Kernel command line: root=/dev/vdiska2 ro keep_bootcon noresume debug loglevel=7 [0.00] log_buf_len individual max cpu contribution: 4096 bytes [0.00] log_buf_len total cpu_extra contributions: 1044480 bytes [0.00] log_buf_len min size: 131072 bytes [0.00] log_buf_len: 2097152 bytes [0.00] early log buf free: 126168(96%) [0.00] PID hash table entries: 4096 (order: 2, 32768 bytes) [0.00] Dentry cache hash table entries: 2097152 (order: 11, 16777216 bytes) [0.00] Inode-cache hash table entries: 1048576 (order: 10, 8388608 bytes) [0.00] Sorting __ex_table... [0.00] Memory: 12364272K/12576792K available (5381K kernel code, 702K rwdata, 1424K rodata, 440K init, 747K bss, 212520K rese rved, 0K cma-reserved) [0.00] Hierarchical RCU implementation. [0.00] Build-time adjustment of leaf fanout to 64. [0.00] NR_IRQS:2048 nr_irqs:2048 1 [0.00] SUN4V: Using IRQ API major 3, cookie only virqs enabled [5664484.612319] clocksource: stick: mask: 0x max_cycles:
Re: [crypto / sparc64] cryptomgr_test OOPS
On Tue, May 3, 2016 at 7:33 PM, David Miller wrote: > From: Anatoly Pugachev > Date: Tue, 3 May 2016 16:54:18 +0300 > >> I have git kernel OOPS (4.6.0-rc6) on sparc64. This OOPS does not >> happen, if I set the following kernel option: >> >> CONFIG_CRYPTO_MANAGER_DISABLE_TESTS=y >> >> Can someone please look at >> https://bugzilla.kernel.org/show_bug.cgi?id=117551 ? > > The lib/mpi/ code hasn't been touched in a long time, so I can only see that > it might > be the crypto/rsa.c changes that happened this release. > > Can you possibly bisect this or at least tell us that 4.5 doesn't have this > problem? David, we're using 4.5.2 debian kernel here without this problem. I'm not sure I would be able to bisect, never did it before, but I could try... Here's a quick diff related to crypto for debian kernel configs: $ diff -u /boot/config-4.5.0-2-sparc64-smp /boot/config-4.6.0-rc5-sparc64-smp @@ -5299,10 +5380,9 @@ CONFIG_CRYPTO_RNG=m CONFIG_CRYPTO_RNG2=y CONFIG_CRYPTO_RNG_DEFAULT=m -CONFIG_CRYPTO_PCOMP=m -CONFIG_CRYPTO_PCOMP2=y CONFIG_CRYPTO_AKCIPHER2=y -# CONFIG_CRYPTO_RSA is not set +CONFIG_CRYPTO_AKCIPHER=y +CONFIG_CRYPTO_RSA=y CONFIG_CRYPTO_MANAGER=y CONFIG_CRYPTO_MANAGER2=y # CONFIG_CRYPTO_USER is not set so, I need to compile 4.5.x kernel (or even older kernels) with CRYPTO_RSA=y and test how it would act. And if it would not crash, I could try to bisect. Thanks. -- To unsubscribe from this list: send the line "unsubscribe linux-crypto" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [crypto / sparc64] cryptomgr_test OOPS
On Wed, May 4, 2016 at 7:07 AM, Herbert Xu wrote: > David Miller wrote: >> From: Anatoly Pugachev >> Date: Tue, 3 May 2016 16:54:18 +0300 >> >>> I have git kernel OOPS (4.6.0-rc6) on sparc64. This OOPS does not >>> happen, if I set the following kernel option: >>> >>> CONFIG_CRYPTO_MANAGER_DISABLE_TESTS=y >>> >>> Can someone please look at >>> https://bugzilla.kernel.org/show_bug.cgi?id=117551 ? >> >> The lib/mpi/ code hasn't been touched in a long time, so I can only see that >> it might >> be the crypto/rsa.c changes that happened this release. >> >> Can you possibly bisect this or at least tell us that 4.5 doesn't have this >> problem? > > It would also be helpful to test the latest cryptodev tree which > has a large number of MPI fixes from Nicolai Stange. Herbert, just tested cryptodev ( http://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git ) kernel, same OOPS, but kernel version is 4.6.0-rc2+ . kernel OOPS message - https://paste.fedoraproject.org/362554/23732641/ -- To unsubscribe from this list: send the line "unsubscribe linux-crypto" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[crypto / sparc64] cryptomgr_test OOPS
Hello! I have git kernel OOPS (4.6.0-rc6) on sparc64. This OOPS does not happen, if I set the following kernel option: CONFIG_CRYPTO_MANAGER_DISABLE_TESTS=y Can someone please look at https://bugzilla.kernel.org/show_bug.cgi?id=117551 ? Thanks. There's attached kernel config on bugzilla. kernel OOPS: SPARC Enterprise T5120, No Keyboard Copyright (c) 1998, 2014, Oracle and/or its affiliates. All rights reserved. OpenBoot 4.33.6.f, 16256 MB memory available, Serial #78400024. Ethernet address 0:14:4f:ac:4a:18, Host ID: 84ac4a18. Boot device: disk1 File and args: SILO Version 1.4.14 boot: LinuxLinuxOLD 6 boot: 6 Allocated 64 Megs of memory at 0x4000 for kernel Uncompressing image... Loaded kernel version 4.6.0 Loading initial ramdisk (14627617 bytes at 0xC80 phys, 0x40C0 virt)... / [0.00] PROMLIB: Sun IEEE Boot Prom 'OBP 4.33.6.f 2014/07/10 10:23' [0.00] PROMLIB: Root node compatible: sun4v [0.00] Linux version 4.6.0-rc6+ (mator@deb4g) (gcc version 6.0.1 20160423 (prerelease) (Debian 6.0.1-2) ) #1 SMP Tue May 3 13:49:36 MSK 2016 [0.00] debug: skip boot console de-registration. [0.00] bootconsole [earlyprom0] enabled [0.00] ARCH: SUN4V [0.00] Ethernet address: 00:14:4f:ac:4a:18 [0.00] MM: PAGE_OFFSET is 0x8000 (max_phys_bits == 39) [0.00] MM: VMALLOC [0x0001 --> 0x6000] [0.00] MM: VMEMMAP [0x6000 --> 0xc000] [0.00] Kernel: Using 3 locked TLB entries for main kernel image. [0.00] Remapping the kernel... done. [0.00] OF stdout device is: /virtual-devices@100/console@1 [0.00] PROM: Built device tree with 195069 bytes of memory. [0.00] MDESC: Size is 61728 bytes. [0.00] PLATFORM: banner-name [SPARC Enterprise T5120] [0.00] PLATFORM: name [SUNW,SPARC-Enterprise-T5120] [0.00] PLATFORM: hostid [84ac4a18] [0.00] PLATFORM: serial# [00ab4130] [0.00] PLATFORM: stick-frequency [457646c0] [0.00] PLATFORM: mac-address [144fac4a18] [0.00] PLATFORM: watchdog-resolution [1000 ms] [0.00] PLATFORM: watchdog-max-timeout [3153600 ms] [0.00] PLATFORM: max-cpus [64] [0.00] Top of RAM: 0x3ffb16000, Total RAM: 0x3f76ac000 [0.00] Memory hole size: 132MB [0.00] Allocated 16384 bytes for kernel page tables. [0.00] Zone ranges: [0.00] Normal [mem 0x0840-0x0003ffb15fff] [0.00] Movable zone start for each node [0.00] Early memory node ranges [0.00] node 0: [mem 0x0840-0x0003ffa89fff] [0.00] node 0: [mem 0x0003ffa9a000-0x0003ffaadfff] [0.00] node 0: [mem 0x0003ffb08000-0x0003ffb15fff] [0.00] Initmem setup node 0 [mem 0x0840-0x0003ffb15fff] [0.00] Booting Linux... [0.00] CPU CAPS: [flush,stbar,swap,muldiv,v9,blkinit,n2,mul32] [0.00] CPU CAPS: [div32,v8plus,popc,vis,vis2,ASIBlkInit] [0.00] percpu: Embedded 9 pages/cpu @8003ff00 s29528 r8192 d36008 u131072 [0.00] SUN4V: Mondo queue sizes [cpu(8192) dev(16384) r(8192) nr(256)] [0.00] Built 1 zonelists in Zone order, mobility grouping on. Total pages: 2061296 [0.00] Kernel command line: root=/dev/mapper/vg1-root ro keep_bootcon console=ttyS0 [0.00] log_buf_len individual max cpu contribution: 4096 bytes [0.00] log_buf_len total cpu_extra contributions: 258048 bytes [0.00] log_buf_len min size: 131072 bytes [0.00] log_buf_len: 524288 bytes [0.00] early log buf free: 127592(97%) [0.00] PID hash table entries: 4096 (order: 2, 32768 bytes) [0.00] Dentry cache hash table entries: 2097152 (order: 11, 16777216 bytes) [0.00] Inode-cache hash table entries: 1048576 (order: 10, 8388608 bytes) [0.00] Sorting __ex_table... [0.00] Memory: 16433448K/16636592K available (5565K kernel code, 733K rwdata, 1392K rodata, 456K init, 742K bss, 203144K reserved, 0K cma-reserved) [0.00] Hierarchical RCU implementation. [0.00] Build-time adjustment of leaf fanout to 64. [0.00] RCU restricting CPUs from NR_CPUS=256 to nr_cpu_ids=64. [0.00] RCU: Adjusting geometry for rcu_fanout_leaf=64, nr_cpu_ids=64 [0.00] NR_IRQS:2048 nr_irqs:2048 1 [0.00] SUN4V: Using IRQ API major 1, cookie only virqs disabled [ 7218.283063] clocksource: stick: mask: 0x max_cycles: 0x10cc5ac4c8a, max_idle_ns: 440795218862 ns [ 7218.283875] clocksource: mult[dbabc5] shift[24] [ 7218.284206] clockevent: mult[952b25d1] shift[31] [ 7218.286792] Console: colour dummy device 80x25 [ 7218.364903] Calibrating delay using timer specific routine.. 2337.22 BogoMIPS (lpj=4674457) [ 7218.365869] pid_max: default: 65536 minimum: 512 [ 7218.367733] Security Framework initialized [ 7218
Re: console noise after commit c1e9b3b0eea
On Wed, Apr 20, 2016 at 1:33 AM, Sowmini Varadhan wrote: > > Hi Anatoly, > > after commit c1e9b3b0eea1 ("hwrng: n2 - Attach on T5/M5, T7/M7 SPARC CPUs") > I get a *lot* of console noise on my T5-2, of the form: > > n2rng f028f21c: Selftest failed on unit 0 > n2rng f028f21c: Test buffer slot 0 [0x] > n2rng f028f21c: Test buffer slot 1 [0xe63f56d6a22eb116] > n2rng f028f21c: Test buffer slot 2 [0xe63f56d6a22eb116] > n2rng f028f21c: Test buffer slot 3 [0xe63f56d6a22eb116] > n2rng f028f21c: Test buffer slot 4 [0xe63f56d6a22eb116] > n2rng f028f21c: Test buffer slot 5 [0xe63f56d6a22eb116] > n2rng f028f21c: Test buffer slot 6 [0xe63f56d6a22eb116] > n2rng f028f21c: Test buffer slot 7 [0xe63f56d6a22eb116] > > Why/when is your commit needed on my T5-2? > > I'm not sure how this was tested, but if you need to revise it and test > on sparc, please let me know- I think it needs more work on sparc. Sowmini, the patch/commit is actually quite trivial, it just adds device_id matches for newer T5/M7 CPUs to n2rng_match structure. Without this patch, n2rng does not work on this newer CPUs. Works well on my T5-2 LDOM (tested with rng-tools and gpg --gen-key). I don't have M7 machine to test it with. Why the n2rng selftest fails on your machine - I've no idea... Just to silence it, you can blacklist this module, since it does not work your hardware anyway. Can you please send me "prtconf -pv" output from your machine, as well information on how do you run linux as LDOM container or baremetal T5-2 ? Mine T5-2 is one of the last firmware releases (run from solaris 11.3 control domain): root@deimos:/home/sysadmin# prtdiag -v FW Version Sun System Firmware 9.5.3 2015/11/25 09:50 sysadmin@deimos:~$ ldm -V Logical Domains Manager (v 3.3.0.0.17) Hypervisor control protocol v 1.12 Using Hypervisor MD v 1.4 System PROM: Hostconfig v. 1.6.3@(#)Hostconfig 1.6.3 2015/11/25 08:57 Hypervisor v. 1.15.3 @(#)Hypervisor 1.15.3 2015/11/11 17:15 OpenBootv. 4.38.3 @(#)OpenBoot 4.38.3 2015/11/11 10:38 Can you please check what firmware release if yours T5-2 server and probably update? I'm not sure it would help, but anyway. -- To unsubscribe from this list: send the line "unsubscribe linux-crypto" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 2/2] n2rng: Attach on T5/M5, T7/M7 SPARC CPUs
n2rng: Attach on T5/M5, T7/M7 SPARC CPUs (space to tab fixes after variable names) Signed-off-by: Anatoly Pugachev --- drivers/char/hw_random/n2-drv.c | 10 ++ 1 file changed, 10 insertions(+) diff --git a/drivers/char/hw_random/n2-drv.c b/drivers/char/hw_random/n2-drv.c index 843d6f6..3b06c1d6 100644 --- a/drivers/char/hw_random/n2-drv.c +++ b/drivers/char/hw_random/n2-drv.c @@ -743,6 +743,16 @@ static const struct of_device_id n2rng_match[] = { .compatible = "SUNW,kt-rng", .data = (void *) 1, }, + { + .name = "random-number-generator", + .compatible = "ORCL,m4-rng", + .data = (void *) 1, + }, + { + .name = "random-number-generator", + .compatible = "ORCL,m7-rng", + .data = (void *) 1, + }, {}, }; MODULE_DEVICE_TABLE(of, n2rng_match); -- 2.7.0 -- To unsubscribe from this list: send the line "unsubscribe linux-crypto" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 0/2] n2rng: Attach on T5/M5, T7/M7 SPARC CPUs
On Mon, Jan 25, 2016 at 10:41:01PM +0800, Herbert Xu wrote: > On Fri, Jan 15, 2016 at 03:22:53PM -0500, David Miller wrote: > > From: Anatoly Pugachev > > Date: Thu, 14 Jan 2016 00:43:18 +0300 > > > > > This patch adds support for recent oracle hardware (T5/M5, T7/M7 SPARC > > > CPUs), > > > so n2_rng driver would work on them. > > > > > > 1. n2rng: Attach on T5/M5, T7/M7 SPARC CPUs > > > 2. n2rng: documentation, add DT bindings, vendor prefixes > > > > > > PS: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=809815#32 > > > > > > Signed-off-by: Anatoly Pugachev > > > > This series looks fine: > > > > Acked-by: David S. Miller > > > > Herbert, please take this via your crypto tree. > > I'd love to but unfortunately the pathces are white-space damaged > and all the tabs have turned into spaces. > > Anatoly, could you please repost with a mailer that does not eat > tabs for lunch? Herbert, I've no idea what has changed tabs to spaces. Resubmitted again, should be in proper format now... Thanks. -- To unsubscribe from this list: send the line "unsubscribe linux-crypto" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 1/2] n2rng: documentation, add DT bindings, vendor prefixes
n2rng: documentation, add DT bindings, vendor prefixes Signed-off-by: Anatoly Pugachev --- .../devicetree/bindings/sparc_sun_oracle_rng.txt | 30 ++ .../devicetree/bindings/vendor-prefixes.txt| 2 ++ 2 files changed, 32 insertions(+) create mode 100644 Documentation/devicetree/bindings/sparc_sun_oracle_rng.txt diff --git a/Documentation/devicetree/bindings/sparc_sun_oracle_rng.txt b/Documentation/devicetree/bindings/sparc_sun_oracle_rng.txt new file mode 100644 index 000..b0b2111 --- /dev/null +++ b/Documentation/devicetree/bindings/sparc_sun_oracle_rng.txt @@ -0,0 +1,30 @@ +HWRNG support for the n2_rng driver + +Required properties: +- reg : base address to sample from +- compatible : should contain one of the following + RNG versions: + - 'SUNW,n2-rng' for Niagara 2 Platform (SUN UltraSPARC T2 CPU) + - 'SUNW,vf-rng' for Victoria Falls Platform (SUN UltraSPARC T2 Plus CPU) + - 'SUNW,kt-rng' for Rainbow/Yosemite Falls Platform (SUN SPARC T3/T4), (UltraSPARC KT/Niagara 3 - development names) + more recent systems (after Oracle acquisition of SUN) + - 'ORCL,m4-rng' for SPARC T5/M5 + - 'ORCL,m7-rng' for SPARC T7/M7 + +Examples: +/* linux LDOM on SPARC T5-2 */ +Node 0xf029a4f4 + .node: f029a4f4 + rng-#units: 0002 + compatible: 'ORCL,m4-rng' + reg: 000e + name: 'random-number-generator' + +/* solaris on SPARC M7-8 */ +Node 0xf028c08c + rng-#units: 0003 + compatible: 'ORCL,m7-rng' + reg: 000e + name: 'random-number-generator' + +PS: see as well prtconfs.git by DaveM diff --git a/Documentation/devicetree/bindings/vendor-prefixes.txt b/Documentation/devicetree/bindings/vendor-prefixes.txt index 72e2c5a..e00029d 100644 --- a/Documentation/devicetree/bindings/vendor-prefixes.txt +++ b/Documentation/devicetree/bindings/vendor-prefixes.txt @@ -170,6 +170,7 @@ opencores OpenCores.org option Option NV ortustech Ortus Technology Co., Ltd. ovti OmniVision Technologies +ORCL Oracle Corporation panasonic Panasonic Corporation parade Parade Technologies Inc. pericomPericom Technology Inc. @@ -227,6 +228,7 @@ startek Startek steST-Ericsson stericsson ST-Ericsson synology Synology, Inc. +SUNW Sun Microsystems, Inc tbsTBS Technologies tclToby Churchill Ltd. technologicTechnologic Systems -- 2.7.0 -- To unsubscribe from this list: send the line "unsubscribe linux-crypto" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 2/2] n2rng: Attach on T5/M5, T7/M7 SPARC CPUs
n2rng: Attach on T5/M5, T7/M7 SPARC CPUs Signed-off-by: Anatoly Pugachev --- drivers/char/hw_random/n2-drv.c | 10 ++ 1 file changed, 10 insertions(+) diff --git a/drivers/char/hw_random/n2-drv.c b/drivers/char/hw_random/n2-drv.c index 843d6f6..8bee43a 100644 --- a/drivers/char/hw_random/n2-drv.c +++ b/drivers/char/hw_random/n2-drv.c @@ -743,6 +743,16 @@ static const struct of_device_id n2rng_match[] = { .compatible = "SUNW,kt-rng", .data = (void *) 1, }, + { + .name = "random-number-generator", + .compatible = "ORCL,m4-rng", + .data = (void *) 1, + }, + { + .name = "random-number-generator", + .compatible = "ORCL,m7-rng", + .data = (void *) 1, + }, {}, }; MODULE_DEVICE_TABLE(of, n2rng_match); -- 2.7.0 -- To unsubscribe from this list: send the line "unsubscribe linux-crypto" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html