- A
secret
byte you want to read is stored at inaccessible memory locationpriv_mem
. - The sender triggers an access exception by attempting to read
priv_mem
. - Due to CPU optimization (out-of-order execution), the load of
secret
frompriv_mem
and the use of its value in (4) and (5) below may execute before the exception is triggered. - Calculate an
offset
into a known arrayprobe
by multiplyingsecret
by the width of a cache line (or whatever block size the CPU typically fetches, like a 4096-byte page). This guarantees each of those 256 possible offsets will cache separately. - Load
probe[offset]
, which causes the CPU to cache exactly one chunk of of our array, populating one cache line. - The exception finally triggers, clearing the modified registers...but cached data is not excised.
- Iterate over all 256 offsets into
probe
to find out which one loads fast. You've determined the value ofsecret
.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /bin/bash | |
# When running for first time, have empty directories; skip the setup by unchecking all plugins, etc. | |
# then shutdown jenkins, add old files and restart. | |
# If it fails, make sure the directory docker-volumes/jenkins and all its children are owned by same user, owner of the docker process. | |
# Or just chown -R on the jenkins directory. | |
docker run -it --name jenkins --network="permanet" --ip="172.30.0.6" \ | |
-v /home/nikhil/.m2:/var/jenkins_home/.m2 \ | |
-v /home/nikhil/.gradle:/var/jenkins_home/.gradle \ | |
-v /home/nikhil/.npm:/var/jenkins_home/.npm \ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
AWSTemplateFormatVersion: '2010-09-09' | |
Description: Cognito Stack | |
Parameters: | |
AuthName: | |
Type: String | |
Description: Unique Auth Name for Cognito Resources | |
Resources: | |
# Creates a role that allows Cognito to send SNS messages | |
SNSRole: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# type of database. Run with -dbhelp for details | |
schemaspy.t=redshift | |
# optional path to alternative jdbc drivers. | |
schemaspy.dp=./RedshiftJDBC42-1.2.7.1003.jar | |
# database properties: host, port number, name user, password | |
schemaspy.host=xxxxx.yyyy.eu-west-1.redshift.amazonaws.com | |
schemaspy.port=5439 | |
schemaspy.db=test | |
schemaspy.u=test | |
schemaspy.p=*************** |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Show hidden characters
{ | |
"presets": [ | |
["env", { | |
"targets": { | |
"node": "6.10" | |
} | |
}] | |
] | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
whateverId | attribute1 | someotherattribute | |
---|---|---|---|
foo | bar | baz | |
hello | erwin | world |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
hbase(main):017:0> scan 'personalnew',{VERSIONS=>4} | |
ROW COLUMN+CELL | |
1 column=personal_data:age, timestamp=1518070847422, value=25 | |
1 column=personal_data:age, timestamp=1517381138957, value=25 | |
1 column=personal_data:city, timestamp=1518070871233, value=USA | |
1 column=personal_data:city, timestamp=1517381134473, value=Bengaluru | |
1 column=personal_data:name, timestamp=1518070904715, value=Ram | |
1 column=personal_data:name, timestamp=1517381128393, value=Ram | |
1 row(s) in 0.0110 seconds |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
Description: AWS AppSync Notes API | |
Parameters: | |
APIName: | |
Type: String | |
Description: Name of the API - used to generate unique names for resources | |
MinLength: 3 | |
MaxLength: 20 | |
AllowedPattern: '^[a-zA-Z][a-zA-Z0-9_]*$' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Make sure you grab the latest version | |
curl -OL https://github.com/google/protobuf/releases/download/v3.5.1/protoc-3.5.1-linux-x86_64.zip | |
# Unzip | |
unzip protoc-3.5.1-linux-x86_64.zip -d protoc3 | |
# Move protoc to /usr/local/bin/ | |
sudo mv protoc3/bin/* /usr/local/bin/ | |
# Move protoc3/include to /usr/local/include/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
''' | |
MIT License | |
Copyright (c) 2018 Paul Melnikow | |
Permission is hereby granted, free of charge, to any person obtaining a copy | |
of this software and associated documentation files (the "Software"), to deal | |
in the Software without restriction, including without limitation the rights | |
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell |