Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
program666
Aug 22, 2013

A giant carnivorous dinosaur
I kind of know all that but I thought gcc would do something like: transform 4 generic instructions into a single one that do the same thing in a single clock loop instead of 4, and this single instruction is only present on one of the two processors. And in my head gcc would do this without the developers needing to set anything on the configure or make files. I guess I was way off.
Funnily enough I'm pretty sure I did have 3dnow set on my installation, checking processor capabilities and setting USE flags accordingly is one of the steps on a gentoo installation.

E: also, I remember having a problem when I migrated from one AMD that had "sse2" or something to another that didn't have it but was also AMD, and I had problems with mplayer until I fixed the USE flags and installed mplayer again. This time around not even that was a problem.

E: basically I didn't know the application had to explicitly support mtune or march

program666 fucked around with this message at 16:51 on Mar 13, 2015

Adbot
ADBOT LOVES YOU

Suspicious Dish
Sep 24, 2011

2020 is the year of linux on the desktop, bro
Fun Shoe
And all compilers will have switches at runtime to determine whether it can run the latest SSSSEAVX5 or whatever and if not, fall back to a slightly slower path.

KozmoNaut
Apr 23, 2008

Happiness is a warm
Turbo Plasma Rifle


program666 posted:

You mean arch?

Yeah. It's trucked on through a complete system upgrade from Pentium 4 to Phenom II, several system drives and a migration to SSD, and several major system changes (including migrating to systemd) with surprisingly little trouble.

program666
Aug 22, 2013

A giant carnivorous dinosaur
I have lots of trouble with gentoo upgrades from time to time, never did a full system upgrade though, but sometimes when you have to upgrade python or something I have loads of trouble. But it could be very well be because I'm loving incompetent, I'm really lazy and just learn a bit less than the bare minimum than I should to maintain my gentoo lol.

evol262
Nov 30, 2010
#!/usr/bin/perl

program666 posted:

I kind of know all that but I thought gcc would do something like: transform 4 generic instructions into a single one that do the same thing in a single clock loop instead of 4, and this single instruction is only present on one of the two processors. And in my head gcc would do this without the developers needing to set anything on the configure or make files. I guess I was way off.
Funnily enough I'm pretty sure I did have 3dnow set on my installation, checking processor capabilities and setting USE flags accordingly is one of the steps on a gentoo installation.

E: also, I remember having a problem when I migrated from one AMD that had "sse2" or something to another that didn't have it but was also AMD, and I had problems with mplayer until I fixed the USE flags and installed mplayer again. This time around not even that was a problem.

E: basically I didn't know the application had to explicitly support mtune or march

Almost zero packages use 3dnow.

But you're right in one sense: gcc does transform complex C into less complex assembler that does the same thing. But that one instruction isn't any different between Intel and AMD. There's a lot of branch prediction and logic actually happening on the CPU when it pulls instructions off the cache. But how processors work is way out of scope here, and I don't have time to write a long post at the moment. I'd suggest looking up "branch prediction", "instruction pipeline", "cache miss", "out of order execution", and a few other phrases if you want to learn why some processors are faster than others clock-for-clock. Pipeline length for various CPU families is easy to find out.

mtune and march don't need application support. Sometimes SSE needs application support, along with some other use flags. 3dnow almost always needs application support.

Suspicious Dish
Sep 24, 2011

2020 is the year of linux on the desktop, bro
Fun Shoe
GCC being able to autovectorize is fairly recent. GCC would not autovectorize to MMX/3DNow! because it's not 1992.

evol262
Nov 30, 2010
#!/usr/bin/perl

Suspicious Dish posted:

GCC being able to autovectorize is fairly recent. GCC would not autovectorize to MMX/3DNow! because it's not 1992.

Sorry, didn't mean to be confusing. I didn't mean autovectorization by "transform complex...". I meant that even conservative optimization will do away with noops and empty loops, and aggressive optimization can lead to very different intermediate code.

nosl
Jan 17, 2015

CHIM, bitch!

KozmoNaut posted:

Still on my (rolling release upgraded) 2009 installation :krad:

I've had to rescue it from no-boot conditions maybe 5 or 6 times

I'd love to see the output of

code:
tree -L 7
executed from /

Your system might still boot, but that doesn't mean it isn't a completely awful mess. This is sort of unavoidable with rolling release systems. Coming from an Arch and Gentoo user (who has kept his Gentoo install for a similarly long time).

PS) Not actually saying to post the output of that. It's probably REALLY, REALLy, REALLY long.

program666 posted:

I have lots of trouble with gentoo upgrades from time to time, never did a full system upgrade though, but sometimes when you have to upgrade python or something I have loads of trouble. But it could be very well be because I'm loving incompetent, I'm really lazy and just learn a bit less than the bare minimum than I should to maintain my gentoo lol.

Unless you use Gnome or KDE, system updates rarely break anymore. And by anymore, I mean in the past year and a half. It's really improved dramatically. Don't be afriad! :)

nosl fucked around with this message at 21:19 on Mar 13, 2015

Lysidas
Jul 26, 2002

John Diefenbaker is a madman who thinks he's John Diefenbaker.
Pillbug
I remembered coming across this article a while ago, and thought it's worth posting:

How does systemd relate to Plasma? (Plasma is the desktop environment that's the basis of KDE.)

Gist of it is "A lot of that stuff that systemd provides would be really nice to use, and it defeats the purpose if we need to be able to fall back to older implementations of these things, since we're just adding one more case to a trainwreck of an abstraction layer".

quote:

Logind is a tiny daemon that keeps track of seats and sessions on your machine.

...

This class kdisplaymanager in plasma-workspace shows our abstraction layer growing since 2004; it currently has Logind support but as we have been adding to a constantly broken abstraction layer it's used very badly. It has tracking code for over 5 different systems (KDM, old GDM, new GDM (which is now old), consolekit, org.freedesktop.DisplayManager, and now logind) and is probably one of the ugliest pieces of code in Plasma.

quote:

In many cases [hooking into systemd for things] allows us to throw away large amounts of code whilst at the same time providing a better user experience. Adding it as an optional extra defeats the main benefit.

KozmoNaut
Apr 23, 2008

Happiness is a warm
Turbo Plasma Rifle


nosl posted:

I'd love to see the output of

code:
tree -L 7
executed from /

Your system might still boot, but that doesn't mean it isn't a completely awful mess. This is sort of unavoidable with rolling release systems. Coming from an Arch and Gentoo user (who has kept his Gentoo install for a similarly long time).

PS) Not actually saying to post the output of that. It's probably REALLY, REALLy, REALLY long.


/usr is ~9,6G, /etc is ~20M, so there can't be too much cruft hiding in the corners.

I have done a bit of manual cleaning-up from time to time, purging config files etc. for applications that aren't installed anymore. Is it pristine like a brand new install? No, but it's running perfectly, with no odd behavior.

I used Gentoo before Arch, and believe me, Gentoo was 100x worse.

YouTuber
Jul 31, 2004

by FactsAreUseless
So against my better judgement I'm going to peek my head into the TOR "Deep Web" which is apparently the wild west. Whats the most recommended way to browse this poo poo without getting wrecked by some script kid? Would using a VM with a minimal distro suffice or is running off of a LiveCD the only way to play it safe?

What distro is the most secure for this? Tails?

Gucci Loafers
May 20, 2006

Ask yourself, do you really want to talk to pair of really nice gaudy shoes?


You're not going get hacked unless you do something incredibly dumb but using TAILS is pretty standard. Throw it in a VM but I'll guarantee the darkweb is a lot less exciting than you think it is.

Powered Descent
Jul 13, 2008

We haven't had that spirit here since 1969.

YouTuber posted:

So against my better judgement I'm going to peek my head into the TOR "Deep Web" which is apparently the wild west. Whats the most recommended way to browse this poo poo without getting wrecked by some script kid? Would using a VM with a minimal distro suffice or is running off of a LiveCD the only way to play it safe?

What distro is the most secure for this? Tails?

Tails is the most secure method, yes. But if you're just looking to poke around a bit, torbrowser is less trouble. Or if you're feeling particularly adventurous, you can always set up a Raspberry Pi as an anonymizing middlebox and then use any device you want.

Also,

Tab8715 posted:

I'll guarantee the darkweb is a lot less exciting than you think it is.

This is true.

Bhodi
Dec 9, 2007

Oh, it's just a cat.
Pillbug
Remember, VPN -> TOR = Go to Jail

Gucci Loafers
May 20, 2006

Ask yourself, do you really want to talk to pair of really nice gaudy shoes?


Bhodi posted:

Remember, VPN -> TOR = Go to Jail

How so?

karl fungus
May 6, 2011

Baeume sind auch Freunde
I'm trying to set up a 64-bit Linux VM on VirtualBox. AMD-V is enabled, and I've double-checked it and looked at cpuinfo too. However, VirtualBox just isn't letting me set up 64-bit VMs. What gives?

CaptainSarcastic
Jul 6, 2013



karl fungus posted:

I'm trying to set up a 64-bit Linux VM on VirtualBox. AMD-V is enabled, and I've double-checked it and looked at cpuinfo too. However, VirtualBox just isn't letting me set up 64-bit VMs. What gives?

What is the host OS? It seems odd to bring up in this day and age, but it should be noted that a 32-bit host cannot run 64-bit guests.

Bhodi
Dec 9, 2007

Oh, it's just a cat.
Pillbug
You want always go TOR -> VPN. I was making a joke, but you probably want to hide your real location from your VPN because it's a paid service and so they have your name and credit card data. You also want to hide the fact you're connecting to a VPN from your ISP because that's easily trackable, too.

Lots of words about it here: https://trac.torproject.org/projects/tor/wiki/doc/TorPlusVPN

karl fungus
May 6, 2011

Baeume sind auch Freunde

CaptainSarcastic posted:

What is the host OS?

Latest 64-bit Xubuntu

Longinus00
Dec 29, 2005
Ur-Quan

karl fungus posted:

I'm trying to set up a 64-bit Linux VM on VirtualBox. AMD-V is enabled, and I've double-checked it and looked at cpuinfo too. However, VirtualBox just isn't letting me set up 64-bit VMs. What gives?

What kind of errors are you getting? I'm assuming the iso is refusing to boot? Also, have you installed any other virtualization software?

Death Vomit Wizard
May 8, 2006
Bottom Feeder
I am planning to start hosting a blog (with little to no traffic) as a home server project. Can anyone recommend some good software? Any general security tips for a first time Web host are also welcome.

Vulture Culture
Jul 14, 2003

I was never enjoying it. I only eat it for the nutrients.

Death Vomit Wizard posted:

I am planning to start hosting a blog (with little to no traffic) as a home server project. Can anyone recommend some good software? Any general security tips for a first time Web host are also welcome.
WordPress is your default option; only use something else if you have a really good reason to. It's probably fastest to get off the ground with Apache and mod_php, but running PHP through Nginx+FPM would also be a good exercise.

Security tips: keep your poo poo up-to-date and don't use easily-cracked passwords. WordPress's auto-updater is so easy to use that there's positively no reason not to always be patched. A few years ago, there would have also been about ten paragraphs here explaining why PHP security is terrible and why you should change every setting away from some insecure default, but nowadays the default settings from most distro packages are pretty sane.

Vulture Culture fucked around with this message at 06:57 on Mar 16, 2015

RFC2324
Jun 7, 2012

http 418

karl fungus posted:

I'm trying to set up a 64-bit Linux VM on VirtualBox. AMD-V is enabled, and I've double-checked it and looked at cpuinfo too. However, VirtualBox just isn't letting me set up 64-bit VMs. What gives?

A little digging turned this up, which might help.

https://forums.virtualbox.org/viewtopic.php?f=6&t=57926

evol262
Nov 30, 2010
#!/usr/bin/perl

karl fungus posted:

Latest 64-bit Xubuntu

Is kvm-amd loaded?

Weird Uncle Dave
Sep 2, 2003

I could do this all day.

Buglord

Misogynist posted:

WordPress is your default option; only use something else if you have a really good reason to. It's probably fastest to get off the ground with Apache and mod_php, but running PHP through Nginx+FPM would also be a good exercise.

Security tips: keep your poo poo up-to-date and don't use easily-cracked passwords. WordPress's auto-updater is so easy to use that there's positively no reason not to always be patched. A few years ago, there would have also been about ten paragraphs here explaining why PHP security is terrible and why you should change every setting away from some insecure default, but nowadays the default settings from most distro packages are pretty sane.

Be aware that WordPress' auto-updater only works on WordPress itself, not on WordPress themes and plug-ins (which is where about 99% of security issues with WordPress really are, these days). So you'll still need to look at your site and update things every so often. It's just a couple button clicks, but you do have to remember to click those buttons on occasion.

Death Vomit Wizard
May 8, 2006
Bottom Feeder
Thank you both. Wordpress it is, then. Also, Nginx + PHP-FPM looks rad.

karl fungus
May 6, 2011

Baeume sind auch Freunde

evol262 posted:

Is kvm-amd loaded?

I don't know, how do I check?

By the way, here's the list of flags for each core via /proc/cpuinfo:

quote:

