HNHacker News
TopNewBestAskShowJobs

mvanotti

20 karma · joined July 8, 2013

Computer Science student at University of Buenos Aires.
submissionscomments
mvanotti··on FreeBSD on the raspberry pi
My biggest problem with fbsd in the rpi is that it's really hard to cross-compile ports for arm, and compiling everything in the rpi takes a lot of time (I think it was half a day to compile tmux in the rpi A).
mvanotti··on RaspBSD – FreeBSD images for the Raspberry Pi
I've tried freeBSD in a Raspberry Pi 1, but I couldn't get any binaries precompiled for ARM :(. I would like to have an easy way to cross-compile ports from my main machine.
mvanotti··on OpenSSL Security Advisory
So, bad certificate HAS to be signed by leaf certificate, and leaf certificate HAS to be trusted. (And you need two CAs with the same keys)

openssl would accept certs that have been issued by a non-ca cert (which is trusted).

So if you have control over the leaf cert, you can just use it for contacting openssl.

If you don't have control over the leaf cert, you can't issue a bad cert.

Am I missing something?

mvanotti··on Maintaining Digital Certificate Security
In the blog post it says that CNNIC issued the CA=TRUE on the basis that MCS H only use it for domains that they have registered.. Wouldn't it be better to just issue a CA cert with name constrains extensions?

Why do we have that extension if nobody uses it :( ?

mvanotti··on Mozilla MASCHE – Memory Forensic Library
Thanks :)

Actually, this lib needs root access in the computer. It is intended to be used as a module in MIG (Mozilla InvestiGator), which is an agent that lives in servers and can receive commands.. So it is mostly the same, I think, except that the commands shouldn't return detailed information to the main server, but just yes/no answers, for example: "Is any of my servers running a vulnerable OpenSSL Version?"

Link to Mozilla Blog Post: https://blog.mozilla.org/security/2015/03/12/introducing-mas...

There's still a lot of work to do!

mvanotti··on First Go challenge – binary decoding
Thank you for this challenge :)

It was easy to solve, but I'm struggling trying to get the design right, also trying to be more robust with the parsing (there are fields that can be interpreted as uint64, int64, int32, uint32, etc).

Most of the hex editors available for linux are broken, ghex for example, the "grab these 4 bytes and interpret them as float32" functionallity doesn't work at all. I don't know what people who work doing this kind of things use.

mvanotti··on Ask HN: The best Linux laptop
I have a Zenbook Infinity and yes, it is good, but the battery life is too bad. On linux it lasts 3 hours or less with the OnDemand governor, whilst on windows it last 4 o 5 hours.

I don't know what to do to improve battery life :(. I regret not buying a Macbook Air for the same money instead.

mvanotti··on X86 boot sector written in C (2010)
Actually, I really prefer writing that in C rather than asm: You can use bitfields to define the GDT, IDT, Page Directories and so on. Doing everything is ASM is a PITA, for debugging and for readability.

(I am a teaching assistant at one of these courses and hate when students do everything in asm.. but they are allowed to do as they want, as long as it works as specified).

mvanotti··on Algorithm for Capturing Pokémon
Maybe it messes with the random number generator.. somehow.

Awesome article, but I suspect that something is wrong. If we see Mewtwo, lvl 70, full hp, frozen solid it says that -on average- we need 6 ultra balls. That is FAR from true. I always freezed all the legendaries to capture them easier, and it took always more than 10 balls to capture them.

mvanotti··on Three Optimization Tips for C++
Oh God. I spent hours trying to understand how it works, when I saw it yesterday :/ I wish I had seen your link!
mvanotti··on Three Optimization Tips for C++
Just an FYI for anyone reading: It's not the multiplicative inverse of 10 modulo 2^64. Multiplying by it only works if the number is divisible by 10.

What it's happening here is something more clever:

  let z be: (2^67 + 2)/10. 
2^67 isn't divisible by 10 (that's why we add 2).

  z = 14757395258967641293L
Now, I claim that

  n/10 = floor(z * n/ 2^67)
z is an integer, but it represents the exact division of

  (2^67 + 2)/10
 
we distribute the n:

  (n * 2^67)/10 + 2 * n/10
we distribute the 2^67 division:

  (n * 2^67)/(10 * 2^67) + 2 * n / (10 * 2^67)
simplify the terms:

  n/10 + n/(10 * 2^66)  [1]
Now:

  floor(x/d + c) == floor(x/d) if c < 1/d
we want to take floor of that number[1], but as

  n/(10 * 2^66) < 1/10
(the maximum value for n is 2^64 - 1), it follows that

  floor(z * n / 2^67) = n/10.
That's what the code is doing: 0xcccccccccccccccd is 14757395258967641293L the multiplication of z * n fits in 128 bits, and the mul instruction stores the higher 64 bits of $rax * $rdx into $rdx.

We need to divide by 2^67, whichs is shift 3 67 bits to the right. If we take the higher part (rdx) we get the higher 64 bits, and then we shift 3 bits to the right (shr $0x3, %rax) and that's our answer :).

Cool trick.

mvanotti··on Ant Colony Optimization Algorithms
Once you have a mixed graph (One-way streets and two-way streets), the problem is known as the Mixed Chinese Postman Problem and is NP.
mvanotti··on WhatsApp on your computer: Pidgin plugin
Wow, this sounds awesome. I hope it becomes popular :)
mvanotti··on How to Make a Computer Operating System in C/C++
I think that AMD Developer Guides & Manuals [1] are very good resources for x86_64 System Programming (better than Intel Manuals). They are better explained and focus on x86_64 arch.

[1]: http://developer.amd.com/resources/documentation-articles/de...

mvanotti··on Show HN: My x86 emulator written in JavaScript
I'm trying to run a custom basic x86 kernel (it was an assignment for my Computer Architecture course). But I can't get it to work =/. (This image works with bochs and in a virtual machine without problems). It seems that it can get to protected mode, enable interruptions, enable paging, but it fails loading the tasks =/

This is the error that I'm getting:

Unimplemented: load system segment descriptor, type = 9 Execution stopped

Here's a screenshot: http://i.imgur.com/DdCt8jX.png

mvanotti··on FreeBSD 10′s New Technologies and Features
Hi, I have gone trough this process last week. I'm new to freeBSD and wanted to install it in my notebook. For me it was painful. I couldn't tweak it to work as I wanted.

- Wifi worked out of the box.

- The people from #freebsd chan on irc were very helpful

- The handbook is very useful

The problems that I couldn't fix:

- Somehow I can't go back to terminal if I start x environment, afaik this is a problem of Intel HD Graphic cards (onboard on my notebook).

- No acpi support to adjust the brightness level, I have to rely on an app but it isn't the same.

- Touchpad support.. In ubuntu it works out of the box, two-finger scrolling and all, in freebsd I have to struggle a little with xorg and the end result is a little worse than ubuntu.

- I can't suspend my computer. It never wakes up :(

I still have to configure a lot of things (keyboard shortcuts, install better fonts, network manager).

It's not that I jumped from ubuntu to freeBSD, I've used archlinux for a few years before I got tired of it breaking my apps with the updates :P

I regret installing it on my notebook before trying it on my desktop or on a virtual machine.