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


ADVERTISEMENT

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

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

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 :: Tools To View/edit User Space Memory Of Running Processes?

Nov 2, 2010

Are there any tools to view/edit user space memory of running processes on Linux?

It would be a great learning tool.

View 1 Replies View Related

Networking :: Cannot Obtain An IP Address

Nov 19, 2010

I just installed ubuntu 10.10 on my laptop Dell Inspiron 1525. Wireless internet is not working. I installed wicd network manager and I am able to see the available wireless networks. My wireless connection is encrypted. I have tried all encrypted options with the key but no avail. It says "Cannot obtain an IP address" after validating authentication.

View 4 Replies View Related

Networking :: Cannot Obtain IP Address Under My Profile

May 16, 2010

But i can under an alternate profile. Running ubuntu 10.04 and cannot seem to pin point the problem. When I was doing some looking into it, it appeared that the wpa-supplicant.conf wasn't where the man page indicated it should be. ie /etc/, but then it wouldn't or shouldn't work for the other profile either, right? i tried to post this before but i couldn't find it anywhere.

View 3 Replies View Related

Ubuntu :: New Adapter - Unable To Obtain IP Address

Feb 9, 2010

I just got a AWUS036H Alfa Network Adapter but there's like 10 folders on teh CD that it comes with, and there's read me's in about all 10 of'em, i have no damn idea which one to install. I went ahead and just did ifconfig wlan1 up and brought the interface up, went to wicd network manager and added wlan1 to wireless adapter

when i try connecting to my wireless router, it says resetting Ip ddress, something else with the configuration file, then obtaining IP address... it just hangs there for about 2-3 minutes and gives me an error... anyone else know how to set up this adapter?

View 1 Replies View Related

Ubuntu Networking :: Cannot Obtain IP Address On Wired Connection

Jan 30, 2010

I am having a persistent problem with getting a wired network connection under a recent install of Ubuntu 9.10. The network manager will show the wired network as 'disconnected' after a restart. This is true whether I am connected directly to my ISP's modem, or through the Linksys router that I usually use.The output of ifconfig suggests that eth0 is not being assigned an IP address:Code:I have reached the limits of my own ingenuity.

View 9 Replies View Related

Ubuntu Networking :: Cannot Obtain IP Address On Wireless Network?

Feb 19, 2010

I believe I have the wireless card installed properly and wicd sees the router. When I try to connect I get an error "can not obtain IP address" Output from iwcongif and lspci is.

dillan@dillan-desktop:~$ iwconfig
lo no wireless extensions.
eth0 no wireless extensions.

[code]....

View 9 Replies View Related

Ubuntu Networking :: Cannot Obtain Ip Address With A Particular Wireless Network?

Mar 5, 2010

I'm using Ubuntu 9.10 and I recently changed certain settings of my router. After that ubuntu isnt able to obtain IP address from this wifi network. I've tried to connect with win 7 and OS X and both of the OSes are able to connect to the same wifi network. I tried to connect ubuntu to another wifi network at school and it connected successfully.

View 7 Replies View Related

Ubuntu Networking :: Wicd Unable To Obtain IP Address?

Mar 12, 2010

I have just installed Ubuntu 9.10 (64 Bit) and I'm trying my best to get this Linksys WMP300N wireless adapter to work.I have searched and gone through a number of threads here with some level of progress but I still can not get this to work.Adapter info is BCM43XG [14e4:4329] rev 01I have installed driver bcmwl5.inf using ndiswrapper and ndisgtk.I had absolutely no success trying to use network manager applet so uninstalled it and went with Wicd instead which at least sees my SSID network with a strong signal.My network is encrypted using WPA and I entered the passphrase which seems to pass authentication but it keeps trying to get an IP address until finally it just tosses a failed message.I feel as though I'm really close but it just won't connect.

iwconfig
lo no wireless extensions.
eth0 no wireless extensions.

[code].....

View 9 Replies View Related

Ubuntu :: Cannot Obtain An IP Address - Wireless Internet Is Not Working

Nov 19, 2010

I just installed ubuntu 10.10 on my laptop Dell Inspiron 1525. Wireless internet is not working. I installed wicd network manager and I am able to see the available wireless networks. My wireless connection is encrypted. I have tried all encrypted options with the key but no avail. It says "Cannot obtain an IP address" after validating authentication.

View 2 Replies View Related

Ubuntu Networking :: Cannot Obtain IP Address From Wireless Network / Enable This?

Jan 17, 2010

I'm using Ubuntu 9.10 and for a while I had no problems connecting to the internet through the wireless network. But recently, my wireless connection started disconnecting regularly. Following an advice I found online, I installed linux-backports-modules-karmic, but after a reboot the wireless device stopped working altogether - it had lost its driver. Since then I managed to associate the device with Broadcom's STA driver, which I had been using before. But now, the wireless device cannot connect to the internet anymore. The network manager's output to /var/log/syslog indicates that the device cannot obtain an IP address. When I run code...

View 4 Replies View Related

Ubuntu Networking :: Wicd Does Not Obtain Ip Address On Wired Connection

Feb 13, 2010

Running kubuntu karmic, kernel 2.6.31-19, on Asus EEE PC 1000.

WICD 1.7.0. hangs on "wired connection: obtaining ip address...". I have downgraded to 1.6.2 and 1.5.9, but this did not solve the issue.

WICD does work under other circumstances, e.g. wireless connection. (But at home I don't have wireless, but just the modem and ethernet.)

Same wired connection ethernet connection works flawlessly on laptop running Windows XP SP2.

View 1 Replies View Related

Software :: Accessing Memory Address Outside Standard Memory

Nov 22, 2009

I am writing an application that wants to access periphals registers outside the standard (allowed) memory area.

Doing so gets me "segmentation fault".

I know, this is natural behaviour.

One way of getting around this is writing the module which has to be loaded by linux. I will consider this some time later.

For now, I want to come to some quick result and allow linux or gcc compiler to write to those memory areas of periphals. Is there a direct way to do so?

View 3 Replies View Related

OpenSUSE Network :: KNetworkManager Connection - Never Obtain An IP Address From Wireless Router

Feb 24, 2010

I have an open WEP wireless internet connection with a security key. KNetworkManager can never obtain an IP address from my wireless router, but I know that the router works because Windows can connect correctly and Ubuntu's NetworkManager can connection correctly. Does anyone know what is happening? KNetworkManager just asks for my security again and again and again after it fails to connect.

View 8 Replies View Related

Ubuntu Networking :: Cannot Obtain IP Address / Disabling Network Manager In Preferences

Mar 13, 2010

The IP address acquisition problem I reported earlier has returned, and I am stymied. To recap: Ubuntu 9.10 would not obtain an IP address via a wired Ethernet connection. I resolved the problem at the time by configuring eth0 in /etc/network/interfaces:

Code:

auto eth0
iface eth0 inet dhcp

and disabling Network Manager in Preferences > Startup Applications.After a powering down the PC today, the problem has returned. It appears that dhclient cannot obtain an IP address. This is true whether I am connected to the router (a Linksys WRT54G running Tomato), or directly to the DSL modem. When my usually wireless Ubuntu 9.10 laptop is wired to the router, it obtains an address almost instantly. I have made no changes to the network configuration since January. I have tried to keep current on Ubuntu updates.

Code:

jgb@alienware:~$ ifconfig eth0
eth0 Link encap:Ethernet HWaddr 00:30:1b:ac:5b:9e
inet6 addr: fe80::230:1bff:feac:5b9e/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1

[code]...

View 4 Replies View Related

Ubuntu Networking :: WLAN Card Stopped Working - Cannot Obtain IP Address

Sep 9, 2010

I'm using Ubuntu 9.10 on a Lenovo ThinkPad T61 using an Intel PRO/Wireless 3945ABG. My laptop's ability to connect to a wireless network stopped last night, and I'm not sure why. It's definitely something on my end, as my roommate can connect to the internet on a Windows box. I can wire in without a problem, but that's a pain and my Ethernet cable got lost in the shuffle when I moved back to school. I've been able to get into this network before and nothing about it has changed. I've been able to hibernate and restart and such and nothing has ever needed to be reset.

The router's a D-Link WBR-2310. Wicd and Network Manager see the network (I'm back to using wicd) , but wicd appears to get stuck at "Obtaining IP address..." and says "Unable to connect: Cannot obtain IP address". I know my password is correct (I set up the router and I'm the CS undergrad in the apartment so I manage it), lspci sees the wireless card, ifconfig and iwconfig return information about the interface, dmesg|grep wlan0 doesn't seem to have anything terribly out of the ordinary, but here's that output:

Code:
allyanncah@taliesin:~% dmesg | grep wlan0
[ 23.514202] ADDRCONF(NETDEV_UP): wlan0: link is not ready
[ 36.609016] ADDRCONF(NETDEV_UP): wlan0: link is not ready
[ 38.756143] wlan0: direct probe to AP 00:24:01:cb:4e:7e (try 1)
[ 38.758791] wlan0: direct probe responded
[ 38.758796] wlan0: authenticate with AP 00:24:01:cb:4e:7e (try 1)
[ 38.760587] wlan0: authenticated
[ 38.760609] wlan0: associate with AP 00:24:01:cb:4e:7e (try 1)
[ 38.763318] wlan0: RX AssocResp from 00:24:01:cb:4e:7e (capab=0x431 status=0 aid=1)
[ 38.763322] wlan0: associated
[ 38.765502] ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready .....

I've tried:
- reinstalling wicd
- uninstalling wicd and installing network-manager
- restarting
- shutting down and booting back up
- restarting the router
- sudo /etc/init.d/networking restart
- taking the interface down and back up with ifconfig

I haven't changed anything recently in regards to my wireless card, and all the fixes I've tried are things I've done before without an issue. The only thing I'm wondering about is if doing a hard reset might have broken something (I know this is a cardinal sin, but there's a whole 'nother problem I haven't been able to fix with the OS hanging every once in a while over a VPN daemon when it tries to shut down or restart -- I've left it for hours to see if it actually gets anywhere and no luck, won't do a soft reset). I'm nervous about reinstalling the driver just because I've never had to do it and drivers are a finicky business. I imagine there's a config error somewhere?

View 2 Replies View Related

General :: Virtual Memory Address To Physical Address?

Apr 13, 2010

How can I get the physical address corresponding to a virtual address in linux by using /proc file system

View 1 Replies View Related

Programming :: Access At Physical Address - I/O Address In My Map Memory?

Dec 17, 2008

When I try to access at physical address (0xD0000), we known that it is necessary to convert physical address to virtual address using function IOREMAP(0xD0000, 1024) and return me 0xC00D0000.

Now our doubt is when I have a board with I/O in address 0x150, is it necessary to convert this address to other virtual address??? or with inb(0x150) return me state of I/O in this address? How can I known where is this I/O address in my map memory?

View 7 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 :: Obtain Local User Accounts Remotely?

Aug 17, 2010

I am trying to figure out a way to pull the user information from local users on a Linux server. I have approximately 40 servers running SUSE and Ubuntu that are using Microsoft Active Directory in order to authenticate. Our internal auditing group has made us disable root ssh ability, I was doing this with clusterssh, but I can login as me then su on the server to conduct root, admin, work. This is an ongoing request to get the local users and it is a painfully slow process since I have to login to each server to get the /etc/passwd file. Is there another way to get the local user information? They are now asking about seeing the last logon date or if the account is disabled, any thoughts there as well?Most of our auditors think Windows and I am trying to make my life easier but not sure what options I have. I need to get local accounts and if they are active or disabled plus last logon date. I'm sure there will be more but if I can get the basics adding more shouldn't be too difficult but I guess I'll cross that bride when I get there.

View 7 Replies View Related

General :: Any Real Alternative To CPRM-protected SD Memory Cards Beside USB Flash Drives?

Apr 19, 2010

Before buying an SD memory card, I'd like to know something more about the CPRM protection, in particular:Does CPRM influence the way I am supposed to access my own data? That is, does CPRM encrypt it? Could CPRM prevent me from accessing my own data?Is it possible to disable or eliminate CPRM from either the memory card or the card reader?Are there manufacturers selling CPRM-free SD memory cards?Is there any real alternative to CPRM-protected SD memory cards beside USB flash drives?Is Linux support for SD cards good?

View 1 Replies View Related

Ubuntu Networking :: Cancel Change And Return It To The Real MAC Address Of NIC?

Nov 9, 2010

In order to change the MAC address I do: ifconfig eth0 down hw ether ff:ff:ff:ff:ff:f0 When the ff:ff:ff:ff:ff:f0 is the new MAC address. Now how do I cancel that change and return it to the real MAC address of my NIC?

View 1 Replies View Related

Ubuntu :: Obtain The User That Owns The Process From /proc/process_id?

May 29, 2010

How can I obtain the user that owns the process from /proc/process_id? Is it the Uid in /proc/process_id/status ? If so why are there 4 values there?

View 2 Replies View Related

OpenSUSE :: How To Get Rid Of White Space / Make Document Actual Real Legal Size

May 7, 2010

I scanned a document with xsane and saved it as a pdf, the pdf shows up great but there is extra white space at the bottom of the document. how do i get rid of the white space and make the document the actual real legal size?

View 2 Replies View Related

Ubuntu Networking :: Error "couldn't Obtain Ip Address"

Mar 19, 2010

though method of editing /etc/network/interfaces worked for me i have decided to get gui work.i have installed wicd, i set wep key for connecting to my network. when i'm scanning wicd find my network. but i get error "couldn't obtain ip address". when i dived into logs i found that there is some problem with wpa_supplicant. here is piece of log:

Code:
2010/03/19 21:45:58 :: Connecting to wireless network MY_ESSID
2010/03/19 21:45:59 :: /sbin/dhclient -r eth0
2010/03/19 21:45:59 :: ifconfig eth0 0.0.0.0
2010/03/19 21:45:59 :: /sbin/ip route flush dev eth0
2010/03/19 21:45:59 :: ifconfig eth0 down

[Code]...

View 8 Replies View Related

Programming :: Passing Data Between Kernel Space To User Space In Asynchronous Way

Dec 13, 2010

I am developing a I2C CDROM client driver. The CDROM firmware supports TOC information read through a I2C command. It sends the TOC information in burst ( Interrupts a GPIO pin when it is ready ) and my CPU does a I2C read to read the TOC. When the CDROM firmware finishes sending the last data burst , it informs my CPU that it is done with the TOC, by a flag in the last data burst. I would like to know, which is the most efficinet way I can send these TOC information to userspace?

View 4 Replies View Related







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