From owner-freebsd-arm@FreeBSD.ORG Wed Dec 31 22:43:36 2014 Return-Path: Delivered-To: freebsd-arm@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id CF9DD5B1 for ; Wed, 31 Dec 2014 22:43:36 +0000 (UTC) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B7DE26651A for ; Wed, 31 Dec 2014 22:43:36 +0000 (UTC) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.14.9/8.14.9) with ESMTP id sBVMhabc078856 for ; Wed, 31 Dec 2014 22:43:36 GMT (envelope-from bugzilla-noreply@freebsd.org) From: bugzilla-noreply@freebsd.org To: freebsd-arm@FreeBSD.org Subject: [Bug 196407] New: kernel modules fail on arm after r276047 Date: Wed, 31 Dec 2014 22:43:36 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: arm X-Bugzilla-Version: 11.0-CURRENT X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Many People X-Bugzilla-Who: ian@FreeBSD.org X-Bugzilla-Status: New X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: freebsd-arm@FreeBSD.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version rep_platform op_sys bug_status bug_severity priority component assigned_to reporter Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "Porting FreeBSD to ARM processors." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 31 Dec 2014 22:43:36 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=196407 Bug ID: 196407 Summary: kernel modules fail on arm after r276047 Product: Base System Version: 11.0-CURRENT Hardware: arm OS: Any Status: New Severity: Affects Many People Priority: --- Component: arm Assignee: freebsd-arm@FreeBSD.org Reporter: ian@FreeBSD.org r276047 added -march=armv7 to the default arm compile options. Among other things, this allows the compiler to generate movw/movt sequences to load a constant into a register. Using those instructions results in relocation types R_ARM_MOVW_ABS_NC and R_ARM_MOVT_ABS being emitted, and when those types appear in a .ko module they are not being handled correctly by ld. The lower 16 bits of the relocated value are correct, but the upper 16 bits (used in the movt instruction) are always zero. This leads to a variety of wild-pointer crashes in the loaded module. This problem may affect shared libraries in userland too, but we don't currently add the -march=armv7 flag there, it's used only for kernel and module builds now. -- You are receiving this mail because: You are the assignee for the bug.