Re: [LTP] gcov - compilation error while using gcc 4.1.1

2008-01-30 Thread Peter Oberparleiter
Hi,

Nanda Annigeri wrote:
 Then I tried linking with -lgcov and now I get below error.
  
 -L/home/nanda/galaxy/lib -lgcov -lPerfStats -L /usr/local/lib -lpthread
 -ldl -dynamic
 /usr/bin/ld: perfstats: hidden symbol `__gcov_init' in
 /usr/local/gcc-411/lib/gcc/x86_64-unknown-linux-gnu/4.1.1/libgcov.a(_gco
 v.o) is referenced by DSO
  
 I have tried using gcc 4.2.2 and also latest libtool but could not
 resolve the issue.

Try using -fprofile-arcs as linker option instead of -lgcov. If that doesn't 
help this is most likely a bug in gcc. Please report to the gcc maintainers.


Regards,
  Peter Oberparleiter

-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list


Re: [LTP] ltp selinux patch

2008-01-30 Thread Stephen Smalley

On Wed, 2008-01-30 at 11:37 -0600, Serge E. Hallyn wrote:
 Quoting Stephen Smalley ([EMAIL PROTECTED]):
  
  On Wed, 2008-01-30 at 07:20 -0500, Stephen Smalley wrote:
   On Tue, 2008-01-29 at 18:21 -0600, Serge E. Hallyn wrote:
Here is a patch against this morning's ltp cvs snapshot to implement
Stephen's suggestion of setting expand-check=0 for the duration of
the policy load.  This allowed me to get rid of the hack
++domain_type(test_create_no_t) in refpolicy/test_task_create.te, also
done in this patch.

(I think it also inlines a patch Stephen sent on jan 23 which
wasn't yet in ltp cvs)
   
   As far as I can tell, no one has merged the two patches that I sent
   earlier, which explains why you are still seeing failures (the one patch
   I sent added permissions needed for the tests).  I've seen no reply to
   my patches, although I've seen other patches responded to.
  
  Actually, I see that your patch does include the permissions from my
  patch (still not sure why my patch hasn't been merged), so I don't know
  why you'd still be seeing failures.   I only get 3 failures with my
  patch applied, on inherit and fdreceive (due to Fedora 8 policy granting
  fd:use permission liberally to all domains) and on task_create (due to
  the refpolicy granting process:fork to all domains), so I would only
  expect you to get 2 failures after your patch.
 
 Interesting.  I'll look into some these on Friday.  Here is the list of
 failures btw:

Backing out my patch and applying yours, I get the following (as
expected).   Make sure you are actually using the right version of your
diff (e.g. are you using a stale version of it due to the PATCHED file
still laying around)?

Test Start Time: Wed Jan 30 14:45:13 2008
-
Testcase   Result Exit Value
   -- --
SELinux01  PASS   0
SELinux02  PASS   0
SELinux03  PASS   0
SELinux04  PASS   0
SELinux05  PASS   0
SELinux06  PASS   0
SELinux07  PASS   0
SELinux08  PASS   0
SELinux09  FAIL   1
SELinux10  PASS   0
SELinux11  FAIL   1
SELinux12  PASS   0
SELinux13  PASS   0
SELinux14  PASS   0
SELinux15  PASS   0
SELinux16  PASS   0
SELinux17  PASS   0
SELinux18  PASS   0
SELinux19  PASS   0
SELinux20  PASS   0
SELinux21  PASS   0
SELinux22  PASS   0
SELinux23  PASS   0
SELinux24  PASS   0
SELinux25  PASS   0
SELinux26  PASS   0
SELinux27  PASS   0
SELinux28  PASS   0
SELinux29  PASS   0
SELinux30  PASS   0
SELinux31  PASS   0
SELinux32  PASS   0
SELinux33  PASS   0
SELinux34  PASS   0
SELinux35  PASS   0
SELinux36  PASS   0
SELinux37  PASS   0
SELinux38  PASS   0

---
Total Tests: 38
Total Failures: 2
Kernel Version: 2.6.23.14-107.fc8
Machine Architecture: i686


-- 
Stephen Smalley
National Security Agency


-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list


Re: [LTP] ltp selinux patch

2008-01-30 Thread Stephen Smalley

On Wed, 2008-01-30 at 11:37 -0600, Serge E. Hallyn wrote:
 Quoting Stephen Smalley ([EMAIL PROTECTED]):
  
  On Wed, 2008-01-30 at 07:20 -0500, Stephen Smalley wrote:
   On Tue, 2008-01-29 at 18:21 -0600, Serge E. Hallyn wrote:
Here is a patch against this morning's ltp cvs snapshot to implement
Stephen's suggestion of setting expand-check=0 for the duration of
the policy load.  This allowed me to get rid of the hack
++domain_type(test_create_no_t) in refpolicy/test_task_create.te, also
done in this patch.

(I think it also inlines a patch Stephen sent on jan 23 which
wasn't yet in ltp cvs)
   
   As far as I can tell, no one has merged the two patches that I sent
   earlier, which explains why you are still seeing failures (the one patch
   I sent added permissions needed for the tests).  I've seen no reply to
   my patches, although I've seen other patches responded to.
  
  Actually, I see that your patch does include the permissions from my
  patch (still not sure why my patch hasn't been merged), so I don't know
  why you'd still be seeing failures.   I only get 3 failures with my
  patch applied, on inherit and fdreceive (due to Fedora 8 policy granting
  fd:use permission liberally to all domains) and on task_create (due to
  the refpolicy granting process:fork to all domains), so I would only
  expect you to get 2 failures after your patch.
 
 Interesting.  I'll look into some these on Friday.  Here is the list of
 failures btw:

Are you running mcstrans?  If not, start it first.

Original testsuite predates MCS/MLS and thus when it fabricates security
contexts, it doesn't include a MCS/MLS level.  mcstrans makes that
transparent and thus it just works.  Alternatively, the test scripts
could be made a bit smarter.

-- 
Stephen Smalley
National Security Agency


-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list


Re: [LTP] ltp selinux patch

2008-01-30 Thread Serge E. Hallyn
Quoting Stephen Smalley ([EMAIL PROTECTED]):
 
 On Wed, 2008-01-30 at 11:37 -0600, Serge E. Hallyn wrote:
  Quoting Stephen Smalley ([EMAIL PROTECTED]):
   
   On Wed, 2008-01-30 at 07:20 -0500, Stephen Smalley wrote:
On Tue, 2008-01-29 at 18:21 -0600, Serge E. Hallyn wrote:
 Here is a patch against this morning's ltp cvs snapshot to implement
 Stephen's suggestion of setting expand-check=0 for the duration of
 the policy load.  This allowed me to get rid of the hack
 ++domain_type(test_create_no_t) in refpolicy/test_task_create.te, also
 done in this patch.
 
 (I think it also inlines a patch Stephen sent on jan 23 which
 wasn't yet in ltp cvs)

As far as I can tell, no one has merged the two patches that I sent
earlier, which explains why you are still seeing failures (the one patch
I sent added permissions needed for the tests).  I've seen no reply to
my patches, although I've seen other patches responded to.
   
   Actually, I see that your patch does include the permissions from my
   patch (still not sure why my patch hasn't been merged), so I don't know
   why you'd still be seeing failures.   I only get 3 failures with my
   patch applied, on inherit and fdreceive (due to Fedora 8 policy granting
   fd:use permission liberally to all domains) and on task_create (due to
   the refpolicy granting process:fork to all domains), so I would only
   expect you to get 2 failures after your patch.
  
  Interesting.  I'll look into some these on Friday.  Here is the list of
  failures btw:
 
 Backing out my patch and applying yours, I get the following (as
 expected).   Make sure you are actually using the right version of your
 diff (e.g. are you using a stale version of it due to the PATCHED file
 still laying around)?

Hmm - I don't think so, I've pulled down a whole new ltp snapshot.  But
I suspect there is *something* in a funky state, so I guess I might just
have to install a new test system.

-serge

 
 Test Start Time: Wed Jan 30 14:45:13 2008
 -
 Testcase   Result Exit Value
    -- --
 SELinux01  PASS   0
 SELinux02  PASS   0
 SELinux03  PASS   0
 SELinux04  PASS   0
 SELinux05  PASS   0
 SELinux06  PASS   0
 SELinux07  PASS   0
 SELinux08  PASS   0
 SELinux09  FAIL   1
 SELinux10  PASS   0
 SELinux11  FAIL   1
 SELinux12  PASS   0
 SELinux13  PASS   0
 SELinux14  PASS   0
 SELinux15  PASS   0
 SELinux16  PASS   0
 SELinux17  PASS   0
 SELinux18  PASS   0
 SELinux19  PASS   0
 SELinux20  PASS   0
 SELinux21  PASS   0
 SELinux22  PASS   0
 SELinux23  PASS   0
 SELinux24  PASS   0
 SELinux25  PASS   0
 SELinux26  PASS   0
 SELinux27  PASS   0
 SELinux28  PASS   0
 SELinux29  PASS   0
 SELinux30  PASS   0
 SELinux31  PASS   0
 SELinux32  PASS   0
 SELinux33  PASS   0
 SELinux34  PASS   0
 SELinux35  PASS   0
 SELinux36  PASS   0
 SELinux37  PASS   0
 SELinux38  PASS   0
 
 ---
 Total Tests: 38
 Total Failures: 2
 Kernel Version: 2.6.23.14-107.fc8
 Machine Architecture: i686
 
 
 -- 
 Stephen Smalley
 National Security Agency

-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list


Re: [LTP] ltp selinux patch

2008-01-30 Thread Serge E. Hallyn
Quoting Stephen Smalley ([EMAIL PROTECTED]):
 
 On Wed, 2008-01-30 at 11:37 -0600, Serge E. Hallyn wrote:
  Quoting Stephen Smalley ([EMAIL PROTECTED]):
   
   On Wed, 2008-01-30 at 07:20 -0500, Stephen Smalley wrote:
On Tue, 2008-01-29 at 18:21 -0600, Serge E. Hallyn wrote:
 Here is a patch against this morning's ltp cvs snapshot to implement
 Stephen's suggestion of setting expand-check=0 for the duration of
 the policy load.  This allowed me to get rid of the hack
 ++domain_type(test_create_no_t) in refpolicy/test_task_create.te, also
 done in this patch.
 
 (I think it also inlines a patch Stephen sent on jan 23 which
 wasn't yet in ltp cvs)

As far as I can tell, no one has merged the two patches that I sent
earlier, which explains why you are still seeing failures (the one patch
I sent added permissions needed for the tests).  I've seen no reply to
my patches, although I've seen other patches responded to.
   
   Actually, I see that your patch does include the permissions from my
   patch (still not sure why my patch hasn't been merged), so I don't know
   why you'd still be seeing failures.   I only get 3 failures with my
   patch applied, on inherit and fdreceive (due to Fedora 8 policy granting
   fd:use permission liberally to all domains) and on task_create (due to
   the refpolicy granting process:fork to all domains), so I would only
   expect you to get 2 failures after your patch.
  
  Interesting.  I'll look into some these on Friday.  Here is the list of
  failures btw:
 
 Are you running mcstrans?  If not, start it first.
 
 Original testsuite predates MCS/MLS and thus when it fabricates security
 contexts, it doesn't include a MCS/MLS level.  mcstrans makes that
 transparent and thus it just works.  Alternatively, the test scripts
 could be made a bit smarter.

Ah, that brought my # failures down to 5 :)

t Start Time: Wed Jan 30 09:39:18 2008
-
Testcase   Result Exit Value
   -- --
SELinux01  PASS   0
SELinux02  PASS   0
SELinux03  PASS   0
SELinux04  PASS   0
SELinux05  PASS   0
SELinux06  PASS   0
SELinux07  PASS   0
SELinux08  PASS   0
SELinux09  FAIL   1
SELinux10  FAIL   2
SELinux11  FAIL   1
SELinux12  PASS   0
SELinux13  PASS   0
SELinux14  FAIL   1
SELinux15  PASS   0
SELinux16  PASS   0
SELinux17  PASS   0
SELinux18  PASS   0
SELinux19  FAIL   1
SELinux20  PASS   0
SELinux21  PASS   0
SELinux22  PASS   0
SELinux23  PASS   0
SELinux24  PASS   0
SELinux25  PASS   0
SELinux26  PASS   0
SELinux27  PASS   0
SELinux28  PASS   0
SELinux29  PASS   0
SELinux30  PASS   0
SELinux31  PASS   0
SELinux32  PASS   0
SELinux33  PASS   0
SELinux34  PASS   0
SELinux35  PASS   0
SELinux36  PASS   0
SELinux37  PASS   0
SELinux38  PASS   0

---
Total Tests: 38
Total Failures: 5
Kernel Version: 2.6.23.1-42.fc8
Machine Architecture: i686
Hostname: localhost.localdomain

thanks,
-serge

-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list


Re: [LTP] ltp selinux patch

2008-01-30 Thread Stephen Smalley

On Tue, 2008-01-29 at 18:21 -0600, Serge E. Hallyn wrote:
 Here is a patch against this morning's ltp cvs snapshot to implement
 Stephen's suggestion of setting expand-check=0 for the duration of
 the policy load.  This allowed me to get rid of the hack
 ++domain_type(test_create_no_t) in refpolicy/test_task_create.te, also
 done in this patch.
 
 (I think it also inlines a patch Stephen sent on jan 23 which
 wasn't yet in ltp cvs)

As far as I can tell, no one has merged the two patches that I sent
earlier, which explains why you are still seeing failures (the one patch
I sent added permissions needed for the tests).  I've seen no reply to
my patches, although I've seen other patches responded to.

 Now I can compile and run the selinux testsuite on Fedora 8.  There are
 10 failures remaining.  I'll start looking at those in spare time, but
 hopefully Joy or George can also be looking into those a bit.
 
 thanks
 -serge
 
 diff -Nrup 
 ltp/testcases/kernel/security/selinux-testsuite/misc/sbin_deprecated.patch 
 ltp.p3/testcases/kernel/security/selinux-testsuite/misc/sbin_deprecated.patch
 --- 
 ltp/testcases/kernel/security/selinux-testsuite/misc/sbin_deprecated.patch
 2008-01-02 06:58:15.0 -0500
 +++ 
 ltp.p3/testcases/kernel/security/selinux-testsuite/misc/sbin_deprecated.patch 
 2008-01-29 11:57:32.0 -0500
 @@ -1,6 +1,6 @@
  diff -Nrup refpolicy/test_capable_file.te refpolicy.new/test_capable_file.te
  refpolicy/test_capable_file.te   2007-12-31 06:57:36.0 -0500
 -+++ refpolicy.new/test_capable_file.te   2007-12-31 05:57:36.0 
 -0500
 +--- refpolicy/test_capable_file.te   2008-01-29 11:51:21.0 -0500
  refpolicy.new/test_capable_file.te   2008-01-29 11:40:09.0 
 -0500
  @@ -14,28 +14,35 @@ type test_fcap_t;
   typeattribute test_fcap_t capabledomain;
   typeattribute test_fcap_t testdomain;
 @@ -39,8 +39,8 @@ diff -Nrup refpolicy/test_capable_file.t
   files_exec_etc_files(capabledomain)
   libs_use_ld_so(capabledomain)
  diff -Nrup refpolicy/test_capable_net.te refpolicy.new/test_capable_net.te
  refpolicy/test_capable_net.te2007-12-31 06:57:36.0 -0500
 -+++ refpolicy.new/test_capable_net.te2007-12-31 05:57:36.0 
 -0500
 +--- refpolicy/test_capable_net.te2008-01-29 11:51:21.0 -0500
  refpolicy.new/test_capable_net.te2008-01-29 11:40:09.0 
 -0500
  @@ -7,12 +7,16 @@
   # Type for process that is allowed certain capabilities
   type test_ncap_t;
 @@ -79,8 +79,8 @@ diff -Nrup refpolicy/test_capable_net.te
   require {
   type ifconfig_exec_t;
  diff -Nrup refpolicy/test_capable_sys.te refpolicy.new/test_capable_sys.te
  refpolicy/test_capable_sys.te2007-12-31 06:57:36.0 -0500
 -+++ refpolicy.new/test_capable_sys.te2007-12-31 05:57:36.0 
 -0500
 +--- refpolicy/test_capable_sys.te2008-01-29 11:51:21.0 -0500
  refpolicy.new/test_capable_sys.te2008-01-29 11:40:09.0 
 -0500
  @@ -7,12 +7,16 @@
   # Type for process that is allowed certain capabilities
   type test_scap_t;
 @@ -99,8 +99,8 @@ diff -Nrup refpolicy/test_capable_sys.te
   typeattribute test_noscap_t testdomain;
   
  diff -Nrup refpolicy/test_dyntrace.te refpolicy.new/test_dyntrace.te
  refpolicy/test_dyntrace.te   2007-12-31 06:57:36.0 -0500
 -+++ refpolicy.new/test_dyntrace.te   2007-12-31 05:57:36.0 -0500
 +--- refpolicy/test_dyntrace.te   2008-01-29 11:51:21.0 -0500
  refpolicy.new/test_dyntrace.te   2008-01-29 11:40:09.0 -0500
  @@ -8,6 +8,8 @@ attribute dyntracedomain;
   # Domain for parent process.
   type test_dyntrace_parent_t;
 @@ -129,8 +129,8 @@ diff -Nrup refpolicy/test_dyntrace.te re
   typeattribute test_dyntrace_notchild_t testdomain;
   
  diff -Nrup refpolicy/test_dyntrans.te refpolicy.new/test_dyntrans.te
  refpolicy/test_dyntrans.te   2007-12-31 06:57:36.0 -0500
 -+++ refpolicy.new/test_dyntrans.te   2007-12-31 05:57:36.0 -0500
 +--- refpolicy/test_dyntrans.te   2008-01-29 11:51:21.0 -0500
  refpolicy.new/test_dyntrans.te   2008-01-29 11:40:09.0 -0500
  @@ -8,18 +8,24 @@ attribute dyntransdomain;
   # Domain for process that is allowed to transition to the new domain.
   type test_dyntrans_fromdomain_t;
 @@ -157,8 +157,8 @@ diff -Nrup refpolicy/test_dyntrans.te re
   typeattribute test_dyntrans_todomain_t testdomain;
   
  diff -Nrup refpolicy/test_entrypoint.te refpolicy.new/test_entrypoint.te
  refpolicy/test_entrypoint.te 2007-12-31 06:57:36.0 -0500
 -+++ refpolicy.new/test_entrypoint.te 2007-12-31 05:57:36.0 -0500
 +--- refpolicy/test_entrypoint.te 2008-01-29 11:51:21.0 -0500
  refpolicy.new/test_entrypoint.te 2008-01-29 11:40:09.0 -0500
  @@ -10,6 +10,8 @@ files_type(test_entrypoint_execute_t)
   # Test domain that can only be entered via the type above.
   type 

Re: [LTP] [patch] selinux-testsuite: update README

2008-01-30 Thread Subrata Modak
And this too. Thanks.

--Subrata

 Update the selinux testsuite README file.
 
 Signed-off-by:  Stephen Smalley [EMAIL PROTECTED]
 
 Index: testcases/kernel/security/selinux-testsuite/README
 ===
 RCS file: 
 /cvsroot/ltp/ltp/testcases/kernel/security/selinux-testsuite/README,v
 retrieving revision 1.4
 diff -u -r1.4 README
 --- testcases/kernel/security/selinux-testsuite/README20 Dec 2007 
 09:32:55 -  1.4
 +++ testcases/kernel/security/selinux-testsuite/README23 Jan 2008 
 19:31:22 -
 @@ -6,6 +6,13 @@
  such as getenforce are found. The test_selinux.sh script adds /usr/sbin
  to the PATH. 
 
 +You must also have the line:
 + expand-check = 0
 +in your /etc/selinux/semanage.conf file as the test policy will violate some 
 +of the neverallow rules in the base policy.  This line may already be present
 +depending on your distribution; if not, add it before running the test suite
 +and remove it when done.
 +
  There are two ways to run the SELinux testcases:
   1. testsuite - all testcases
   2. individual testcases
 @@ -32,13 +39,13 @@
  to the testscripts directory and from the command line execute,
   ./test_selinux.sh
 
 -This script builds the test policy in the selinux-testsuite/policy 
 +This script builds the test policy in the selinux-testsuite/refpolicy 
  directory and runs the testsuite. After the testcases have completed, 
  the test policy will be removed and the original policy will be 
  restored. Thus, if the test_selinux.sh script is not allowed 
  to complete, you may manually have to restore your system's 
  original policy. This can be done by changing to the the 
 -selinux-testsuite/policy directory and from the commandline, 
 +selinux-testsuite/refpolicy directory and from the commandline, 
  issue a make cleanup to remove the test policy and restore the 
  original policy.
 
 @@ -62,8 +69,8 @@
  Run Individual Testcases
  --
  First build the test policy manually. Do this by first changing 
 -to the selinux-testsuite policy directory (cd to 
 -$LTPROOT/testcases/kernel/security/selinux-testsuite/policy)
 +to the selinux-testsuite refpolicy directory (cd to 
 +$LTPROOT/testcases/kernel/security/selinux-testsuite/refpolicy)
  and build the policy by doing a, 
   make load
 
 @@ -88,7 +95,7 @@
  testcase directory of the testcase being debugged.   
 
  To remove the test policy and restore original policy,
 -cd to selinux-testsuite/policy directory and execute,
 +cd to selinux-testsuite/refpolicy directory and execute,
   make cleanup
 
  Remember to remove test policy and restore original policy after
 


-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list