Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 263434 - glibc ewarn wrt /proc/xen isn't exactly correct
Summary: glibc ewarn wrt /proc/xen isn't exactly correct
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High trivial (vote)
Assignee: Gentoo Toolchain Maintainers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-03-23 00:42 UTC by Jeremy Olexa (darkside) (RETIRED)
Modified: 2009-03-23 18:48 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jeremy Olexa (darkside) (RETIRED) archtester gentoo-dev Security 2009-03-23 00:42:43 UTC
glibc-2.8_p20080602-r1.ebuild has this:

	if [[ -e /proc/xen ]] && [[ $(tc-arch) == "x86" ]] && ! is-flag -mno-tls-direct-seg-refs ; then
		ewarn "You are using Xen but don't have -mno-tls-direct-seg-refs in your CFLAGS."
		ewarn "This will result in a 50% performance penalty, which is probably not what you want."
	fi

But that isn't correct if the hypervisor is 64bit. I suggest a simply wording change and (maybe) drop the ewarn to an elog.

19:32 <@caker> darkside_: -mno-tls-direct-seg-refs isn't required when the 
               hypervisor is x86_64 .. not sure what one can poke at within the 
               domU to determine that, however
19:33 < darkside_> caker: ah, ok. well, we can adjust the warning message. no 
                   problem there
19:33 <@caker> sounds like a plan
19:34 < bd_> Isn't there a kernel capability flag?
19:34 < bd_> At least on debian, there's a libc6-xen package that adds a 
             -mno-tls-direct-seg-refs build of glibc - but it's only selected 
             if it's detected to be needed at runtime
19:35 < bd_> So, one could take a look at whatever ld.so looks at to determine 
             that
19:35 <@caker> at runtime, huh? .. cool
19:35 <@caker> there's also something within domU kernels that prints a warning 
               the first time userspace tickles it .. but I figured that was 
               magic
Comment 1 SpanKY gentoo-dev 2009-03-23 02:30:13 UTC
except that we cant do detection at build time.  the warning was added in the first place because the xen guys wanted it.  either suggest a rewording or i'll punt it and the xen guys can suck it.
Comment 2 Jeremy Olexa (darkside) (RETIRED) archtester gentoo-dev Security 2009-03-23 02:36:06 UTC
Hm, ok. I was just looking for something like:

-ewarn "This will result in a 50% performance penalty, which is probably not what you want."
+ewarn "This will result in a 50% performance penalty (unless your hypervisor is 64bit), which is probably not what you want."

My knowledge on this subject is limited so you can close this bug if desired.