From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 55F91C433EF for ; Mon, 21 Feb 2022 21:53:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1645480427; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=6Fik74kL+6fVUKapEm743J9MG4NoEbL9zdfba96Frdo=; b=ZWzJEMWIg03fC7XNEf4PQZ75E1xeUNKrmNdVPg3vpdyRXGykdotEhwF0IMqIHd/WmBGFvu UcZ0bzGHugTUXNx8EXSKhAgyGTybAKTeYK7Ux/D+T4lGjCxsNf3pnuN/4yNouAKsh6jDz8 rOMhgijndjULXxhxivdYD5wfByjHrYY= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-199-gJD7l7LZPxeaFaoi7g9gsA-1; Mon, 21 Feb 2022 16:53:43 -0500 X-MC-Unique: gJD7l7LZPxeaFaoi7g9gsA-1 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id B4D5E801ADB; Mon, 21 Feb 2022 21:53:38 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 2B35745314; Mon, 21 Feb 2022 21:53:38 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 74C3D1809CAA; Mon, 21 Feb 2022 21:53:35 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 21LLoloq026341 for ; Mon, 21 Feb 2022 16:50:47 -0500 Received: by smtp.corp.redhat.com (Postfix) id 9480F1037F51; Mon, 21 Feb 2022 21:50:47 +0000 (UTC) Received: from x2.localnet (unknown [10.22.9.185]) by smtp.corp.redhat.com (Postfix) with ESMTP id 5CEE01037F41 for ; Mon, 21 Feb 2022 21:50:23 +0000 (UTC) From: Steve Grubb To: linux-audit@redhat.com Subject: audit user space build problems Date: Mon, 21 Feb 2022 16:50:22 -0500 Message-ID: <2126549.NgBsaNRSFp@x2> Organization: Red Hat MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-loop: linux-audit@redhat.com X-BeenThere: linux-audit@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Linux Audit Discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: linux-audit-bounces@redhat.com Errors-To: linux-audit-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=linux-audit-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Hello, Recently, distributions moved to building against gcc-12 for their latest OS composes. It's been found in at least 2 distributions that the user space package is failing to build. It's natural to think this is related to gcc-12 since it's the obvious change. However, the problem is a combination of 2 things: 1) SWIG is making buggy code 2) The kernel changed to using flexible array members The issue specifically is with struct audit_rules_data. At the bottom, it was using buf[0]; But on 5.17, it uses buf[]; It turns out that gcc-12 is just a coincidence and anything using gcc-12 also has the newest kernel. The options are: 1) Report this as a SWIG bug and wait 2) Rewrite the libaudit python bindings to not use SWIG 3) Ask for buf[0]; to be reinstated in the kernel. Of these, I think option 2 is the only viable long term option. It will take some time to write new python bindings that preserve the SWIG api. A short term fix might be for distros to copy the kernel header into the lib directory and patch it to restore buf[0];, then change libaudit.c to include "audit.h" instead of . There may be other approaches. Just wanted to let everyone know that new builds in distributions are running into a problem. And a real fix will take a while. Best, -Steve -- Linux-audit mailing list Linux-audit@redhat.com https://listman.redhat.com/mailman/listinfo/linux-audit