From owner-freebsd-bugs@FreeBSD.ORG Tue Feb 25 21:40:00 2014 Return-Path: Delivered-To: freebsd-bugs@smarthost.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id AB074310 for ; Tue, 25 Feb 2014 21:40:00 +0000 (UTC) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 84B221D00 for ; Tue, 25 Feb 2014 21:40:00 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.7/8.14.7) with ESMTP id s1PLe0jA017540 for ; Tue, 25 Feb 2014 21:40:00 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.8/8.14.8/Submit) id s1PLe0lk017539; Tue, 25 Feb 2014 21:40:00 GMT (envelope-from gnats) Resent-Date: Tue, 25 Feb 2014 21:40:00 GMT Resent-Message-Id: <201402252140.s1PLe0lk017539@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Michael Pounov Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2A0AAEAB for ; Tue, 25 Feb 2014 21:32:17 +0000 (UTC) Received: from newred.freebsd.org (cgiserv.freebsd.org [IPv6:2001:1900:2254:206a::50:4]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 01E171C89 for ; Tue, 25 Feb 2014 21:32:16 +0000 (UTC) Received: from cgiserv.freebsd.org ([127.0.1.6]) by newred.freebsd.org (8.14.7/8.14.7) with ESMTP id s1PLWGJo047882 for ; Tue, 25 Feb 2014 21:32:16 GMT (envelope-from nobody@cgiserv.freebsd.org) Received: (from nobody@localhost) by cgiserv.freebsd.org (8.14.7/8.14.7/Submit) id s1PLWGJv047866; Tue, 25 Feb 2014 21:32:16 GMT (envelope-from nobody) Message-Id: <201402252132.s1PLWGJv047866@cgiserv.freebsd.org> Date: Tue, 25 Feb 2014 21:32:16 GMT From: Michael Pounov To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.1 Subject: kern/187074: Crash cross compilation for MIPS X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 25 Feb 2014 21:40:00 -0000 >Number: 187074 >Category: kern >Synopsis: Crash cross compilation for MIPS >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Tue Feb 25 21:40:00 UTC 2014 >Closed-Date: >Last-Modified: >Originator: Michael Pounov >Release: FreeBSD 11 current >Organization: ELWIX >Environment: FreeBSD elwix.aitnet.org 11.0-CURRENT FreeBSD 11.0-CURRENT #4: Tue Feb 25 21:16:09 EET 2014 root@elwix.aitnet.org:/usr/obj/usr/src/sys/GENERIC i386 >Description: Cross compilation of kernel for MIPS architecture failed with this lines:: /home/fbsd_work.src/src/sys/netpfil/pf/pf_ioctl.c: In function 'pfioctl': /home/fbsd_work.src/src/sys/netpfil/pf/pf_ioctl.c:1357: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast] /home/fbsd_work.src/src/sys/netpfil/pf/pf_ioctl.c:1359: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast] /home/fbsd_work.src/src/sys/netpfil/pf/pf_ioctl.c:1361: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast] >How-To-Repeat: Try to cross compilation of kernel for MIPS >Fix: Index: sys/netpfil/pf/pf_ioctl.c =================================================================== --- sys/netpfil/pf/pf_ioctl.c (revision 262482) +++ sys/netpfil/pf/pf_ioctl.c (working copy) @@ -1353,12 +1353,12 @@ * XXXGL: this is what happens when internal kernel * structures are used as ioctl API structures. */ - pr->rule.states_cur = - (counter_u64_t )counter_u64_fetch(rule->states_cur); - pr->rule.states_tot = - (counter_u64_t )counter_u64_fetch(rule->states_tot); - pr->rule.src_nodes = - (counter_u64_t )counter_u64_fetch(rule->src_nodes); + pr->rule.states_cur = (counter_u64_t) (uintptr_t) + counter_u64_fetch(rule->states_cur); + pr->rule.states_tot = (counter_u64_t) (uintptr_t) + counter_u64_fetch(rule->states_tot); + pr->rule.src_nodes = (counter_u64_t) (uintptr_t) + counter_u64_fetch(rule->src_nodes); if (pf_anchor_copyout(ruleset, rule, pr)) { PF_RULES_WUNLOCK(); error = EBUSY; Patch attached with submission follows: Index: sys/netpfil/pf/pf_ioctl.c =================================================================== --- sys/netpfil/pf/pf_ioctl.c (revision 262482) +++ sys/netpfil/pf/pf_ioctl.c (working copy) @@ -1353,12 +1353,12 @@ * XXXGL: this is what happens when internal kernel * structures are used as ioctl API structures. */ - pr->rule.states_cur = - (counter_u64_t )counter_u64_fetch(rule->states_cur); - pr->rule.states_tot = - (counter_u64_t )counter_u64_fetch(rule->states_tot); - pr->rule.src_nodes = - (counter_u64_t )counter_u64_fetch(rule->src_nodes); + pr->rule.states_cur = (counter_u64_t) (uintptr_t) + counter_u64_fetch(rule->states_cur); + pr->rule.states_tot = (counter_u64_t) (uintptr_t) + counter_u64_fetch(rule->states_tot); + pr->rule.src_nodes = (counter_u64_t) (uintptr_t) + counter_u64_fetch(rule->src_nodes); if (pf_anchor_copyout(ruleset, rule, pr)) { PF_RULES_WUNLOCK(); error = EBUSY; >Release-Note: >Audit-Trail: >Unformatted: