« first day (2803 days earlier)      last day (2371 days later) » 

00:23
@Mgetz What's the problem with threads on Linux ?
00:34
@Mikhail HPC tends toward the other direction: single job spread across multiple nodes. Given how little of the OS most use, you could almost get away without an OS at all, and just use the UEFI stack for network and FS access...
Oh hey. Just got an email from Intel acknowledging that they have received the report and it "may" qualify for a bug bounty.
That's it. lol
I'm not sure they've even read it yet.
More like, they're acknowledging that it got past their spam filter.
Doesn't somebody here work for Intel?
@Mikhail Not sure exactly what he's referring to, but it's certainly well known that threads and fork don't mix well.
@JerryCoffin They mix perfectly fine? What's an example of them not mixing?
@Mikhail They don't mix well at all. When you fork, only the thread that called fork gets duplicated in the child. The other threads just cease to exist in the child. If any of them has (for example) a mutex locked, life can get difficult very quickly. Basically, to make it work at all, you have to fully synchronize all your threads before you call fork, then re-start any you still need afterwards.
Trying to duplicate the threads would probably be even worse though--they did what they could, but it's definitely choosing the least of the available evils, not something that really works well (at all).
00:41
Yeah, that's the expected behavior, you fork() first, and then use threads...
@Mikhail That's not "mixing well". That's just being aware that they don't mix, and not mixing them.
Personally, I've found a lot of use in fork() or similar when needing to isolate bullshit code written by other people that happens to do things like divided integers by zero. Or set COM into "single threaded apartment mode "
@Mikhail Oh, no question that isolating crappy code can limit its ability to cause damage.
Also as a driver for my validation tests
Sadly, fork() can't solve the dreaded "page fault in non-paged area" crap I've been hitting in recent weeks.
@Mikhail That sounds more like a kernel problem...
00:52
Yep, faulty drivers and blue screens, but the hardware costs tens of thousands, so what you gonna do?
and there is no self diagnosis that can sanction faulty section?
One of these devices will blue screen if the debugger has paused a user land thread responsible for offloading data from the device, its almost a security feature!
@Mikhail If you follow the OSS religion, you write a better driver. Then you end up at a better job after you get fired...
Speaking of which, my desktop is making weird noise when starting occasionally, I turn it off straight away and nothing is wrong when I start the PC on again.
@TelKitty It wants more personal attention.
00:57
Yeah, play sick, get more attention.
@TelKitty The doctor prescribes 128 GB of RGB memory to give it a constant reminder of how much you really care.
It's an old machine, no medicine can prolong human's life beyond 200, no single hardware upgrade can make a machine to serve beyond 20 years (unless owner too lazy or cheap to upgrade).
The thing is that, I don't play games on this PC and I don't have very big project to compile and build on this machine, so it totally handles all my needs. I don't feel the compulsion to upgrade it.
And I don't run time critical applications on it ...
01:33
@Mikhail basically linux doesn't really differentiate between threads and processes. This leads to a lot of strange behaviors that the kernel sort of plasters over badly. But in effect threads on Linux are processes that share the same address space instead of tasks within the same process.
TL;DR; there really isn't a difference between fork and a thread in linux... it's just a major problem all around
01:46
@Mikhail you can create multiple apartments, you just create a new thread and reinit COM in free threaded mode. Worse is if they call COM APIs without initializing an apartment at all in which case they get the dreaded 'main' apartment threading.
I think the underlying problem was that I needed to have a multi-threaded apartment for Qt, but a single threaded apartment for some "legacy" sdk. Ideally, these two would shared the same thread. I don't remember if I was allowed to have both the same process.
@Mikhail you are, you just need to remember to have proxies between threads
because they have to exist in different threads
Oh, fuck now I remember. Basically, the legacy sdk would call CoInitialize when the dll attached, which happened before Qt (actually before main). Qt also calls CoInitialize (for things like drag and drop). So both would end up on the main thread.
yep that causes major issues
I'd delay load that DLL
so you can control when it loads
But, out of curiosity, is it okay to have both kinds of models in the same process, as long as they are on different threads?
02:00
@Mikhail AFAIK yes
but you have to very carefully load them
and use proxies
Proxies are only for moving object's between them right?
@Mikhail nope, if you call into a single threaded apartment you need to use a proxy
free threaded objects don't care
but single threaded servers need to be proxied
My fork() sandboxing was like one class and 30 lines :-)
AND NO PROXIES WERE HARMED IN THE PROCESS :-)
fuck com
@Mikhail eh... it solves a rather touchy problem of composing code in a reasonable manner by many different authors
I know Jerry hates it but it does its job
With the exception of WoW64 IPC (which is black magic witchcraft), I don't see how its better than conventional IPC. The apartment stuff, certainly makes it more confusing. Fells like IPC +special rules + stuff that chokes IntelliSense.
02:08
@Mikhail So single threaded apartment is really made for UI stuff, or people that are too lazy to do it properly
any other COM should be multi-threaded
realistically most of it is hidden
if you CoCreateInstance of a single threaded CoClass on a multi apartment it'll give you a proxy
the main issue is when you directly request an object from that apartment
so 99% of the time you don't even know that the runtime spun up a new thread for it
02:58
@Borgleader TIL: reddit.com/r/AyyMD
@Mgetz Back before antibiotics, they used mercury pills to cure STDs. It worked too. I suppose it was a slower way to die, but I hope you'll forgive me if I prefer not to ingest mercury.
03:26
lol
@JerryCoffin Actually it didn't work, basically by the time you start getting the kind of lesions it was used to treat, it would have spread internally.
03:41
> Me and my friend both chose [the same character] at the exact same time on startup screen. […] All of our actions were shared and events were duplicated
why even bother handling race conditions
it all works out in the end
 
2 hours later…
05:44
@Mikhail Well, it wasn't very effective, and overdoses that led to dead or insane patients were common--but at least from what I've read, it did almost certainly extend life at least a little bit a fair amount of the time.
So, basically, it can't treat the disease because the disease is already in you.
@Mikhail If the disease already being "in you" meant it couldn't be treated, that would mean that sulfa drugs and antibiotics couldn't work...
Antibiotics go into the blood, sulfur powder didn't
@Mikhail And you think inhaling mercury fumes doesn't get it into your blood? If it didn't, the stuff wouldn't be nearly the deadly toxin it is...
I suspect that a lot of herb medicines poison you, but they cause greater damages to other foreign bodies (i.e. viruses & bacteria)...
05:50
@JerryCoffin So, true antibiotics are like little machines that will only cut bacteria cells, in contrast to sulfur which kinda, reacts with everything. From what I recall, the sulfer treatment was a powder that could sterilize wounds. Soap would have also worked, also sulfer was used in soap...
@Mikhail Where did sulfur come into the conversation? We were talking about mercury. I did mention sulfa drugs, but they're also antibiotics (though they fell into near disuse after penicillin became known).
Yeah, wrong chemical. But still, it didn't do anything with the possible exception of sterilize the lesion.
There were also some other treatments that were apparently somewhat effective--some using arsenic compounds, and another that's so insane it can't be made up. There is a reason our body reacts to infections with a fever: it honestly can kill off some diseases. In the case of syphilis, you can reduce its effects with a high enough fever--so you infect the patient with malaria, let them develop a high fever, then treat the malaria with quinine.
Of course, you lost a few to malaria, but on balance it apparently did actually benefit patients (somewhat) more often than not.
06:13
Ah, here we go: around 1909 or so, Paul Erlich and his assistant Sahachiro Hata successfully treated Syphilis with dioxy-diamino-arsenobenzol-dihydrochloride (i.e., an arsenic compound).
I'd be curious if you could identify the mechanism of action, its probably not a real antibiotic in the sense it targets some bacteria only mechanism, although for some reason it killed a lot of bacteria...
@Mikhail That one isn't really an antibiotic, but a form of chemotherapy. Erlich had previously invented tissue staining techniques. In the process, he noted that some stains were "attracted" more to some types of cells than others. This was an outgrowth of that: a "stain" that happened to be toxic, that was substantially more "attracted" to the syphilis bacteria (or maybe to cells infected with it) than to normal cells.
Sure, but what's the reason :-)
I don't know--and I kind of doubt that he really did either.
Given its age, and how long it's been since it was actively used, it's possible that nobody's studied it recently enough to know for sure (though to be honest, I doubt that--I'd guess most successful forms of chemotherapy have been studied pretty closely since).
06:33
But the people that study them are like me, so maybe nobody knows anything ¯\_(ツ)_/¯
@Mikhail Which didn't: mercury, sulfa drugs, or what? Sulfa drugs were actual antibiotics (though less effective than penicillin as a rule). Mercury was administered as a pill, and also (truly fearsome) by boiling mercury in a steam room, and having the patient breathe the result. It was also applied as a salve, but most use was apparently internal.
Even when it was a salve, it was apparently (mostly) before going in a steam room (or dry sauna) so you were breathing mercury fumes, not just applying it to the skin.
07:36
Morning
Ven
Ven
Heyo
08:40
@Mgetz It "solves" it by making it more difficult than it would be if people just used C APIs like normal.
09:12
seclists.org/oss-sec/2018/q2/189 more speculative execution attacks
If I go camping and live in an inflatable tent like ^this^, will you think less of me? >_<
Ven
Ven
I don't believe I can think less of you.
-∞< me < +∞
can always go less
@Mikhail very cool, thanks for sharing
09:49
@TelKitty lol, do it. I want to see photos.
I would totally buy it if it does not cost a grand. I have limited budget for hobby $.
 
1 hour later…
11:04
@Puppy yes in a mostly memory safe manner which C apis wouldn't
COM isn't any more memory safe than C
@Puppy it's quite a bit more safe in the sense that it has extremely predetermined semantics versus api specific
COM semantics are pretty unsafe, not significantly more safe than random C code
@Puppy in what sense, it has extremely well defined semantics and contracts. I've seen C-APIs with much worse
defining something doesn't make it safe
it's only safe if you define it to be something that is safe
e.g. a lot of COM APIs still pass around raw pointers and array lengths manually, no bounds checking
just as unsafe as C
11:11
I'd like to see you support a system that allows for integrations with scripting apis with little to no new code
@Puppy SAFEARRAY BSTR
BSTR isn't any more safe than C-strings
and nowhere in COM does it require that you use SAFEARRAY instead of raw C arrays
@Puppy it's length prefixed
@Mgetz So what? You still have to manually read the length and manually bounds check.
it's just as unsafe as receiving the length manually in any other way
the length prefix is an optimisation at most
and SAFEARRAY is not really tremendously safe
e.g. SafeArrayAccessData, oh wait, you have to manually remember to use SafeArrayUnaccessData when you're done
I never said it was perfect
it's not "imperfect", it's just as unsafe as any other random C API
there's nothing more safe about this
11:16
On that we'll have to disagree, I've seen C-apis that are far worse and far harder to use. Moreover would require custom wrapping to expose to any sort of scripting or .net
you can make any terrible C API just as bad as a COM API
I would say it's the other way around, the vast majority of C-apis are horribad
and frankly, not all COM APIs are scriptable or exposable in a useful way
but pretty much everybody permits access to C APIs anyway
a much broader base than COM
by that token we shouldn't be writing c++ because it limits our userbase 🙄
if you're implementing a C++ library and you want a broad userbase as a plus, then yes, expose a C API
 
6 hours later…
nwp
nwp
17:31
@StackedCrooked coliru broke
@nwp Looking at it.
0
Q: why THREADS in C++ gives different output on execution?

Rishi singhhere is my code of thread programing. I am initializing the two thread like first thread t1 is initialized using the non member function of class person and 2nd thread t2 is initialized using a member function of person class. Now my doubt is why output is different at each time. class person {...

/cc @Mysticial
@Borgleader Don't use threads. :)
terrible abstraction
nwp
nwp
Coliru lives again!
17:43
@Mysticial don't use std::async either!
18:14
Yeah, with modern suoer-scalar aritechtures you can get parallelism without explicit threading
@Borgleader Why is water wet?
Is the term "method" used at all in C++? Or do we always only refer to "member functions"?
nwp
nwp
The standard doesn't define "method". People usually assume you mean "member function".
18:31
Woo I have WiFi on a plane
We live in the future
nwp
nwp
Do some file sharing and watch them fight over jurisdictions.
18:53
@BartekBanachewicz Welcome to the present.
Intel just got back to me about the AVX Spectre. They said they are "evaluating it right now" and implied that they want an embargo. Holy shit.
wait what
So no, my blog is not going to go up any time soon.
What did you write there?
19:04
@Puppy No, this one is completely different.
Also @Pup I also got promoted recently, not sure if I bragged here already
The fact that Intel responded the way they did implies that the AVX Spectre is not one of the 8 Spectre-NG ones which haven't all been disclosed yet.
The FP register one is one of the Spectre-NG ones.
@BartekBanachewicz Congratulations.
what did youg et promoted to?
Although dunno how long I'll keep the title, I'm just flying back from an interview
what is the title?
19:14
Senior Software Developer
nice
19:27
Well done, you are now officially someone who has been promoted :P
nwp
nwp
Did you get a raise or just more work and responsibility for the same pay?
@Mysticial did they also imply something about a bounty?
@ratchetfreak yes they did. Even though I violated at least 2 or 3 requirements (among many) for getting the bounty, they still spoke as if it was still on the table.
Specifically, the bounty requires:
- The report to be encrypted with PGP. I didn't encrypt shit when I submitted to them.
- Step-by-step repro details for the exploit. My attack is theoretical only, I have no PoC.
I haven't violated anything else yet.
@nwp of course it's the latter
I wouldn't respect my manager if he didn't jump at the possibility of avoiding spending more money for free
@thecoshman so how's your license going? Believe it or not there currently 4 people in progress for their licenses that I got into that lol
20:01
@BartekBanachewicz Should be doing first day of the day of it Tuesday
20:20
Shit, now Intel wants me to PGP emcrypt all my emails I exchange with them... How the fuck do I even do that?
Talk about shit hitting the fan.
20:36
@Mysticial no idea but aren't they going to be annoyed you discussed it here?
he kept it pretty vague though
@Mgetz I haven't talked about the details of it.
@Mysticial could have sworn you did to me awhile back here
@Mgetz There's a few critical missing pieces which I left out.
a google with your mail client name +pgp should help bring up results
20:38
Someone who's an expert in area who poured over the transcript can probably piece it together in some fashion and fill in the missing link.
though I'm surprised gmail doesn't have support natively
@Mgetz Those critical missing pieces are what kept me from submitting the report months ago when I started thinking about this attack.
20:59
@Borgleader
-1
Q: Where to complain if my question downvoted?

Bhavin ChiragWhere to complain if my question downvoted? I thought I asked decent question, however in my oppinion nobody bother to read it carefully. They start to call my question vague, too broad. They start giving answers, which is not fit to my purpose and it can be seen during thorough (but not difficul...

^^ meta.SO is definitely the right place. :P
 
3 hours later…
23:41
Current hypothesis: The sweet spot for transactions will be Intel-style TSX with speculative execution of atomic blocks and lone atomic instructions, making them free in the no-contention case. All else will be a software problem. https://twitter.com/timsweeneyepic/status/996269325378973696
@Mysticial xD kek
"And Native Shall Rise Again!" (in a Southern Accent)
Also how the fuck do I take an integral over a random function. Typical integration involves adapting the integral step size adaptively, but if your function is random the deeper you look you'd get different values. Aka random([-1:0.1:1]) is different then random([-1:0.05:1])

« first day (2803 days earlier)      last day (2371 days later) »