Questions tagged [x86]

The processor architecture of most PCs and servers, including the 386/486/Pentium/… (IA-32) 32-bit family and the amd64 64-bit family. Most x86 processors are made by Intel or AMD.

7
votes
2answers
117 views

How does the ELF loader determine the initial stack size?

I'm studying the ELF specification (http://www.skyfree.org/linux/references/ELF_Format.pdf), and one point that is not clear to me about the program loading process is how the stack is initialized, ...
2
votes
1answer
78 views

82MB of “reserved memory” on 512MB (x86) system

I reinstalled a fresh debian 10 on an old x86 system with 512MB RAM (everything works ok). Available memory is 431MB. (No graphic card plugged right now) I don't think that that much memory was "...
1
vote
1answer
27 views

What is the correct Grub configuration to boot a kernel with an initramfs embedded in the kernel image?

I've used buildroot to compile a Linux kernel image with the root file system embedded as an initramfs. But when I go to boot it I see grub select the enctry and then I get a solid cursor in the up ...
1
vote
0answers
32 views

How do I get Solaris 11.3 to recognise my hard drive as having 4Tb capacity?

I have a hard drive which I know has 4Tb capacity, but is only showing on my Solaris 11.3 x86 system as having 2Tb. format -e yields the following: c1t2d0: configured with capacity of 2047.89GB 2. ...
2
votes
2answers
212 views

What happens whenever there is a segfault in linux

What are the steps that the Linux kernel does whenever the hardware raises segfault. Right now I know that through the IDT, the fault handler handles it, and somewhere along the road there is a ...
1
vote
1answer
49 views

Transparent x86 emulation using QEMU on Raspbian

I'm trying to setup transparent x86 emulation on Raspbian according to this tutorial: https://wiki.debian.org/QemuUserEmulation. The issue is that after enabling multiarch and running sudo apt-get ...
0
votes
0answers
25 views

Is there any way to find an associated page with the page under the same VMA?

Assume There are many pages in a random vma. I know the virtual address of page1 0x7f9942c273dc and have a pointer of its struct vm_area_struct vma1. VMA 1 |---- page 1 |---- page 2 |---- ... |---- ...
1
vote
0answers
28 views

Does Linux uses Segmentation (in addition to Paging)? [duplicate]

As far as I know, Linux uses Paging to allow processes (and even the kernel itself) to access memory. And through paging, the CPU can prevent a process (which runs in user mode of course) from ...
2
votes
1answer
71 views

Can the kernel allow a process to execute all privileged CPU instructions?

I have read that the kernel can allow a process (which is running in user mode) to execute the IN and OUT CPU instructions (which are privileged instructions I think). But can the kernel allow a ...
2
votes
1answer
142 views

How does the CPU know if it is accessing an unallocated memory location? [closed]

Based on my understanding, when the CPU is accessing some memory location, for example if it is setting the memory location with the address of 4 to the value 100, it treats the address 4 as a virtual ...
0
votes
1answer
44 views

Two questions about copy_pte_range() in kernel

I've been trying to understand how fork() works and finally arrived at copy_pte_range(). Most of the functions are understandable but few are quite questionable. Kernel: 4.14.84 static int ...
27
votes
3answers
2k views

Porting Linux to another platform requirements [closed]

I know that Linux is available and has been ported for many different platforms such as for X86, ARM, PowerPC etc. However, in terms of porting, what is required exactly? My understanding is that ...
1
vote
0answers
19 views

Why does the address of an internal symbol needs to be recorded in .got?

I am reading the blog https://eli.thegreenplace.net/2011/11/11/position-independent-code-pic-in-shared-libraries-on-x64 In the part "x64 PIC with data references - an example", it seems that the ...
1
vote
1answer
150 views

How should I pass 32-bit arguments to Linux syscalls on x86_64?

If a syscall needs some 32-bit arguments like uid_t or int (for file descriptors) or unsigned int or even some 16-bit type, how can I pass them using 64-bit registers? Do I need to zero-extend or ...
1
vote
2answers
70 views

How does mmap work with x32 ABI?

I'm looking at Linux 5.0-rc5 source code in arch/x86/entry/syscalls/syscall_64.tbl, find that there's no separate syscall number for x32 mmap. So how does the kernel know we're using the x32 ABI in ...
1
vote
1answer
435 views

yum: gcc trying to install i686 architecture on x86_64 server

Trying to YUM install gcc gcc-g++ make and it fails with: Package: glibc-2.17-260.el7.i686 (RHEL_SEC_7) Requires: glibc-common = 2.17-260.el7 Installed: glibc-common-2.17-260.el7_6.3....
0
votes
0answers
17 views

Boot Linux Mint Partition from VirtualBox on Windows, don't seem to have /usr/lib/grub/i386-pc

I'm trying to boot a regular Linux partition from VirtualBox on Windows. I found this tutorial and followed it. Basically, this just creates an ISO file of the GRUB configuration so that VirtualBox ...
1
vote
1answer
317 views

Why do Linux world use the term i386 instead of x86?

I see the term i386 instead of x86 in many places related to Linux. As of my knowledge, they are not interchangeable. x86 is a family of instruction set architectures where i386 is a specific one of ...
0
votes
1answer
37 views

What software that I run uses AVX (or a specific assembly instruction)?

Let's say I want to find any libraries that use AVX, or the VZEROALL instruction? How could I go about doing that? I don't care if the AVX was hand written or compiled, I'll look that up later. I'm ...
1
vote
1answer
604 views

Trying to resolve dependency on libz.so.1(ZLIB_1.2.9)

A friend built an EPUB converter for me that depends on lib64png16_16. lib64png16_16 has a dependency on libz.so.1(ZLIB_1.2.9)(64bit). I pulled down and compiled ZLIB_1.2.11, but it's not being ...
1
vote
1answer
96 views

What does SYSENTER do in 64-bit Long mode on Linux?

There is an x86 instruction sysenter. This seems to be the Intel fast-system-call method. SYSENTER seems to be valid in LONG mode (64-bit) on Intel processors. This seems to have fallen out of favor ...
0
votes
1answer
249 views

Why cannot 64-bit shared libraries be used by 32-bit code?

On GNU/Linux, x86/x86-64, in general, what is the reason that (at least sometimes, maybe there are exceptions) 64-bit library code cannot be used by a 32-bit program? I'm aware of many of the ...
0
votes
1answer
97 views

Does GCC generate Bit Tests (x86 BT)?

Seaching through the GCC source, I see things like X86_TUNE_USE_BT TARGET_USE_BT My goal is to get an answer for myself whether or not GCC generates BT, BTS, BTR, and BTC. I started with BT and I ...
0
votes
1answer
712 views

GNU Linker differences between the different 32bit emulation modes?

What is the difference between the 386 and 32 bit options in ld -V? elf32_x86_64 elf_i386 i386linux i386pep i386pe And, where can I find the documentation on these "emulation modes"
0
votes
1answer
3k views

What exactly does “Illegal instruction (core dumped)” mean? [duplicate]

I see a lot of solutions to resolving the problem exemplified by Illegal instruction (core dumped) But, I'm wondering what exactly that means? What generates that error, and what's the root cause ...
12
votes
3answers
762 views

What does physical address 0 in x86 Linux contain?

I am not sure if this question should go here or in reverseengineering.stackexchange.com Quoting from wikipedia: In the 8086 processor, the interrupt table is called IVT (interrupt vector table)....
0
votes
3answers
298 views

How do i convert 32-bit to 64-bit arch on centos 6?

Currently I installed Centos 6.9 32bit OS in VM and I want to convert into 64-bit architecture in same machine. I checked lots of stuff over internet but didn't find any forum for same, specifically ...
0
votes
1answer
63 views

What is x86/mm?

During boot time there are certain instructions run from something like x86/mm as shown in the image. I was wondering if anyone knew what they were and is it a file system dependent instruction?
2
votes
1answer
78 views

FreeBSD i386 sendfile for large files

Is there any kind of sendfile64 for FreeBSD i386? Can't find anything like this in FreeBSD sys calls reference.
0
votes
1answer
155 views

vDSO file path in Android x86 kernel

I am working on my school research on Dirty CoW (if you don't know what it is and you think the implementation might be relevant to my problem, see P.S. below). I have found some solutions (i.e. https:...
2
votes
1answer
3k views

How to verify spectre retpoline feature is enabled on my linux machine with kernel 4.14.14?

I installed latest stable kernel 4.14.14 from ELRepo which seems to have some fix for the Spectre vulnerability. The changelog says there is some CONFIG_RETPOLINE in /boot/config-4.14.14-1.el7.elrepo....
34
votes
4answers
28k views

How to mitigate the Spectre and Meltdown vulnerabilities on Linux systems?

Security researchers have published on the Project Zero a new vulnerability called Spectre and Meltdown allowing a program to steal information from a memory of others programs. It affects Intel, AMD ...
1
vote
1answer
976 views

How to install check:i386 on amd64 debian stretch? [closed]

I have a problem with amd64 Debian GNU/Linux 9.3 (stretch) virtualbox vm. I want to use 32 bit version of libcheck (C unit test framework), because the program I test must be compiled as 32 bit, so ...
0
votes
1answer
1k views

Why doesn't Fedora support i686 architecture?

My desktop has a i686 CPU running macOS and I'm looking to install Fedora 26 i686. It turns out that they only support x86_64 and i386 (plus the various ARM architectures). I've tried to install ...
1
vote
1answer
152 views

Installing debian amd64 on laptop that refuses to boot 64bit system

I am trying to install Debian 9, to one of my laptops, that I have never got to boot into 64 bit. However I did switch the kernel to 64bit. I then used multi-arch to install 64bit virtual-box (this ...
1
vote
2answers
763 views

Why the “lspci” command does not list the serial ports?

I have enabled two serial ports in VirtualBox, and then typed the lspci command in Ubuntu, and this is the result: The serial ports are not listed, is it because the serial ports are not part of the ...
2
votes
1answer
132 views

how to directly drive the PC speaker in linux

On the original IBM PC, you could directly drive the PC speaker by writing ones and zeroes to bit 1 of I/O address 0x61; it was basically a 1-bit DAC running at a timer frequency of 1.19 MHz (system ...
0
votes
2answers
100 views

How can I know when it's safe to uninstall my i386 packages (on an amd64 system)?

I use GNU/Linux Mint 18.1 on an amd64/x86_64 processor. I have a bunch of i386 packages installed - 250 of them to be exact. Up until today I knew I need some/most of them, since I had 32-bit Skype ...
26
votes
3answers
6k views

How to detect and mitigate the Intel escalation of privilege vulnerability on a Linux system (CVE-2017-5689)?

According to the Intel security-center post dated May 1, 2017, there is a critical vulnerability on Intel processors which could allow an attacker to gain privilege (escalation of privilege) using AMT,...
0
votes
1answer
479 views

Questions about kernel virtual address layout

I have two questions about virtual address layout of kernel on x86 and x64 system. As far as I know, x86 uses the splited memory layout that is highmem and lowmem. If my understanding is correct, ...
2
votes
1answer
6k views

How can I build and run 32-bit software on 64-bit Debian? [duplicate]

I'm looking into developing a C++ program that needs a proprietary 32-bit library and which should run on 64-bit Debian (jessie, amd64). I assume I need to create a 32-bit executable in order to be ...
1
vote
1answer
314 views

Lubuntu 16.10 (32-bit, i386) booting on Dell Inspiron 1525

I'm having some problems with booting on my old laptop. It is a Dell Latitude 1525 with an Intel Celeron CPU (550 @ 2 GHz) with 4 GB of memory. It used to run Windows Vista, but due to issues, I ...
0
votes
1answer
268 views

How to check if the hypervisor present bit is set using CPUID

I currently have problems determining if the hypervisor bit (31 bit) is set to true using CPUID on command line. I'm using the following command cpuid -1 -r to retrieve the hex data as shown in the ...
2
votes
0answers
656 views

Why is ondemand not available as a governor for cpu frequency scaling? [duplicate]

Consider the following: $ cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_governors performance powersave $ cat /proc/config.gz | gunzip | grep -i ondemand ...
0
votes
1answer
507 views

Linux: location in memory of initramfs

What is the standard location in the RAM of the initramfs (0xSOMETHING) ? If it is not specific, how do I specify an address to load initramfs from during boot? Is it possible to run make menuconfig ...
0
votes
1answer
192 views

Which device the reset vector address is mapped?

#cat /proc/iomem . . . **000f0000-000fffff : System ROM** . . . **fffe0000-ffffffff : reserved** But Intel Reference Manual says that ...
7
votes
1answer
570 views

Is there an open source software to simulate and virtually program a computer BIOS?

I’m looking for an open source software like Virtual-box that I can run on Linux but gives the possibility to program the BIOS (use a personal BIOS program). I want to understand (in a practical way) ...
1
vote
4answers
1k views

QEMU with KVM with differing host/guess architectures

My guest OS is an x86 (.vmdk format) and it seems from QEMU documentation that since my host is an ARM Raspberry Pi 3, I can't take advantage of KVM even after enabling it in the kernel. Is that ...
3
votes
1answer
68 views

What UEFI-related problems do I need to look out for when getting an x86 computer for Linux?

The last time I bought a PC several years ago I had no problems installing Linux on it. I just inserted my Debian iso in the CD-ROM drive and it put Debian on the computer no problem. However, I have ...
3
votes
1answer
4k views

how to turbo boost my cpu on Ubuntu?

My PC has one Intel Haswell i5 4690, which is supposed to be boosted up to 3.9GHz from the regular frequency 3.5GHz. I do not know if it is possible to use some softwares to turbo boost this cpu on ...