From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/3368 Path: news.gmane.org!not-for-mail From: Szabolcs Nagy Newsgroups: gmane.linux.lib.musl.general Subject: Re: util-linux-2.23 mount segmentation fault error Date: Mon, 27 May 2013 16:29:29 +0200 Message-ID: <20130527142929.GF31915@port70.net> References: <20130525162604.GY20323@brightrain.aerifal.cx> <20130526091432.GE31915@port70.net> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1369664991 13120 80.91.229.3 (27 May 2013 14:29:51 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 27 May 2013 14:29:51 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-3372-gllmg-musl=m.gmane.org@lists.openwall.com Mon May 27 16:29:52 2013 Return-path: Envelope-to: gllmg-musl@plane.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by plane.gmane.org with smtp (Exim 4.69) (envelope-from ) id 1UgyQg-0000gE-4P for gllmg-musl@plane.gmane.org; Mon, 27 May 2013 16:29:42 +0200 Original-Received: (qmail 7762 invoked by uid 550); 27 May 2013 14:29:41 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: Original-Received: (qmail 7754 invoked from network); 27 May 2013 14:29:41 -0000 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Xref: news.gmane.org gmane.linux.lib.musl.general:3368 Archived-At: * plan9assembler [2013-05-27 23:05:37 +0900]: > util-linux-2.23 mount segfault error seems to be solved. > no more segfault error, when i test mount binary. > > i modified follow macros in musl /include/bits/ioctl.h and musl libc > reinstalled. > > - #define _IOR(a,b,c) _IOC(2,(a),(b),sizeof(c)) > - #define _IOWR(a,b,c) _IOC(3,(a),(b),sizeof(c)) > > + #define _IOR(a,b,c) _IOC(2U,(a),(b),sizeof(c)) > + #define _IOWR(a,b,c) _IOC(3U,(a),(b),sizeof(c)) > hm are you sure this was the change that solved the segfault? that would be scary since the linux headers have signed int left shift overflows in many places (and as far as i know users of those headers dont use special compilation flags to make signed overflow well-defined like gcc -fwrapv) which compiler did you use and with what flags? (this could break a lot of legacy code)