| From | Subject | Date |
|---|---|---|
| Rajesh S R | Re: fixed memory bytes
On Tue, Jan 4, 2011 at 11:28 PM, Mulyadi Santosa
Still there can be padding issues due to byte alignment, which may vary
across architecture. Am not sure if that is controllable (probably some
--
Rajesh S R
http://rajeshsr.co.cc/blogs/
| Jan 4, 11:07 am 2011 |
| Mulyadi Santosa | Re: fixed memory bytes
Your question isn't specific enough, so I'll just guess. Let's say
"int". In 32 bit, AFAIK it's 4 byte, but in 64 bit (like IA 64, not
sure if it's x64) it's 8 byte. So, if you just say "int", you will
likely getting screwed up.
By using types like u_int or something like that, you pretty much say
"I mean 4 byte kind of integer" etc
--
regards,
Mulyadi Santosa
Freelance Linux trainer and consultant
blog: the-hydra.blogspot.com
training: ...
| Jan 4, 10:58 am 2011 |
| julie Sullivan | Re: fixed memory bytes
Hi Mohit
I'm not sure whether we are interpreting your question correctly. Do you
mean
1. you've seen some code in the kernel which you think means the size of a
structure/
variable (and its resulting binary footprint) is set to be the same (in
bytes),
regardless of the architecture, and you are confused about it?
2. you think that there should be a way of fixing the structure/variable
(binary footprint)
size to be the same (in bytes) regardless of the architecture and you ...
| Jan 4, 3:59 pm 2011 |
| mohit verma | fixed memory bytes
hi all,
i have seen many places in kernel where the variables specially the
structures should be of fixed size independent of the architecture. i went
through the definitions of them but dint get clearly (or frankly say
...dint get them even a bit) .
so ,can please someone help me to understand this??
thanks in advance for help........
--
........................
*MOHIT VERMA*
| Jan 4, 10:40 am 2011 |
| Mulyadi Santosa | Re: fixed memory bytes
Hi..
well, AFAIK by mapping that new type into native one...for example,
let's say I have "u_int", which in turn when this code is compiled for
x86 32 bit, it is a typedef of "int".
--
regards,
Mulyadi Santosa
Freelance Linux trainer and consultant
blog: the-hydra.blogspot.com
training: mulyaditraining.blogspot.com
_______________________________________________
Kernelnewbies mailing ...
| Jan 4, 11:25 am 2011 |
| John Mahoney | Re: fixed memory bytes
Please reply all..I added back list.
I am not sure of your definition of boundary, but I would say it does
the opposite. It tells the compiler not to align the struct to
boundaries.
--
John
_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
| Jan 4, 2:15 pm 2011 |
| sk.syed2 | Re: fixed memory bytes
while writing portable applications always remember that "unsigned
long" is the size of pointer and not necessarily unsigned int.
For example on x86_64 sizeof(unsigned int) != sizeof(void *).
-syed
_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
| Jan 4, 3:20 pm 2011 |
| Denis Kirjanov | Re: fixed memory bytes
Linux (compiler actually) supports C99 fixed-width types such as 8,
16, 32, 64 bits.
Just look through the include/linux/types.h
and small example here:
--
Regards,
Denis
_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
| Jan 4, 12:17 pm 2011 |
| John Mahoney | Re: fixed memory bytes
I believe you are referring to __attribute__( ( packed ) )
_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
| Jan 4, 11:24 am 2011 |
| mohit verma | Re: fixed memory bytes
that is it mulyadi. but how the compiler or kernel forces the things to get
--
........................
*MOHIT VERMA*
| Jan 4, 11:22 am 2011 |
| Mulyadi Santosa | Re: ASLR implementation
Hi...
try http://lxr.linux.no/#linux+v2.6.36/arch/x86/vdso/vma.c
--
regards,
Mulyadi Santosa
Freelance Linux trainer and consultant
blog: the-hydra.blogspot.com
training: mulyaditraining.blogspot.com
_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
| Jan 4, 9:51 am 2011 |
| Zubin Mithra | ASLR implementation
Hi,
I recently read about the Linux kernel implementing ASLR to prevent buffer overflow attacks. I would like to have a look at how this is implemented by reading the kernel source code.
Could someone offer a few pointers on where to start looking?(It would make my work slightly easier.)
Thanks,
zm
_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
| Jan 4, 6:04 am 2011 |
| mohit verma | floating points in kernel space
hi all,
i read somewhere that there is no floating point arithmatic supported in the
kernel space . is it true??
but the floating point registers and even floating point arithmatic units
are all handled by the.........( kernel i think).
thanks in advance for help...........
--
........................
*MOHIT VERMA*
| Jan 4, 5:43 am 2011 |
| Mulyadi Santosa | Re: floating points in kernel space
Hi..
AFAIK, once x86 didn't supported due to floating point related
registers are not correctly (or even doing?) saved and restored during
context switching. So maybe it is fixed now...
--
regards,
Mulyadi Santosa
Freelance Linux trainer and consultant
blog: the-hydra.blogspot.com
training: mulyaditraining.blogspot.com
_______________________________________________
Kernelnewbies mailing ...
| Jan 4, 9:57 am 2011 |
| julie Sullivan | Re: floating points in kernel space
I've often wondered about this oft-cited kernel behaviour too, in my
naivety. I understand
that this must be on a per-arch basis, but does this mean that the kernel
doesn't police FP
access at _all_ (perhaps this is what Mohit means too)? Does code like X for
example have to access it directly, or does it just use the GPU? What about
other user-space code - does it
have a separate library and do its own security? Video drivers?
Sorry if these are basic questions, I grepped for float in the ...
| Jan 4, 3:19 pm 2011 |
| Dave Hylands | Re: floating points in kernel space
Hi Mohit,
That is correct. In some architectures, attempts to use floating point
from the kernel will work. I've seen some x86 code that uses it.
However, with ARM for example, there is no float support in the
kernel, and some ARM architectures have no floating point support in
the hardware either. For ARM, there is a kernel implemented emulation
of the floating point instructions, but these can only be called from
user space. There are also some ARM software floating point libraries
(aka ...
| Jan 4, 8:44 am 2011 |
| Victor Rodriguez | Re: floating points in kernel space
HI it is true , the floating point is not supported on printk , AFAIK
the only way to handle is to send it like HEX values and then some
other application like perl or python transform it to floating point
Hope it helps
Regards
_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
| Jan 4, 7:31 am 2011 |
| Greg Freemyer | Re: floating points in kernel space
Julie,
I think the issue is the kernel is extremely concerned with the
efficiency of the syscall path.
Very legitimately some benchmarks just measure that one path to see
how many thousands of syscalls per second can be made.
To accelerate that path as much as possible, the linux kenel chooses
not to incur the overhead of preserving the FP registers on every
syscall.
So kernel code that uses FP must first ensure any registers it uses
are preserved. I don't recall ever writing any FP ...
| Jan 4, 3:32 pm 2011 |
| Sowmya Sridharan | slab usage in linux
Hi List,
I have a few queries regarding slab memory and it's usage.
I have seen slab cache increase by even 1GB, over two to three days on a
stable system.(The system was sending and receiving bulk amounts of
packets).
When is slab usually freed? Also when I analyzed /proc/slabinfo, I was
able to see that the number of active slab objects were increasing mostly
for task_struct, dentry_cache and proc_inode_caches. When are these caches
allotted objects, in general?
Can anyone please ...
| Jan 4, 4:49 am 2011 |
| Mulyadi Santosa | Re: slab usage in linux
Hi....
I cc: the reply to the new list address. I hope you don't mind....
Now, let's what I can share here....
No kidding? 1 Gig? Wow.... But that's alright, I think that still make
sense ... highly frequent sock related cache creation I guess....
AFAIK when it can no longer "grow".... same like page cache, it will
grow to fill your RAM until it exhausts everything left by anonymous
page allocation plus some amount of reserved pages. And AFAIK too,
it's tunable, but I couldn't recall ...
| Jan 4, 9:29 am 2011 |
| Dave Hylands | Re: get info in a loop from a sysfs entry
Hi Wouter,
I would change this to use unbuffered I/O routines (i.e.
open/read/lseek/close) and use sscanf rather than fscanf.
fopen/fread/fseek/fclose use buffering by default.
That would eliminate any buffering that the user side runtime library
is doing. I suspect that because the data is buffered by the FILE *
routines, even doing the seek is just re-returning the data that was
read the first time around.
Dave Hylands
_______________________________________________
Kernelnewbies ...
| Jan 4, 8:52 am 2011 |
| Greg KH | Re: get info in a loop from a sysfs entry
2.6.21 is so obsolete and old and insecure it's not funny. Please use a
modern kernel version.
good luck,
greg k-h
_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
| Jan 4, 6:56 am 2011 |
| Wouter Simons | Re: get info in a loop from a sysfs entry
I believe I have found the issue. The older kernel my driver is
currently running on (a 2.6.21 version maintained by the hardware
supplier) does not seem to rearm the show method on seek to 0.
crap...
Wouter
_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
| Jan 4, 5:46 am 2011 |
| Wouter Simons | get info in a loop from a sysfs entry
Hi all,
This might be a silly question, but I want to make sure I understand
things correctly.
I have a driver with a sysfs entry to get the next data sample every
time I read the file. Used like below it works wonderful:
# cat next
0x15814
# cat next
0x1682B
The last 12 bits are the sample and the first (20) bits are the channel
the sample is from (some ADC hardware board with 24 inputs).
Now I have some C code that will loop periodically to collect the
samples and do some magic ...
| Jan 4, 3:48 am 2011 |
| Wouter Simons | Re: get info in a loop from a sysfs entry
Yes, I know. It is a shame that I am currently forced to use this. The
problem is that the board that I am using is not supported in newer
kernel versions. There have been people that tried to put it into the
mainline kernel, but that is now basically unmaintained code and I
cannot compile a recent kernel for my platform.
The long-term solution is to work to integrate required drivers into the
mainline, but I work for a commercial company and we are launching a
system soon which is running in ...
| Jan 4, 7:35 am 2011 |
| Ashok Babu | help : Not able to clone from the git.kernel.org, git-re ...
Admin Functions
- Edit<http://support.github.com/discussions/repos/5208-not-able-to-close-from-the-gitkernelorg-git-remote-goes-to-infinite-loop-on-poll-and-select/comments/1>
- Remove<http://support.github.com/discussions/repos/5208-not-able-to-close-from-the-gitkernelorg-git-remote-goes-to-infinite-loop-on-poll-and-select/delete>
Hi All,
I am sorry, If this question is not relevant here. If not please suggest me
from where I can get help :
I am trying to clone from the ...
| Jan 3, 10:25 pm 2011 |
| lijin liu | Re: sharing link about contribution to open source projects
On Tue, Jan 4, 2011 at 7:42 AM, Anuz Pratap Singh Tomar
Thank you Anuz !
This Article is very useful.
_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
| Jan 3, 6:16 pm 2011 |
| Victor Rodriguez | Re: sharing link about contribution to open source projects
Thanks a lot for this good information
Regards
Victor Rodriguez
_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
| Jan 4, 7:47 am 2011 |
| Mulyadi Santosa | Re: Verifying module
Hi..
Please don't do top posting....
About measuring latency, I think you can use lmbench along with ftrace
(check http://lxr.linux.no/linux+*/Documentation/trace/events.txt for
the details). Uhm and I think you could probably use the new "perf"
tool, which is bundled in vanilla kernel tarball.
Network latency? Perhaps you can check this article "Benchmarking
network performance with Network Pipemeter, LMbench, and nuttcp"
(http://www.linux.com/archive/feature/144532)
All in all, the ...
| Jan 3, 10:03 pm 2011 |
| Mag Gam | Re: Verifying module
I am talking about scheduling latency and more important network latency
On Mon, Jan 3, 2011 at 3:06 PM, Mulyadi Santosa
_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
| Jan 3, 8:15 pm 2011 |
| nilesh | Re: functions about dump backtrace function names in mips arch
Enabling the config option, it allows to build the symbol table for
kernel. It uses /proc/kallsyms.
Below links could help:
http://tldp.org/HOWTO/Module-HOWTO/x627.html
--
Thanks,
Nilesh
_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
| Jan 3, 11:44 pm 2011 |
| previous day | today | next day |
|---|---|---|
| January 3, 2011 | January 4, 2011 | None |