flags: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt pdpe1gb rdtscp lm 3dnowext 3dnow constant_tsc rep_good nopl nonstop_tsc extd_apicid aperfmperf pni monitor cx16 popcnt lahf_lm cmp_legacy svm extapic cr8_legacy abm sse4a misalignsse 3dnowprefetch osvw ibs skinit wdt arat cpb hw_pstate npt lbrv svm_lock nrip_save pausefilter vmmcall

evol262
Nov 30, 2010
#!/usr/bin/perl

karl fungus posted:

I don't know, how do I check?

By the way, here's the list of flags for each core via /proc/cpuinfo:

lsmod

Flags are fine. You haven't been able to buy an AMD processor without SVM since socket 939 almost 10 years ago.

But kvm_amd and vboxdrv are orthogonal (really, all hardware virt extensions are orthogonal, but...). You have to rmmod kvm_amd if it's loaded and you want to use vbox.

karl fungus
May 6, 2011

Baeume sind auch Freunde

evol262 posted:

lsmod

Flags are fine. You haven't been able to buy an AMD processor without SVM since socket 939 almost 10 years ago.

But kvm_amd and vboxdrv are orthogonal (really, all hardware virt extensions are orthogonal, but...). You have to rmmod kvm_amd if it's loaded and you want to use vbox.

I have kvm, but not kvm_amd.

meatpath
Feb 13, 2003

Can anyone recommend a cross-platform encryption solution for an external HDD? I have a laptop running Mint and a desktop running Win7, and I would like to be able to use the drive (as seamlessly as possible) between both machines, but also have the entire drive encrypted.

evol262
Nov 30, 2010
#!/usr/bin/perl

karl fungus posted:

I have kvm, but not kvm_amd.

Output of lsmod, please

karl fungus
May 6, 2011

Baeume sind auch Freunde

evol262 posted:

Output of lsmod, please

code:
Module                  Size  Used by
cfg80211              581632  0 
pci_stub               16384  1 
vboxpci                24576  0 
vboxnetadp             28672  0 
vboxnetflt             28672  0 
vboxdrv               421888  3 vboxnetadp,vboxnetflt,vboxpci
binfmt_misc            20480  1 
nls_iso8859_1          16384  1 
amdkfd                 90112  1 
amd_iommu_v2           20480  1 amdkfd
joydev                 20480  0 
radeon               1585152  3 
snd_hda_codec_idt      61440  1 
snd_hda_codec_generic    73728  1 snd_hda_codec_idt
snd_hda_intel          32768  1 
snd_hda_controller     36864  1 snd_hda_intel
snd_hda_codec         147456  4 snd_hda_codec_idt,snd_hda_codec_generic,snd_hda_intel,snd_hda_controller
snd_hwdep              16384  1 snd_hda_codec
snd_pcm               110592  3 snd_hda_codec,snd_hda_intel,snd_hda_controller
snd_seq_midi           16384  0 
snd_seq_midi_event     16384  1 snd_seq_midi
snd_rawmidi            32768  1 snd_seq_midi
ttm                   102400  1 radeon
drm_kms_helper        126976  1 radeon
kvm                   512000  0 
snd_seq                69632  2 snd_seq_midi_event,snd_seq_midi
snd_seq_device         16384  3 snd_seq,snd_rawmidi,snd_seq_midi
snd_timer              32768  2 snd_pcm,snd_seq
drm                   352256  6 ttm,drm_kms_helper,radeon
snd                    86016  12 snd_hwdep,snd_timer,snd_hda_codec_idt,snd_pcm,snd_seq,snd_rawmidi,snd_hda_codec_generic,snd_hda_codec,snd_hda_intel,snd_seq_device
soundcore              16384  2 snd,snd_hda_codec
k10temp                16384  0 
i2c_algo_bit           16384  1 radeon
shpchp                 40960  0 
i2c_piix4              24576  0 
mac_hid                16384  0 
parport_pc             36864  0 
ppdev                  20480  0 
lp                     20480  0 
parport                45056  3 lp,ppdev,parport_pc
autofs4                40960  2 
hid_generic            16384  0 
uas                    24576  0 
sdhci_pci              24576  0 
usb_storage            69632  1 uas
sdhci                  45056  1 sdhci_pci
usbhid                 53248  0 
hid                   114688  2 hid_generic,usbhid
ahci                   36864  3 
r8169                  90112  0 
libahci                32768  1 ahci
mii                    16384  1 r8169

Bhodi
Dec 9, 2007

Oh, it's just a cat.
Pillbug
I have to cross-post this, it's too good not to share with you guys and especially evol

pseudorandom name posted:

Matthew Garrett @mjg59 · Mar 13
Impressive. Oracle have released a signed kernel that implements none of the features that make a signed kernel in any way worthwhile.

Matthew Garrett @mjg59 · Mar 13
eg, kexec_load() is still enabled

Matthew Garrett @mjg59 · Mar 13
Basically the Oracle Unbreakable Enterprise Kernel is not a kernel that you should let near any Secure Boot systems

Matthew Garrett @mjg59 · Mar 13
The only kernel Oracle supply with any meaningful security is the one that's just a direct copy of the Red Hat kernel source

Matthew Garrett @mjg59 · Mar 13
Both the broken UEK kernel and the good Red Hat clone kernel are signed with the same key

Matthew Garrett @mjg59 · Mar 13
So you can just replace the good kernel with the broken kernel, own the system and then kexec() into a backdoored good kernel

Matthew Garrett @mjg59 · Mar 13
Basically https://blogs.oracle.com/wim/entry/...ort_with_oracle is loving pointless

Matthew Garrett @mjg59 · Mar 13
.@Oracle delete your signing key

Matthew Garrett @mjg59 · Mar 13
The really fun thing is that Oracle called their signing key "oracle301". Because the RH one ends 301. Because that was its serial number.

Matthew Garrett @mjg59 · Mar 13
Security implemented by running sed without understanding what's actually going on.

Matthew Garrett @mjg59 · Mar 13
Also, only releasing this with 7.1 is kind of admitting "we didn't even try to solve this problem until we could just copy Red Hat"

Matthew Garrett @mjg59 · Mar 13
With respect to the lovely people I know at Oracle: Unbreakable Linux is a bad product and you should feel bad

Matthew Garrett @mjg59 · 27m
Of course my first attempt to download OEL 7.1 ends up with a corrupt ISO

Matthew Garrett @mjg59 · 22m
Deeply impressed to discover that Oracle Linux installs its bootloader in EFI/redhat

Matthew Garrett @mjg59 · 19m
I mean to be fair who would want to install RHEL and Oracle Linux on the same computer anyway

Matthew Garrett @mjg59 · 19m
But how lovely is your sed job of a Linux distribution if you can't even find all the places to sed?

Matthew Garrett @mjg59 · 12m
Booted Oracle Linux 7 on a Secure Boot system, RH-derived kernel has appropriate lockdowns. Installed UEK kernel, rebooted, no lockdowns.

Matthew Garrett @mjg59 · 10m
Describing this as a cargo cult version of a Secure Boot implementation is an insult to actual cargo cults

Gucci Loafers
May 20, 2006

Ask yourself, do you really want to talk to pair of really nice gaudy shoes?


Who's Matthew Garrett?

Bhodi
Dec 9, 2007

Oh, it's just a cat.
Pillbug

http://en.wikipedia.org/wiki/Matthew_Garrett posted:

Matthew Garrett is a technologist, programmer, and free software activist who is a major contributor to a series of free software projects including Linux, GNOME, Debian, Ubuntu, and Red Hat.[2] He is a recipient of the Free Software Award from the Free Software Foundation for his work on Secure Boot, UEFI, and the Linux kernel.[3]

Longinus00
Dec 29, 2005
Ur-Quan

Tab8715 posted:

Who's Matthew Garrett?

He did a lot of the work on UEFI for linux. If that acronym means nothing to you then this talk he gave is a good watch.
https://www.youtube.com/watch?v=V2aq5M3Q76U

Gucci Loafers
May 20, 2006

Ask yourself, do you really want to talk to pair of really nice gaudy shoes?


Is there anything OEL does uniquely well?

Bhodi
Dec 9, 2007

Oh, it's just a cat.
Pillbug
It funnels money into oracle with a large profit margin.

karl fungus
May 6, 2011

Baeume sind auch Freunde
I had a breakthrough!

Apparently, HP decided that consumer-grade computers will not be able to run virtualization for some reason.

However, this can apparently be defeated by suspending the computer for two minutes. Now I can run 64-bit VMs just fine.

What's the explanation for that?

Adbot
ADBOT LOVES YOU

Odette
Mar 19, 2011

karl fungus posted:

I had a breakthrough!

Apparently, HP decided that consumer-grade computers will not be able to run virtualization for some reason.

However, this can apparently be defeated by suspending the computer for two minutes. Now I can run 64-bit VMs just fine.

What's the explanation for that?

Sounds like when you're forcing the memory flush, it reloaded over what blocking firmware they decided to put in, or something. I have no idea.

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply