Better HN
topnewbestaskshowjobs
Log inSign up

codedokode

9,867 karma · joined Aug 20, 2015 (11y ago) · 5,528 submissions

PHP developer from Russia.
Submissions

comment 2y ago · link · parent

Is it normal that I have asked two networks (llama/mixtral) the same question ("tell me about most popular audio pitch detection algorithms") and they gave almost the same answer? Both answers start with "Sure, here are some of the most popular pitch detection algorithms used in audio signal processing" and end with "Each of these algorithms has its own strengths and weaknesses, and the choice of algorithm depends on the specific application and the characteristics of the input signal.". And the content is 95% the same. How can it be?

comment 2y ago · link · parent

ISPs will block DNS traffic to harmful DNS servers or reroute it to approved servers.

comment 2y ago · link · parent

As I understand, Vulkan allows to run custom code on GPU, including the code to multiply matrices. Can one simply use Vulkan and ignore CUDA, PyTorch and ROCm?

comment 2y ago · link · parent

If you want to create a fair system you should also build infrastructure otherwise it is unfair when someone lives near the subway in a historical part of the city and someone has to live near the forest among ugly modern high-rise buildings.

comment 2y ago · link · parent

I have used memory profilers in PHP. In my experience, it is difficult to analyze why application uses lot of RAM just by looking at stack traces. It is better when you have a graph of references: which variable references which memory block. So that you can see, for example, that `cache.users[23].comments[56].attachments[2].binary_data` uses 10 Mb of RAM.

comment 2y ago · link · parent

There are lot of MCUs around us but they are locked down and not reprogrammable. For example, if your microwave oven or a smart bulb breaks, you cannot reuse its MCU for anything else. Don't you think that MCUs must be reprogrammable, resolderable and reusable?

comment 2y ago · link · parent

Unveil looks like a hack or a patch. Why do applications have access to whole filesystem by default?

comment 2y ago · link · parent

What about compilers? They have lots of optimization rules, how do they solve the problem?

comment 2y ago · link · parent

Well, at least the file extension honestly warns you that the file might watch after your face.

comment 2y ago · link · parent

But notice that this feature was present in several generations of the chip.

comment 2y ago · link · parent

Now I am thinking Kaspersky should not have published this information. What a wrong decision. Instead they should have sold it to Russian government which I am sure could find lot of interesting uses for these "debugging features" and offer a good reward.

comment 2y ago · link · parent

It reminds me of Linux backdoor that also was made to look like a mistake (== replaced with =) [1].

[1] https://freedom-to-tinker.com/2013/10/09/the-linux-backdoor-...

comment 2y ago · link · parent

Why do you need error-correction code for a debugging feature though? I would not protect debug registers with a hash.

comment 2y ago · link · parent

The original article doesn't have as many technical details as the article I linked to. That is why I added a link to another article which is better in my opinion and it is difficult to understand the vulnerability from original article. Original article also doesn't say anything about how Apple tried to fix it.

comment 2y ago · link · parent

Cannot one write tests in Python? Python seems much nicer to use language. Sadly, I found no library that would allow to create an instance of verilog model from Python and control it (cocotb doesn't allow this).

comment 2y ago · link · parent

I tried to use Verilog for a DIY project and found no way to control Verilog model from Python. Why is it like this? Do people really write tests directly in this awful outdated language instead of using Python?

I tried to use cocotb, but this is not what I want. It runs verilog interpreter and launches Python script from it, but I want the other way: I want to create a verilog model instance and access it in Python.

Also, I found that Verilog seems to have no built-in feature for modeling real delays. Let's say we have a gate, and when input signal changes, output should instantly go to "undefined" (x) state and only after a delay switch to a valid 0 or 1 value. It seems that verilog has no such type of realistic delay built-in. I found only "transport delay" and "elastic delay", both unrealistic. I had to create my own "delay gate" to simulate this (and made lot of mistakes doing this).

comment 2y ago · link · parent

I see that one of the steps in exploit was to use GPU registers to bypass kernel memory protection. Does it mean that the vulnerability cannot be fixed by an update and existing devices will stay vulnerable?

comment 2y ago · link · parent

Isn't it easier just to pay to one of hundreds employees having access to chip design? Or even get it without paying by appealing to patriotism?

comment 2y ago · link · parent

I would like also to link an article with technical details of main exploit (memory protection bypass by using undocumented hadware GPU registers): https://securelist.com/operation-triangulation-the-last-hard...

comment 2y ago · link · parent

If you read a better article with technical details [1], you'll see that Apple SOCs contain a "feature" (that resembles a debugging tool) that allows to bypass memory protection by writing into undocumented and unused GPU registers. Apple locks down kernel memory to stop exploits, but these registers allow to bypass the lock.

This vulnerability is they key vulnerability without which all the exploit chain would be useless.

[1] https://securelist.com/operation-triangulation-the-last-hard...

comment 2y ago · link · parent

Absolutely unfair.

comment 2y ago · link · parent

> Consoles ship at a hardware loss

First, it might not be true (because all console contains is a PCB and several chips). Second, if you sell something cheaper than you could it doesn't mean you get some kind of privilege and exception from the law.

comment 2y ago · link · parent

Shouldn't this apply to Japanese game consoles as well? Why American companies must allow third-party stores, but consoles must not?

comment 2y ago · link · parent

But isn't this super expensive, especially when there are many windows and 4K resolution displays? I don't like that you need 10 buffers for 10 full-screen windows when you see only the topmost one.

comment 2y ago · link · parent

I wonder, does Wayland requires to allocate gigantic buffers for every window or it is possible to make a Wayland implementation that doesn't require tens of megabytes of RAM? For example, is it possible to render window by tiles (of course only changed tiles) using a small 200×200 buffer? Is it possible to use a single buffer for all applications (which they use in turn)?

comment 2y ago · link · parent

Why only police? Install mind-readers at every home.

comment 2y ago · link · parent

I think that 4090 has 16000 ALUs, not "cores" (let's call a component capable to execute instructions independently from others, a "core"). And M1 Max probably has more than 1 ALU in every core, otherwise it resembles an ancient GPU.

comment 2y ago · link · parent

Let me share a Chinese Firewall (according to rumours) algorithm for detecting cryptography: count number of 0 and 1 bits. If the number is almost equal, it is likely encrypted content.
1
808182
185