LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   It is possible to modify the /proc/cpuinfo ? (https://www.linuxquestions.org/questions/linux-newbie-8/it-is-possible-to-modify-the-proc-cpuinfo-469278/)

fc3_fan 07-31-2006 12:21 AM

It is possible to modify the /proc/cpuinfo ?
 
i would like to modify the file under :
/proc/cpuinfo

I use vi but the file was read only
event i use chmod u+w

if this issue possible please reply

regards,
andrianus

cs-cam 07-31-2006 12:45 AM

The /proc filesystem is a virtual one, the files in there aren't real and the filesystem as a whole is simply an interface to some of the information the kernel is holding in memory.

Can I ask why you would want to edit that file in the first place?

musicman_ace 07-31-2006 02:17 AM

I'll answer the question as yes you could edit the file with vi and save changes given that the user has privelages to do so. Root is probably the only one.

Now would those changes completely fubar your system? I don't know, I see no reason to change that information. Like cs-cam, I'm interested in the Why question.

-- edit --
bummer, I click on cs-cam's link. It said my brain was eaten :(

krisealv 07-31-2006 02:19 AM

hack it
 
He probably wants to boast of a faster cpu than he really has got. Maybe if you copy everything in proc into a diffrent directory, than disable proc in fstab.

Maybe you could change the directory of proc in fstab into /tmp/proc, and put up links of everything into /proc, then you could edit the cpuinfo file manually;)

Have not tried this though, and I belive quite a few programs use proc. I think that's the reason why we keep it around. After all we do have sysfs now.

Xena 07-31-2006 02:24 AM

Could just slip in a new CPU, that'll change the cpuinfo...

cs-cam 07-31-2006 03:05 AM

Quote:

Originally Posted by musicman_ace
-- edit --
bummer, I click on cs-cam's link. It said my brain was eaten :(

Bahahaha, another one joins the legions :D

fc3_fan 07-31-2006 08:41 PM

Thanks a lot every body for the kind reply of my issue

The only reason why do i need to modify /proc/cpuinfo was because i'm working for security software.

The software will ignore if the system running with Celeron "D" processor
The idea if i could change the information on /proc/cpuinfo so the problem solved

I got frustated with this issue, ihope sombody could help me
I beleave there is a way to do that, some thing like doing path may be

Any way thank you so much

:)

pixellany 07-31-2006 08:46 PM

/proc/cpuinfo reflects what is actually installed in your machine. I think one respondent had it right: "Change /proc/info by putting in a different cpu/".

I suggest that you give us some more details as to what you are up to. WHAT security SW??

J.W. 07-31-2006 09:46 PM

Agreed - cpuinfo reflects what's installed, and if you want to change it you need to install a different CPU. To say it another way, I can't really think of any useful reason to "change it". That's sort of like saying "I've got a 40G drive, but I want it to appear as though it is a 100G drive". It doesn't make any sense, and doesn't match reality. Rather than to change cpuinfo, you might want to ask the other guys at your security company why they disabled their software for Celeron D processors.

khaleel5000 08-01-2006 01:58 AM

alternatively he can just change the L2 cache of 256 to 128kb so that it becomes in class of Celeron and Not CELERON-D ..... so no kinda overclocking or risk of hangups?????..........that might have happened if he did from 256 to 512kb which made it a Pentium ?
But why such an apparently dumb and useless security feature?....... I bet its for microsoft's vista ;)

fc3_fan 08-01-2006 08:25 PM

Gentleman,

It is not for Microsoft product, the software I've developt is for Military waepon, before the program getting up, my program will check hardware routine...

My company doesn't supply the hardware they use, that why we must protect our software... we just don't know the software don't work perfectly in Celeron...

So, when the user start the program it will doing check first.. if found celeron it will turn it off automatically..

That why i need to modify the information on /proc/cpuinfo
if i just modify the description "Celeron(R)" to "Pentium(R)" all my problem will solve.

alternatively we could by a new pentium... but the government already purchace 1000 celeron...

that is all my problem

regards,
:)
Andrianus

AmphetaminePhreak 08-02-2006 02:23 AM

blaaaaaahahahahahah! i fell out of my chair. they should make a forum section for the funniest posts ever, and an option to rate veiwed posts as criteria for humor raiting. i'd vote for this one to be put there for sure.

#1 response, this guy:

Quote:

He probably wants to boast of a faster cpu than he really has got. Maybe if you copy everything in proc into a diffrent directory, than disable proc in fstab.

Maybe you could change the directory of proc in fstab into /tmp/proc, and put up links of everything into /proc, then you could edit the cpuinfo file manually

Have not tried this though, and I belive quite a few programs use proc. I think that's the reason why we keep it around. After all we do have sysfs now.
however, someone may actually follow your directions and that would be nasty.

//funnyFlag 1

AmphetaminePhreak 08-02-2006 02:29 AM

mover right along, nothing to see here. sorry for the double post.

b0uncer 08-02-2006 07:28 AM

Heh, yea just tell us all about this military weapon :) we could do something about it..patches for you, you know..like backdoors that only open using some arabic letters or something..

:rolleyes:

khaleel5000 08-05-2006 02:19 AM

fc3_fan I sympathize ...... so tell me did this changing /proc/cpu config work?


All times are GMT -5. The time now is 06:06 AM.