General :: Reattaching To Same Address Space On Process Restart?

Feb 17, 2011

Suppose a process creates multiple shared mem segments as part of it job.Now is it always possible that on restart, that process can reattach to those previously created shared mem segments to the same virtual address spaces (returned on first time creation) ? My intention is use pointers over shared memory.So on restart I want those pointers absolute value to remain valid.

View 1 Replies


ADVERTISEMENT

Programming :: Shared Memory Address Area In Process Address Space?

Feb 21, 2011

if i attach a shared memory to my process whch part of the address space it will add(like stack, heap, data, code...).

View 3 Replies View Related

Programming :: Fork() Copies The Address Space Of The Calling Process?

May 13, 2010

I know that fork() copies the address space of the calling process. Say, however, i have a linked list allocated. Will the list be copied over to the child process's space? If so, i would have to free them in the child process as well as the parent process, correct? Or will the variables be copied but not be pointing to any valid address? Or would it just kind of not do anything?example:

Code:
struct ll_ex {
struct ll_ex * next;

[code]....

View 7 Replies View Related

General :: Virtual Space Seen By Each New Process In User Space?

Jun 21, 2010

In a 32-bit system, max memory addressable is 4GB. Now Linux kernel does memory mapping division of 1GB for kernel address space and 3GB for user address space. That means 4GB of virtual address space is divided between kernel (1GB) and user (3GB).

Q1. All virtual mapping utilizes the available physical RAM without any division? I mean to say that if RAM is 512MB then a page in kernel space can lie any where RAM (leave aside old PCI dma accesses)? (How this fits to fact that kernel memory is non-pageble)

Q2. If a process is created in user space, it has visibility 4GB address space or 3GB address space?

View 2 Replies View Related

General :: Automatically Restart A Process Every Few Hours?

Dec 30, 2010

I'm having a VPS using Ubuntu 10.4 and i would like a guide on how to restart apache2 process every few hours (a time determined by me).

View 11 Replies View Related

General :: Kill Zombie Process - Cannot Restart The Service

Aug 7, 2010

I have a process that I cannot kill with kill -9 how to go about this?

[Code]...

It is an openvpn process but I cannot retsrat the service as I alreday have another openvpn service running on the server so when I do openvpn service restart, it won;t know which service to restart.

View 3 Replies View Related

Security :: Address Space Randomization On 2.6.28-15-generic Ubuntu 9.04 - Finding Base Address?

Sep 14, 2009

Im an academic (university networks and security lecturer) studying/teaching network and operating system security, and inspired by the work of Hovav Shacham set about testing ASLR on linux. Principley I did this by performing a brute force buffer overflow attack on Fedora 10 and Ubuntu 9. I did this by writting a little concurrent server daemon which accidently on purpose didnt do bounds checking.

I then wrote a client to send it a malicious string brute forcing guessed addresses which caused a return-to-libc to the function usleep with a parameter of 16m causing a delay of 16 seconds as laid out in [URL] Once I hit the delay I new I had found the function and could calculate delta_mmap allowing me to create a standard chained ret-to-libc attack. All of that works fine. However .... To complete my understanding I am trying establish where I can find the standard base address for ubuntu 9 (and other distros) for the following, taken from Shacham:-

Quote:

[code]....

/proc/uid/maps gives me some information but not the base address ldd also gives me the randomised starting address for sections in the user address space but neither gives me the base address. Intrestingly ... when a run ldd with aslr on for over (about) 100 times and checked the start point of libc I determined that the last 3 (least significant) hex digits were always 0's and the fist 4 (most significant) where between 0xB7D7 and 0xB7F9. To me this indicated that bits 22-31 were fixed and bits 12-21 were randomized with bits 11-0 fixed. Although even that doesnt define the boundaries observed correctly.

Note: I am replicating the attack to provide signatures to detect it using IDS, and for teaching purposes. I am NOT a hacker and if needed to could reply from my .ac.uk email address as verification.

View 1 Replies View Related

General :: Bring Up System Recovery Durin The Restart Process?

Aug 28, 2010

I have forgotten my administrative password and am locked out of my system. I have an HP Mini 1120NR and I am running Edubuntu software. I cannot remember which key I need to press during the restart process to bring up the system restore/recovery option.

View 9 Replies View Related

General :: System Do Fragmentation On Virtual Address Space?

Apr 21, 2010

I have millions of small chunks of new's and delete's in my program. Even though no memory leak is detected through valgrind or purify, memory grows. But the growth is degrading over the number of times of the execution of the tasks. Can i think that fragmentation plays a role in this?

View 6 Replies View Related

General :: Process Control From Boot Loader To User Space

Jun 29, 2010

For the past few days I was putting effort on understanding the software control flow starting from "Boot loader" to "Linux User space".

I am consolidating the entire process and putting forth in this forum...It would be great if someone can validate this..It might be useful to other new bees too.

Step 1 : Power up the board

Step 2 : The CPU control goes to EEPROM/storage memory where BIOS resides

Step 3: BIOS gets loaded in RAM and gets executed

Step 4: During execution, the selection of Boot device has to be done with the help of BIOS Menu [Blue screen appearance during start up in normal PC's]

Step 5: BIOS shall access the Bootloader stored in boot device [for eg.,Hard disk]. Boot loader is stored in MBR area.

for explanation purpose I take the following configurations

Bootloader = GRUB
Boot Device = Hard Disk

Step 6: GRUB shall be loaded in RAM and gets executed

Step 7: GRUB shall load the KERNEL image to RAM. Kernel image is stored in Hard Disk.

The question of "How the GRUB knows where the Kernel image is stored".

The answer is
1. In the "Grub.config" file, the location of "Kernel Image" and " Ramdisk Image" [which will be discussed later in the section] is being given.

Step 8: Kernel Image followed by Ramdisk Image is loaded in RAM by GRUB bootloader

Step 9: Kernel Image gets executed...During execution, top portion of the code shall make initial hardware initialization and latter part
of the code shall just decompress the Kernel Image

Step 10 : After decompressing the Kernel Image, it shall decompress
the already loaded Ramdisk Image

Ram disk is just creating a temporary hard disk in RAM. The main responsibility includes it consists of minimal driver files, executables, directory structures to created a TEMPORARY ROOT FILE SYSTEM.

This Temporary Root File system shall be used by Kernel Image

1. Execute the executables to access the Hard disk
2. For creating Permanent Root File System in HARD DISK

Step 11 : Kernel Shall look for the file /Linuxrc in Ramdisk. Linuxrc
is a USER script file [not sure]

Step 12: At the end of script file Linuxrc, the Ramdisk shall give the
control to "USER SPACE" [path for writing the script not known]in Linux kernel

Step 13: USER SPACE is the normal shell

View 2 Replies View Related

General :: Mapping Kernel Virtual Address Space To Physical Memory Zones?

Nov 4, 2010

As i undertsand - out of 1GB of the virtual Address space for Kernel from 3GB to 4GB of the process address space, Kernel image (code, data, bss, stack, heap) resides staring @0x0 address. Vmalloc area starts either at the end of Physical ram size or at 896M. This 896M cap is mandated to ensure that minimum of 128MB is reserved as vmalloc_reserve for vmalloc,kmap etc.

Is the understanding correct? Now trying to map Physical Zones into this 1GB address space

Initial 16MB is mapped to ZONE_DMA
16MB - 896MB is mapped to ZONE_NORMAL
896MB - 1024MB is mapped to ZONE_HIGHMEM

Does this mean that Kernel image is residing in ZONE_DMA area? Any call to vmalloc() in kernel code will return address beyond 896M? insmod of any LKM will internally invoke vmalloc() to obtain contiguous area - where will this code physically located along with rest of kernel code in ZONE_DMA or in ZONE_HIGHMEM?

View 1 Replies View Related

General :: Application Virtual Address Space Memory Allocation - Memory Does Not Get Free

Apr 20, 2010

I am using malloc and frees a lot in my program. It shows its allocated but when i remove it doesnt show as the memory is removed(I am using the top command to view VIRT memory usage). If this continously grows what would happen to my program (Will it go out of memory?)

View 4 Replies View Related

General :: Division Of Logical Memory Space In To User Space And Kernel Space

Jan 4, 2010

Logical Memory Space of 4GB is divided in to 3GB User Space and 1GB Kernel Space. Always. Correct?

1. How can we change it? (just changing value of PAGE_OFFSET is okay?)

2. If system have only 256MB of memory (embedded system) and suppose Kernel Modules eat away all the memory during boot. User space will be left will no memory. Is this case possible?

View 2 Replies View Related

Networking :: Create A Script Which Checks For The 2 Process And Restart It Automatically?

Mar 11, 2010

There are two host agent process ( hprsmha -WD and RSMHA ) running on my SLES 10 server suddenly hangs which is critical for my daily scheduled backup jobs.I want to create a script which checks for the 2 process and restart it automatically.so i can put it to daily cron job.My knowledge with scripting is so poor. Following are the commands i am running manually to stop and start the process.

cd /etc/init.d
./hprmsha stop
./hprsmha_wd stop
./hprsmha_wd start
./hprsmha start

View 4 Replies View Related

Server :: How To Automate Starting A Process In Gnu Screen And Restart It When It Crashes

Sep 10, 2010

I have a java service that needs to be run in a gnu screen session so that I can -r into it to access it's interactive shell. I would like this to run at start-up. More importantly, it crashes frequently so I need the service to restart itself when it crashes. How do I go about doing this myself? My previous experience with shell scripting amounts to putting ./service in a file and marking it executable. This will be running on a FreeBSD server, but I might put it on a Linux server soon also. So any caveats on the differences would be useful information.

View 6 Replies View Related

Software :: Restart Apache2 Process Every 10 Mins To Clear /tmp Directory?

Aug 31, 2009

I have been working on this for a few hours now and still haven't been able to track down whats going on. I just switched servers and put a fresh debian install on with apache2 + custom suexec + php5(fcgi). now when i upload a file to the site it wont upload, so i tracked down the issue. its the /tmp directory that root tmp. its at 100% so i restart the /etc/init.d/apache2 process and the /tmp directory is automagically cleared to 20% used and i can upload again. so i figure ok its got to be a setting. i looked in all the conf files conf.d the php5 conf files and no where do i have a /tmp directory set. so i think OK I can build a cron to clear the tmp directory every 10 mins till i find the issue, but alas, when i go into the tmp directory There are NO files to delete!!! wtf. holy crap. and all that goodness, this is crazy, how can you have a tmp directory that is not being written to, from all i can see, so i think ok it might be a hard link, i checked, in all root and sub root directories no hard links to tmp, no soft links to temp either. and if i sit in my /tmp directory and do a df -h after some uploads its going from 20% so 23% and up, but i do ls -alh and nothing, then ls -al and watch bytes, nothing , so this is very strange. has anyone encountered something like this? is it possible that this is a hard link thats hidden somewhere or some other extreme function i have never heard of?

View 8 Replies View Related

Networking :: No IPv6 Global Address When Restart The Network Service

Jul 26, 2010

I addes IPv6 address to my interface as

Code:

ifconfig eth0 inet6 add 3fff:ffff:6:5:4:3:2:1

But, when I restart the network service this IPv6 address is gone. How could I make it as a permanent IPv6 address( that should be edited or deleted when I want but not when I only restart the network)to my interface?

View 1 Replies View Related

Ubuntu :: Killing All The Process On Restart/halt/shutdown Instead Waiting For Scripts?

May 9, 2010

I haveing a big problem atm (just after to upgrade to 10.04). I have a simply and easy script that sent a halt command to every KVM virtual machine actually running into the server. this script is/and was) palced as a init-rc script in rc0/rc1 and rc6 lvls. Just after to upgrade, I have noticed that this script is executed but the system ignore the time that it require to finish (giving time to correctly stop a single virtual machine). Aftert 5 second it start sending SIG-TERM and SIGN-KILL to any currect process and then reboot/halt.

I have just done a new script using upstart and I got just the same result. What is happending? why is the waiting the init secuence for a valid/or_not termination of any init script. I am so sorry for this crap english I have never study this language so I try to do my best anytime I speak it (or try ti..).

View 9 Replies View Related

Ubuntu Installation :: 11.04 LiveCD Boot - Win7 Recovery Process On Restart

Jun 16, 2011

I wanted to put 11.04 on my wife's Win 7 Toshiba laptop so thought I would live boot and see everything worked first. Well it does seem to but I didn't have time to install it then so just shut down. Well on restarting without CD in it failed to boot windows and had to let the recovery process fix it. Now I want to set it up for dual boot at least to start with so until I can get some answers I don't want to risk it. Is there some problem with win 7? Will I be able to shrink the Win7 partition to put ubuntu on? Will Win 7 have an error each time she boots it after 11.04 is installed and run?

View 5 Replies View Related

Ubuntu Installation :: 10.10 - No Enough Space To Start Process

Dec 4, 2010

I have just build a new computer, and I want to install Ubuntu 10.10 on it. The problem is that when I run the Live cd and start the installation it cant find enough space to install. I have a 1TB WD Black Caviar disc installed and I can see that the BIOS detects it.

View 3 Replies View Related

Fedora Networking :: 4GB Of RAM And 6GB Of Swap Space - CPU Process Normally Don't Occupied More Than 30%

Dec 1, 2010

Whether i am short of memory or some memory corruptions? If so, what can i do? Because i find it hard to believe this is a memory problem when i have 4GB of RAM and 6GB of swap space, and my CPU process normally don't occupied more than 30%

Well my Linux is keep on crashing.

Code:

View 8 Replies View Related

Red Hat / Fedora :: Increase Memory Space Allocated For Process?

Jun 1, 2010

I want to know if i can increase the memory space allocated for a process manually while the process is running ,,,, and if it is possible how i can do this .

View 2 Replies View Related

Programming :: Make A (user Space )process Pre Emptive / In 2.6 Kernel?

Dec 10, 2008

I am writing a program which i dont want the kernel scheduler to preempt before certain time duration. I am using the system call sched_get_priority_max to set the maximum priority. However it is not producing results.

View 3 Replies View Related

Fedora :: (EE) NOUVEAU(0): 1432: No Valid FB Address In PCI Config Space

Sep 15, 2009

I have a problem with 32Bit Fedora. I have it installed on my desktop pc, and it works, but in my laptop it doesn't. On my laptop, I have 64Bit, but wanted to reinstall and use 32Bit instead. Whenever I try to install 32Bit, the loading bar finishes, then the screen goes black, and enters the terminal, blinking rapidly, spamming mtrr 3 not used. I've tried a few things to fix this, but I haven't had any luck.

I have another similar problem with 32Bit on my desktop. It is working right now, but yesterday I installed a NVidia driver, and the mtrr 3 error occurred, forcing me to reinstall, without the NVidia driver.

EDIT: I tried

X -configure

Then i ran

X -config /boot/xorg.conf.new

The errors that show up are these:

Quote:

(EE) NOUVEAU(0): [drm] error creating device, setting NoAccel
(EE) NOUVEAU(0): 1432: No valid FB address in PCI config space
(EE) Screen(s) found, but none have a usable configuration

Fatal server error:

no screens found
mtrr: MTRR 3 not used

View 3 Replies View Related

Programming :: Macro To Get Base Address Register In Configuration Space?

Nov 21, 2010

I am trying to understand working of pci_resource_start function So I browsed code via cscope and searched for string pci_resource_start and got following in pci.h

Code:

#define pci_resource_start(dev, bar) ((dev)->resource[(bar)].start)

I am not able to understand how does this above macro works. How does it above macro gets appropriate base address register in configuration space?

View 1 Replies View Related

Hardware :: Obtain A Real Memory Address From User Space - Mmap() And /dev/mem

Feb 25, 2010

I'm running an embedded Linux kernel, and I want to obtain a real memory address from user space. After goggeling a little, I found that the only way was to use mmap to access /dev/mem. But I never used mmap. I want to load a program in memory, in order to make it available from another processor, that has access to the DDR, but not to the flash memory where program is stored. Here is the code I use:

Code: // Open file and get its size
FILE* program = fopen(argv[3],"rb");
fseek(program, 0, SEEK_END);
long program_size = ftell(program);
fseek(program, 0, SEEK_SET);
// Prepare memory to copy it in
void* program_address = malloc(program_size+1);
FILE* memory_stream = fmemopen(program_real_address, program_size + 1, "wb");
[Code]....

View 5 Replies View Related

General :: Restart Dhcp From /etc/init.d/dhcpd Restart

Feb 27, 2010

i have installed dhcp,there i declared the subnet and network,i used command include "/etc/dhcpd.conf.jutu1"; to start and other files, but it show me this error when i want to restart the DHCP, if you need more information contact me, i have configured this file too jutu1, but it don't let me to restart dhcp from /etc/init.d/dhcpd restart, this show me this message

[Code]..

View 3 Replies View Related

General :: Calling User Space Callback Function From Kernel Space?

Sep 22, 2009

I am writing device driver in which i have to call callback function from kernel space, which are saving my data. But the callback functions are in userspace. While accessing them i am getting segmentation fault.

View 1 Replies View Related

General :: Difference Between Restarting/stopping Apache Using 'service Httpd Restart/stop' And Apachectl Restart/stop

Oct 11, 2010

whats the difference between restarting/stopping apache using 'service httpd restart/stop' and apachectl restart/stop. I know that using 'service httpd restart' is actually a script in /etc/init.d/httpd but what about apachectl?

View 1 Replies View Related

General :: Scripting - Cp A List Of Files Which Starts With - Or Space Without - Or Space?

Oct 14, 2009

I have a list of files in a directory which starts with - or have space.

I need to copy them back without the space or -?

linux1[sim]% ls linux1[sim]% cp ./-* ./*

View 8 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved