* Questions about --with-alpha and --with-armeb configure flags @ 2012-11-16 17:00 Laurent Bigonville 2012-11-16 18:21 ` Steve Grubb 0 siblings, 1 reply; 11+ messages in thread From: Laurent Bigonville @ 2012-11-16 17:00 UTC (permalink / raw) To: linux-audit Hello, I've several questions about the --with-alpha and --with-armeb build-time flags. 1) are --with-alpha and --with-armeb intended to be enabled only on these architectures on could they also be enabled on any other one? If I understand correctly it's only adding arch detection and syscall tables to ausyscall. Why are these syscall table conditional? 2) Is --with-armeb meant for ARMEB (aka ARM big-endian) or is it meant for ARM with embedded ABI? The help message of the configure says the later but it seems to be badly named. If somebody could enlighten me, Kind regards Laurent Bigonville ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Questions about --with-alpha and --with-armeb configure flags 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 0 siblings, 2 replies; 11+ messages in thread From: Steve Grubb @ 2012-11-16 18:21 UTC (permalink / raw) To: linux-audit On Friday, November 16, 2012 06:00:56 PM Laurent Bigonville wrote: > I've several questions about the --with-alpha and --with-armeb > build-time flags. > > 1) are --with-alpha and --with-armeb intended to be enabled only on > these architectures on could they also be enabled on any other one? If you have an aggregating server and you want to make sense of the syscalls on these arches, then you might want them enabled. To my knowledge, Fedora never made an Alpha process distribution so it would be waste to enable that. I suppose there is a remote possibility that some other distribution did and it might get aggregated to a Fedora machine, but no one has ever complained. > 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. > 2) Is --with-armeb meant for ARMEB (aka ARM big-endian) or is it meant > for ARM with embedded ABI? The help message of the configure says the > later but it seems to be badly named. I think its related to what comes out of uname -m. -Steve ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Questions about --with-alpha and --with-armeb configure flags 2012-11-16 18:21 ` Steve Grubb @ 2012-11-16 19:00 ` Nathaniel Husted 2012-11-26 17:21 ` Miloslav Trmac 1 sibling, 0 replies; 11+ messages in thread From: Nathaniel Husted @ 2012-11-16 19:00 UTC (permalink / raw) To: Steve Grubb; +Cc: linux-audit [-- Attachment #1.1: Type: text/plain, Size: 2170 bytes --] Steve is correct AFAIK regarding #2. I am unaware of the original meaning for ARMEB, but functionality it must match the machine name returned by the Linux Kernel. If --with-armeb is not used on ARM platforms, many audit tools will return "Machine Type Not Found" or something similar. This has been a little frustrating with ARM, because unlike X86/X86_64 machine types, there are a slew of ARM types out there based on my experience. The SVN currently has support for Qemu, most Android devices, and the Raspberry Pi. Other ARM processors are trivial to add if you have the machine name. This'll probably be needed upon the release of the armv8 64-bit processors. Cheers, Nathaniel Husted On Fri, Nov 16, 2012 at 1:21 PM, Steve Grubb <sgrubb@redhat.com> wrote: > On Friday, November 16, 2012 06:00:56 PM Laurent Bigonville wrote: > > I've several questions about the --with-alpha and --with-armeb > > build-time flags. > > > > 1) are --with-alpha and --with-armeb intended to be enabled only on > > these architectures on could they also be enabled on any other one? > > If you have an aggregating server and you want to make sense of the > syscalls > on these arches, then you might want them enabled. To my knowledge, Fedora > never made an Alpha process distribution so it would be waste to enable > that. > I suppose there is a remote possibility that some other distribution did > and > it might get aggregated to a Fedora machine, but no one has ever > complained. > > > 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. > > > > 2) Is --with-armeb meant for ARMEB (aka ARM big-endian) or is it meant > > for ARM with embedded ABI? The help message of the configure says the > > later but it seems to be badly named. > > I think its related to what comes out of uname -m. > > -Steve > > -- > Linux-audit mailing list > Linux-audit@redhat.com > https://www.redhat.com/mailman/listinfo/linux-audit > [-- Attachment #1.2: Type: text/html, Size: 2924 bytes --] [-- Attachment #2: Type: text/plain, Size: 0 bytes --] ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Questions about --with-alpha and --with-armeb configure flags 2012-11-16 18:21 ` Steve Grubb 2012-11-16 19:00 ` Nathaniel Husted @ 2012-11-26 17:21 ` Miloslav Trmac 2012-11-26 17:40 ` Steve Grubb ` (2 more replies) 1 sibling, 3 replies; 11+ messages in thread From: Miloslav Trmac @ 2012-11-26 17:21 UTC (permalink / raw) To: Steve Grubb; +Cc: linux-audit [-- 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 --] ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Questions about --with-alpha and --with-armeb configure flags 2012-11-26 17:21 ` Miloslav Trmac @ 2012-11-26 17:40 ` Steve Grubb 2012-11-26 17:50 ` Nathaniel Husted 2012-11-30 13:42 ` Laurent Bigonville 2 siblings, 0 replies; 11+ messages in thread From: Steve Grubb @ 2012-11-26 17:40 UTC (permalink / raw) To: Miloslav Trmac; +Cc: linux-audit On Monday, November 26, 2012 12:21:55 PM Miloslav Trmac wrote: > ----- 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. I guess not # relinfo.pl /lib64/libaudit.so.1.0.0 /lib64/libaudit.so.1.0.0: 45 relocations, 35 relative (77%), 60 PLT entries, 2 for local syms (3%), 97 users # relinfo.pl /home/sgrubb/working/BUILD/audit/lib/.libs/libaudit.so.1.0.0 /home/sgrubb/working/BUILD/audit/lib/.libs/libaudit.so.1.0.0: 45 relocations, 35 relative (77%), 56 PLT entries, 2 for local syms (3%), 0 users However, it does trim about 14k off libaudit by not compiling these in. > 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. Applied. Thanks. -Steve ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Questions about --with-alpha and --with-armeb configure flags 2012-11-26 17:21 ` Miloslav Trmac 2012-11-26 17:40 ` Steve Grubb @ 2012-11-26 17:50 ` Nathaniel Husted 2012-11-30 13:42 ` Laurent Bigonville 2 siblings, 0 replies; 11+ messages in thread From: Nathaniel Husted @ 2012-11-26 17:50 UTC (permalink / raw) To: Miloslav Trmac; +Cc: linux-audit [-- Attachment #1.1: Type: text/plain, Size: 1746 bytes --] The issues with specific arm platforms has been fixed via a previous patch in the SVN, thus the lines, + 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); shouldn't be needed, as far as I have tested (i.e., I tested it and it works, but didn't do much more than run auditd/auditctl). I don't believe there required commas are in place in machinetab.h to allow for --with-armeb and --with-alpha to be compiled at the same time. Cheers, Nathaniel On Mon, Nov 26, 2012 at 12:21 PM, Miloslav Trmac <mitr@redhat.com> wrote: > ----- 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 > -- > Linux-audit mailing list > Linux-audit@redhat.com > https://www.redhat.com/mailman/listinfo/linux-audit > [-- Attachment #1.2: Type: text/html, Size: 2458 bytes --] [-- Attachment #2: Type: text/plain, Size: 0 bytes --] ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Questions about --with-alpha and --with-armeb configure flags 2012-11-26 17:21 ` Miloslav Trmac 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 2 siblings, 1 reply; 11+ messages in thread From: Laurent Bigonville @ 2012-11-30 13:42 UTC (permalink / raw) To: Miloslav Trmac; +Cc: linux-audit Le Mon, 26 Nov 2012 12:21:55 -0500 (EST), Miloslav Trmac <mitr@redhat.com> a écrit : > FWIW, at least the attached patch was necessary to build with > --with-alpha --with-armeb. Mirek I unfortunately still have a failure in the checks with both svn HEAD and 2.2.1 when passing --with-armeb Unexpected match `a1' FAIL: lookup_test An idea? Thanks for your previous answers Cheers, Laurent Bigonville -- Linux-audit mailing list Linux-audit@redhat.com https://www.redhat.com/mailman/listinfo/linux-audit ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Questions about --with-alpha and --with-armeb configure flags 2012-11-30 13:42 ` Laurent Bigonville @ 2012-11-30 14:05 ` Steve Grubb 2012-11-30 17:41 ` Laurent Bigonville 0 siblings, 1 reply; 11+ messages in thread From: Steve Grubb @ 2012-11-30 14:05 UTC (permalink / raw) To: Laurent Bigonville; +Cc: linux-audit, Miloslav Trmac On Friday, November 30, 2012 02:42:27 PM Laurent Bigonville wrote: > Le Mon, 26 Nov 2012 12:21:55 -0500 (EST), > > Miloslav Trmac <mitr@redhat.com> a écrit : > > FWIW, at least the attached patch was necessary to build with > > --with-alpha --with-armeb. Mirek > > I unfortunately still have a failure in the checks with both svn HEAD > and 2.2.1 when passing --with-armeb > > Unexpected match `a1' > FAIL: lookup_test > > An idea? Thanks for reporting this. Its fixed in trunk now. -Steve ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Questions about --with-alpha and --with-armeb configure flags 2012-11-30 14:05 ` Steve Grubb @ 2012-11-30 17:41 ` Laurent Bigonville 2012-11-30 17:44 ` Miloslav Trmac 0 siblings, 1 reply; 11+ messages in thread From: Laurent Bigonville @ 2012-11-30 17:41 UTC (permalink / raw) To: Steve Grubb; +Cc: linux-audit, Miloslav Trmac Le Fri, 30 Nov 2012 09:05:19 -0500, Steve Grubb <sgrubb@redhat.com> a écrit : > On Friday, November 30, 2012 02:42:27 PM Laurent Bigonville wrote: > > Le Mon, 26 Nov 2012 12:21:55 -0500 (EST), > > > > Miloslav Trmac <mitr@redhat.com> a écrit : > > > FWIW, at least the attached patch was necessary to build with > > > --with-alpha --with-armeb. Mirek > > > > I unfortunately still have a failure in the checks with both svn > > HEAD and 2.2.1 when passing --with-armeb > > > > Unexpected match `a1' > > FAIL: lookup_test > > > > An idea? > > Thanks for reporting this. Its fixed in trunk now. Thanks, arm support is now compiling. But it still failing with the same error if both --with-alpha and --with-armeb are enabled. Cheers Laurent Bigonville -- Linux-audit mailing list Linux-audit@redhat.com https://www.redhat.com/mailman/listinfo/linux-audit ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Questions about --with-alpha and --with-armeb configure flags 2012-11-30 17:41 ` Laurent Bigonville @ 2012-11-30 17:44 ` Miloslav Trmac 2012-12-01 14:38 ` Laurent Bigonville 0 siblings, 1 reply; 11+ messages in thread From: Miloslav Trmac @ 2012-11-30 17:44 UTC (permalink / raw) To: Laurent Bigonville; +Cc: linux-audit ----- Original Message ----- > Le Fri, 30 Nov 2012 09:05:19 -0500, > Steve Grubb <sgrubb@redhat.com> a écrit : > > > On Friday, November 30, 2012 02:42:27 PM Laurent Bigonville wrote: > > > Le Mon, 26 Nov 2012 12:21:55 -0500 (EST), > > > > > > Miloslav Trmac <mitr@redhat.com> a écrit : > > > > FWIW, at least the attached patch was necessary to build with > > > > --with-alpha --with-armeb. Mirek > > > > > > I unfortunately still have a failure in the checks with both svn > > > HEAD and 2.2.1 when passing --with-armeb > > > > > > Unexpected match `a1' > > > FAIL: lookup_test > > > > > > An idea? > > > > Thanks for reporting this. Its fixed in trunk now. > > Thanks, arm support is now compiling. > > But it still failing with the same error if both --with-alpha and > --with-armeb are enabled. Locally I "fixed" it by adding a srand(2) to the beginning of main() in lib/test/lookup_test.c. A real fix would probably involve replacing the /* Blindly assuming this will not generate a \ meaningful identifier. */ \ comment with a code that detects such cases and ignores them. Mirek -- Linux-audit mailing list Linux-audit@redhat.com https://www.redhat.com/mailman/listinfo/linux-audit ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Questions about --with-alpha and --with-armeb configure flags 2012-11-30 17:44 ` Miloslav Trmac @ 2012-12-01 14:38 ` Laurent Bigonville 0 siblings, 0 replies; 11+ messages in thread From: Laurent Bigonville @ 2012-12-01 14:38 UTC (permalink / raw) To: Miloslav Trmac; +Cc: linux-audit Le Fri, 30 Nov 2012 12:44:54 -0500 (EST), Miloslav Trmac <mitr@redhat.com> a écrit : > ----- Original Message ----- > > Le Fri, 30 Nov 2012 09:05:19 -0500, > > Steve Grubb <sgrubb@redhat.com> a écrit : > > > > > On Friday, November 30, 2012 02:42:27 PM Laurent Bigonville wrote: > > > > Le Mon, 26 Nov 2012 12:21:55 -0500 (EST), > > > > > > > > Miloslav Trmac <mitr@redhat.com> a écrit : > > > > > FWIW, at least the attached patch was necessary to build with > > > > > --with-alpha --with-armeb. Mirek > > > > > > > > I unfortunately still have a failure in the checks with both svn > > > > HEAD and 2.2.1 when passing --with-armeb > > > > > > > > Unexpected match `a1' > > > > FAIL: lookup_test > > > > > > > > An idea? > > > > > > Thanks for reporting this. Its fixed in trunk now. > > > > Thanks, arm support is now compiling. > > > > But it still failing with the same error if both --with-alpha and > > --with-armeb are enabled. > > Locally I "fixed" it by adding a srand(2) to the beginning of main() > in lib/test/lookup_test.c. Unfortunately this is now FTBFS if only --with-armeb or --with-alpha is passed to the configure (if both are passed this is working well): Unexpected match `A1' FAIL: lookup_test Laurent Bigonville -- Linux-audit mailing list Linux-audit@redhat.com https://www.redhat.com/mailman/listinfo/linux-audit ^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2012-12-01 14:38 UTC | newest] Thread overview: 11+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 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 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
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox