how to remove contexts in TPM2 version 3.1.3 to free TPM memory - tpm

I'm using tpm2-tools version 3.1.3 on Raspberry Pi CM4. It turns out it doesn't have tpm2_flushcontext which was added in v4.0.
Is there any other tools in tpm2-tools 3.1.3 that can remove contexts? My goal is to free up some memory in TPM as it returned the following error:
$ tpm2_rc_decode 0x902
error layer
hex: 0x0
identifier: TSS2_TPM_RC_LAYER
description: Error produced by the TPM
format 0 warning code
hex: 0x02
name: TPM2_RC_OBJECT_MEMORY
description: out of memory for object contexts

Related

WineBottler returning error message every time i try an open .exe file on Mac

I'm trying to open a plugin for SNAP (to process Sentinel-3 imagery) on my Mac - the plugin downloads as an .exe file which means I need to open it using WineBottler. Every time I try and open the file however, I get this error message:
###BOTTLING### default.sh
/var/folders/rz/rr6ytzhx5gl60f1v1tbc67xm0000gn/T/AppTranslocation/6CDA1855-FA78-4A2A-A976-2C1A539F36ED/d/WineBottler.app/Contents/Frameworks/WBottler.framework/Resources/bottler.sh: line 39: /Applications/Wine.app/Contents/Resources/bin/wine: Bad CPU type in executable
###BOTTLING### Gathering debug Info...
Versions
OS...........................: darwin21
Wine.........................:
WineBottler..................: 1.8.6
Wineticks....................: 20220411-next - sha256sum: b6370f13c4dc410023f2a4e4e9a4385d2a0420031666c2f30befccc9b39c8f65
Environment
PWD..........................: '/Applications/Wine.app/Contents/Resources/bin'
PATH.........................: /Applications/Wine.app/Contents/Resources/bin:/usr/bin:/bin:/usr/sbin:/sbin
USER.........................: hannah
HOME.........................: /Users/hannah
COMPUTERNAME.................: hannahâs MacBook Air
BUNDLERESOURCEPATH...........: /var/folders/rz/rr6ytzhx5gl60f1v1tbc67xm0000gn/T/AppTranslocation/6CDA1855-FA78-4A2A-A976-2C1A539F36ED/d/WineBottler.app/Contents/Frameworks/WBottler.framework/Resources
WINEPREFIX...................: /Applications/Wine.app/Contents/Resources
WINEPATH.....................: /Applications/Wine.app/Contents/Resources/bin
LD_LIBRARY_PATH..............: /Applications/Wine.app/Contents/Resources/lib:/opt/X11/lib:/usr/X11/lib
DYLD_FALLBACK_LIBRARY_PATH...: /Applications/Wine.app/Contents/Resources/lib:/usr/lib:/opt/X11/lib:/usr/X11/lib
SILENT.......................:
http_proxy...................:
https_proxy..................:
ftp_proxy....................:
socks5_proxy.................:
Bottle
TEMPLATE.....................:
BOTTLE.......................: /Users/hannah/Desktop/Untitled.app
INSTALLER_URL................: /Users/hannah/Desktop/iCOR_Setup_3.0.0.exe
INSTALLER_IS_ZIPPED..........: 0
INSTALLER_NAME...............: iCOR_Setup_3.0.0.exe
INSTALLER_ARGUMENTS..........:
REMOVE_MONO..................:
REMOVE_GECKO.................:
REMOVE_USERS.................:
REMOVE_INSTALLERS............:
WINETRICKS_ITEMS.............: winxp
DLL_OVERRIDES................:
EXECUTABLE_PATH..............: winefile
EXECUTABLE_ARGUMENTS.........:
EXECUTABLE_VERSION...........: 1.0.0
BUNDLE_COPYRIGHT.............: © Your Company
BUNDLE_IDENTIFIER............: com.yourcompany.yourapp
BUNDLE_CATEGORYTYPE..........: public.app-category.business
SILENT.......................:
Hardware:
Hardware Overview:
Model Name: MacBook Air
Model Identifier: MacBookAir7,2
Processor Name: Dual-Core Intel Core i5
Processor Speed: 1.6 GHz
Number of Processors: 1
Total Number of Cores: 2
L2 Cache (per Core): 256 KB
L3 Cache: 3 MB
Hyper-Threading Technology: Enabled
Memory: 4 GB
System Firmware Version: 476.0.0.0.0
OS Loader Version: 540.120.3~22
SMC Version (system): 2.27f2
Serial Number (system): C02QM1XWG941
Hardware UUID: EE27242F-C2B2-59E6-AAED-D598D1D61044
Provisioning UDID: EE27242F-C2B2-59E6-AAED-D598D1D61044
###BOTTLING### Create .app...
###BOTTLING### Enabling CoreAudio, Colors, Antialiasing and flat menus...
/var/folders/rz/rr6ytzhx5gl60f1v1tbc67xm0000gn/T/AppTranslocation/6CDA1855-FA78-4A2A-A976-2C1A539F36ED/d/WineBottler.app/Contents/Frameworks/WBottler.framework/Resources/bottler.sh: line 134: /Applications/Wine.app/Contents/Resources/bin/wine: Bad CPU type in executable
### LOG ### Command '/Applications/Wine.app/Contents/Resources/bin/wine regedit /tmp/reg.reg' returned status 126.
###ERROR### Command '/Applications/Wine.app/Contents/Resources/bin/wine regedit /tmp/reg.reg' returned status 126.
Task returned with status 1.
I've tried downloading the 'stable' version of WineBottler, download and redownload it to no avail - it always returns this message. I can't seem to find any way of getting around this or recently posted question (a lot are from 2010-15 and are outdated in their solutions)
Does anyone know what I can do to get around this and open it? It's driving me insane!!!
Thanks!

