Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Does this work on WSL2? #8

Closed
MrObvious opened this issue Nov 23, 2021 · 4 comments
Closed

Does this work on WSL2? #8

MrObvious opened this issue Nov 23, 2021 · 4 comments

Comments

@MrObvious
Copy link

Hi. I got it working on my gen3 I7 build, but I was wondering if this works on WSL2?

pstejska@PSTEJSKA03-PC:/blacksmith-public/build$ sudo ./blacksmith --dimm-id 2 --runtime-limit 21600 --ranks 1 --sweeping
Writing into logfile stdout.log
pstejska@PSTEJSKA03-PC:
/blacksmith-public/build$ sudo ./blacksmith --dimm-id 1 --runtime-limit 21600 --ranks 1 --sweeping

[+] General information about this fuzzing run:
Start timestamp:: 1637689072
Hostname: PSTEJSKA03-PC
Commit SHA: NO_REPOSITORY
Run time limit: 21600 (6 hours 0 minutes 0 seconds)
[+] Printing run configuration (GlobalDefines.hpp):
DRAMA_ROUNDS: 1000
CACHELINE_SIZE: 64
HAMMER_ROUNDS: 1000000
THRESH: 495
NUM_TARGETS: 10
MAX_ROWS: 30
NUM_BANKS: 16
DIMM: 1
CHANNEL: 1
MEM_SIZE: 1073741824
PAGE_SIZE: 4096

[+] Initializing memory with pseudorandom sequence.
[-] Could not find conflicting address sets. Is the number of banks (16) defined correctly?

@pjattke
Copy link
Collaborator

pjattke commented Nov 24, 2021

Hi @MrObvious
I am not sure if it would work on WSL as the hugetlb filesystem is currently only partially implemented, see Memory Management - hugetlbfs filesystem partially implemented #3796. As we don't have any Windows systems, we would appreciate if you could report back in case you have tried it. Thank you!

Regards,
Patrick

@MrObvious
Copy link
Author

Ok good news WSL2 supports big pages (hugetlb). It was only partially implemented in WSL1. I just need to figure out how to get it to detect the RAM banks. I'm not sure of the command so can I please have some commands or things to check to get it working?

@pjattke
Copy link
Collaborator

pjattke commented Nov 28, 2021

If you are not running on a Coffee Lake machine (e.g., i7-8700K that we used), you will need to reverse-engineer the DRAM address functions. These are determined by the memory controller of the CPU, so I would assume that they are the same on the native host and WSL but we don't have experience with that.

Regarding reverse-engineering the DRAM address functions, please see the updated README:

NOTE: The DRAM address functions that are hard-coded in DRAMAddr.cpp assume an Intel Core i7-8700K. For any other microarchitecture, you will need to first reverse-engineer these functions (e.g., using DRAMA or TRResspass' DRAMA) and then update the matrices in this class accordingly.

Please follow this issue. I will soon add instructions there on how to pass the functions found by DRAMA to Blacksmith.

@pjattke
Copy link
Collaborator

pjattke commented Dec 5, 2021

Any updates on this, @MrObvious — could you make it work?

@pjattke pjattke closed this as completed Dec 23, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants