Q: How to know which process manipulates semaphore ?

2000-05-23 Thread Lev Olshvang


   Hello gurus !


I am looking for some semapore monitoring tool.

I know ipcs command, but it doesn`t help me to find out
process - semapore asociation.
I understand that kernel debugging can help in this issue, but may be
some tool exist ?

And the same question concerning threads - does anybody knows thread
monitoring tool -like top ?

Regards,
Lev



=
To unsubscribe, send mail to [EMAIL PROTECTED] with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail [EMAIL PROTECTED]




Help :Connectin to IMAP server refused

2000-06-13 Thread Lev Olshvang



Hello everybody !


  I have just installed Linux Mandrake 7.0 on PC. This PC run WIN-NT and
had connection to Internet and our IMAP server.

  I use exactly the same IP address the PC had before.


  I can make a ping to IMAP server and I can open telnet session to
imap port 143 on IMAP server from any computer in my disposa, except for
Linux machine.

 Traceroute shows exactly the same path for any machine, including this
Linux station, so I believe that my connection request goes exactly the
same way for all machines.


What to do ?

Regards.
Lev




=
To unsubscribe, send mail to [EMAIL PROTECTED] with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail [EMAIL PROTECTED]




KDE stops create any windows

2000-07-25 Thread Lev Olshvang


   Hello !

I use Mandrake 7.0 KDE desktop.

From some moment, any attempt to create console window or any
other selected from menu applications does nothing.

Existing windows behaves normal.

I`d like to know whether it is possible to trace KDE events and actions
?

Thx




=
To unsubscribe, send mail to [EMAIL PROTECTED] with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail [EMAIL PROTECTED]




FSCK Error after upgrade Ubuntu 7.1

2008-03-05 Thread Lev Olshvang


Hello List,

Several days ago I asked Upgrade manager to install all available 
upgrades for my Kubuntu Desktop.

(regular instalation,  stock kernel 2.6.22-14-generic)
disk partitions:
1   /boot
2  swap
3   /
4 Extended
5 /home



It had finished successfully and required the reboot.
After reboot I got blank screen filled with  and so I used the SCD 
rescue to reinstall grub.


Several strange things happened  :

1. fsck on /  runs   only e2fsk although  I know my  /  is  ext3
2. when boot from Hard Disk, grub does not see /boot/vmlinuz (my boot 
partition is on thirst slice of HD),

   but it sees it as /vmlinuz
   The same with initrd



3. When grub finally boot the system
fsck  error on /  and was thrown into maintanence shell:
fsck 1.40.2 (12-Jul-2007)
fsck.ext3: symbol lookup error: fsck.ext3: undefined symbol: 
et_ext2_error_table
fsck.ext3: symbol lookup error: fsck.ext3: undefined symbol: 
et_ext2_error_table

fsck died with exit status 127

Since / is mounted read-only  I tried to boot from SCD and  fix 
filesystem but SCD thinks it is ext2 and OK


4 . Although I did not fix a thing ( except changing /boot/vmlinuz to 
/vmlinuz in grub menu and canceling fsck check in fstab)

  my system continue boot after exiting from maintanence shell

5 . The system does not see  / (/dev/sda3) as mounted anymore

What goes wrong ?, why SCD rescue and Ubuntu disagree on  /  filesystem 
type and state ?


Regards,
Lev



=
To unsubscribe, send mail to [EMAIL PROTECTED] with
the word unsubscribe in the message body, e.g., run the command
echo unsubscribe | mail [EMAIL PROTECTED]



What is a proper way to make User mode device (pseudo device) ?

2008-04-16 Thread Lev Olshvang

Hi all,

I have following problem :

User mode application (VLC) communicates with a kernel device (in /dev)  
in a regular way:

open+ioctl().

I have user mode SDK which I would like to use in order to implement 
ioctl calls.

( This SDK issues  ioctl to the real device).

Till now I did not find the solution throgh googling, please advice .


Good day,
Lev





=
To unsubscribe, send mail to [EMAIL PROTECTED] with
the word unsubscribe in the message body, e.g., run the command
echo unsubscribe | mail [EMAIL PROTECTED]



Posix/NTPL : Is particular thread alive ? (pthread_timedjoin_np ??)

2008-04-16 Thread Lev Olshvang

Hi friends,

I seems that i have buggy implementation of pthread_timedjoin_np.

Although linux does not documented this function yet ( see 
http://www.kernel.org/doc/man-pages/missing_pages.html ), I suspect that 
on my installation
this function does not work properly because it returns  sometimes 0, 
sometimes 110 and does not set errno to ETIMEOUT.



After some googling I still do not know how to get thread status.

As an idea i thought about using the futex() to check memory pointed my 
thread handle, but
I am almost sure this solution (if pthread handle indeed references 
memory) is dirty, ...


I saw on this list people with experience in thread programming and  I 
am hope for you help.


Cheers,
Lev

=
To unsubscribe, send mail to [EMAIL PROTECTED] with
the word unsubscribe in the message body, e.g., run the command
echo unsubscribe | mail [EMAIL PROTECTED]



Re: Posix/NTPL : Is particular thread alive ? (pthread_timedjoin_np ??) - Solved

2008-04-17 Thread Lev Olshvang

Just solved  - evidently the timeout should be specified as absolute time

--


Lev Olshvang wrote:

Hi friends,

I seems that i have buggy implementation of pthread_timedjoin_np.

Although linux does not documented this function yet ( see 
http://www.kernel.org/doc/man-pages/missing_pages.html ), I suspect 
that on my installation
this function does not work properly because it returns  sometimes 0, 
sometimes 110 and does not set errno to ETIMEOUT.



After some googling I still do not know how to get thread status.

As an idea i thought about using the futex() to check memory pointed 
my thread handle, but
I am almost sure this solution (if pthread handle indeed references 
memory) is dirty, ...


I saw on this list people with experience in thread programming and  I 
am hope for you help.


Cheers,
Lev

=
To unsubscribe, send mail to [EMAIL PROTECTED] with
the word unsubscribe in the message body, e.g., run the command
echo unsubscribe | mail [EMAIL PROTECTED]




=
To unsubscribe, send mail to [EMAIL PROTECTED] with
the word unsubscribe in the message body, e.g., run the command
echo unsubscribe | mail [EMAIL PROTECTED]



Re: Posix/NTPL : Is particular thread alive ? (pthread_timedjoin_np ??)

2008-04-17 Thread Lev Olshvang

guy keren wrote:

Lev Olshvang wrote:

Hi friends,

I seems that i have buggy implementation of pthread_timedjoin_np.

Although linux does not documented this function yet ( see 
http://www.kernel.org/doc/man-pages/missing_pages.html ), I suspect 
that on my installation
this function does not work properly because it returns  sometimes 0, 
sometimes 110 and does not set errno to ETIMEOUT.



After some googling I still do not know how to get thread status.

As an idea i thought about using the futex() to check memory pointed 
my thread handle, but
I am almost sure this solution (if pthread handle indeed references 
memory) is dirty, ...


I saw on this list people with experience in thread programming and  
I am hope for you help.


Cheers,
Lev


Hi Lev,

why do you want to use this non-posix API in the first place?

APIs ending with '_np' are not part of the pthreads spec - and thus 
are not portable and should be avoided.


why can't you use the standard pthread_join API?

and if you need a work-around you can use some portable mechanism, 
e.g. synchronizing using a condition variable, having the inner thread 
signal it just before terminating, and the outer thread waiting on it 
just before calling pthread_join?


--guy



Hi,

I am looking for generic way to ask about  thread existence.

The problem is that I create thread for third party function,  so I can 
not add to this function code to use thread signalling and cond variables.


Yes, I know that _np functioins are GNU extensions to POSIX, but I did 
not found  way to query

thread aliviness.

Thanks for answer.
L.

=
To unsubscribe, send mail to [EMAIL PROTECTED] with
the word unsubscribe in the message body, e.g., run the command
echo unsubscribe | mail [EMAIL PROTECTED]



Re: Posix/NTPL : Is particular thread alive ? (pthread_timedjoin_np ??)

2008-04-22 Thread Lev Olshvang




Gilad Ben-Yossef wrote:

  
  
  Lev Olshvang wrote:
  
  I am
looking for generic way to ask about thread existence. 
  
You mean like calling pthread_kill() with a signal number of zero? :-)
  
Gilad
  -- 
Gilad Ben-Yossef 
Chief Coffee Drinker

Codefidence Ltd.
The code is free, your time isn't.(TM)

Web:http://codefidence.com
Email:  [EMAIL PROTECTED]
Office: +972-8-9316883 ext. 201
Fax:+972-8-9316885
Mobile: +972-52-8260388
  

Gilad, thank you very much.

It is exactly what I was looking for.

Perhaps you could also advise me on the second item I posted recenly :
"What is a proper way to make User mode device (pseudo device) ?"

May be my question was not expresssed in a proper terminology ?


Thanks,

LEV



=
To unsubscribe, send mail to [EMAIL PROTECTED] with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail [EMAIL PROTECTED]



Re: AOE and iSCSI (software only)

2008-04-24 Thread Lev Olshvang

ronys wrote:

Hi,

For a LAN, AOE seems to have less overhead, so performance *might* be better
(assuming the network is the bottleneck).

iSCSI is much more popular in the industry, though.

My experience is with iSCSI - feel free to ask me if you need more info on
setting up iSCSI initiators  targets.

Cheers,

Rony
 


-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
On Behalf Of Dan Shimshoni
Sent: Thursday, April 24, 2008 10:05 AM
To: linux-il@cs.huji.ac.il
Subject: AOE and iSCSI (software only)

Hello, Linux-il gurus,

I have to decide between two options of exporting block devices
on a LAN (same subnet for clients and server)
: one is with iSCSI target and iSCSI initiator. The second
is with AOE.

I am talking about using software tools only, not using special hardware.

I had tested AOE with my hardware (no special hw): I had downloaded
aoetools from
http://sourceforge.net/projects/aoetools/.
I had also installed blade server of this project on the server
side.
(http://sourceforge.net/project/showfiles.php?group_id=130453package_id=143
790).

I can mount on the client a file which I am exporting on the AOE
server. (which is running this blade).

My question is this:
What are the advantages and disadvantages of using AOE versus iSCSI?
Does anybody have any experience/advice regarding using AOE on Linux
(sw only, I am not talkin about CORAID, etc) ?


Regards,
Dan

=
To unsubscribe, send mail to [EMAIL PROTECTED] with
the word unsubscribe in the message body, e.g., run the command
echo unsubscribe | mail [EMAIL PROTECTED]


=
To unsubscribe, send mail to [EMAIL PROTECTED] with
the word unsubscribe in the message body, e.g., run the command
echo unsubscribe | mail [EMAIL PROTECTED]




Just to clarify Rony's reply :

AOE protocol is build upon Ethernet layer and so AOE payload is 
encapsulated in Ethernet frames


Using iSCSI there 2  encapsutions -
SCSI to IP to ethernet and IP to Ethernet.

So theoretically AOE  has less overhead .

Hag Sameah,
Lev




=
To unsubscribe, send mail to [EMAIL PROTECTED] with
the word unsubscribe in the message body, e.g., run the command
echo unsubscribe | mail [EMAIL PROTECTED]



Re: Posix/NTPL : Is particular thread alive ? (pthread_timedjoin_np ??)

2008-04-24 Thread Lev Olshvang

Hi Guys,


To finish with this thread, my last question

What is altternative to phtread_timed_join_np ?

I want to wait for thread temination, but not forever.

Say , I can not rewrite  code that  creates user threads, I can just  
add some management thread.



Hag Sameah,
Lev

Gilad Ben-Yossef wrote:


Lev Olshvang wrote:


I am looking for generic way to ask about  thread existence.

You mean like calling pthread_kill() with a signal number of zero? :-)

Gilad
--
Gilad Ben-Yossef 
Chief Coffee Drinker


Codefidence Ltd.
The code is free, your time isn't.(TM)

Web:http://codefidence.com
Email:  [EMAIL PROTECTED]
Office: +972-8-9316883 ext. 201
Fax:+972-8-9316885
Mobile: +972-52-8260388
  



=
To unsubscribe, send mail to [EMAIL PROTECTED] with
the word unsubscribe in the message body, e.g., run the command
echo unsubscribe | mail [EMAIL PROTECTED]



POSIX QUEUE : mq_receive fails, but works fine after reboot , why ??

2008-04-24 Thread Lev Olshvang

Hello friends,

During program debug I made sometimes errors on queue attributes.

Somehow my working test program started to complain on invalid msg size.

I was beating my head agains a wall because on a program which send and 
receives messages from POSIX queue ( I create new queue on every program 
invocation)  mq_receive returned invalid lengh error.


Msq size are only 12 bytes on mq_send, and I verified it even on /dev/mqueue
And the quuee was having only one message in my test


After reboot, test program works again .


I am on Ubuntu 7.1,  librt-2.6.1.so

How can I quarantee message queue subsystem integrity ???

Hag Sameah,
Lev




=
To unsubscribe, send mail to [EMAIL PROTECTED] with
the word unsubscribe in the message body, e.g., run the command
echo unsubscribe | mail [EMAIL PROTECTED]



Need advice LFS or buildroot - the maturity of tools ?

2008-04-28 Thread Lev Olshvang

Hi friends,

I need to make customized and small linux installation for i686 
processor but with only 64M disk available.


I tried some automated tools from LFS site ( Linux from scratch) then 
buildroot and was stuck with errors I had not time to dig in.






Please share you experience with such tools.


Thanks for reading this,

Lev

=
To unsubscribe, send mail to [EMAIL PROTECTED] with
the word unsubscribe in the message body, e.g., run the command
echo unsubscribe | mail [EMAIL PROTECTED]



Corrupted stack - Why Ubuntu 7.10 does not have libsafe; does not show errors in ?

2008-05-18 Thread Lev Olshvang

Hi people,

I am fighting with stack corruption problem in my appilcation

I wanted to use libsafe , but debian/ubuntu packages are not accessible,
so I built libsafe manually from source tar distribution

And now, I see from trace ouput that altough my calls  are indeed 
intercepted in preloaded libsafe functions, no errors are shown neither 
in stderr, nor in /var/log/secure


Any advises are heartly welcomed

Toda,
L.





=
To unsubscribe, send mail to [EMAIL PROTECTED] with
the word unsubscribe in the message body, e.g., run the command
echo unsubscribe | mail [EMAIL PROTECTED]



Re: Corrupted stack - Why Ubuntu 7.10 does not have libsafe; does not show errors in ?

2008-05-18 Thread Lev Olshvang

Hi Valery,

I do use valgrind to find memory leaks, but libsafe suppose to directly 
get me  the name of function where stack is smashed.


I forgot to write, that in order to disable GCC stack protectin, I 
compile my application and libsafe with -fno-stack-protector option.




Valery Reznic wrote:

You can try to use valgrind.

Valery


--- On Sun, 5/18/08, Lev Olshvang [EMAIL PROTECTED] wrote:

  

From: Lev Olshvang [EMAIL PROTECTED]
Subject: Corrupted stack - Why   Ubuntu 7.10 does not have libsafe; does not 
show errors in ?
To: linux-il linux-il@cs.huji.ac.il
Date: Sunday, May 18, 2008, 4:47 PM
Hi people,

I am fighting with stack corruption problem in my
appilcation

I wanted to use libsafe , but debian/ubuntu packages are
not accessible,
so I built libsafe manually from source tar distribution

And now, I see from trace ouput that altough my calls  are
indeed 
intercepted in preloaded libsafe functions, no errors are
shown neither 
in stderr, nor in /var/log/secure


Any advises are heartly welcomed

Toda,
L.





=
To unsubscribe, send mail to [EMAIL PROTECTED]
with
the word unsubscribe in the message body, e.g.,
run the command
echo unsubscribe | mail [EMAIL PROTECTED]




  
  



=
To unsubscribe, send mail to [EMAIL PROTECTED] with
the word unsubscribe in the message body, e.g., run the command
echo unsubscribe | mail [EMAIL PROTECTED]



Re: Monitor activation of a process (by process name) - is it possible ?

2008-06-18 Thread Lev Olshvang

Very simple :

1. Rename your original process
2 . Write a wrapper script with a same name which perform your custom 
actions  and then calls to original process


CHEERS.
lev


Dan Shimshoni wrote:

Hello,

Is there a way to write an application/a kernel module which will
notice when a process named xyz starts ?

For example, I want to be able to notice when a user statrs a process
named calc (by running calc, or whatever other unspecified command)
and print this notification to a file (or to kernel log).

My assumption is that I know **nothing** about that process besides it
name, xyz; I don't know anything about which ports it uses, (if at all),
I don't know the files it uses, (if at all), etc.  All I know is ***just***
the process name.

And a very important point - I don't know for how long this process
will run before
exiting. It can be less than a second, and I **MUST** take this in account
and handle such a case.

Can this be done at all?

Regards,
Dan

=
To unsubscribe, send mail to [EMAIL PROTECTED] with
the word unsubscribe in the message body, e.g., run the command
echo unsubscribe | mail [EMAIL PROTECTED]

  



=
To unsubscribe, send mail to [EMAIL PROTECTED] with
the word unsubscribe in the message body, e.g., run the command
echo unsubscribe | mail [EMAIL PROTECTED]



Looking for IGMP (multicast) server-client solution

2008-09-22 Thread Lev Olshvang


Hi,

I have following issue to solve:

The network have one server which sends multicast streams to several 
multicast groups.


I would like it to stop  streaming if no client is listening, and  start 
streaming again when client is joining multicast group.


I see from sniffing, that clients  indeed  send IGMP join group protocol 
message  , and I wonder how to make linux server to handle this join and 
manage multicast group.


I saw that kernel have provisions to manage multicast groups through 
setsockopt(), but I did not find how to get join/leave group 
notification at user

space.

I know that there are multicast routers , like mrouted and pimd and I am 
trying to configure thema at they moment but I  doubt that I can 
configure only one interface because it contradict routing concept, 
isn't it ?


Thanks ,
Lev

=
To unsubscribe, send mail to [EMAIL PROTECTED] with
the word unsubscribe in the message body, e.g., run the command
echo unsubscribe | mail [EMAIL PROTECTED]



Re: Looking for IGMP (multicast) server-client solution

2008-09-22 Thread Lev Olshvang





Hi Baruch,

Thanks for response,
I will put my comments close to your statements, please see below



Thaks,


Baruch Even wrote:

  
  On Mon, Sep 22, 2008 at 11:38 AM, Lev Olshvang [EMAIL PROTECTED]
wrote:
  
  
Hi,

I have following issue to solve:

The network have one server which sends multicast streams to several
multicast groups.

I would like it to stop streaming if no client is listening, and
start streaming again when client is joining multicast group.
  
Normally for multicast the server never receives any notification if
there are clients or not. It just sends data and if the clients want
it, they ask for it. To control the server actual sending you need an
external protocol to notify the server that there is a new client and
when the client leaves.
  
  
  

 As such, I think IGMP serves this matter. IGMP defines host -
router conversation and I see IGMP messages from a host 
 (in my terms client). ( client application use setsockopt(
IP_ADD_MEMBERSHIP) ) .

The server box have as linux kernel + mrouted counting for this groups
and making proper entries in /proc/net/igmp, 
/proc/net/ip_mf_cache ,...

  
  
  
If the clients are connected to the server without a router between
them, you could implement a program that listens on the interface for
the IGMP messages and controls the server when to send and when not.
  
  
  

 Since the kernel have this information - which group are active on
every interface, it is very logically to suppose that kernel may easily
filter out the multicast packets to the non-active group. It seems to
me it should work this way.
But these functionality should be implemented in kernel space ( it is
similar to netfilter,) the question is how to turn it on ?

  
  
  
If there is a router between the server and the clients you are out of
luck as the router expects the multicast packets to just be sent
constantly to its interface for it to consider this multicast group
active at all. A router will not send IGMP messages to you!
  
  
  

I think you wrong here, I see mrouted is taking the responsibility of
querier and periodically ask the interface neighbours to confirm every
registered multicast group relationship.


  
  
  
  
  I see from sniffing, that clients indeed send IGMP join
group protocol message , and I wonder how to make linux server to
handle this join and manage multicast group.
  
If you send data to the interface the clients will receive it, I'm not
sure what is your problem statement here. 
  
  
  

 I do not want to overload LAN in a data nobody is interesting (no
clients running) 

  
  
  
  
I saw that kernel have provisions to manage multicast groups through
setsockopt(), but I did not find how to get join/leave group
notification at user
space.

I know that there are multicast routers , like mrouted and pimd and I
am trying to configure thema at they moment but I doubt that I can
configure only one interface because it contradict routing concept,
isn't it ?
  
mrouted and pimd will monitor for IGMP messages and control the kernel
multicast routing fabric. They will instruct the kernel where to
forward multicast packets, but you only need that if you have multiple
interfaces on your computer or to make a multicast router that sits
between your multicast server and clients.
  
  
  

 I expected them to turn outgoing packet filtering on the base of
active group information kernel has.


  
  
  
If the server app is on a machine and the clients are connected to it
directly (as in with a switch or a hub) you don't need mrouted.
  
  
  Thanks ,
Lev
  
Baruch
  
  
  





=
To unsubscribe, send mail to [EMAIL PROTECTED] with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail [EMAIL PROTECTED]



Ubuntu kernel build - ignores .config ??

2008-12-24 Thread Lev Olshvang

Evening all,


I need to rebuild kernel for my Ubuntu 7.10 box .

So I had installed linux-source package and made menuconfig. ( I do not 
need make-dpkg since I used to do things manually)


And I see that .config file indeed is build according to my request and 
only my hardware devices are present in  it.


To my surprise, the next command - make all  still makes modules for the 
whole universe of devices.



What is going here ?

Regards, Lev





=
To unsubscribe, send mail to linux-il-requ...@cs.huji.ac.il with
the word unsubscribe in the message body, e.g., run the command
echo unsubscribe | mail linux-il-requ...@cs.huji.ac.il



kgdb usage errors on strictly following kgdb authorss guide

2009-02-05 Thread Lev Olshvang


Hello all,

I am looking for explanation of the  kgdb errors and usage advice.

I am running Linux 2.6.15.5 system with a kgdb patches from the 
kgfb.linsyssoft.com.


I built a kernel with ethernet driver included (not module) and KGDB 
remote debug enable over Ethernet.


I am trying to strictly follow the guide I had downloaded from 
linsyssoft.com



First I tried to run debug other ethernet using kgdboe parameter on boot

I built a kernel with ethernet driver included (not module) and KGDB 
remote debug enable over Ethernet.


And the gdb session was stuck because the target system did not answered 
to ARP requsests

for 10.0.0.3
The corresponding section from gub.conf is

title Linux-2.6.15.5-kgdb(eth)
root (hd0,0)
kernel /boot/vmlinuz-2.6.15.5-kgdb ro root=/dev/hda1 
kgdb...@10.0.0.6/,@10.0.0.3/

console=ttyS0,115200


So I suppose I should manually load network driver, but how can I do it 
from boot line and assign IP address to it ?

---

The second attempt I took with a serial 8250 driver
I had build new kernel with Serial driver configured  for remote 
debugging and


changed boot line to :

kernel /boot/vmlinuz-2.6.13-kgdb ro root=/dev/hda1 kgdbwait 
kgdb8250=1,115200


*Question1 :  - docs says it must be kgdb8250=ttyS1,115200,
*
but when I tried this , the debug session even did not come to kgdb 
breakpoint.



gdbmod-2.4 ./vmlinux itle Linux-2.6.15.5-kgdb(eth)


GNU gdb 6.4
Copyright 2005 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain 
conditions.

Type show copying to see the conditions.
There is absolutely no warranty for GDB.  Type show warranty for details.
This GDB was configured as i686-pc-linux-gnu...Using host libthread_db 
library /lib/libthread_db.so.1.


(gdb) set remotebaud 115200
(gdb) target remote /dev/ttyS0
Remote debugging using /dev/ttyS0
breakpoint () at kernel/kgdb.c:1888
1888atomic_set(kgdb_setting_breakpoint, 0);
(gdb) cont
Continuing.
[17179569.184000] Waiting for connection from remote gdb...
[*17179569.184000] Invalid syntax for option kgdb8250=*

[New thread 1737]
Error while mapping shared library sections:
ide_disk.ko: Success.
Error while reading shared library symbols:
ide_disk.ko: No such file or directory.
Error while reading shared library symbols:
ide_disk.ko: No such file or directory.
[New thread 1774]
Error while reading shared library symbols:
ide_disk.ko: No such file or directory.
Error while reading shared library symbols:
ide_disk.ko: No such file or directory.
[New thread 1747]
Error while mapping shared library sections:
generic.ko: Success.
Error while reading shared library symbols:
ide_disk.ko: No such file or directory.
Error while reading shared library symbols:
generic.ko: No such file or directory.
Error while reading shared library symbols:
ide_disk.ko: No such file or directory.
Error while reading shared library symbols:
generic.ko: No such file or directory.
[New thread 1757]
Error while mapping shared library sections

Question 3 : Are those Succeses and Errors normal
Question  4: How I can command to load my module from gdb line and set a 
breakpoint to the function I would like to debug ?




Regards to the kenel gurus.

Lev

___
Linux-il mailing list
Linux-il@cs.huji.ac.il
http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il


kchmviewer problem - correct contents page , but any other page are inaccessible

2009-03-11 Thread Lev Olshvang

Hi all,

I am trying to open .chm book and kchmviewer correctly displays contents 
page but  then produces  the  following error:



/An error occurred while loading ms-its:/tmp/kde-ttt/arklouxQz/Learning 
JavaScript, 2nd Edition.chm::/Cover.html:
The file or folder ms-its:/tmp/kde-tt/arklouxQz/Learning JavaScript, 2nd 
Edition.chm::/Cover.html does not exist/.




The length of the archive seems normal, and I succesfully made file 
export to of the book to html files using kchmviewr file operations menu.


How to make this book normal ???

ThanX
L.




___
Linux-il mailing list
Linux-il@cs.huji.ac.il
http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il


no medium found error on USB Sandisk ImageMatte 12 in 1 , 2.6.22

2009-03-22 Thread Lev Olshvang
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Return-Path: l...@vboxcomm.com
X-OriginalArrivalTime: 22 Mar 2009 07:49:43.0875 (UTC) 
FILETIME=[C3994930:01C9AAC2]

Boker tov all,

My simple card reader  broke down , and I took more advanced Sandisk 
card reader.

It behaves very strange on my  Ubuntu (generic 2.6.22, all possible 
drivers)   and RH boxes :

I have a Compact Flash card with 1 Linux partition. ( I tryed several 
cards, I am sure they are OK).

But this reader reports of  4 partitions  when card is inserted into 
(strange enouth ???)



and all futher fdisk , fsk, or mount returns :
open(/dev/sdc, O_RDONLY|O_LARGEFILE)  = -1 ENOMEDIUM (No medium found)
open(/dev/sdc, O_RDWR|O_LARGEFILE)= -1 ENOMEDIUM (No medium found)
open(/dev/sdc, O_RDONLY|O_LARGEFILE)  = -1 ENOMEDIUM (No medium found)


The dmesg reveals :


[1429181.448814] Initializing USB Mass Storage driver...
[1429181.449088] scsi2 : SCSI emulation for USB Mass Storage devices
[1429181.449333] usb-storage: device found at 2
[1429181.449338] usb-storage: waiting for device to settle before scanning
[1429181.449619] usbcore: registered new interface driver usb-storage
[1429181.449770] USB Mass Storage support registered.
[1429186.437915] usb-storage: device scan complete
[1429186.438822] scsi 2:0:0:0: Direct-Access Generic  STORAGE 
DEVICE   9339 PQ: 0 ANSI: 0
[1429188.348727] scsi 2:0:0:1: Direct-Access Generic  STORAGE 
DEVICE   9339 PQ: 0 ANSI: 0
[1429190.281237] scsi 2:0:0:2: Direct-Access Generic  STORAGE 
DEVICE   9339 PQ: 0 ANSI: 0
[1429192.213871] scsi 2:0:0:3: Direct-Access Generic  STORAGE 
DEVICE   9339 PQ: 0 ANSI: 0
[1429196.079084] sd 2:0:0:0: [sdc] Attached SCSI removable disk
[1429196.079167] sd 2:0:0:0: Attached scsi generic sg3 type 0
[1429196.085068] sd 2:0:0:1: [sdd] Attached SCSI removable disk
[1429196.085147] sd 2:0:0:1: Attached scsi generic sg4 type 0
[1429196.089085] sd 2:0:0:2: [sde] Attached SCSI removable disk
[1429196.089161] sd 2:0:0:2: Attached scsi generic sg5 type 0
[1429196.092123] sd 2:0:0:3: [sdf] Attached SCSI removable disk
[1429196.092199] sd 2:0:0:3: Attached scsi generic sg6 type 0




___
Linux-il mailing list
Linux-il@cs.huji.ac.il
http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il


Failed to pass parameter to module in initramfs stage - watiting for root file system problem

2009-04-19 Thread Lev Olshvang

Hi All,

I am trying to use vanilla kernel on Ubuntu host.

The problem that althogb my IDE disk is recognized during boot process
( I see messages hda disk, partitions hda1, hda2, hda5 -- as it should be)
the system comes finally to BusyBox prompt and I do not see any /dev/hda 
created


The boot message also advises me to use probe_mask parameter of 
ide_generic module and I am tried this : -
passed it to mkiniramfs command in  InitRamfs module configuration file 
and on boot command line too, but to no success because I see the the 
same advice again.


Pleasa advice.
Lev






___
Linux-il mailing list
Linux-il@cs.huji.ac.il
http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il


Re: SOLVED Failed to pass parameter to module in initramfs stage - watiting for root file system problem

2009-04-19 Thread Lev Olshvang
With no help from community I solved the main problem ( ide disk device 
created) by setting CONFIG_HOTPLUG in kernel configuration.

Why IDE need HOTPLUG - Gd knows. ???




Lev Olshvang wrote:

Hi All,

I am trying to use vanilla kernel on Ubuntu host.

The problem that althogb my IDE disk is recognized during boot process
( I see messages hda disk, partitions hda1, hda2, hda5 -- as it should 
be)
the system comes finally to BusyBox prompt and I do not see any 
/dev/hda created


The boot message also advises me to use probe_mask parameter of 
ide_generic module and I am tried this : -
passed it to mkiniramfs command in  InitRamfs module configuration 
file and on boot command line too, but to no success because I see the 
the same advice again.


Pleasa advice.
Lev






___
Linux-il mailing list
Linux-il@cs.huji.ac.il
http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il




___
Linux-il mailing list
Linux-il@cs.huji.ac.il
http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il


where are now ubuntu gutsy repositories ?

2009-04-26 Thread Lev Olshvang

Shalom,


I need to install kernel headres for Ubuntu gutsy, but gutsy is no more 
on  Canonical servers.



Where it goes ?

I found the required package on net and tryed to install it, but it 
requires some linux-headers-2.6.22-14 package, but this pakage does not 
exist.


This way  I put itself int dependency mess and I am afraid apt database 
is corrupted.

How can I check and repair apt database ???



dpkg -i linux-headers-2.6.22-14-generic_2.6.22-14.52_i386.deb
(Reading database ... 130398 files and directories currently installed.)
Preparing to replace linux-headers-2.6.22-14-generic 2.6.22-14.52 (using 
linux-headers-2.6.22-14-generic_2.6.22-14.52_i386.deb) ...

Unpacking replacement linux-headers-2.6.22-14-generic ...
dpkg: dependency problems prevent configuration of 
linux-headers-2.6.22-14-generic:
linux-headers-2.6.22-14-generic depends on linux-headers-2.6.22-14; 
however:

 Package linux-headers-2.6.22-14 is not installed.
dpkg: error processing linux-headers-2.6.22-14-generic (--install):
dependency problems - leaving unconfigured
Errors were encountered while processing:
linux-headers-2.6.22-14-generic


___
Linux-il mailing list
Linux-il@cs.huji.ac.il
http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il


Xserver question - why VESA considers monitor Virtual size is 800x600 ???

2009-05-05 Thread Lev Olshvang


Hi,

I have only two resolutions displayed by gnome-display-properties while 
my Monitor  connected to other systems definetly have more than 2 
resolutions available.





From the Xserver Log I got the following:


(II) VESA(0): Total Memory: 1024 64KB banks (65536kB)
(II) VESA(0): Configured Monitor: Using hsync range of 30.00-98.00 kHz
(II) VESA(0): Configured Monitor: Using vrefresh range of 50.00-160.00 Hz
(II) VESA(0): Configured Monitor: Using maximum pixel clock of 200.00 MHz
(II) VESA(0): Not using built-in mode 2048x1536 (width too large for 
virtual size)
(II) VESA(0): Not using built-in mode 1920x1440 (width too large for 
virtual size)
(II) VESA(0): Not using built-in mode 1920x1200 (width too large for 
virtual size)
(II) VESA(0): Not using built-in mode 1920x1080 (width too large for 
virtual size)
(II) VESA(0): Not using built-in mode 1600x1200 (width too large for 
virtual size)
(II) VESA(0): Not using built-in mode 1680x1050 (width too large for 
virtual size)
(II) VESA(0): Not using built-in mode 1600x1024 (width too large for 
virtual size)
(II) VESA(0): Not using built-in mode 1400x1050 (width too large for 
virtual size)
(II) VESA(0): Not using built-in mode 1280x1024 (width too large for 
virtual size)
(II) VESA(0): Not using built-in mode 1440x900 (width too large for 
virtual size)
(II) VESA(0): Not using built-in mode 1280x960 (width too large for 
virtual size)
(II) VESA(0): Not using built-in mode 1366x768 (width too large for 
virtual size)
(II) VESA(0): Not using built-in mode 1360x768 (width too large for 
virtual size)
(II) VESA(0): Not using built-in mode 1280x800 (width too large for 
virtual size)
(II) VESA(0): Not using built-in mode 1152x864 (width too large for 
virtual size)
(II) VESA(0): Not using built-in mode 1280x768 (width too large for 
virtual size)
(II) VESA(0): Not using built-in mode 1280x720 (width too large for 
virtual size)
(II) VESA(0): Not using built-in mode 1024x768 (width too large for 
virtual size)
(II) VESA(0): Not using built-in mode 1024x640 (width too large for 
virtual size)
(II) VESA(0): Not using built-in mode 1024x600 (width too large for 
virtual size)
(II) VESA(0): Not using built-in mode 1024x576 (width too large for 
virtual size)
(II) VESA(0): Not using built-in mode 960x600 (width too large for 
virtual size)
(II) VESA(0): Not using built-in mode 1024x512 (width too large for 
virtual size)

(II) VESA(0): Not using built-in mode 720x576 (no mode of this name)
(II) VESA(0): Not using built-in mode 853x480 (width too large for 
virtual size)
(II) VESA(0): Not using built-in mode 852x480 (width too large for 
virtual size)
(II) VESA(0): Not using built-in mode 848x480 (width too large for 
virtual size)

(II) VESA(0): Not using built-in mode 720x540 (no mode of this name)
(II) VESA(0): Not using built-in mode 800x480 (no mode of this name)
(II) VESA(0): Not using built-in mode 720x480 (no mode of this name)
(--) VESA(0): Virtual size is 800x600 (pitch 800)
(**) VESA(0): *Built-in mode 800x600
(**) VESA(0):  Built-in mode 640x480
(**) VESA(0): Display dimensions: (320, 240) mm
(**) VESA(0): DPI set to (63, 63)
(II) VESA(0): Attempting to use 85Hz refresh for mode 800x600 (114)
(II) VESA(0): Attempting to use 85Hz refresh for mode 640x480 (111)


___
Linux-il mailing list
Linux-il@cs.huji.ac.il
http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il


Re: Xserver question - why VESA considers monitor Virtual size is 800x600 ???

2009-05-05 Thread Lev Olshvang




Thanks, 

After hard googling I managed to set up  working setup in xorg.conf

What I miss  - i did not find good explanation for  various Option and
their affects, ( I do not deal with graphics usually), perhaps you can
give me some reference 

It looks this way :

Section "Monitor"
    Identifier  "Configured Monitor"
    Vendorname  "Plug 'n' Play"
    Modelname   "Plug 'n' Play"
    HorizSync    30-98
    Option   "DPMS"
    Option  "VBEModes"
    VertRefresh  60-85
    #Gamma  1.0
EndSection

Section "Screen"
    Identifier  "Default Screen"
    Device  "VIA"
    Monitor "Configured Monitor"
    DefaultDepth    24
    Option "metamodes" "1280x1024_75 +0+0; 1280x1024 +0+0;
1024x768 +0+0; 800x600 +0+0"
EndSection




Hetz Ben Hamo wrote:

  Hi Lev,

Unless this is a last resort, I really recommend *NOT* to use the VESA
driver. Vesa used the least of your grpahics chip capabilities, NO
graphics acceleration, no nothing,

Any native driver for your graphics chip would do a better job of
allocating memory (and not giving you only 64MB RAM for your chip) and
will detect all the resolutions. VESA most of the time don't know much
about those resolutions because it's trying to go "wild" with 24 bit
colors and for VESA, thats what you can get unless you fiddle with
many parameters in xorg.conf file.

Your monitor can supports multiple resolutions as shown by your log,
but VESA is too dumb. Use the correct driver (which chip do you have?
if you can tell me, I'll be happy to tell you which driver to use) and
it should show all the fancy stuff.

Thanks,
Hetz

On Tue, May 5, 2009 at 12:51 PM, Lev Olshvang l...@vboxcomm.com wrote:
  
  
Hi,

I have only two resolutions displayed by gnome-display-properties while my
Monitor  connected to other systems definetly have more than 2 resolutions
available.




From the Xserver Log I got the following:


(II) VESA(0): Total Memory: 1024 64KB banks (65536kB)
(II) VESA(0): Configured Monitor: Using hsync range of 30.00-98.00 kHz
(II) VESA(0): Configured Monitor: Using vrefresh range of 50.00-160.00 Hz
(II) VESA(0): Configured Monitor: Using maximum pixel clock of 200.00 MHz
(II) VESA(0): Not using built-in mode "2048x1536" (width too large for
virtual size)
(II) VESA(0): Not using built-in mode "1920x1440" (width too large for
virtual size)
(II) VESA(0): Not using built-in mode "1920x1200" (width too large for
virtual size)
(II) VESA(0): Not using built-in mode "1920x1080" (width too large for
virtual size)
(II) VESA(0): Not using built-in mode "1600x1200" (width too large for
virtual size)
(II) VESA(0): Not using built-in mode "1680x1050" (width too large for
virtual size)
(II) VESA(0): Not using built-in mode "1600x1024" (width too large for
virtual size)
(II) VESA(0): Not using built-in mode "1400x1050" (width too large for
virtual size)
(II) VESA(0): Not using built-in mode "1280x1024" (width too large for
virtual size)
(II) VESA(0): Not using built-in mode "1440x900" (width too large for
virtual size)
(II) VESA(0): Not using built-in mode "1280x960" (width too large for
virtual size)
(II) VESA(0): Not using built-in mode "1366x768" (width too large for
virtual size)
(II) VESA(0): Not using built-in mode "1360x768" (width too large for
virtual size)
(II) VESA(0): Not using built-in mode "1280x800" (width too large for
virtual size)
(II) VESA(0): Not using built-in mode "1152x864" (width too large for
virtual size)
(II) VESA(0): Not using built-in mode "1280x768" (width too large for
virtual size)
(II) VESA(0): Not using built-in mode "1280x720" (width too large for
virtual size)
(II) VESA(0): Not using built-in mode "1024x768" (width too large for
virtual size)
(II) VESA(0): Not using built-in mode "1024x640" (width too large for
virtual size)
(II) VESA(0): Not using built-in mode "1024x600" (width too large for
virtual size)
(II) VESA(0): Not using built-in mode "1024x576" (width too large for
virtual size)
(II) VESA(0): Not using built-in mode "960x600" (width too large for virtual
size)
(II) VESA(0): Not using built-in mode "1024x512" (width too large for
virtual size)
(II) VESA(0): Not using built-in mode "720x576" (no mode of this name)
(II) VESA(0): Not using built-in mode "853x480" (width too large for virtual
size)
(II) VESA(0): Not using built-in mode "852x480" (width too large for virtual
size)
(II) VESA(0): Not using built-in mode "848x480" (width too large for virtual
size)
(II) VESA(0): Not using built-in mode "720x540" (no mode of this name)
(II)

SOLVED : Xserver question - why VESA considers monitor Virtual size is 800x600 ???

2009-05-05 Thread Lev Olshvang




Hi  Hetz,

The chipset is cle266,  Linux Ubuntu 8.04, I configured Xserver to use
openchrome driver ( Ubuntu has it inside )  

I suppose these VESA messages were printed before I rerun Xserver and I
did not realize it

Now the messages are come from OpenChrome  but what does VESA Bios
means I still do not now ???

(II) CHROME(0): Modeline "800x600"x84.9   56.75  800 848 928 1056  600
603 607 633 -hsync +vsync (53.7 kHz)
(II) CHROME(0): Modeline "1024x768"x84.9   94.50  1024 1096 1200 1376 
768 771 775 809 -hsync +vsync (68.7 kHz)
(II) CHROME(0): Modeline "1280x960"x84.9  148.25  1280 1368 1504 1728 
960 963 967 1011 -hsync +vsync (85.8 kHz)
(II) CHROME(0): Modeline "1280x1024"x84.8  159.50  1280 1376 1512 1744 
1024 1027 1034 1078 -hsync +vsync (91.5 kHz)
(II) CHROME(0): Modeline "1600x1200"x75.0  204.75  1600 1720 1888 2176 
1200 1203 1207 1255 -hsync +vsync (94.1 kHz)
(II) CHROME(0): ViaOutputsDetect
(II) CHROME(0): VIATVDetect
(WW) CHROME(0): This device is supposed to have a TV encoder, but we
are unable to detect it (support missing?).
(II) CHROME(0): ViaOutputsSelect
(II) CHROME(0): ViaOutputsSelect: X Configuration: 0x00
(II) CHROME(0): ViaOutputsSelect: BIOS Initialised register: 0x00
(II) CHROME(0): ViaOutputsSelect: CRT.
(II) Loading sub module "int10"
(II) LoadModule: "int10"
(II) Loading /usr/lib/xorg/modules//libint10.so
(II) Module int10: vendor="X.Org Foundation"
    compiled for 1.4.0.90, module version = 1.0.0
    ABI class: X.Org Video Driver, version 2.0
(II) Loading sub module "vbe"
(II) LoadModule: "vbe"
(II) Loading /usr/lib/xorg/modules//libvbe.so
(II) Module vbe: vendor="X.Org Foundation"
    compiled for 1.4.0.90, module version = 1.1.0
    ABI class: X.Org Video Driver, version 2.0
(II) Loading sub module "int10"
(II) LoadModule: "int10"
(II) Reloading /usr/lib/xorg/modules//libint10.so
(II) CHROME(0): initializing int10
(II) CHROME(0): Primary V_BIOS segment is: 0xc000
(II) CHROME(0): VESA BIOS detected
(II) CHROME(0): VESA VBE Version 3.0
(II) CHROME(0): VESA VBE Total Mem: 65536 kB
(II) CHROME(0): VESA VBE OEM: VIA P4N800 PRO

(II) CHROME(0): VESA VBE OEM Software Rev: 1.0
(II) CHROME(0): VESA VBE OEM Vendor:
(II) CHROME(0): VESA VBE OEM Product:
(II) CHROME(0): VESA VBE OEM Product Rev:
(II) CHROME(0): Searching for matching VESA mode(s):
Mode: 101 (640x480)

II) CHROME(0): VIASwitchMode
(II) CHROME(0): [drm] Cleaning up DMA ring-buffer.
(II) CHROME(0): VIAWriteMode
(II) CHROME(0): Trying VBE Mode 1280x960 (0xc16a) Refresh 85.00:
(II) CHROME(0): ViaVbeSetRefresh
(II) CHROME(0): Active Device: 1
(II) CHROME(0): Refresh Rate Index: 7
   ?
(II) CHROME(0): VBESetVBEMode failed...but worked OK without customized
refresh and dotclock.

    ??
(II) CHROME(0): VIAAdjustFrame


Hetz Ben Hamo wrote:

  Lev,

You didn't tell me which chipset do you use (I understand it's VIA,
but which VIA?), nor distribution that you use...

You can download a driver + docs if you know what chipset in your
board (lspci -v) at this site:
http://linux.via.com.tw/support/downloadFiles.action

You can use the forum here (http://www.tkarena.com/forums/via-arena/)
which I'm sure your question has been asked before.

Thanks,
Hetz

On Tue, May 5, 2009 at 2:09 PM, Lev Olshvang l...@vboxcomm.com wrote:
  
  
Thanks,

After hard googling I managed to set up  working setup in xorg.conf

What I miss  - i did not find good explanation for  various Option and their
affects, ( I do not deal with graphics usually), perhaps you can give me
some reference

It looks this way :

Section "Monitor"
    Identifier  "Configured Monitor"
    Vendorname  "Plug 'n' Play"
    Modelname   "Plug 'n' Play"
    HorizSync    30-98
    Option   "DPMS"
    Option  "VBEModes"
    VertRefresh  60-85
    #Gamma  1.0
EndSection

Section "Screen"
    Identifier  "Default Screen"
    Device  "VIA"
    Monitor "Configured Monitor"
    DefaultDepth    24
    Option "metamodes" "1280x1024_75 +0+0; 1280x1024 +0+0;
1024x768 +0+0; 800x600 +0+0"
EndSection




Hetz Ben Hamo wrote:

Hi Lev,

Unless this is a last resort, I really recommend *NOT* to use the VESA
driver. Vesa used the least of your grpahics chip capabilities, NO
graphics acceleration, no nothing,

Any native driver for your graphics chip would do a better job of
allocating memory (and not giving you only 64MB RAM for your chip) and
will detect all the resolutions. VESA most of the time don't know much
about those resolutions because it's trying to go "wild" with 24 bit
colors and for VESA, thats what you can get unless you fiddle with
many parameters in xorg.conf file.

Your mo

Re: SOLVED : Xserver resolution problem - NEW : gdm refuses to show up

2009-05-05 Thread Lev Olshvang

Hi Hetz,

New problem I noticed after reboot  - now gdm do not show anything, it 
just turns display on/off


Here the  Log

more /var/log/gdm/:0.log

This is a pre-release version of the X server from The X.Org Foundation.
It is not supported in any way.
Bugs may be filed in the bugzilla at http://bugs.freedesktop.org/.
Select the xorg product for bugs you find in this release.
Before reporting bugs in pre-release versions please check the
latest version in the X.Org Foundation git repository.
See http://wiki.x.org/wiki/GitPage for git access instructions.

X.Org X Server 1.4.0.90
Release Date: 5 September 2007
X Protocol Version 11, Revision 0
Build Operating System: Linux Ubuntu (xorg-server 
2:1.4.1~git20080131-1ubuntu9.2)
Current Operating System: Linux ubfull 2.6.26 #16 Mon May 4 11:26:43 
EEST 2009 i686

Build Date: 13 June 2008  01:08:21AM

   Before reporting problems, check http://wiki.x.org
   to make sure that you have the latest version.
Module Loader present
Markers: (--) probed, (**) from config file, (==) default setting,
   (++) from command line, (!!) notice, (II) informational,
   (WW) warning, (EE) error, (NI) not implemented, (??) unknown.
(==) Log file: /var/log/Xorg.0.log, Time: Mon May  4 15:05:38 2009
(==) Using config file: /etc/X11/xorg.conf
(II) Module i2c already built-in
(II) Module ddc already built-in
(II) Module ramdac already built-in
Fulfilled via DRI at 39714816
Freed 39714816 (pool 2)
expected keysym, got XF86KbdLightOnOff: line 70 of pc
expected keysym, got XF86KbdBrightnessDown: line 71 of pc
expected keysym, got XF86KbdBrightnessUp: line 72 of pc
expected keysym, got XF86KbdLightOnOff: line 70 of pc
expected keysym, got XF86KbdBrightnessDown: line 71 of pc
expected keysym, got XF86KbdBrightnessUp: line 72 of pc
Freed 39714816 (pool 1)



++
Hetz Ben Hamo wrote:

VESA (Video Electronics Standard Association) is an entity made from
several companies which creates different standards (see here:
http://www.vesa.org/)

The thing you saw is related to VESA VBE (VESA BIOS Extensions -
http://en.wikipedia.org/wiki/VESA_BIOS_Extensions) which is a standard
that any graphics chip vendors needs to comply to. This standard means
that the graphics chip should give a basic operation under this
standard (which is implemented in the vesa driver). The graphics
won't be accelerated, video will not be using any acceleration at all
(which means your video will have really jerky playback experience).
It only should let you have minimum memory to show something, cursor
and some more basic operations, a very basic VGA display. It's
reserved for times when you have a shiny new card and there are no
Linux (or any other OS) drivers for it.

Thanks,
Hetz

On Tue, May 5, 2009 at 3:59 PM, Lev Olshvang l...@vboxcomm.com wrote:
  

Hi  Hetz,

The chipset is cle266,  Linux Ubuntu 8.04, I configured Xserver to use
openchrome driver ( Ubuntu has it inside )

I suppose these VESA messages were printed before I rerun Xserver and I did
not realize it

Now the messages are come from OpenChrome  but what does VESA Bios means I
still do not now ???

(II) CHROME(0): Modeline 800x600x84.9   56.75  800 848 928 1056  600 603
607 633 -hsync +vsync (53.7 kHz)
(II) CHROME(0): Modeline 1024x768x84.9   94.50  1024 1096 1200 1376  768
771 775 809 -hsync +vsync (68.7 kHz)
(II) CHROME(0): Modeline 1280x960x84.9  148.25  1280 1368 1504 1728  960
963 967 1011 -hsync +vsync (85.8 kHz)
(II) CHROME(0): Modeline 1280x1024x84.8  159.50  1280 1376 1512 1744  1024
1027 1034 1078 -hsync +vsync (91.5 kHz)
(II) CHROME(0): Modeline 1600x1200x75.0  204.75  1600 1720 1888 2176  1200
1203 1207 1255 -hsync +vsync (94.1 kHz)
(II) CHROME(0): ViaOutputsDetect
(II) CHROME(0): VIATVDetect
(WW) CHROME(0): This device is supposed to have a TV encoder, but we are
unable to detect it (support missing?).
(II) CHROME(0): ViaOutputsSelect
(II) CHROME(0): ViaOutputsSelect: X Configuration: 0x00
(II) CHROME(0): ViaOutputsSelect: BIOS Initialised register: 0x00
(II) CHROME(0): ViaOutputsSelect: CRT.
(II) Loading sub module int10
(II) LoadModule: int10
(II) Loading /usr/lib/xorg/modules//libint10.so
(II) Module int10: vendor=X.Org Foundation
compiled for 1.4.0.90, module version = 1.0.0
ABI class: X.Org Video Driver, version 2.0
(II) Loading sub module vbe
(II) LoadModule: vbe
(II) Loading /usr/lib/xorg/modules//libvbe.so
(II) Module vbe: vendor=X.Org Foundation
compiled for 1.4.0.90, module version = 1.1.0
ABI class: X.Org Video Driver, version 2.0
(II) Loading sub module int10
(II) LoadModule: int10
(II) Reloading /usr/lib/xorg/modules//libint10.so
(II) CHROME(0): initializing int10
(II) CHROME(0): Primary V_BIOS segment is: 0xc000
(II) CHROME(0): VESA BIOS detected
(II) CHROME(0): VESA VBE Version 3.0
(II) CHROME(0): VESA VBE Total Mem: 65536 kB
(II) CHROME(0): VESA

why ubuntu increases interface name of network card eth ( ASAP !!!0

2009-05-11 Thread Lev Olshvang

Shalom List,

Please advice me on the following issue :

I have Compact flash with Ubuntu 8.04 installation and several mini ATX 
boxes


When I booted up first box, I had eth0 interface up

The second box received eth1 name

The third one got  eth2

/etc/udev/rules.d/z25_persistent-net.rules

I do not see any network card related information in udevinfo --export_db

My /etc/network/interfaces is :



I saw once the post from Shahar:

On Debian systems, check out /etc/udev/rules.d/z25-persistent-network. 
Just delete the lines for the old and the new network card, and let it 
choose automatically eth0.


Shachar 


But  I do not see anything related to the inerface number in my 
udev/rules for Ubuntu


I have a feeling that the list of PCI devices is stored in some place  
and  the udev matching see network card MAC address stored when I booted 
other boxes


I need some answer today if possible ???



ThanX,
Lev

___
Linux-il mailing list
Linux-il@cs.huji.ac.il
http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il


SOLVED: why ubuntu increases interface name of network card eth

2009-05-11 Thread Lev Olshvang
References: 4a08272a.3060...@vboxcomm.com
In-Reply-To: 4a08272a.3060...@vboxcomm.com
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Return-Path: l...@vboxcomm.com
X-OriginalArrivalTime: 11 May 2009 12:58:49.0578 (UTC) 
FILETIME=[3A5A7CA0:01C9D238]

I did not knw that udev writes new rules on every boot:

The problem was in file
 /etc/udev/rules.d/70-persistent-net.rules

I cleaned this file and rebooted.

ThanX


Lev Olshvang wrote:
 Shalom List,

 Please advice me on the following issue :

 I have Compact flash with Ubuntu 8.04 installation and several mini 
 ATX boxes

 When I booted up first box, I had eth0 interface up

 The second box received eth1 name

 The third one got  eth2

 /etc/udev/rules.d/z25_persistent-net.rules

 I do not see any network card related information in udevinfo --export_db

 My /etc/network/interfaces is :



 I saw once the post from Shahar:

 On Debian systems, check out 
 /etc/udev/rules.d/z25-persistent-network. Just delete the lines for 
 the old and the new network card, and let it choose automatically eth0.

 Shachar 


 But  I do not see anything related to the inerface number in my 
 udev/rules for Ubuntu

 I have a feeling that the list of PCI devices is stored in some place  
 and  the udev matching see network card MAC address stored when I 
 booted other boxes

 I need some answer today if possible ???



 ThanX,
 Lev

 ___
 Linux-il mailing list
 Linux-il@cs.huji.ac.il
 http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il



___
Linux-il mailing list
Linux-il@cs.huji.ac.il
http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il


How to change compact flash geometry ( cfdisk, sfdisk, parted, fdisk failed)

2009-05-21 Thread Lev Olshvang

Hi ,

I have Compact flash whi gave wrong number of cyl/heads during install.

I tried all listed utilities ( cfdisk ,sfdiskm parted )  to change 
geometry, but  after  reinserting it retaims to the invalid geometry.


Help ??

___
Linux-il mailing list
Linux-il@cs.huji.ac.il
http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il


Help setting up xfce4 on ubuntu 8.04 - does not connect with Dbus -- Blank screen

2009-05-21 Thread Lev Olshvang



Hi All,

I have  stripped down  ubuntu 8.04no X windows (installed  with 
debootstrap)


Now I am adding XFCE desktop


XServer starts up normally (ps + Xorg.log) , but xfce gives strange 
errors and screen remains blank :


more .xsession-errors
Xsession: X session started for vbox at Thu May 21 20:41:42 UTC 2009


** (xfdesktop:6742): WARNING **: Unable to initialise D-Bus.  Some 
xfdesktop features may be unavailable.


** (xfdesktop:6742): WARNING **: Unable to initialise D-Bus.  Some 
xfdesktop features may be unavailable.


** (xfdesktop:6742): WARNING **: Unable to initialise D-Bus.  Some 
xfdesktop features may be unavailable.


** (xfdesktop:6742): WARNING **: Unable to initialise D-Bus.  Some 
xfdesktop features may be unavailable.


** (xfdesktop:6742): WARNING **: Unable to initialise D-Bus.  Some 
xfdesktop features may be unavailable.


(xfwm4:6733): libxfcegui4-WARNING **: ICE I/O Error

(xfwm4:6733): libxfcegui4-WARNING **: Disconnected from session manager.

(xfdesktop:6742): libxfcegui4-WARNING **: ICE I/O Error

(xfdesktop:6742): libxfcegui4-WARNING **: Disconnected from session manager.
xfce-mcs-manager: Fatal IO error 11 (Resource temporarily unavailable) 
on X server :0.0.

xfwm4: Fatal IO error 2 (No such file or directory) on X server :0.0.
** Message: Xfce Menu: screen changed: 0

** Message: No valid plug window.

(xfce4-panel:6735): Gtk-CRITICAL **: gtk_socket_get_id: assertion 
`GTK_WIDGET_ANCHORED (socket)' failed


** (xfce4-panel:6735): CRITICAL **: An item was unexpectedly removed: 
Xfce Menu.


(xfce4-panel:6735): libxfcegui4-WARNING **: ICE I/O Error

(xfce4-panel:6735): libxfcegui4-WARNING **: Disconnected from session 
manager.
xfce4-panel: Fatal IO error 11 (Resource temporarily unavailable) on X 
server :0.0.
xfdesktop: Fatal IO error 11 (Resource temporarily unavailable) on X 
server :0.0.


(xfce4-menu-plugin:6765): Gtk-WARNING **: cannot open display: :0.0
Xsession: X session started for vbox at Thu May 21 20:49:42 UTC 2009



r...@lev:~# ps -ef |grep dbus
105   2262 1  0 20:46 ?00:00:00 /usr/bin/dbus-daemon 
--system



___
Linux-il mailing list
Linux-il@cs.huji.ac.il
http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il


SOLVED Re: Help setting up xfce4 on ubuntu 8.04 - does not connect with Dbus -- Blank screen

2009-05-21 Thread Lev Olshvang

I solved dbus connection problem by installing dbus-x11 package


Still have a problem with ICE  :  libxfcegui4-WARNING **: ICE I/O Error


Lev Olshvang wrote:



Hi All,

I have  stripped down  ubuntu 8.04no X windows (installed  with 
debootstrap)


Now I am adding XFCE desktop


XServer starts up normally (ps + Xorg.log) , but xfce gives strange 
errors and screen remains blank :


more .xsession-errors
Xsession: X session started for vbox at Thu May 21 20:41:42 UTC 2009


** (xfdesktop:6742): WARNING **: Unable to initialise D-Bus.  Some 
xfdesktop features may be unavailable.


** (xfdesktop:6742): WARNING **: Unable to initialise D-Bus.  Some 
xfdesktop features may be unavailable.


** (xfdesktop:6742): WARNING **: Unable to initialise D-Bus.  Some 
xfdesktop features may be unavailable.


** (xfdesktop:6742): WARNING **: Unable to initialise D-Bus.  Some 
xfdesktop features may be unavailable.


** (xfdesktop:6742): WARNING **: Unable to initialise D-Bus.  Some 
xfdesktop features may be unavailable.


(xfwm4:6733): libxfcegui4-WARNING **: ICE I/O Error

(xfwm4:6733): libxfcegui4-WARNING **: Disconnected from session manager.

(xfdesktop:6742): libxfcegui4-WARNING **: ICE I/O Error

(xfdesktop:6742): libxfcegui4-WARNING **: Disconnected from session 
manager.
xfce-mcs-manager: Fatal IO error 11 (Resource temporarily unavailable) 
on X server :0.0.

xfwm4: Fatal IO error 2 (No such file or directory) on X server :0.0.
** Message: Xfce Menu: screen changed: 0

** Message: No valid plug window.

(xfce4-panel:6735): Gtk-CRITICAL **: gtk_socket_get_id: assertion 
`GTK_WIDGET_ANCHORED (socket)' failed


** (xfce4-panel:6735): CRITICAL **: An item was unexpectedly removed: 
Xfce Menu.


(xfce4-panel:6735): libxfcegui4-WARNING **: ICE I/O Error

(xfce4-panel:6735): libxfcegui4-WARNING **: Disconnected from session 
manager.
xfce4-panel: Fatal IO error 11 (Resource temporarily unavailable) on X 
server :0.0.
xfdesktop: Fatal IO error 11 (Resource temporarily unavailable) on X 
server :0.0.


(xfce4-menu-plugin:6765): Gtk-WARNING **: cannot open display: :0.0
Xsession: X session started for vbox at Thu May 21 20:49:42 UTC 2009



r...@lev:~# ps -ef |grep dbus
105   2262 1  0 20:46 ?00:00:00 /usr/bin/dbus-daemon 
--system



___
Linux-il mailing list
Linux-il@cs.huji.ac.il
http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il




___
Linux-il mailing list
Linux-il@cs.huji.ac.il
http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il


Changing Xserver driver from vesa to openchrome gives ICE I/O error

2009-05-24 Thread Lev Olshvang

Hi List,   and Hetz


I have Ubuntu 8.04 system on VIA motherboard  that I installed with 
debootstrap and addes XFCE afterwards.


The X windows works only with vesa driver,  I have a similar system 
where Ubuntu 8.04 is functioning with GNOME on the same hardware.   So I 
copied xorg.conf from the running system to target and X Xindows  
complains with an error :


libxfcegui4-WARNING **: ICE I/O Error


Then I switched back   openchrome driver to vesa driver X window resume 
to work.



Please advise ???

Lev


___
Linux-il mailing list
Linux-il@cs.huji.ac.il
http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il


Re: Changing Xserver driver from vesa to openchrome gives ICE I/O error

2009-05-24 Thread Lev Olshvang




Thank you Meir,


This exact link is for for Ubuntu =8.10, although I can find
stuff for Ubuntu Hardy


Meanwhile I found what may be a caause fro problem : 

The output of xrandr utility shows that with VESA driver the display
set to 1200x768 
( it max it can)

but with openchrome driver it is set above its limits , smthing like
2000 x 1000 ( I don't remember exact numbers, but 2000 )

So the question - how to set up resolution in xorg or perhaps in
.Xresources ??



And As a consequence, I see a blank screen 
Meir Michanie wrote:

  Try this, it solved my issues with via motherboard.

https://launchpad.net/~ubuntu-x-swat/+archive/x-updates

  
  
- Original Message -
Subject: Changing Xserver driver from vesa to openchrome  gives ICE I/O

  
  error
  
  
From: Lev Olshvang l...@vboxcomm.com
To: "linux-il" linux-il@cs.huji.ac.il,"Hetz Ben Hamo" het...@gmail.com
Date: 24-05-2009 14:06


Hi List,   and Hetz


I have Ubuntu 8.04 system on VIA motherboard  that I installed with 
debootstrap and addes XFCE afterwards.

The X windows works only with vesa driver,  I have a similar system 
where Ubuntu 8.04 is functioning with GNOME on the same hardware.   So I 
copied xorg.conf from the running system to target and X Xindows  
complains with an error :

 libxfcegui4-WARNING **: ICE I/O Error


Then I switched back   openchrome driver to vesa driver X window resume 
to work.


Please advise ???

Lev


___
Linux-il mailing list
Linux-il@cs.huji.ac.il
http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il

  
  
___
Linux-il mailing list
Linux-il@cs.huji.ac.il
http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il

  





___
Linux-il mailing list
Linux-il@cs.huji.ac.il
http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il


Re: Changing Xserver driver from vesa to openchrome gives ICE I/O error

2009-06-02 Thread Lev Olshvang




Hello Oleg,

I was on vacation the last week and could not thank you for a response.


I made configuration the way you describe and it works.

So thank you again.


Still I have some issues unresolved :

Xserver probes hardware for possible screen resolutions and decides to
choose the first one when it boots up.
1. The question is how I can manage it ?
I tried to use vga boot parameter so vga=792 but I got I a blank
screen

2. now I am thinking to use Modes that Xserver prints in Xorg.log file,
and I wonder if these modes anyhow corresponds to vga boot modes?

3. Why Xserver itself ( I am not using window manager) is not capable
to fulfill geometry requests,
 i.e running xterm -g +0,-0 from .xinitc does not place it in a
bottom ?


Hope you can point me to some directions




Oleg Goldshmidt wrote:

  Lev Olshvang l...@vboxcomm.com writes:

  
  
So the question - how to set up resolution in xorg or perhaps in
.Xresources ??

  
  
Well, I don't use Ubuntu, but if Xorg there behaves similarly to, say,
Fedora, then Xorg will use xorg.conf if it exists, but by default it
probes you HW at runtime and there is no xorg.conf. 

You can run

# Xorg -configure 

to generate a skeleton xorg.conf file (IIRC, as /root/xorg.conf.new)
and edit it to your heart's content. Then test it and put it into
/etc/X11/xorg.conf

Don't trust me - RTFM yourself.

  





___
Linux-il mailing list
Linux-il@cs.huji.ac.il
http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il


Re: PE apps on linux, alternative solutions when win4lin breaks

2009-06-08 Thread Lev Olshvang


Try


http://ubuntumanual.org/posts/171/install-internet-explorer-in-ubuntu-the-easiest-way



I did not tried it yet, So ifpossible inform us if it works





Dotan Cohen wrote:

No, it's not High Learn. It's an in house software that seems to be
developed by openu. Anyway, the website it self is not the problem,
the whole system is quite workable with Firefox / Chrome, the IT
department at openU is actually quite aware of standards and browser
interoperability.

The problem is that the lectures them self were created with a stupid
thing called Microsoft Producer[1] which requires an ActiveX plugin
to make it even start. So I must have a IE browser fully working with
sound, popups and everything to view the lectures.

Suggestions?





___
Linux-il mailing list
Linux-il@cs.huji.ac.il
http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il


Compiling glibc2.9 on ubuntu - stack-protector functions are undefined

2009-07-02 Thread Lev Olshvang

Hi linuxers,


I am trying to compile glibc2.9 on Ubuntu 7.10
and I am experiencing chicken and egg problem :

Here the steps I do

1. ../glibc-2-.9/configure

2. make

 Result:
dl-load.c:1796: more undefined references to `__stack_chk_fail_local' follow
collect2: ld returned 1 exit status

Google search reveals that this function  belong to stack-protector 
feature and advised to turn it off

So I removed buid directory to start  again

1 . export CFLAGS=-fno-stack-protector
   export CXXFLAGS=-fno-stack-protector 


2. ../glibc-2-.9/configure

3.  make

Result
 glibc-build/config.h:3:3: error: #error glibc cannot be compiled 
without optimization




Can smb advise on this ?

Thanks,
Lev



___
Linux-il mailing list
Linux-il@cs.huji.ac.il
http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il


Why initramfs stops although root device is mountable and ready to use

2009-07-07 Thread Lev Olshvang

Boker  Everybody,


I recently experienced a strange problem:

The system is based on Ubuntu kernel 2.6.28  which I compiled and built
initramfs for it provided with a driver for ide disk (pata_via.ko)

grub should boot this system from the root=/dev/sda1

The boot process stops on a famous message waiting for a root file system.

But then it enters the busybox prompt  and I see that /dev/sda1 is
indeed exist, I can mount it  and access files.


I do not  understand this  : root device is ready, but  boot process  is
stuck ??

Thanks,
Lev

___
Linux-il mailing list
Linux-il@cs.huji.ac.il
http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il


Re: SOLVED Why initramfs stops although root device is mountable and ready to use

2009-07-08 Thread Lev Olshvang

Shachar Shemesh wrote:

Ilya A. Volynets-Evenbakh wrote:


I think it's the other way around - if you exit from your linuxrc when
running from initramfs,
it'll continue on with standard boot sequence, while ending linuxrc in
initrd will panic the kernel
with Trying to kill PID 1 error.

  
An initramfs exists for any 2.6 kernel. Sometimes it's just a very 
small one. The way the kernel decides whether to execute it is to 
check for a */init* file in it. If it finds one, it runs it. If not, 
it does not.


As such, if you have a /linuxrc file in your initramfs, and it simply 
exists at the end, all that will happen is that the kernel will not 
find a /init and will skip running anything from the initramfs at all. 
In that sense you might be said to be right that if your linuxrc 
exists, the normal boot sequence will continue.


The history goes something like this:
Originally, the drivers for the root file system had to be compiled 
into the kernel. This was very difficult, if not impossible, for 
distribution kernels, as the list of potential drivers included, well, 
everything, and the kernels were just too big. Then the idea of initrd 
came - we compile the drivers only for the ram disk and the initrd 
file system (typically, cramfs) into the kernel. The initrd loads the 
relevant drivers into the kernel and quits, restoring the original 
boot sequence. Then someone pointed out that, sometimes, an initrd is 
all you need. The convention then arose to pass boot=/dev/ram0 to 
the kernel, which tells it that the initrd stage is the last one. It 
then became common to put the real boot= option on the kernel 
command line, but then, from initrd, to load the values for 
/dev/ram0 into the proc entry for the boot device from linuxrc, 
manually mount the real root file system, make it the root file system 
using pivot_root, and exec init from there.


Then, for 2.6, people figured that if this is what you normally do 
anyways, there is no point in carrying around the drivers for the ram 
disk and cramfs (compiled into the kernel, which means it cannot be 
unloaded). Instead, use the much lighter tmpfs file system, and use a 
cpio archive for the actual files. The tmpfs file system was made 
mandatory, whether initramfs was used or not, and so you couldn't move 
it from the root (only mount on top of it). This means you cannot use 
pivot_root, and switch_root was invented. While at it, the legacy 
boot sequence was removed. Assuming, as Gilad seems to, that we leave 
initrd is out of the discussion, your options are either run an 
initramfs and perform the entire root mounting from the /init script 
there, or compile the root file system drivers into the kernel and let 
the kernel mount them using the boot= kernel option.


Shachar

--
Shachar Shemesh
Lingnu Open Source Consulting Ltd.
http://www.lingnu.com
  



___
Linux-il mailing list
Linux-il@cs.huji.ac.il
http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il

  

Many thanks to all of you,

Due to some glitch, initramfs image does not have /init script.
This is the reason boot stopped. (and the required device driver was 
compiled in kernel, so the device was created)




Thanks you Again
Lev.

BTW,  is there any way to track next line from /proc/devices
8 sd

  which modules  actually made possible access to  devices  8,0  ???



___
Linux-il mailing list
Linux-il@cs.huji.ac.il
http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il


Re: DTT

2009-08-02 Thread Lev Olshvang

Hello all,

Here is my 2 cents

It started , Frequence is 514000, channel number 26
Symbol Rate is not appilcable for DVB-T

I have DVBT card and watched translation already, although quality was 
bad ( I do not shure about the reason)



Hetz Ben Hamo wrote:
It's not started yet. Some company already sell some hardware, but the 
service is not operational yet. It should be real soon now, and there 
will be an ad campaign.


Thanks,
Hetz

2009/7/30 Amos Shapira amos.shap...@gmail.com 
mailto:amos.shap...@gmail.com


2009/7/30 geoffrey mendelson geoffreymendel...@gmail.com
mailto:geoffreymendel...@gmail.com


On Jul 30, 2009, at 12:13 PM, Erez D wrote:



i am trying to receive israel's DTT ( dvb-t terestrial
digital tv) transmissions
i tried doing a channel scan using kaffeine, but found nothing


Has it really started? I have seen nothing anyhere about it. I
don't read the Hebrew press but my son does and he would tell
me if he saw anything about it.


I don't know if it started yet (not living in Israel) but just
today I saw an ad (maybe in Tapuz) for a usb dvb-t dongle in an
Israeli site, so there must be a market for this...
 


___
Linux-il mailing list
Linux-il@cs.huji.ac.il mailto:Linux-il@cs.huji.ac.il
http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il




--
Skepticism is the lazy person's default position.
my blog (hebrew): http://benhamo.org


___
Linux-il mailing list
Linux-il@cs.huji.ac.il
http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il

  



___
Linux-il mailing list
Linux-il@cs.huji.ac.il
http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il


Trying to understand multicast packet IP routing - why src IP address affects reception ??//

2009-08-04 Thread Lev Olshvang

Evening all,

I made some investigation in my Ubuntu Linux , kernel 2.6.30


Here the  case :
I have computer with 2 interfaces. It runs Ubuntu, kernel 2.6.30 and 
application that opens multicast socket and bind it to one of the

interfaces, 192.168.123.1
There are only multicast packets in this net.


Multicast Packets   with dest address 224.45.45.45 and source address 
192.168.123.23  are received by

interface defined in the same network 192.168.123.0 with no problems
and even delivered to application.

But if I change the interface IP address to  other network, these 
packets are ignored at IP layer  (data link layer got it since RX count 
is running according to ifconfig )
I have tcp ip forwarding set to 1 and application sets  multicast socket 
option  to join the multicast group.


I had an understanding that for multicast only  destination MAC address 
really rules  ( interface filters are set to accept specific multicast 
address as a result of muticats join by setsockopt()  )


So the question is -  why   IP SRC address is taken into consideration 
by IP layer and how to disable this feature ??



Thank you very much ..
Lev




___
Linux-il mailing list
Linux-il@cs.huji.ac.il
http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il


Re: Trying to understand multicast packet IP routing - why src IP address affects reception ??//

2009-08-04 Thread Lev Olshvang

Shahar ,
Thanks 

see below :
Shachar Shemesh wrote:

I'll just point out that my Multicast understanding is a bit tenuous.

Lev Olshvang wrote:

Evening all,


But if I change the interface IP address to  other network, these 
packets are ignored at IP layer  (data link layer got it since RX 
count is running according to ifconfig )
I have tcp ip forwarding set to 1 and application sets  multicast 
socket option  to join the multicast group.


Did you change the IP address after the socket is up? Multicast needs 
to perform some handshaking before it can start sending data, and this 
handshake might be done only at the start.




  Since this is my network driver , I  reload it and set IP after 
reload, as well I put some printk in it  so I see data link accepts 
packages in either case.  tcpdump also shows these packets.
Also, I would start the debugging by running a sniffer and seeing 
whether the packets actually leave the machine, and if so, with what 
destination MAC address.


 I have no problem with MAC ( driver gets the packets), I put also some 
printk in net/ipv4/route.c and I see this packets are discarded at IP layer.

Shachar
--
Shachar Shemesh
Lingnu Open Source Consulting Ltd.
http://www.lingnu.com
  



___
Linux-il mailing list
Linux-il@cs.huji.ac.il
http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il


Re: Automated GUI testing with JS and AJAX

2009-09-04 Thread Lev Olshvang




Just my 2 cents:

I think that combination of iMacros +GreaseMonkey plugins can be used
for regression tests,
perhaps the  iMacros alone  is just sufficient for your purposes.

Danny Lieberman wrote:

  
  Leonid,
  
I'm pretty sure there are two possible non-DIY alternatives
1)  maybe  ratproxy - it's pretty cool for webapp software security
assessment and it might cover some of your test use cases
  
2) probably Mochitest - https://developer.mozilla.org/en/Mochitest
  
Just a thought.
  
Danny
  
  On Thu, Sep 3, 2009 at 3:48 PM, Leonid Podolny leonidp.li...@gmail.com
wrote:
  Hi, all,
At my work we encountered a problem and it looks like we are
re-inventing the bicycle. Someone here surely has an experience with
that.
We have a regressions testing lab. As a part of the testing we have to
work with the web-interface of our product. (I'm intentionally vague,
the details are quite irrelevant to the problem). The testing scenario
includes action items like "press the button with caption 'Advanced
Settings' on it".
This is implemented as a C program with sockets interface, so "find a
button" actually means "look for a substring in the received HTML
code" and "press the button" means "create an HTTP POST message and
send it".
However, recently we have added some _javascript_ and AJAX to the
web-interface and now the testing environment must be able to run JS
and even cope with things like replacing part of the DOM tree. We can
see three possible directions to tackle the problem:
- Further fix our great testing program. After all, we know what AJAX
can return -- we can manually open the connection it would open, parse
the response, etc. Looks ugly and has a potential to turn into
maintenance nightmare.
- Setup a headless X server with Firefox running inside and some sort
of scripting/management add-on. If someone has an experience with such
a setup, I would appreciate pointers to specific add-ons you used.
- Somehow hack off the GUI from any open-source browser and link it to
our program, i.e. use it as HTML parser and JS machine. Looks
unpredictably complicated, maybe not even feasible.

___
Linux-il mailing list
Linux-il@cs.huji.ac.il
http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il
  
  
  
  
  
-- 
Danny Lieberman
-
  http://www.dannylieberman.info
Twitter:  http://twitter.com/onlyjazz
Skype:  dannyl50
Warsaw:+48-79-609-5964
Israel:   +972 8 9701485
Mobile: +972 - 54 447 1114
  
  

___
Linux-il mailing list
Linux-il@cs.huji.ac.il
http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il
  






___
Linux-il mailing list
Linux-il@cs.huji.ac.il
http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il


Re: Alsa Underrun problems with Skype and Skype ALSA problem on Ubuntu jauntu

2009-09-04 Thread Lev Olshvang

Hi Geoff,

Perhaps you know what is going wrong with Ununtu jaunty Skype - recently 
I upgraded from ububtu 8.10 to 9.04  and although sound work well with 
all non-skype applications the Skype complains that it have problem with 
audio playback and capture device.


Strace shows the problem is :

ALSA lib pcm.c:2205:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.hdmi


And I saw in ubuntu forums that smbody  just installed skype build with 
static oss bound,

but I woul dlike to stay with alsa model.




geoffrey mendelson wrote:


On Sep 3, 2009, at 11:44 PM, mbrace7for...@aim.com wrote:

 Sound on Skype is very unpredictable. Sometimes it works well and 
sometimes it doesn't. I often get brake up (pauses) with speech. Or I 
find that the Skype Sound settings in Options have changed. Or before 
it worked now it won't.


I get the same problems (breakup) and other random problems under both 
MacOS and Windows on several different computers. I think it is a 
SKYPE problem, not a Linux one.


You can turn on a display of packet information and see how many 
dropped or out of sequence packets you get. You can improve it if you 
open a UDP port on your router for SKYPE. The port is a user setting 
so you can do it for more than one computer if you share a router.


BTW, SKYPE is very careful to keep the exact details of their protocol 
hidden, though some people have packet sniffed it. Because it is 
hidden, one of the things I can't do is to give it priority (QOS) over 
other things on my router. Therefore SKYPE is often a less than 
desirable way for me to communicate. I use SKYPE, and yes they do get 
some of my money, but most of my money goes to SIP providers who use 
an open protocol. YMMV.



Geoff.




___
Linux-il mailing list
Linux-il@cs.huji.ac.il
http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il


Re: Thunderbird problem

2009-09-04 Thread Lev Olshvang

Hi David,

Try first to use View pane and switch to the classic view.

L.

david wrote:

This is not a Linux question but it is a FOSS related question.  I am running 
Thunderbird 2.0.0.23 under Windows XP.  Everything was working fine until I 
installed some extensions today and when I restarted Thunderbird none of my 
folders were listed on the left hand pane.  I can't see any of the emails that 
were there.  They are all still on my hard disk.  Trying to get mail or send 
mail through Thunderbird doesn't do anything.  If I look under account settings 
all of my accounts are there but I cannot access any of the mail.  I tried 
searching on Google but did not find anything that seemed to address this 
problem.  Any ideas or pointers to resources would be much appreciated.

___
Linux-il mailing list
Linux-il@cs.huji.ac.il
http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il

  



___
Linux-il mailing list
Linux-il@cs.huji.ac.il
http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il


Re: [!! SPAM] RE: Virtualization recommendation

2009-09-17 Thread Lev Olshvang




Hi Gilad,

Have you heard of KVM-lite ? (KVM that doesn't require virtualization
features from processor)

In what sense "KVM rocks", do we have any benchmark of KVM versus
VirtualBox ?

I saw a post from Ingo Molnar stating that context number of context
switches in KVM reduced dramatically with adoption of VT-d in Intel
processor, and I still wonder how to measure this.

Shana tova le kulam !!

Lev

Gilad Ben-Yossef wrote:

  
  Amos Shapira wrote:
  
  
2009/9/16 Arie Skliarouk sklia...@gmail.com:
  

Yes. We use xen heavily on CentOS 5 at work and am pretty excited that
RH 5.4 is out with KVM "preview tech", I'm not an expert but got the
impression that KVM might get things better than Xen eventually.
  
  
Don't mean to dis Xen or anyone, but...
  
You can drop the "eventually". KVM rocks :-)
  
Gilad
  





___
Linux-il mailing list
Linux-il@cs.huji.ac.il
http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il


Re: attaching lots of disks to PowerEdge 860?

2009-09-30 Thread Lev Olshvang




You can buy Coraid and fill it with sata disks www.coraid.com, isn't
this an option ?


Amos Shapira wrote:

  2009/9/29 Michael Ben-Nes mich...@epoch.co.il:
  
  
Hi,
I would consider buying used server and fill it up with hard drives. Then
using Linux or OpenSolaris to manage them.

  
  
We have some "used servers" laying around (and I'd much prefer to use
existing hardware), but we also have (or will have in the not far
future) about ten or more SATA drives to stick into this array and so
far I didn't find a case to put them all in. I got the following
pointers from another mailing list:

http://www.mwave.com.au/newAU/mwaveAU/productdetail.asp?SKU=16010594
(18 drive bays)
http://www.auspcmarket.com.au/index.php?redir=http://www.auspcmarket.com.au/show_product_info.php?input[product_code]=EL-PC-343Binput[category_id]=277
(18 drives)

Together with the decommissioned MoBo's/CPU's/Memory we have, these
might do the trick.

Thanks for the advise.

--Amos

___
Linux-il mailing list
Linux-il@cs.huji.ac.il
http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il

  





___
Linux-il mailing list
Linux-il@cs.huji.ac.il
http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il


QEMU snapshot : loadvm error

2009-10-29 Thread Lev Olshvang

Hi all,

I am getting the following error on  my Ubuntu 9.04 , kernel 2.6.28-15,  
qemu versi 0.10.0


snapshot list (from ide0-hd0):
IDTAG VM SIZEDATE   VM CLOCK
2 bri 14M 2009-10-28 11:11:21   19:25:21.601
(qemu) loadvm bri
Error -22 while loading VM state





and here my questions:

First, I am a bit confused about snapshot feature duality:
1. on a command line , qemu - snapshot   means snapshot are made in 
/tmp until they are commited from  qemu monitor so they written to image 
file


2. qcow2 format allows to create snapshot in image file and load 
snapshots from the image file ??? no commit, no need in command line option



3. How many space are available in qcow2 image file for snapshot ?


4. does snapshot remembers qemu command line parameters and whether it 
overrides command line after loadvm ?



ThanX for reading this rather haotic mail, hope for the list help.


Lev





___
Linux-il mailing list
Linux-il@cs.huji.ac.il
http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il


Kernel Oopsed, but where ?

2009-11-30 Thread Lev Olshvang

Hi list,

I am trying to figure out Oops reason, but I do not understand where it 
happens



The system is ARM, linux kernel 2.6.31, No loadable modules

I have 3 questions to following dump :

1. - PID 1 must be an init process, why it calls himself  a swapper ?
 (Perhaps it is a kernel thread kswapd)

2. - who is trying to load the failed module - kernel or userspace  (
I see that module failed initialization and oopsed in cleanup)
 The console shows that kernel made most initializations  before oops
3. - why no printk from this module is not shown ( I added dozen printks 
to  module init)




Here is console messages
CPU: Testing write buffer coherency: ok

Serial: AMBA PL011 UART driver
dev:f1: ttyAMA0 at MMIO 0xc600 (irq = 0) is a AMBA/PL011
console [ttyAMA0] enabled
bio: create slab bio-0 at 0
MMC card not detected
NET: Registered protocol family 2
IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
TCP established hash table entries: 1024 (order: 1, 8192 bytes)
TCP bind hash table entries: 1024 (order: 3, 40960 bytes)
TCP: Hash tables configured (established 1024 bind 1024)
TCP reno registered
NET: Registered protocol family 1
Unable to handle kernel paging request at virtual address 36677670
pgd = c0004000
[36677670] *pgd=
Internal error: Oops: 0 [#1]
CPU: 0Not tainted  (2.6.31 #8)
PC is at 0x36677670
LR is at device_get_nodename+0x70/0xdc
pc : [36677670]lr : [c01540e4]psr: 2013
sp : c1c33e30  ip : c1c33e50  fp : c1c33e4c
r10: c022d744  r9 : 0001  r8 : 
r7 : c03c5554  r6 : c1ca5880  r5 : c1c33e54  r4 : c1ca5880
r3 : 36677670  r2 : 0004  r1 : c1c33e54  r0 : c1ca5880
Flags: nzCv  IRQs on  FIQs on  Mode SVC_32  ISA ARM  Segment kernel
Control: 0005317f  Table: 31004000  DAC: 0017
Process swapper (pid: 1, stack limit = 0xc1c32270)
Stack: (0xc1c33e30 to 0xc1c34000)
3e20: c1ca5880 c1c47000 c1c19bc0 
c03c5554

.
3fa0: c001f2e8 c0028a9c 0040 c03bca48   c001befc 
c001c088
3fc0:     c1c33ff4 c1c33fe0 c0008448 
c001f2c0
3fe0:    c1c33ff8 c0034df4 c00083c0 b3cc73ac 
318cb34c

Backtrace:
[c0154074] (device_get_nodename+0x0/0xdc) from [c0154260] 
(dev_uevent+0x110/0x144)

r7:c03c5554 r6:c1c19bc0 r5:c1c47000 r4:c1ca5880
[c0154150] (dev_uevent+0x0/0x144) from [c01166fc] 
(kobject_uevent_env+0x1e4/0x478)

r5:c1c47000 r4:c1ca5888
[c0116518] (kobject_uevent_env+0x0/0x478) from [c01169a4] 
(kobject_uevent+0x14/0x18)
[c0116990] (kobject_uevent+0x0/0x18) from [c01548b8] 
(device_del+0x138/0x17c)
[c0154780] (device_del+0x0/0x17c) from [c0154910] 
(device_unregister+0x14/0x20)

r7: r6:0fe0 r5:c0257698 r4:c1ca5880
[c01548fc] (device_unregister+0x0/0x20) from [c0154954] 
(device_destroy+0x38/0x44)

r5:c0257698 r4:c1ca5880
[c015491c] (device_destroy+0x0/0x44) from [c0028a28] 
(lpg610_cleanup_module+0xd8/0x13c)

r4:c03cc490
[c0028950] (lpg610_cleanup_module+0x0/0x13c) from [c0028bf0] 
(lpg610_init_module+0x164/0x330)
[c0028a8c] (lpg610_init_module+0x0/0x330) from [c001f2e8] 
(do_one_initcall+0x38/0x1c4)



Thnaks for reading,
Lev

___
Linux-il mailing list
Linux-il@cs.huji.ac.il
http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il


Sound problem with P7H55 MoBo Intel IbexPeak HDMI aplay versus alsamixer

2010-12-16 Thread Lev Olshvang

Hi,

My system  Asus P7HP55M Pro board +i3 530 processor running Ubuntu 
10.04, 10.10


Board had HDMI port to output  video and audio.
Video is OK,  cabel is ok because it is HDMI 1.4 (suppors audio )

I have issues with sound :
alsamixer under the kernel 2.6.32.26  shows only line in, mic and SPDIF 
output

aplay shows hdmi subdevice

I migrated to Ubuntu 10.10 to have a latest alsa version . Now alsamixer 
thinks it works with Intel IbexPeak HDMI chip, sound from line out gone.


I put a custom kernel (vanilla 2.6.36.2) hoping for the best but
still no sound.

aplay -l
 List of PLAYBACK Hardware Devices 
card 0: Intel [HDA Intel], device 0: ALC892 Analog [ALC892 Analog]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: Intel [HDA Intel], device 3: ALC892 Digital [ALC892 Digital]
  Subdevices: 1/1
  Subdevice #0: subdevice #0

aplay -L
default
pulse
Playback/recording through the PulseAudio sound server
front:CARD=Intel,DEV=0
HDA Intel, ALC892 Analog
Front speakers
surround40:CARD=Intel,DEV=0
HDA Intel, ALC892 Analog
4.0 Surround output to Front and Rear speakers
surround41:CARD=Intel,DEV=0
HDA Intel, ALC892 Analog
4.1 Surround output to Front, Rear and Subwoofer speakers
surround50:CARD=Intel,DEV=0
HDA Intel, ALC892 Analog
5.0 Surround output to Front, Center and Rear speakers
surround51:CARD=Intel,DEV=0
HDA Intel, ALC892 Analog
5.1 Surround output to Front, Center, Rear and Subwoofer speakers
surround71:CARD=Intel,DEV=0
HDA Intel, ALC892 Analog
7.1 Surround output to Front, Center, Side, Rear and Woofer speakers
hdmi:CARD=Intel,DEV=0
HDA Intel, ALC892 Digital
HDMI Audio Output
hdmi:CARD=Intel,DEV=1
HDA Intel, INTEL HDMI 0
HDMI Audio Output


card 0: Intel [HDA Intel], device 7: INTEL HDMI 0 [INTEL HDMI 0]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: Intel [HDA Intel], device 8: INTEL HDMI 1 [INTEL HDMI 1]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
--
Alsamixer  correctly lists  master, front/line, 2 SPDIF and other 
controlsBUT NO HDMI



You see here the problem aplay is correct, alsamixer misses someting

The question is - what  is the missing part ?



___
Linux-il mailing list
Linux-il@cs.huji.ac.il
http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il


Re: HW compatibility research: are intel i5 graphics and realtek net/audio hassle-free?

2010-12-16 Thread Lev Olshvang

On 12/15/2010 07:25 PM, Oleg Goldshmidt wrote:



On Wed, Dec 15, 2010 at 6:06 PM, geoffrey mendelson 
geoffreymendel...@gmail.com mailto:geoffreymendel...@gmail.com wrote:


There are plenty of them around. No one wants them because you can
buy a new computer with 1g of DDR2 or DDR3 RAM for less money than
1g alone of DDR(1) RAM.


Exactly.

There are two different Intel Graphics chip sets. I don't know
which is which, but a quick search should answer the question. The
earlier ones are chips that Intel bought a license to manufacture.
They are not very good in general and have closed source drivers.
This makes them OK for Windows, a problem for Linux. The second
are the newer ones Intel designed and builds.


Well, i5-650 is supposed to be a member of the Clarkdale family, and 
its little brother (i3-530) was reviewed, e.g., here


http://www.phoronix.com/scan.php?page=news_itempx=NzkwOA 
http://www.phoronix.com/scan.php?page=news_itempx=NzkwOA


- driver problems reported, GPU hangs, etc. But the date is Jan 22, 
2010 - maybe there has been driver progress in the last 11 months?




My 2 cents:
I personally have ASUS P7H55 M-Pro with i3-530 processor + 4GB RAM( 
bought at KSP for ~1400 NIS)  running kernels 2.6.32- 3.6.36.2
Although the latest 2.6.36.2 still continues to patch intel chipset I915 
(drm patches) I did not noticed any problem with graphics.


The only issue I have is a sound :

in 2.6.32  no hdmi sound,  alsamixer did  not recognize sound card
in 2.6.36 - no sound at all, alsamixer shows too much non-existent 
controls but no hdmi output, it thinks it had Intel IbexPeak HDMI chip


I think i will post it in separate post, because I slipped from a subject

Intel's support/download page does not say a word about Linux - there 
are drivers for every Windows in the Galaxy, but there don't seem to 
be any proprietary Intel HD Linux drivers.


Oron, can you comment? ;-)

As for buying an I5 processor, there are newer I3's with similar
performance (for example 3gHz instead of 3.6gHz) for a lot less money.


Indeed, i3-540 3.06GHz is ILS505, while i5-650 3.20GHz is ILS815 at 
KSP. From what I see, the latter has VT-d that I may want to play with 
(or maybe not) that comes with Intel TXT (trusted execution 
technology), unfortunately, and Turbo Boost Frequency that sounds 
nice to have.


Various benchmarks that I saw (lies, damned lies, statistics, and 
benchmarks) seem to indicate a difference in overall performance, but 
not all that much.


Thanks for pointing this out.


As for realtek, they tend to have cheap chips, which generallty
work well. If you are concerend about support, check the exact
model number of the chip as they keep changing them and the linux
drivers do not always keep up.

When you buy a mobo make sure you are getting one that supports
full 64 bit addressing.


The H55 chipset seems OK in this respect - 
http://www.intel.com/Assets/PDF/datasheet/322169.pdf


Be warned that most of the current production really cheap (around
600 NIS) LCD screens only have VGA ports. 



My LCD has a DVI port, but I never bothered to get a cable.

There are not a lot of things that run on Linux that use the extra
acceleration in expensive graphic cards, on the other hand if you
are also going to run Windows on it


Not unless it is in a VM for some as yet unidentified specific purpose.

(see my other comment below) and play high end games (Fallout New
Vegas anyone?) you will need an extra hot graphics card. 



No, I did say games were out of scope.

If you plan on running Windows on it, then IMHO you should buy a
name brand such as HP, Packard Bell, etc. The difference in cost
between them and a roll-your-own system is about the cost of a
Windows license. If you do not plan on running Windows on it, it
pays IMHO to buy a local company's product, e.g. Ivory or KSP
and avoid the extra cost.


No Windows or Mac OSX, so I'll stick to KSP or Ivory who seem to have 
competitive prices. Besides, I don't like HP for various reasons, and 
I wouldn't touch PB (they still exist?!) with a ten foot pole. ;-)


Thanks, Geoff,

--
Oleg Goldshmidt | p...@goldshmidt.org mailto:p...@goldshmidt.org


___
Linux-il mailing list
Linux-il@cs.huji.ac.il
http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il
___
Linux-il mailing list
Linux-il@cs.huji.ac.il
http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il


Surprise : /proc/keys file depends on who is looking, super user can not see data of other users

2010-12-16 Thread Lev Olshvang

I have just noticed that   result of the cat /proc/keys command
displays different output for root and regular user, and the output for 
the root

user does not include keys of other users

(I see implementation for this in kernel tree  security/keys/proc.c - 
proc_key_users_show()



Is it some kind of security policy in Linux ? because I used to think 
that as a superuser I have access for all

information.
(kernel 2.6.36.2)

___
Linux-il mailing list
Linux-il@cs.huji.ac.il
http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il


Re: Sound problem with P7H55 MoBo Intel IbexPeak HDMI aplay versus alsamixer -ALC892

2010-12-17 Thread Lev Olshvang

Hi Oleg,

Thank you for a tips

I  tried to  follow t your tips  with no result.

First, kernel documentation HD-AUDIO-models.txt is not up to date because
kernel 2.6.36 knows this ALC892 model. (/sound/pci/hda/patch_realtek.c)

But all my attempts to select model as modprobe option for snd_hda_intel 
fiailed, and the delegating to bios did not help.


So I do not have sound in 2.6.36 and even in 2.6.37-rc6 - no sound at ALL !



On 12/16/2010 03:56 PM, Oleg Goldshmidt wrote:

On Thu, Dec 16, 2010 at 11:01 AM, Lev Olshvanglols...@012.net.il  wrote:

Hi,

My system  Asus P7HP55M Pro board +i3 530 processor running Ubuntu 10.04, 10.10

Board had HDMI port to output  video and audio.
Video is OK,  cabel is ok because it is HDMI 1.4 (suppors audio )

I have issues with sound :
alsamixer under the kernel 2.6.32.26  shows only line in, mic and SPDIF output
aplay shows hdmi subdevice

Sanity check: try different mixer (starting with alsamixer) and volume
control applications and see if there are any controls missing from
the GUI (usually somewhere under Preferences) and volume set to 0.

In the past I found that something like gnome-control-volume or
gst-mixer could be used to switch the right channel on, even though I
used KDE. I have no idea why. In my experience the issue was typically
microphone not working for Skype and such.

I have a lot of controls: line, headphone,  front, rear, surround, 
SPDIF1, SPDIIF2, ...


-indeed the board has it.
I expected to see some control labeled HDMI, but may be I am wrong

I migrated to Ubuntu 10.10 to have a latest alsa version . Now alsamixer thinks 
it works with Intel IbexPeak HDMI chip, sound from line out gone.

Not only HDMI this time?


I put a custom kernel (vanilla 2.6.36.2) hoping for the best but
still no sound.

aplay -l
 List of PLAYBACK Hardware Devices 
card 0: Intel [HDA Intel], device 0: ALC892 Analog [ALC892 Analog]

Hmm... I have a 2.6.33 kernel lying around on my work laptop, and I
don't see ALC892 in Documentation/sound/alsa/HD-Audio-Models.txt. I
don't know if it is significant, nor do I know whether, say,
ALC882/883/885/888/889 is a good substitute. It probably is, and in
any case I understand that you have sound, just not through HDMI. This
probably means that what follows is not the solution, but if you have
no other ideas you might want to try your options.

Check your /etc/modprobe.d/alsa-base.conf (or whatever the Ubuntu
equivalent is) against lspci | grep Audio to see if the model
specified looks right. If you decide to play with the model then you
may try the following:

1) choose the default auto model, in this case the kernel relies on
the BIOS, and this means that the sound device should be enabled in
the BIOS - check that.

 I did it

2) disable the sound card in the BIOS, boot, choose this or that model
that looks relevant from the HD-Audio-Models.txt list, and reload the
module/modules.


I tried, but no matter what I wrote in alsa-base.conf I got no sound


Just some random ideas...

--
Oleg Goldshmidt | o...@goldshmidt.org




___
Linux-il mailing list
Linux-il@cs.huji.ac.il
http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il


Re: cgi-script shell script wrapping question

2010-12-28 Thread Lev Olshvang

Hi,

I would go to the javascript wrapper solution :
I would wrap cgi-script to send javascript code to browser and  then 
redirect original script output to the html file
In a javascript I would loop (and sleep) until load of html file will 
succeed.





On 12/27/2010 08:26 PM, Dov Grobgeld wrote:
Thanks for the help! Based on it I tried running the command with 
python as follows:


import subprocess

pipe = subprocess.Popen(do_slow_command 21,
 bufsize=1,
 stdout=subprocess.PIPE,
 stdin=subprocess.PIPE,
 shell=True)

for p in pipe.stdout.readlines():
print p,br\n

According to the subprocess documentation, this is supposed to set up 
line by line mode. But I still get things buffered up. But perhaps 
that is because I did not tell do_slow_command to flush after print 
command, and it senses that it is not being run under a terminal? I'll 
try that.


Dov


On Mon, Dec 27, 2010 at 20:08, ik ido...@gmail.com 
mailto:ido...@gmail.com wrote:


2010/12/27 shimi linux...@shimi.net mailto:linux...@shimi.net



2010/12/27 Dov Grobgeld dov.grobg...@gmail.com
mailto:dov.grobg...@gmail.com

I'm trying to write a cgi wrapper for a long running
command. The command takes about 10minutes to execute and
when running it from the command line it continously
outputs text to stdout. A simplistic cgi-bin wrapper that
tries to execute the script and then writes that it is
done fails with the following message:


 Timeout waiting for output from CGI script ...

What I wonder if there is any easy way to have continously
update the web page with stdout of the script.

One way, I guess would be to run the script in a separate
thread and just do HTML reload on a static page which I
would regenaret with the stdout generated so far.

Is there any other simple solution?


You could increase the timeout to be  running time of the
script ...


Do not forget that you also have timeout of the web browser that
you can not control (you can not control the users themselves).


-- Shimi


Ido



___
Linux-il mailing list
Linux-il@cs.huji.ac.il mailto:Linux-il@cs.huji.ac.il
http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il



LINESIP - Opening the source for communication
http://www.linesip.com http://www.linesip.com/
http://www.linesip.co.il http://www.linesip.co.il/



___
Linux-il mailing list
Linux-il@cs.huji.ac.il
http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il


___
Linux-il mailing list
Linux-il@cs.huji.ac.il
http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il


Re: Linux Bridging of Tagged-VLAN (802.1q) Ethernet Traffic

2011-01-25 Thread Lev Olshvang

Hi,

just 2 cents:

The vconfig man says that many ethernet controllers will remove vlan 
tags in hardware, so I woulk check with a sniffer for a presence of the 
vlan tag in ethernet header first.

( And  see the vconfig set_flag  1 effect on a vlan interface. )



On 01/24/2011 11:31 PM, shimi wrote:

On Mon, Jan 24, 2011 at 11:26 PM, Oron Peledo...@actcom.co.il  wrote:

On Monday, 24 בJanuary 2011 21:47:20 shimi wrote:

I'm trying to run a Linux Bridge in order to manipulate traffic
running between trunk ports on two switches.

The ports on both ends pass all their traffic with VLAN tagging to
both ends (i.e. both switches has the port set to 802.1q/trunk, and
the traffic flow between the switches encapsulates many subnets on
different VLANs)

Short googling turned out the following related links:
  - [LARTC] linux bridging vlans?
   http://mailman.ds9a.nl/pipermail/lartc/2006q1/018537.html
  - 802.1Q VLAN Tagging and Untagging on Linux?
   http://www.linuxsa.org.au/pipermail/linuxsa/2006-July/084589.html

The point mentioned is that you should vconfig the *physical* interfaces
and then bridge the result. The reason given for this is that it is more
flexible (although more complex) -- e.g: you can bridge a physical
non-vlan capable interface to a specific vlan.

I didn't test any of this personally...


Thanks, but, quoting my original message:

I also tried intercepting VLAN traffic by creating VLANs on the
physical interfaces with vconfig, then adding them to the br0 and also
tried setting them up in promisc mode. This also didn't seem to have
any effect.

Any other idea?

-- Shimi

___
Linux-il mailing list
Linux-il@cs.huji.ac.il
http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il




___
Linux-il mailing list
Linux-il@cs.huji.ac.il
http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il


Job offer : Linux developer for network platform, Petah-Tikva

2011-06-28 Thread Lev Olshvang

Evening all,

We have open position for Linux programmer (outsourcing).

Development for embedded networking platform.


Required skills - C, Linux,  networking, routing, etc.
Experience 2 years.

Send me a CV, I will forward.

Thx,
Lev






___
Linux-il mailing list
Linux-il@cs.huji.ac.il
http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il


Looking for implementation of IPv6 option management (RFC3542) on embedded

2012-01-10 Thread Lev Olshvang

Hi list ,


I am working on embedded 2.6.39 platform with a  uclibc 0.9.32.

It turns out that neither uclibc, nor newlib implements   IPv6 option 
management (RFC3542) , such as

inet6_opt_init(),
inet6_opt_append() functions.

The newlib for example just provide include reference

newlib-1.20.0/newlib/libc/sys/linux/include/netinet6/in6.h:extern int 
inet6_opt_append __P((void *, size_t, int, uint8_t ,)


 but how it is
supposed to resolve external symbol ?

ThanX,
Lev




___
Linux-il mailing list
Linux-il@cs.huji.ac.il
http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il


Re: Looking for implementation of IPv6 options(RFC3542) on embedded

2012-01-11 Thread Lev Olshvang

Shalom Rami, Hello Dear Linuxes,

Does anybody get  this mail and maybe had a though about the subject ?



On 01/11/2012 07:49 AM, Lev Olshvang wrote:

Hi list ,


I am working on embedded 2.6.39 platform with a  uclibc 0.9.32.

It turns out that neither uclibc, nor newlib implements   IPv6 option 
management (RFC3542) , such as

inet6_opt_init(),
inet6_opt_append() functions.

The newlib for example just provide include reference

newlib-1.20.0/newlib/libc/sys/linux/include/netinet6/in6.h:extern int 
inet6_opt_append __P((void *, size_t, int, uint8_t ,)


 but how it is
supposed to resolve external symbol ?

ThanX,
Lev






___
Linux-il mailing list
Linux-il@cs.huji.ac.il
http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il


Headers for network applications : include netinet/* or linux/*

2012-02-05 Thread Lev Olshvang

Morning  Dear Listers,



I am looking for the right solution for following problem.


I came recently across some of multicast setsockopt() calls that have their
structures defined in /usr/include/linux/ directory.

But you cannot leave without arpa/net  functions such as htons() and alike.

But  when you try to include these files, the comlpilation fails on
symbol redeclaration between netinet/in.h and linux/netinet.h.

The origin of the problem I understand :
kernel exports its interface to include/linux,
whils include/net , include/netinet are libc productions.

It is really strange for me that major distributions did not fix the 
problem,

theer is a bug opened on this issue in uclibc.

http://lists.uclibc.org/pipermail/uclibc-cvs/2011-July/029794.html

I have solved it in a quick and dirty way ( #define NETINED_IN_H, ..)  
but what is a right thing to do ?


Best Day,
Lev


___
Linux-il mailing list
Linux-il@cs.huji.ac.il
http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il


HOW to prevent DNS resolver from going into revert lookup (record of PTR type)?

2015-03-22 Thread Lev Olshvang
Hi Linuxers,

I am jumping on today's DNS thread,

My Linux Debian  uses DNS service some Windows server.

Linux resolver  gets back  IP address ( type A and AAA records), but fail to 
get back PTR record.
( I am observing DNS queries and failures with Wireshark)

This  cause ldap to use address instead of  host name in  authentication realm 
and fail.
When I add address -hostname pairs in /etc/hosts,  ldap succeeds. (it uses name 
in the realm claim)



I did not yet find a way to change nsswitch.conf to some resolver that prevents 
reverse lookup,
Please give me some ideas if it is possible.


Lev.
___
Linux-il mailing list
Linux-il@cs.huji.ac.il
http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il


RE: Server stopped DNS name resolution

2015-03-22 Thread Lev Olshvang
Try wireshark/tcpdump  to see which DNS queries goes to which server and  
wheter DNS server replies back .

You can also try dig, nslookup and couple of other cmoomd line tools form:

http://serverfault.com/questions/7056/whats-the-reverse-dns-command-line-utility/7088#7088


From: Linux-il [mailto:linux-il-boun...@cs.huji.ac.il] On Behalf Of Gabor Szabo
Sent: Sunday, March 22, 2015 1:14 PM
To: guy keren
Cc: linux-il
Subject: Re: Server stopped DNS name resolution

I tried that, and although I am not sure what should I look for in there it 
seems to be claiming

rt_sigsuspend([];; connection timed out; no servers could be reached

I tried to telnet 72.14.179.5 53  (one of the DNS servers) and that did not got 
a response.

Anyway, Linode support told me to add this to the resolve.conf
nameserver 8.8.8.8
nameserver 8.8.4.4

and that seemed to do the trick.

Gabor

On Sun, Mar 22, 2015 at 1:00 PM, guy keren 
guy.choo.ke...@gmail.commailto:guy.choo.ke...@gmail.com wrote:

run this on the host:

strace host www.google.comhttp://www.google.com

and scan the output.

more efficient then guessing.

--guy

On 03/22/2015 12:50 PM, Gabor Szabo wrote:
Hi,

I run an Ubuntu based VPS on Linode.
I few hours ago the machine stopped resolving hostnames.
I think it was after an aptitude safe-upgrade and a reboot, but I am
not sure. Maybe was like this earlier.

It takes ages to ssh to it, once I got to the machine I can ping IP
addresses from it, but I cannot ping anything with a hostname.

this is what I have in resolv.conf

# cat /etc/resolv.conf

domain members.linode.comhttp://members.linode.com http://members.linode.com

search members.linode.comhttp://members.linode.com http://members.linode.com

nameserver 72.14.179.5

nameserver 72.14.188.5

options rotate


I tried to replace the nameservers with others that are listed in
another of my servers, but that did not make a change.

How can I track down what has the server stopped resolving hostnames?

Accessing the server via HTTP work as expected.

Gabor

___
Linux-il mailing list
Linux-il@cs.huji.ac.il
http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il


RE: HOW to prevent DNS resolver from going into revert lookup (record of PTR type)?

2015-03-23 Thread Lev Olshvang
Hi Amos,

Perhaps I was not clear enough.
Yes, I  want to prevent client from revert lookup.
The client is not my application, It is part of Linux installation in some docs 
named DNS resolver.
It is configured in /etc/nsswitch.conf and then control flow of gethostbyname() 
does IP lookup and reverse lookup


But back to my question – I see in sniffer  DNS query for type A record issued  
and then DNS query for PTR record ( reverse lookup)
And I want to know if there is a way to configure nsswitch to prevent reverse 
since I already get IP ith the peer.

Hope now I explained the queston more thoroughly.

L.

From: Amos Shapira [mailto:amos.shap...@gmail.com]
Sent: Sunday, March 22, 2015 10:08 PM
To: Lev Olshvang
Cc: linux-il
Subject: Re: HOW to prevent DNS resolver from going into revert lookup (record 
of PTR type)?

I'm not sure what you are trying to achieve here - PTR records and A records 
are completely separate entities living under different domains. Both of them 
should be maintained separately (there are probably tons of tools to keep them 
in sync if you like, but from DNS' perspective there is no relation between 
them).

If you want to prevent reverse lookup then you should tell the client not to 
do this.

On 22 March 2015 at 22:31, Lev Olshvang 
l...@nyotron.commailto:l...@nyotron.com wrote:
Hi Linuxers,

I am jumping on today’s DNS thread,

My Linux Debian  uses DNS service some Windows server.

Linux resolver  gets back  IP address ( type A and AAA records), but fail to 
get back PTR record.
( I am observing DNS queries and failures with Wireshark)

This  cause ldap to use address instead of  host name in  authentication realm 
and fail.
When I add address –hostname pairs in /etc/hosts,  ldap succeeds. (it uses name 
in the realm claim)



I did not yet find a way to change nsswitch.conf to some resolver that prevents 
reverse lookup,
Please give me some ideas if it is possible.


Lev.

___
Linux-il mailing list
Linux-il@cs.huji.ac.ilmailto:Linux-il@cs.huji.ac.il
http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il



--
[Image removed by sender.]http://au.linkedin.com/in/gliderflyer
___
Linux-il mailing list
Linux-il@cs.huji.ac.il
http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il


Help: OpenLdap bindRequest with NTLM authentication makes mailformed message.

2015-03-03 Thread Lev Olshvang


Hello Alll,


Does anybody have example or can advice how to perform NTLM 
authentication of Linux client toward Microsoft AD service?



I calledd ldap_ntlm_bind() to do the Job, but
Wireshark can not fully recognize these message and prints mailformed

And following
ldap_parse_ntlm_bind_result() returns with Authentication error.


Unfortunately these functions are not documented, perhaps I pass wrong 
parameters.



Actually I pass
ldap_ntlm_bind(ld, dn, LDAP_AUTH_NTLM_REQUEST, cred, NULL, NULL, msgidp);
I put password in cred structure and user parameter as part of dn string,
like user=NTDOMAIN\lev, cn=myhost,dn=com


Many thanks and Hag Sameah,

L.





___
Linux-il mailing list
Linux-il@cs.huji.ac.il
http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il


Re: Help: OpenLdap bindRequest with NTLM authentication makes mailformed message.

2015-03-04 Thread Lev Olshvang

Hi Oleg and Shimi.

I did not describe problem correctly.

This is not Linux sysadm problem.
I am fixing application  running on Debian,

I will take Oleg's advice to see cntlm source.

Today I was surprised by ldapsearch  utility ( package ldap-utils) which 
reports that are several authentication mechanism available on AD server,

like GSS-API, KERBEROS, OTP
but it did not listed  NTLM  !!!


on the other hand I see that  ad browser from sysinternals  suite for  
windows  do use NTLM ( wireshark sees it)



So I am confused now :
Can linux use NTLM as some backdoor method, or only windows can use it?

Perhaps NTLM plugin of openldap library is usable only on LDAP server to 
authenticate windows clients?



L.


On 04/03/2015 00:12, shimi wrote:


On Tue, Mar 3, 2015 at 10:20 PM, Lev Olshvang lols...@012.net.il 
mailto:lols...@012.net.il wrote:



Hello Alll,


Does anybody have example or can advice how to perform NTLM
authentication of Linux client toward Microsoft AD service?


I calledd ldap_ntlm_bind() to do the Job, but
Wireshark can not fully recognize these message and prints
mailformed

And following
ldap_parse_ntlm_bind_result() returns with Authentication error.


Unfortunately these functions are not documented, perhaps I pass
wrong parameters.


Actually I pass
ldap_ntlm_bind(ld, dn, LDAP_AUTH_NTLM_REQUEST, cred, NULL, NULL,
msgidp);
I put password in cred structure and user parameter as part of dn
string,
like user=NTDOMAIN\lev, cn=myhost,dn=com


Many thanks and Hag Sameah,


Tried already the 'regular' way 
(https://help.ubuntu.com/community/ActiveDirectoryWinbindHowto) and 
saw if that works? Maybe the issue is not with your code...


Not that I am sure what are you trying to do beyond just 
authenticating (if it's just login or similar, why really not with 
winbind through PAM?) - maybe I got it all wrong :-)


IIRC, to use LDAP towards an AD server, it must be a GlobalCatalog - 
you should make sure that is the case (as well as the right port for 
the job, whether encryption is used or not, etc etc.). But this is 
ancient history, so I hope I am not misleading you.


-- Shimi




___
Linux-il mailing list
Linux-il@cs.huji.ac.il
http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il


How to unwind kernel stack to seek for specific caller?

2018-08-15 Thread Lev Olshvang
Hello all linuxers,


I am writing a LSM kernel module which had register  hook to mmap()

I need to know whether this call came from elf loader or other code path.

I know that I can print stack of function using dump_stack(), in this case I 
should 
seek within kmsg buffer.

I see that kmsg_dump_get_buffer() function can get kernel messages but it is 
mot clear for me how I can get parameters 
of this functions

Regards,
Lev


___
Linux-il mailing list
Linux-il@cs.huji.ac.il
http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il


How much kernel stack can be used in non-terminal function inside module ?

2018-08-16 Thread Lev Olshvang
Having the kernel stack is limited to 4K, how can I know how many of this 4K 
was used
before mu function X()  is called ?

I need to extract 512 bytes of some data from storage using vfs_getxattr().  I 
can call for kmalloc or just use buffer on stack.

But how can assess whether I can safely do this or not ?

What was the stack utilization till my function was called, how much space is 
left?

And while I may take a diff of SP and Stack segment register to know stack 
utilization to the current moment ( I wonder whether if there are some kernel 
macro exist?)  I do knot know how to calculate future consumption of stack 
memory down the vfs call chain.

Regards,
Lev
   

___
Linux-il mailing list
Linux-il@cs.huji.ac.il
http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il


OT: Job offers

2018-03-27 Thread Lev Olshvang
 Hi everybody,We are dealing with Cyber of cars. Argus was sold and now is growing and looking for hackers, linux programmers and automation programmers, QA and backend. Location : Tel Aviv , Igal AlonPlease see a list of vacancies at https://argus-sec.com/careers/Send me a smiley when decided to go to interview.Questions?Lev, 054-4599471___
Linux-il mailing list
Linux-il@cs.huji.ac.il
http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il


Re: How to signal kernel that shared library is not in use by any process anymore ?

2019-01-05 Thread Lev Olshvang
Shachar , you are 100%/ right ! Since I knew that mmap needs file descriptor I assumed ( and did not checked man page)  that munmap need file descriptor. Great !!Thanks, Thanks,  Thanks!  04.01.2019, 22:30, "Shachar Shemesh" : On 27/12/2018 15:34, Lev Olshvang wrote:Can you elaborate why I can not write new system call to unmap this memory regions,  which I see in /proc/self/maps  by force ?Why would you need a system call to do this? Well, obviously, you'd need a system call to do this, but why can't that system call be "munmap"? Especially since you already pointed out that you know which pages you want unmapped. This is especially true, and this is also something that people seem to miss, considering that it wasn't the kernel that mapped those pages in to begin with. Those pages were mapped by the dynamic linker. It typically resides in /lib/ld-linux.so.2 or something (/lib64/ld-linux-x86-64.so.2 for more modern platforms), and is 100% a user space function. So I'm still not sure why you insist on unmapping, but even if you do, I don't see why you'd need a new system call to do it. Shachar,___Linux-il mailing listLinux-il@cs.huji.ac.ilhttp://mailman.cs.huji.ac.il/mailman/listinfo/linux-il___
Linux-il mailing list
Linux-il@cs.huji.ac.il
http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il


How to forbid user space and kernel executable pages from becoming writable?

2019-01-05 Thread Lev Olshvang
I am researching this issue and I am confused with the finding

Some articles, ex 
https://shanetully.com/2013/12/writing-a-self-mutating-x86_64-c-program/
state that mprotect() can change protection of executable section.

As I understanf pte entry has page protection bits set to RO so  mprotect 
should change pte which is loaded to MMU/TLB. Why kernel can not refuse do 
perform this mprotect call(). Whu we do norhave kernel config options to forbid 
user-space mutable code as security feature?



>From the other side,  when  run-time linker or elf_loader loads the executable 
>it uses MAP_DENYWRITE which protect executable file from being overwritten. 

But writing to  executable text  will make  page dirty and require the 
write-back which is disabled by MAP_DENYWRITE. (or it might be disable for 
other processes except current, I am not sure?)


To add to the confusion, the following quote from the LWN articlle 
https://lwn.net/Articles/422487/ about CONFIG_DEBUG_SET_MODULE_RONX 
"Marking the kernel module pages as RO and/or NX is important not only because 
it is consistent with how the rest of the kernel pages are handled"
  
Digging dipper I see that ARM since kernel version 4.11 has 
CONFIG_STRICT_KERNEL_RWX ,  and as I understand it is enforced in hardware.

But I am not sure that some variant of pte_clear(), pte_mkexec(0 can not 
disable it.

So let me cut to final qiestion:

Suppose I want to cut off dynamic code instrumentation, like ftrace and friends.
Is it achievable at least at ARM architecture to enforce RO+X at hardware or 
kernel? 

Thanks to all folks for reading till this point.

Regards
Lev



___
Linux-il mailing list
Linux-il@cs.huji.ac.il
http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il


systemtap on Amazon kernel v4.4.160 failes to recognizaze @avg, @max aggregate

2019-01-06 Thread Lev Olshvang
Hi,

I debugged systemtap scripts which monitor __kmalloc()  which are coming from 
my  my 2 module  MOD1.KO, MOD2.ko

and they are working perfectly on my Ubuntu 16.10 kernel 4.8.17 VM  with gcc 
6.2.0  and systemtap package v3.0-7 amd64 . This is a custom kernel and I 
compiled it with debuginfo myself

Then I moved this scripts to Amazon ?Ubuntu VM 16 I again compiled kernel with 
debuginfo myself.

My modules are compiled with EXTRA_CFLAGS += -g -DDEBUG 

gcc on this host is v5.5.0
I tried systemtap 3.1, 3,3 4.0 , same error


sudo /usr/local/stap_v4.0/bin/stap -v -d MOD1.ko -d MOD2 ./kmalloc_argus.stp 1 1
Pass 1: parsed user script and 472 library scripts using 
91988virt/65864res/5032shr/61236data kb, in 260usr/50sys/320real ms.
Pass 2: analyzed script: 5 probes, 7 functions, 1 embed, 6 globals using 
131248virt/106220res/5972shr/100496data kb, in 640usr/70sys/711real ms.
WARNING: missing unwind/symbol data for module 'MOD1.ko'
WARNING: missing unwind/symbol data for module 'MOD2.ko'
Pass 3: translated to C into 
"/tmp/stap7YDmYH/stap_9b711e9d9caac3ad6af772118b2bf956_4495_src.c" using 
131248virt/106476res/6228shr/100496data kb, in 350usr/500sys/850real ms.
Pass 4: compiled C into "stap_9b711e9d9caac3ad6af772118b2bf956_4495.ko" in 
38820usr/166550sys/191672real ms.
Pass 5: starting run.
ERROR: empty aggregate near operator '@max' at ./kmalloc_argus.stp:58:3
WARNING: Number of errors: 1, skipped probes: 0
WARNING: /usr/local/stap_v4.0/bin/staprun exited with status: 1
Pass 5: run completed in 130usr/1160sys/1748real ms.
Pass 5: run failed.  [man error::pass5]







___
Linux-il mailing list
Linux-il@cs.huji.ac.il
http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il


is it possible to mount /proc as read-only on embedded system

2019-01-05 Thread Lev Olshvang
Hello all,

I am trying to harden the embedded system.
Is it possible and safe to mount /proc file system in a read-only mode and how 
to do this?
I have embedded system with systemd where /proc is mounted rw.
I suspect that systemd mounts it when it bebins to bootsrtap user space. 

On my  very simple QEMU busybox system with no systemd  I was able to remount 
/proc read-only.
But when I changed fstab to mount it as a read-only it  is still mounted 
rw,relatime after reboot

So at what s boot stage and how I can mount /proc read-only ?
Perhaps it is hardcoded in busybox init or in  systemd ?



Regards,
Lev



___
Linux-il mailing list
Linux-il@cs.huji.ac.il
http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il


Why read only memory segment is dirty?

2019-01-17 Thread Lev Olshvang
I am trying to understand the output of pmap command, why read-only memory  is in fact dirty?Why it shows 2 line of output with a same address (2 latst lines) but completely diferent content? sudo pmap  -x 84708470:  /usr/lib/snapd/snapdAddress          Kbytes    RSS  Dirty Mode  Mapping 561a9b8d3000      0              0      0 r-x-- snapd561a9c6f3000    6592    5916    5072 r snapd561a9c6f3000      0      0      0      r snapd  snapd is multithreaded, but all thread show the same   Regards,Lev___
Linux-il mailing list
Linux-il@cs.huji.ac.il
http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il


How to signal kernel that shared library is not in use by any process anymore ?

2018-12-21 Thread Lev Olshvang


Hi All,

I have  an executable (C++) which is the exclusive user of the some shared 
library that it uses only during  the initialization phase.

I would like to free memory used by this shared library, because I am running 
on embedded system.

How can I achieve this?

I know that dlopen() will load shared library, and hope that following 
dlclose() will free this lib memory. 

1. Still  I do not know what method should be used to make dynamic linker look 
again into executable and resolve symbols of the newly appeared symbols ?
2. And  how to tell the dynamic linker ld-linux.so to postpone the symbol 
resolution until dlopen()  will load  the library?
3. Whether to compile and link executable with this library or leave unresolved 
symbols?

Waiting for your advises,
Lev.

___
Linux-il mailing list
Linux-il@cs.huji.ac.il
http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il


Re: How to signal kernel that shared library is not in use by any process anymore ?

2018-12-22 Thread Lev Olshvang
Boker tov, Thanks for all of your replies that helped me to understand what question I really wanted to ask. So this is a question. I have  C++ program which calls many services of third party library.This library is needed only on initialization phase of my program.  Linker has resolved symbols of this library and now it is bound to executable and in a run tinethis lib will be mapped  will have use count > 0   while executable is in use.I would like to unmap it to release memory, but i do not know how to do it in user space. As an alternative I know that by using dynamic loader calls  dlopen() .. dlclose()  I can achieve the desired effect The problem that I need to add a lot of dlfind() calls, and I looked for a way dynamic loader can do it.I am not that lazy, but since the code is C++,  function names are mangled and I was tring to avoid thisby looking as a subject of this mail said, way to ask kernel to unmap this lib I wish we have __init attribute in a user land ! Many Many Thanks again, Lev.  21.12.2018, 20:18, "Shachar Shemesh" :
  


  
  
On 21/12/2018 16:20, Lev Olshvang
  wrote:


  Hi All,

I have  an executable (C++) which is the exclusive user of the some shared library that it uses only during  the initialization phase.

I would like to free memory used by this shared library, because I am running on embedded system.

How can I achieve this?

I know that dlopen() will load shared library, and hope that following dlclose() will free this lib memory. 

1. Still  I do not know what method should be used to make dynamic linker look again into executable and resolve symbols of the newly appeared symbols ?
2. And  how to tell the dynamic linker ld-linux.so to postpone the symbol resolution until dlopen()  will load  the library?
3. Whether to compile and link executable with this library or leave unresolved symbols?

What you are asking for, as asked, is not possible. If you
  explain your use case better, we might better understand what
  you're trying to do.


With that said, I think you should just link the library.


All the text segments of the library (i.e. - code) will be loaded
  with a read only shared mapping. This means that if they are not
  used, they will be unmapped the first time memory becomes
  constrained. If you do not use them later on, they will simply not
  be loaded to memory. They will still be mapped, but will not load
  your embedded system's memory in any significant way.


Shachar


  


,___Linux-il mailing listLinux-il@cs.huji.ac.ilhttp://mailman.cs.huji.ac.il/mailman/listinfo/linux-il___
Linux-il mailing list
Linux-il@cs.huji.ac.il
http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il


Re: How to signal kernel that shared library is not in use by any process anymore ?

2018-12-26 Thread Lev Olshvang
Hello Greg,

Thanks for you your reply.
It help me to better express my question

From the application I can access /proc/self/maps and see which memory is  
mapped  for my library I do not intend to use after application passes init 
phase.
I would like to unmap this memory region, but since I do not have file 
descriptor for this so I can not do this.
Only kernel can unmap this memory for me,
I am willing to pass library name or address to system cal, but IMHO such 
system call does not exist.
Should I rely on memory manager which will use reuse this pages because they 
will never page faulted back ?

I am afraid that since this is C++ lib, some pages are modified and will not be 
considered clean ?


Thanks again for your precious time.
Perhaps somebody from the list can respond too.

Thank you all
Lev

21.12.2018, 18:31, "Greg KH" :
> On Fri, Dec 21, 2018 at 05:20:36PM +0300, Lev Olshvang wrote:
>>  Hi All,
>>
>>  I have an executable (C++) which is the exclusive user of the some shared 
>> library that it uses only during the initialization phase.
>>
>>  I would like to free memory used by this shared library, because I am 
>> running on embedded system.
>>
>>  How can I achieve this?
>>
>>  I know that dlopen() will load shared library, and hope that following 
>> dlclose() will free this lib memory.
>
> That right there is how you "achieve" this, call dlclose() and all will
> be fine. If your system needs the memory that was being used, it will
> reclaim it from the memory that was previously being used by the library
> at this point in time.
>
> Nothing else needs to be done.
>
> Have you tested this and found it not to work properly?
>
>>  1. Still I do not know what method should be used to make dynamic linker 
>> look again into executable and resolve symbols of the newly appeared symbols 
>> ?
>
> What "newly appeared symbols"?
>
> If you need to load the library again, call dlopen().
>
>>  2. And how to tell the dynamic linker ld-linux.so to postpone the symbol 
>> resolution until dlopen() will load the library?
>
> It will not happen until you tell it to, right?
>
>>  3. Whether to compile and link executable with this library or leave 
>> unresolved symbols?
>
> It sounds like you don't really know what type of problem you are trying
> to solve here.
>
> Back up, what is the real issue you are having with the kernel at this
> point in time?
>
> thanks,
>
> greg k-h

___
Linux-il mailing list
Linux-il@cs.huji.ac.il
http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il


Re: How to signal kernel that shared library is not in use by any process anymore ?

2018-12-27 Thread Lev Olshvang
Shahar, Thank you very much.I am going to use your advise ( actually I am advising on this to other team but I will ping them until they change static mapping to dynamic in their build system) I will update the list on the results but your are absolutely correct that memory manager will do it.Every kernel text book (as I remember now) says the same. As you said text segment will be clean and memory manager will reuse pages sometime, I just not sure when it will happen, is it just last recently used page or other method, not such important. Still I have one concern with a data section of this library. I think  data pages can be dirty, perhaps C++ make even use more  data page dirty versus C. Can you elaborate why I can not write new system call to unmap this memory regions,  which I see in /proc/self/maps  by force ? Thank you again.I am relying on your and other Linux souls expertise who helped me on this issue. Lev   21.12.2018, 20:18, "Shachar Shemesh" :
  


  
  
On 21/12/2018 16:20, Lev Olshvang
  wrote:


  Hi All,

I have  an executable (C++) which is the exclusive user of the some shared library that it uses only during  the initialization phase.

I would like to free memory used by this shared library, because I am running on embedded system.

How can I achieve this?

I know that dlopen() will load shared library, and hope that following dlclose() will free this lib memory. 

1. Still  I do not know what method should be used to make dynamic linker look again into executable and resolve symbols of the newly appeared symbols ?
2. And  how to tell the dynamic linker ld-linux.so to postpone the symbol resolution until dlopen()  will load  the library?
3. Whether to compile and link executable with this library or leave unresolved symbols?

What you are asking for, as asked, is not possible. If you
  explain your use case better, we might better understand what
  you're trying to do.


With that said, I think you should just link the library.


All the text segments of the library (i.e. - code) will be loaded
  with a read only shared mapping. This means that if they are not
  used, they will be unmapped the first time memory becomes
  constrained. If you do not use them later on, they will simply not
  be loaded to memory. They will still be mapped, but will not load
  your embedded system's memory in any significant way.


Shachar


  


,___Linux-il mailing listLinux-il@cs.huji.ac.ilhttp://mailman.cs.huji.ac.il/mailman/listinfo/linux-il___
Linux-il mailing list
Linux-il@cs.huji.ac.il
http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il


What to do if kernel_read() returns -EINTR?

2018-12-21 Thread Lev Olshvang
Hi All,

I need to do some calculation of file contents inside LSM hook.

This LSM hook is in a process context, so I hope I can do I/O.
( I put might_sleep() inside hook to confirm I can sleep)

I use kernel_read() to read  file in chunks of 4K size.
On several files, like libc, libm,  I got -EINTR error.

I  tried to insert mdelay() or yield() before repeating  kernel_read but still 
on every read attempt I got -EINTR.
According to timestamp of printk, mdelay or yield() do not have any affect, 
next read happens 2-3 nsecs later.

This error happens on libc, libm, ld-linux on 4.4 and 4.13 kernels.
It did not happen on other libraries.

What might be the solution for this problem ?
ThnX,
Lev 




___
Linux-il mailing list
Linux-il@cs.huji.ac.il
http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il


How CONFIG_DEFAULT_SECURITY affects non-staked LSM ? does it take precedence other DAC?

2018-11-24 Thread Lev Olshvang
One of the  choices of security options proposes to select default securityCONFIG_DEFAULT_SECURITYUser can select  traditional Unix DAC or one of LSMs.Suppose CONFIG_DEFAULT_SECURITY_DAC=y  selected.I wonder how it affects LSM policy decisions? Lets take file permissionsfile fs/namei.c, kernel 4.8 __inode_permission ---> do_inode_permission --> generic_permission : /*         * Do the basic permission checks.         */        ret = acl_permission_check(inode, mask);            if (capable_wrt_inode_uidgid(inode, CAP_DAC_READ_SEARCH))                        return 0;          do_inode_permission(inode, mask);        if (retval)                return retval;        ...         retval = devcgroup_inode_permission(inode, mask);        if (retval)                return retval;         return security_inode_permission(inode, mask);   from reading the code we see that first file ACL is consulted, then unix UID/GID thencapabilties and finally security_inode_permissions, i.e LSM So the questioned config option seems obsolete ?Wheher LSM always consulted last ? Am I write ? Perhaps I miss another code path?___
Linux-il mailing list
Linux-il@cs.huji.ac.il
http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il


Kernel default security configuration - how it affects LSM policy?

2018-11-21 Thread Lev Olshvang
One of the  choices of security options proposes to select default securityCONFIG_DEFAULT_SECURITYUser can select  traditional Unix DAC or one of LSMs.Suppose CONFIG_DEFAULT_SECURITY_DAC=y  selected.I wonder how it affects LSM policy decisions? Lets take file permissionsfile fs/namei.c, kernel 4.8 __inode_permission ---> do_inode_permission --> generic_permission : /*         * Do the basic permission checks.         */        ret = acl_permission_check(inode, mask);            if (capable_wrt_inode_uidgid(inode, CAP_DAC_READ_SEARCH))                        return 0;          do_inode_permission(inode, mask);        if (retval)                return retval;        ...         retval = devcgroup_inode_permission(inode, mask);        if (retval)                return retval;         return security_inode_permission(inode, mask);   from reading the code we see that first file ACL is consulted, then unix UID/GID thencapabilties and finally security_inode_permissions, i.e LSM So the questioned config option seems obsolete ?Wheher LSM always consulted last ? Am I write ? Perhaps I miss another code path? ___
Linux-il mailing list
Linux-il@cs.huji.ac.il
http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il


Security-What can be done in kernel to disable forever executable memory modificaton

2019-01-12 Thread Lev Olshvang
Hi All,



The fact that the text segment could be modified is bad news from the security 
standpoint.
For example, in order to set a breakpoint GDB should map a text segment with 
MAP_PRIVATE flag which allows kernel to ignore the dirty bit that MMU  sets on 
this page.

Somewhere in the middle of this mapping,  perhaps in mprotect,  permission bits 
of  page's PTE entry are modified as well from their original RO+X   to RWX
I am not sure whether it is actually happening, perhaps instead new pages are 
allocated, sort of COW (copy on write).

And here I am getting to the point :

Is there any way to disable the change of permission bits of PTE? Is it 
possible in the hardware (ARM) or should kernel be patched?

Regards to  All,

Happy new year.

Lev. 


___
Linux-il mailing list
Linux-il@cs.huji.ac.il
http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il


Re: How to signal kernel that shared library is not in use by any process anymore ?

2019-01-08 Thread Lev Olshvang
Hi Lior thanks for your time and code example. Shachar Shemesh explained to me couple of simple things I forgotten. You can find his replies in this thread but the bottom line : I do not need to signal kernel.Kernel memory manager will discover that pages are not active ( each page have active bit) so it will use it whenever  get free page request is received. And the second option is to look  mapped memory for this loib /proc/pid/mapsand issue munmap () call. simple and easy. Thanks to given it a thought.Lev   08.01.2019, 05:52, "Lior Okman" :  On Fri, Dec 21, 2018 at 4:21 PM Lev Olshvang <levon...@yandex.com> wrote:Hi All,I have  an executable (C++) which is the exclusive user of the some shared library that it uses only during  the initialization phase.I would like to free memory used by this shared library, because I am running on embedded system.How can I achieve this?I know that dlopen() will load shared library, and hope that following dlclose() will free this lib memory. According to the dlclose (2) man page:  "The  function  dlclose() decrements the reference count on the dynamically loaded shared object referred to by handle.  If the reference count drops to zero, then the object is unloaded.  All shared   objects that were automatically loaded when dlopen() was invoked on the object referred to by handle are recursively closed in the same manner.   A successful return from dlclose() does not guarantee that the symbols associated with handle are removed from the caller's address space.  In addition to references resulting from explicit dlopen()   calls,  a shared object may have been implicitly loaded (and reference counted) because of dependencies in other shared objects.  Only when all references have been released can the shared object be   removed from the address space."   1. Still  I do not know what method should be used to make dynamic linker look again into executable and resolve symbols of the newly appeared symbols ? If you are using the dlopen/dlclose functions, you are responsible for symbol resolution for symbols provided by your shared object. After you get a handle from dlopen(), you need to call dlsym() in order to get a pointer to your symbol. You can then call that symbol when you need it. 2. And  how to tell the dynamic linker ld-linux.so to postpone the symbol resolution until dlopen()  will load  the library? When you use dlopen() your compilation shouldn't need to resolve any symbols from your dlopen()-ed libraries. 3. Whether to compile and link executable with this library or leave unresolved symbols? You shouldn't have any unresolved symbols, nor should you link to your library during compilation. I guess the best thing is to show an example: Given the following library source (printint.c) : #include  void printint(int num) {    printf("Called with num=%d \n", num);} Create a shared object from it using  gcc -shared -o libprintint.so  printint.c Now consider the following test program (main.c) which uses printint with dlopen (removed most of the error handling for clarity here):---#include  typedef void printint(int num); int main(int argc, char *argv[]) {    void *handle = NULL;    handle = dlopen("./libprintint.so", RTLD_LAZY);    if (handle == NULL ) {    // use dlerror to find out what went wrong        return -1;    }    printint *sym = NULL;    sym = (printint*)dlsym(handle, "printint");    if (sym == NULL ) {    // use dlerror to find out what went wrong        return -1;    }    sym(argc);    dlclose(handle);    return 0;}-- You compile this program like this:   gcc  main.c -ldl -o a.out You can verify that the program doesn't dynamically link to libprintint.so by running "ldd ./a.out". When you run it with libprintit.so in the same directory it will load the shared library and call the correct function.  Waiting for your advises,Lev.___Linux-il mailing listLinux-il@cs.huji.ac.ilhttp://mailman.cs.huji.ac.il/mailman/listinfo/linux-il,___Kernelnewbies mailing listkernelnewb...@kernelnewbies.orghttps://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies___
Linux-il mailing list
Linux-il@cs.huji.ac.il
http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il


Solved systemtap on Amazon kernel v4.4.160 failes to recognizaze @avg, @max aggregate

2019-01-08 Thread Lev Olshvang
I found that it is advised to check first @count(Statist) ans if it positve applut to @max operator There is also interesting @entry operator. My script still produces warning but produces result Herfe is the script: # script arguments :# $1 - total test duration in sec# ex: stap -v  

Re: What will happen if 2 processes map same physical page

2019-03-21 Thread Lev Olshvang
Hi Vaaldis,

Thanks for answer,
I still wondering whether the kernel will allow write to a read-only page of 
shared library while it has mapped to several processes? Kernel knows that 
page's reference count >1,  will it allow mmap/mprotect to change page 
protection ? Or will it allow direct right by physical address?
I suppose that CPU should raise page fault when write is made to read only 
page, 

What is the sequence  CPU raises page faul before write to page of after data 
is written
Will  CPU wait until kernel will consider what to do , whether agree and change 
PTE  "writable " bit to 1 ?
Or kernel may disagree and raise SEGFAULT?

I checked in the handle_mm_fault()  calls for arch_vma_access_permitted() which 
just returns true on most architectures which is very strange and  contradicts 
my prediction of SEFFAULT.
arch_vma_access_permitted() retutus true when is sees that access is made from 
foreign process?
https://elixir.bootlin.com/linux/latest/ident/arch_vma_access_permitted

I am totally confused.

What do you think ?

Regards,
Lev



20.03.2019, 20:08, "Valdis Klētnieks" :
> On Wed, 20 Mar 2019 16:42:39 +0300, Lev Olshvang said:
>>  The question is it ipossiblle in Linux/MMU/TLB that 2 processes map to
>>  the same physical address?
>
> Totally possible. That's how mmap shared memory works, and why shared
> libraries are possible.
>
>>  Will CPU or TLB discover that second process tries to reach occupied 
>> physical page?
>
> Well, the hardware won't discover it as a "second" process, it only knows it's
> processing *this* memory access.
>
>>  What if first process set page permission to read and second whats to write 
>> to this page ?
>
> Perfectly OK - the two processes have separate page table mappings, with
> separate permission bits. So (for example) physical page 0x17F000 is mapped to
> virtual address 0x2034D000 with read-only permission n process 1's page 
> tables,
> and to virtual address 0x98FF3000 with read-write permission in process 2's
> page tables. No problem.
>
> (And before you ask, yes it's possible for process 2 to running on one core
> doing a write to the page at the exact same time that process 1 is doing a 
> read
> on another core. Depending on the hardware cache design, this may or may not
> get process 1 updated data. This is why locking and memory barriers are
> important. See Documentation/memory-barriers.txt for more details)
>
> "And then there's the Alpha" - a processor design that got much of its speed 
> by
> being weird about this stuff. :)
>
>>  Perhaps during context switch all page access permissions of first process 
>> is
>>  flashed out from MMU ?
>
> Actually, the kernel just points the MMU at a new set of page table entries 
> and lets
> the TLB reload as needed. In particular, on most architectures, the kernel 
> tries really
> hard to ensure that all processes share at least part of their page table 
> mappings so
> the kernel is always mapped at the same place, meaning that there's a better 
> chance
> that on a syscall, the TLB already has hot entries for large parts of the 
> kernel so no
> TLB reloads are needed.

___
Linux-il mailing list
Linux-il@cs.huji.ac.il
http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il


Which Ubuntu toolchains is better compiling andeoid ARM kernel

2019-03-25 Thread Lev Olshvang



There are 2 toolchain available in Ubuntu 16 :
 gcc-arm-linux-androideabi  and 
 gcc-arm-linux-gnueabihf

I  confess I do not understand which is correct one for ARMv7.1 level 10 when 
compiling kernel

Clearly gcc-arm-linux-androideabi is built with Bionic libc so it must be used 
to compile applications

When I tried to compile kernel 4.9 with this toolchain it terminated with error 
specific for 4.9 and I patched Makefile.build
https://patchwork.kernel.org/patch/9412009/

Then it works almost till the end 

arm-linux-androideabi-ld: warning: unwinding may not work because EXIDX input 
section 609 of net/built-in.o is not in EXIDX output section
arm-linux-androideabi-ld: error: missing CPU support


I compiled kernel using  gcc-arm-linux-gnueabihf toolchain with no problem, but 
device did not boot and was  stuck before shoeing even kernel uncompressing 
line.

So I wonder perhaps I need to solve  androideabi  problem? 

Regards,
Lev





___
Linux-il mailing list
Linux-il@cs.huji.ac.il
http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il


Whicl linux technology existd to protect file's data at run at file granularity?

2019-02-24 Thread Lev Olshvang
 I know at least several  technologies that protect "data at rest" , such as dm-crypt, tomb, eCryptfs. The problem with dm-crypt or eCrypts that since file system is mounted, all logged users, including attackers can read files. But I did not find anything that protects data at run, i.e decrypts  only file read request using user key. Please advise,Lev

___
Linux-il mailing list
Linux-il@cs.huji.ac.il
http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il


writes to /dev/kmsg

2019-02-19 Thread Lev Olshvang
Kernel documentation describes interfacehttps://www.kernel.org/doc/Documentation/ABI/testing/dev-kmsg I wonder what kind of applications use it?Why somebody need to use kmsg instead of syslog? Can anybody give example of such application? Regards,Lev  

___
Linux-il mailing list
Linux-il@cs.huji.ac.il
http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il


What will happen on attempt to write to read-only page when CONFIG_MEM_SOFT_DIRTY is off ?

2019-03-11 Thread Lev Olshvang
Hello all,
Please help me to clarify what will page fault handler do (if any)

File arch/x86/include/asm/pgtable_types.h have following comment for  2  
PAGE_DIRTY_BITs

#define _PAGE_BIT_DIRTY 6   /* was written to (raised by CPU) */
_PAGE_BIT_SOFT_DIRTY_PAGE_BIT_SOFTW3 /* software dirty tracking */

While documentation clearly explains that Page Fault handler sets second flag
https://www.kernel.org/doc/Documentation/vm/soft-dirty.txt

I do not have idea what will happen when tracking Soft Dirty flags is off, I 
suppose the answer is in mm/gup.c 
but I was not able to track it to page handler.

Thanks you all.
Lev.



___
Linux-il mailing list
Linux-il@cs.huji.ac.il
http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il


What will happen if 2 processes map same physical page

2019-03-20 Thread Lev Olshvang
Hi all,

The question is it ipossiblle in Linux/MMU/TLB  that 2 processes map to the 
same physical address?
Will CPU or  TLB discover that second process tries to reach occupied physical 
page?

What if first process set page permission to read and second whats to write to 
this page ?
Perhaps during context switch all page access permissions of first process is 
flashed out from MMU ?


I confess I do not know what exactly happens in TLB and between Linux and 
hardware view of pages.

I am particularly intereste in ARMv7, perhaps its architecture have some 
solutions to these question.

Regards,
Lev



___
Linux-il mailing list
Linux-il@cs.huji.ac.il
http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il


Re: What will happen if 2 processes map same physical page

2019-03-22 Thread Lev Olshvang
Hello Okash,

Actually there were 3 question:

Third question is :
Is there any way to tell the kernel that PTE of same physical page should be 
equal in all processes?

For example, shared lib mapped from different processes to same physical page 
must have same PTE, isn it?

And  the presence of SELinux feature SELINUX_CHECKREQPROT_VALUE  indicates for 
me that kernel somehow knows the correct page protections. (although I do not 
see in code how it is done)

But the question might be rephrased :  IMHO Kernel should mandate same PTE 
flags no matter how many virtual mapping were made to the same physical page.

What do you think?






21.03.2019, 13:45, "Okash Khawaja" :
> On Thu, 21 Mar 2019 12:56:17 +0300
> Lev Olshvang  wrote:
>
>>  Hi Vaaldis,
>>
>>  Thanks for answer,
>>  I still wondering whether the kernel will allow write to a read-only
>>  page of shared library while it has mapped to several processes?
>>  Kernel knows that page's reference count >1, will it allow
>>  mmap/mprotect to change page protection ? Or will it allow direct
>>  right by physical address? I suppose that CPU should raise page fault
>>  when write is made to read only page,
>>
>>  What is the sequence CPU raises page faul before write to page of
>>  after data is written Will CPU wait until kernel will consider what
>>  to do , whether agree and change PTE "writable " bit to 1 ? Or
>>  kernel may disagree and raise SEGFAULT?
>
> Note that each process has its own PTE. So PTE in one process may say
> the page is writable and PTE in another process may say it's read-only.
>
>>  I checked in the handle_mm_fault() calls for
>>  arch_vma_access_permitted() which just returns true on most
>>  architectures which is very strange and contradicts my prediction of
>>  SEFFAULT. arch_vma_access_permitted() retutus true when is sees that
>>  access is made from foreign process?
>>  https://elixir.bootlin.com/linux/latest/ident/arch_vma_access_permitted
>>
>>  I am totally confused.
>>
>>  What do you think ?
>>
>>  Regards,
>>  Lev
>
> It looks like there are two separate questions in the email.
>
> 1) Will kernel allow the same physical page to be mapped as read-only
> in one process and as read-write in another process?
>
> 2) How page fault is generated?
>
> Answer for first is yes. Same physical page can be mapped with
> different permissions in two different processes. It means read-only
> process will ultimately (hopefully very soon) notice changes made by
> read-write process.
>
> Answer for second question is a bit complicated. However there is a
> trick to it. Once we know that, rest will become clear automaticaly.
> The trick (at least for x86 systems) is that permissions are maintained
> at two different levels:
>
> - VMA level
> - PTE level (or PUD level for larger page size but that is not relevant
>   here)
>
> When a page in memory is accessed, permission on corresponding VMA is
> checked first. If the access is allowed by VMA then PTE permissions are
> checked. Otherwise segfault is generated. If permissions at PTE level
> don't match the access type then a page fault is generated. That's when
> page fault hander kicks in and tries to resolve the problem by faulting
> the page into RAM, copying the page in RAM (for copy-on-write) etc.
>
>>  20.03.2019, 20:08, "Valdis Klētnieks" :
>>  > On Wed, 20 Mar 2019 16:42:39 +0300, Lev Olshvang said:
>>  >>  The question is it ipossiblle in Linux/MMU/TLB that 2 processes
>>  >> map to the same physical address?
>>  >
>>  > Totally possible. That's how mmap shared memory works, and why
>>  > shared libraries are possible.
>>  >
>>  >>  Will CPU or TLB discover that second process tries to reach
>>  >> occupied physical page?
>>  >
>>  > Well, the hardware won't discover it as a "second" process, it only
>>  > knows it's processing *this* memory access.
>>  >
>>  >>  What if first process set page permission to read and second
>>  >> whats to write to this page ?
>>  >
>>  > Perfectly OK - the two processes have separate page table mappings,
>>  > with separate permission bits. So (for example) physical page
>>  > 0x17F000 is mapped to virtual address 0x2034D000 with read-only
>>  > permission n process 1's page tables, and to virtual address
>>  > 0x98FF3000 with read-write permission in process 2's page tables.
>>  > No problem.
>>  >
>>  > (And before you ask, yes it's possible for process 2 to running on
>>  > one core doin

Re: writes to /dev/kmsg

2019-02-20 Thread Lev Olshvang
Can you please elaborate, what you are trying to synchronize, I suppose messages from your driver are uniquely identified?19.02.2019, 19:42, "Constantine Shulyupin" :I write to /dev/kmsg when it is need to synchronize UM and driver's logs. On Tue, Feb 19, 2019 at 3:34 PM Lev Olshvang <levon...@yandex.com> wrote:Kernel documentation describes interfacehttps://www.kernel.org/doc/Documentation/ABI/testing/dev-kmsg I wonder what kind of applications use it?Why somebody need to use kmsg instead of syslog? Can anybody give example of such application? Regards,Lev  

___
Linux-il mailing list
Linux-il@cs.huji.ac.il
http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il
-- Constantine Shulyupinhttp://www.MakeLinux.co.il/Embedded Linux SystemsTel Aviv
___
Linux-il mailing list
Linux-il@cs.huji.ac.il
http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il


which tools exist for configuring SELinux /AppArmor in development cycle automatically iterations? ?

2019-02-20 Thread Lev Olshvang
 Lets Say I develop several applications and during the test of version almost all code paths are executed. So  I can take logs and build a policy and load it to the target.But then  I change code and now it calls another utility, Are there any tools that automate such  iterations ? Thx,Lev

___
Linux-il mailing list
Linux-il@cs.huji.ac.il
http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il


SELinux, LSM and ima_policy rules

2019-02-04 Thread Lev Olshvang
Hello everybody.

I learned recently that IMA kernel security  subsystem can be integrated with 
LSMs, such as SELinux, Smack, ...
https://sourceforge.net/p/linux-ima/wiki/Home/

https://www.kernel.org/doc/Documentation/ABI/testing/ima_policy

It was present in kernel since v3.8 but not google does not know much about the 
usability.

Does anybody have any experience or references which I can read to learn 
restrictions, performance impact or just use cases? 

ThanX!
Lev.



___
Linux-il mailing list
Linux-il@cs.huji.ac.il
http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il


Solved:: Help:get_user_pages_remote - succeed on QEMU, Oops on Android 9 board

2019-04-16 Thread Lev Olshvang
 The problem was how I convert received page address to kernel address. I need to do it with kmap()Now all works again  16.04.2019, 17:17, "Lev Olshvang" :Hello all, I need to remap 1 page from user space to kernel and I use get_user_pages_remote for this purpose ret = get_user_pages_remote(tsk, tsk->mm, offset, 1,                                    0,                                    _page, NULL); Kernel is 4.9.88I compiled module for Arm Vertex board  and run it under  QEMU  with no problemBut on Android 9  with this exactly kernel I got Oops:Unable to handle kernel paging request at virtual address fe002000pgd = d8c14000[fe002000] *pgd=Internal error: Oops: 5 [#1] PREEMPT SMP ARM I checked config files  and did not find any difference( almost except balloon ) in memory related configs.   Does anybody have a clue what is a problem here? Regards,Lev   ___
Linux-il mailing list
Linux-il@cs.huji.ac.il
http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il


Help:get_user_pages_remote - succeed on QEMU, Oops on Android 9 board

2019-04-16 Thread Lev Olshvang
Hello all, I need to remap 1 page from user space to kernel and I use get_user_pages_remote for this purpose ret = get_user_pages_remote(tsk, tsk->mm, offset, 1,                                    0,                                    _page, NULL); Kernel is 4.9.88I compiled module for Arm Vertex board  and run it under  QEMU  with no problemBut on Android 9  with this exactly kernel I got Oops:Unable to handle kernel paging request at virtual address fe002000pgd = d8c14000[fe002000] *pgd=Internal error: Oops: 5 [#1] PREEMPT SMP ARM I checked config files  and did not find any difference( almost except balloon ) in memory related configs.   Does anybody have a clue what is a problem here? Regards,Lev   ___
Linux-il mailing list
Linux-il@cs.huji.ac.il
http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il


Access host from QEMU guest

2020-05-17 Thread Lev Olshvang
I read once that  QEMU linux guest has reserved IP of the host. I did not bookmarked it, can anyone help? Thanks Just share referencehttps://www.cnx-software.com/2011/10/02/how-to-transfer-files-between-host-and-qemu-via-ssh-and-nfs/ 

___
Linux-il mailing list
Linux-il@cs.huji.ac.il
http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il


__STDC_VERSION__ is not know in Linux kernel module, why ?

2020-05-17 Thread Lev Olshvang
I am trying to include  ELF object file into kernel module It gives me a warning of undefined __STDC_VERSION__  symbol"__STDC_VERSION__" is not defined, evaluates to 0  But continues and resulted module works, I see from https://gcc.gnu.org/onlinedocs/cpp/Standard-Predefined-Macros.html that _STDC_VERSION__ is built in gcc macro Please commentLevP.S.BTW, I am looking  for a job, try me !  

___
Linux-il mailing list
Linux-il@cs.huji.ac.il
http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il


OT - looking for a job

2020-05-20 Thread Lev Olshvang
Hi all Sorry to be off-topic, but need to find a job I worked at Argus cyber,  developed kernel LSM and stuff like thisLooking for kernel +- embedded20 years of Linux experience user space programming, sysadmin, devops, kernel  development, cyber I would be glad to be part of the Linux development team.  

___
Linux-il mailing list
Linux-il@cs.huji.ac.il
http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il


__STDC_VERSION__ : What C dialect c89, c99,gnu90 kernel compiies ?

2020-05-20 Thread Lev Olshvang
Hi All,I am building out of tree kernel module.I am trying to include user-space lib into the kernel moduleI reference include file of this lib to use the API.  I  got the following warning  during make"__STDC_VERSION__" is not defined, evaluates to 0But continues and resulted module works,I see from https://gcc.gnu.org/onlinedocs/cpp/Standard-Predefined-Macros.htmlthat _STDC_VERSION__ is a built-in gcc macro, so I think that evenhkernel compilation should be able to see it.Please commentLev.___
Linux-il mailing list
Linux-il@cs.huji.ac.il
http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il


  1   2   >