public inbox for linux-audit@redhat.com
 help / color / mirror / Atom feed
From: Miloslav Trmac <mitr@redhat.com>
To: Steve Grubb <sgrubb@redhat.com>
Cc: linux-audit@redhat.com
Subject: Re: Questions about --with-alpha and --with-armeb configure flags
Date: Mon, 26 Nov 2012 12:21:55 -0500 (EST)	[thread overview]
Message-ID: <1614990143.37889188.1353950515505.JavaMail.root@redhat.com> (raw)
In-Reply-To: <1624466.CLzrYpMLkX@x2>

[-- Attachment #1: Type: text/plain, Size: 890 bytes --]

----- Original Message -----
> > If I understand correctly it's only adding arch detection and syscall
> > tables to ausyscall. Why are these syscall table conditional?
> 
> To reduce the number of text relocations in libaudit. Libaudit links against a
> number of applications and text relocations eats memory and increases startup
> time.
 
Is that really an issue with the current code?  The gentab.c code was designed to avoid text relocations.

At least on x86_64 (which, true, is especially well-designed for this), there are no text relocations in libaudit nor libauparse, whether --with-alpha or --with-armeb are used or not.  In fact the number of relocations of any kind is exactly the same in both cases.

Any one care to retest this on a different architecture, e.t. 32-bit x86?

FWIW, at least the attached patch was necessary to build with --with-alpha --with-armeb.
    Mirek

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: p --]
[-- Type: text/x-patch; name=p, Size: 1251 bytes --]

Index: lib/lookup_table.c
===================================================================
--- lib/lookup_table.c	(revision 718)
+++ lib/lookup_table.c	(working copy)
@@ -75,10 +75,10 @@
     { MACH_S390X,   AUDIT_ARCH_S390X  },
     { MACH_S390,    AUDIT_ARCH_S390   },
 #ifdef WITH_ALPHA
-    { MACH_ALPHA,   AUDIT_ARCH_ALPHA  }
+    { MACH_ALPHA,   AUDIT_ARCH_ALPHA  },
 #endif
 #ifdef WITH_ARMEB
-    { MACH_ARMEB,   AUDIT_ARCH_ARMEB  }
+    { MACH_ARMEB,   AUDIT_ARCH_ARMEB  },
 #endif
 };
 #define AUDIT_ELF_NAMES (sizeof(elftab)/sizeof(elftab[0]))
Index: lib/test/lookup_test.c
===================================================================
--- lib/test/lookup_test.c	(revision 718)
+++ lib/test/lookup_test.c	(working copy)
@@ -325,8 +325,11 @@
 	printf("Testing machinetab...\n");
 #define I2S(I) audit_machine_to_name(I)
 #define S2I(S) audit_name_to_machine(S)
-	TEST_I2S(t[i].s[0] == 'i' && t[i].s[1] >= '4' && t[i].s[1] <= '6'
-		 && strcmp(t[i].s + 2, "86") == 0);
+	TEST_I2S((t[i].s[0] == 'i' && t[i].s[1] >= '4' && t[i].s[1] <= '6'
+		  && strcmp(t[i].s + 2, "86") == 0)
+		 || strcmp(t[i].s, "armv5tejl") == 0
+		 || strcmp(t[i].s, "armv6l") == 0
+		 || strcmp(t[i].s, "armv7l") == 0);
 	TEST_S2I(-1);
 #undef I2S
 #undef S2I

[-- Attachment #3: Type: text/plain, Size: 0 bytes --]



  parent reply	other threads:[~2012-11-26 17:21 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-11-16 17:00 Questions about --with-alpha and --with-armeb configure flags Laurent Bigonville
2012-11-16 18:21 ` Steve Grubb
2012-11-16 19:00   ` Nathaniel Husted
2012-11-26 17:21   ` Miloslav Trmac [this message]
2012-11-26 17:40     ` Steve Grubb
2012-11-26 17:50     ` Nathaniel Husted
2012-11-30 13:42     ` Laurent Bigonville
2012-11-30 14:05       ` Steve Grubb
2012-11-30 17:41         ` Laurent Bigonville
2012-11-30 17:44           ` Miloslav Trmac
2012-12-01 14:38             ` Laurent Bigonville

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1614990143.37889188.1353950515505.JavaMail.root@redhat.com \
    --to=mitr@redhat.com \
    --cc=linux-audit@redhat.com \
    --cc=sgrubb@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox