toad.social is one of the many independent Mastodon servers you can use to participate in the fediverse.
Mastodon server operated by David Troy, a tech pioneer and investigative journalist addressing threats to democracy. Thoughtful participation and discussion welcome.

Administered by:

Server stats:

277
active users

#numa

1 post1 participant0 posts today

When “Access Control” to sensitive Data is just a Number in a URL

Not long ago, I covered the Merkur hack from Lilith Wittmann – a glaring example of careless handling of sensitive data. And today, here we are again! Another service, another broken-by-design system. This time: the hotel chain Numa, exposing tens of thousands of identity documents to anyone with a URL and a browser.

What happened

I just came across this report by this post on Mastodon from the CCC. Their (german) post describes what happened. I’ll briefly try to outline it:

[…]

locked.de/when-access-control-

The IT Blog · When “Access Control” to sensitive Data is just a Number in a URLNot long ago, I covered the Merkur hack from Lilith Wittmann - a glaring example of careless handling of sensitive data. And today, here we are again! Another service, another broken-by-design system. This time: the hotel chain Numa, exposing tens of thousands of identity documents to anyone with a

Random #linux #numa question.

If I have 2 processes, using the same shared library, the immutable (TEXT and RODATA) sections are usually loaded only once in the physical memory, and mapped into both process.

However, if each process asks the kernel to pin its memory on a different NUMA node, anyone knows if the kernel duplicates the physical pages on each numa node, if only one process wins, or if this results in bad behaviour (pages going back and forth) ?

Boost reduce the rate of cache misses in your CPUs

К вопросу использования #epoll вместо хорошо знакомых и «традиционных» select & poll. Т.е. асинхронной работы с чем-либо посредством polling’а и мультиплексирования.

Недавно пришлось заниматься реализацией очереди событий для AMQP-CPP. В одном из продуктов решено сделать связь агентских частей с основным «контроллером» через #AMQP, в качестве брокера #RabbitMQ (всё стандартно, обычный кластер и TLS-соединения).

Вот только агенты продукта активно используют асинхронно-реактивное программирование с хорошей «горизонтальной масштабируемостью». Когда достигнуто полноценное sharing nothing, не просто горизонтальная масштабируемость через lock-free или wait-free и закон Амдала. Исключается много всего и сразу, как старый-добрый cache ping-pong, так и печаль с false sharing.

Отсюда внутри агентов и своё управление потоками с выделениями памяти. Не только в плане heap (динамической памяти, со своими аллокаторами а-ля #jemalloc от #Facebook), но и приколы вокруг узлов #NUMA и даже huge pages (снижающих «давление» на #TLB, меньше промахов).

Первая же проблема выплыла почти сразу — не реально использовать библиотеку AMQP-CPP с уже предоставляющейся поддержкой #libev, #libuv, #libevent. Несовместимы эти очереди сообщений с имеющейся моделью управления потоками и организации задач на агентах.

Почему был взят epoll

Подход используемый в #epoll выглядит более современно, меньше копирований памяти между user space и kernel space. А при появлении данных в отслеживаемом файловом дескрипторе можно напрямую перейти по указателю на объект класса или структуру данных. Тем самым обходиться без поиска дескриптора по индексным массивам/контейнерам. Сразу же работать с экземплярами объектов оборачивающих нужное #tcp -соединение, того самого, в которое и пришли данные.

И тут обозначилась вторая проблема, что используема AMQP-библиотека не вычитывает данные целиком из потока сокета. Например, забирает данные лишь до тех пор, пока не насытится автомат состояний (finite-state machine), выполняющий парсинг сущностей AMQP-протокола.

Используя #epoll приходится выбирать на какой вариант обработки событий ориентироваться:

  • срабатывание оповещений «по уровню» (level-triggered),
  • выбрасывания событий «по фронту» (edge-triggered).

И беда с библиотекой в очередной раз показала, что нельзя использовать работу «по фронту» (edge-triggered) не изучив досконально работу подсистемы отвечающей за вычитывание данных из файловых дескрипторов. И появление флага EPOLLET в коде является маркером, о том, чтобы проводить аудит использовавшихся решений.

Про Edge Triggered Vs Level Triggered interrupts можно почитать в https://venkateshabbarapu.blogspot.com/2013/03/edge-triggered-vs-level-triggered.html)

idealists.suAkkoma
Continued thread

#Plutarch #ParallelLives #Numa 11/

For possibly there is no need of any compulsion or menace in dealing with the multitude, but when they see with their own eyes a conspicuous and shining example of virtue in the life of their ruler, they will of their own accord walk in wisdom's ways, and unite with him in conforming themselves to a blameless and blessed life of friendship and mutual concord, attended by righteousness and temperance.

Continued thread

#Plutarch #ParallelLives #Numa 10/

Not only was the Roman people softened and charmed by the righteousness and mildness of their king, but also the cities round about, as if some cooling breeze or salubrious wind were wafted upon them from Rome, began to experience a change of temper, and all of them were filled with a longing desire to have good government, to be at peace, to till the earth, to rear their children in quiet, and to worship the gods.

Continued thread

#Plutarch #ParallelLives #Numa 9/

He wished to remove the destitution which drives men to wrongdoing, and to turn the people to agriculture, that they might be subdued and softened along with the soil they tilled.

For there is no other occasion which produces so keen and quick a relish for peace as that of a farmer's life, where the warrior's daring that prompts a man to fight for his own is preserved, while the warrior's licence to indulge in rapacity and injustice is extirpated.

Continued thread

#Plutarch #ParallelLives #Numa 7/

Numa therefore decided to yield, and after sacrifi­cing to the gods, set out for Rome.

The senate and people met him on his way, filled with a wondrous love of the man; women welcomed him with fitting cries of joy; sacrifices were offered in the temples, and joy was universal, as if the city were receiving, not a king, but a kingdom.

Continued thread

#Plutarch #ParallelLives #Numa 6/

"This people loved Tatius, though he was a foreign prince, and they pay divine honours to the memory of Romulus."

"And who knows but that the people, even though victorious, is sated with war, and, now that it is glutted with triumphs and spoils, is desirous of a gentle prince, who is a friend of justice, and will lead them in the paths of order and peace?"

Continued thread

#Plutarch #ParallelLives #Numa 5/

"Even though thou neither desirest wealth for thyself, because thou hast enough, nor covetest the fame which comes from power, because thou hast the greater fame which comes from virtue, yet consider that the work of a true king is a service rendered to God."

"Do not flee from this office, which a wise man will regard as a field for noble actions, where the hearts of men are softened and inclined towards piety through the moulding influence of their ruler."