Linux Mint Uma - meshlab does not start, libGL errors fbConfigs, swrast

I installed meshlab from the repo (sudo apt install) on a freshly made LM partition. when calling I got these msgs:
qt5ct: using qt5ct plugin
libGL error: No matching fbConfigs or visuals found
libGL error: failed to load driver: swrast
Current Plugins Dir is: /usr/lib/x86_64-linux-gnu/meshlab/plugins
qt5ct: D-Bus global menu: no
Shader directory found '/usr/share/meshlab/shaders', and it contains 19 gdp files
terminate called after throwing an instance of 'MLException'
what(): MLSceneGLSharedDataContext: GLEW initialization failed
Abgebrochen (Speicherabzug geschrieben)
Maybe the prob is caused by the graphic cards/driver due to Dell notebook with onboard plus dedicated graphics:
Graphics:
Device-1: NVIDIA G98M [GeForce 9200M GS] vendor: Dell driver: nvidia
v: 340.108 bus ID: 02:00.0 chip ID: 10de:06e8
Device-2: NVIDIA C79 [GeForce 9400M G] vendor: Dell driver: nvidia
v: 340.108 bus ID: 03:00.0 chip ID: 10de:0866
Display: x11 server: X.Org 1.20.11 driver: modesetting,nouveau,nvidia
unloaded: fbdev,vesa resolution: 1920x1200~60Hz
OpenGL: renderer: GeForce 9400M G/integrated/SSE2 v: 3.3.0 NVIDIA 340.108
How can I solve?

TPM2.0 error while trying to clear the chip

I'm discovering the tpm2.0 chip on Ubuntu 17.10. I'm using tpm2-tools package in version 1.1.0. (I have physical chip on my laptop). However when I try to clear the chip I have an error.
$ tpm2_takeownership -c
Clear Failed ! ErrorCode: 0x921
I launched tpmtest too and had few more error.
9 - DICTIONARY ATTACK LOCK RESET TEST
DICTIONARY ATTACK LOCK RESET TEST:
passing case: FAILED! TPM Error: 0x921
16 - POLICY TESTS
POLICY TESTS:
Policy Test: PASSWORD
passing case: PASSED!
passing case: PASSED!
passing case: PASSED!
passing case: PASSED!
passing case: PASSED!
passing case: PASSED!
passing case: FAILED! TPM Error: 0x9a2
24 - QUOTE CONTROL TESTS
QUOTE CONTROL TESTS:
passing case: FAILED! TPM Error: 0x184
I also had a failed test in tpmclient.
$ tpmclient
[...]
STARTUP TESTS:
passing case: PASSED!
passing case: FAILED! TPM Error: 0x100
I checked that resourcemgr service is well activated. I tryed some basics commands over the tpm (tpm2_create, tpm2_load, tpm2_rsaencrypt, tpm2_sign, etc...) and they worked.
Here is the output of tpm2_rc_decode:
$ tpm2_rc_decode 0x921
error layer
hex: 0x0
identifier: TSS2_TPM_ERROR_LEVEL
description: Error produced by the TPM
format 0 warning code
hex: 0x21
name: TPM_RC_LOCKOUT
description: authorizations for objects subject to DA protection are not allowed at this time because the TPM is in DA lockout mode
$ tpm2_rc_decode 0x9a2
error layer
hex: 0x0
identifier: TSS2_TPM_ERROR_LEVEL
description: Error produced by the TPM
format 1 error code
hex: 0x22
identifier: TPM_RC_BAD_AUTH
description: authorization failure without DA implications
session
hex: 0x100
identifier: TPM_RC_1
description: (null)
$ tpm2_rc_decode 0x184
error layer
hex: 0x0
identifier: TSS2_TPM_ERROR_LEVEL
description: Error produced by the TPM
format 1 error code
hex: 0x04
identifier: TPM_RC_VALUE
description: value is out of range or is not correct for the context
handle
hex:0x100
identifier: TPM_RC_1
description: (null)
$ tpm2_rc_decode 0x100
error layer
hex: 0x0
identifier: TSS2_TPM_ERROR_LEVEL
description: Error produced by the TPM
format 0 error code
hex: 0x00
name: TPM_RC_INITIALIZE
description: TPM not initialized
I'm new in tpm technology so I wonder if those errors come from the tpm itself or from the package tpm2-tools. Thank you for your help !
RC = 0x100 is not a 100%-error indeed.
I have a look to tpm2-tss sources. In their integration test that error (and only it) is ignored at test start-up (files: test/integration/main-sapi.c test/integration/main-esapi.c)
Moreover, they describe the error as 'TPM not initialized by TPM2_Startup or already initialized' in their headers. So, the most likely, your error is just an initialization repetition.

Three.js shader error 1282

Receiving following when trying to render using three.js.
THREE.WebGLProgram: shader error: 1282 gl.VALIDATE_STATUS false
gl.getProgramInfoLog not linked.
I have gotten my project running on a Windows 10 laptop and now trying to get it running on a Windows Server 2012. I speculate that it might be due to the server not having a real GPU, but I am no OpenGL developer and it's all chinese to me. This is what the DXDIAG says:
Display Devices
Card name: RDPUDD Chained DD
Manufacturer:
Chip type:
DAC type:
Device Type: n/a
Device Key: Enum\ROOT\BASICRENDER
Display Memory: n/a Dedicated Memory: n/a
Shared Memory: n/a
Current Mode: 1920 x 1080 (32 bit) (32Hz)
Driver Name: Driver File Version: ()
Driver Version:
DDI Version: 9Ex
Feature Levels:
Driver Model: Graphics Preemption: Compute Preemption: Driver Attributes: Final Retail Driver Date/Size: , 0 bytes
WHQL Logo'd: n/a
WHQL Date Stamp: n/a Device Identifier: {D7B71AF4-43CC-11CF-3921-F003ADC2CB35}
Vendor ID: 0x1414
Device ID: 0x008C
SubSys ID: 0x00000000
Revision ID: 0x0000 Driver Strong Name:
Rank Of Driver:
Video Accel:
DXVA2 Modes:
Deinterlace Caps: n/a
D3D9 Overlay: Not Supported
DXVA-HD: Not Supported
DDraw Status: Not Available
D3D Status: Enabled
AGP Status: Not Available
So the process is as usual to install node-gyp, which is risky business. That requires Visual C++ Build tools, which is installed on the server. Python 2.7 is installed and I've run the commands that are stated in the Installation section: https://github.com/nodejs/node-gyp
Then I use headless gl to be able to create the WebGL context in Three.js. That requires d3dcompiler_47.dll, which is added to the system32 folder. https://github.com/stackgl/headless-gl
The thing is that the server is pretty locked.. I am not able to do npm install of modules due to self signed certificate, probably since I am not allowed to do jack on the server. Now I'm pretty much stuck.. I don't know if my error is due to some compiler not being installed, if a module needs to be installed on the server, if node-gyp is mocking with me or whatever. It's a complete mess. But the server do work on my own machine. Anyone that have encountered something like it and could point me in a direction? Would be greatful!

Node.js "Illegal instruction" on PowerPC 440EP and PowerPC E300C3

I can't run node.js on PowerPC 440EP, I get only error "Illegal instruction".
Hardware info:
cat /proc/cpuinfo
processor : 0
cpu : 440EP Rev. C
clock : 533.333332MHz
revision : 24.212 (pvr 4222 18d4)
bogomips : 1066.66
timebase : 533333332
platform : CPU440EP
model : micran,cpu440
Memory : 128 MB
LD_SHOW_AUXV=1 /bin/true
AT_DCACHEBSIZE: 0x20
AT_ICACHEBSIZE: 0x20
AT_UCACHEBSIZE: 0x0
AT_SYSINFO_EHDR: 0x100000
AT_HWCAP: booke mmu fpu ppc32
AT_PAGESZ: 4096
AT_CLKTCK: 100
AT_PHDR: 0x10000034
AT_PHENT: 32
AT_PHNUM: 8
AT_BASE: 0x48000000
AT_FLAGS: 0x0
AT_ENTRY: 0x1000446c
AT_UID: 0
AT_EUID: 0
AT_GID: 0
AT_EGID: 0
AT_SECURE: 0
AT_RANDOM: 0xbf8c04f2
AT_EXECFN: /bin/true
AT_PLATFORM: ppc440
AT_BASE_PLATFORM:ppc440
Software info:
I'm using powerpc-440-linux-gnu compiler (version 5.2.0) and Linux v3.6.7.
I tried to use different versions of sources:
*node-0.10-ppc* from https://github.com/ibmruntimes/node
*node-4.x-port* from https://github.com/ibmruntimes/node
*node-v4.4.7* from https://nodejs.org/dist/v4.4.7/node-v4.4.7.tar.gz
*node-6.x* from https://github.com/nodejs/node
I'm using the following script for build of node.js:
#!/bin/bash
CROSS_COMPILER=powerpc-440-linux-gnu
HOST=powerpc-linux
ENDIAN=big
BUILD_PATH=/home/user/node
CFLAGS=-Os
JOBS=4
export ARCH=ppc
export CC=${CROSS_COMPILER}-gcc
export CXX=${CROSS_COMPILER}-g++
export CFLAG=${CFLAGS}
export AR=${CROSS_COMPILER}-ar r
export LINK=${CROSS_COMPILER}-g++
export PATH=${PATH}:/home/user/powerpc-440-linux-gnu/bin
./configure --without-snapshot --prefix=${BUILD_PATH} --dest-cpu=ppc --dest-os=linux
make -j ${JOBS}
make install
Which version of node.js should I use?
Do we have working portable
version of node.js for PowerPC 440EP ?
Sad update
I got the following answer from issues page on https://github.com/nodejs:
[Michael Dawson] The particular chip mentioned is based on the older PowerPC cores and does not have all of the Power5+ instructions available.
There are roughly two reasons for an illegal instruction. Either a memory corruption is derailing the control flow with the result that the CPU is trying to execute garbage/data.
The other reason would be that your node.js binary contains an instruction that isn't known to your CPU aka. your cross compiler output isn't matching your CPU. Investigate if you need to pass an additional -mcpu= or -mtune= argument to the compiler (or rather to configure).
As node.js contains a just in time compiler itself there is also the third option that node.js is generating instructions not suitable for you CPU variant.
I would investigate option two first.

Resources