From nobody Tue Apr 19 12:47:35 2022 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id F25FB11D1217; Tue, 19 Apr 2022 12:47:39 +0000 (UTC) (envelope-from mjguzik@gmail.com) Received: from mail-lj1-x22f.google.com (mail-lj1-x22f.google.com [IPv6:2a00:1450:4864:20::22f]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4KjNqt5S1dz4TXc; Tue, 19 Apr 2022 12:47:38 +0000 (UTC) (envelope-from mjguzik@gmail.com) Received: by mail-lj1-x22f.google.com with SMTP id h11so20364741ljb.2; Tue, 19 Apr 2022 05:47:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=nwZC7Os3D9RLKfGObkPc0NJAcQTyCUX3ByUPjhC0w7w=; b=IFugra3pkd7P4bW35pEsOiItVRcEBlSFRZTANm1KzSqQjCfY5JuQeTAfKmkHhEoTEP YzwX++kEPJmRDsJfZIZ82GMadRQstrsZ5VM5OsRUYxc+DPzc6C0LKmlNcDZYlorvUZkN 0zn26SaLh52XlKJ2EJTK8Dq6l+MJrHRwgMrbnYQp4sU/rqp7rgBQ2wfRJCe13o/8AtEq IEMyzuVKmZIjN3786AuWJCUMZ0ej5UdRc8iplVWkNi7xBIrMK1YmltioYRZNdGRfXGRp H2W5fufIWb9bBucr5Bd4E+ysVneYHOh00WJ0upNG3sOSAofaS5DFysp8ZzUkJXcS9E5h UdCw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=nwZC7Os3D9RLKfGObkPc0NJAcQTyCUX3ByUPjhC0w7w=; b=TMvSNc0+7FBD2pkkp1RkaMXwHannRXAjHZ5QV2wi4iMz43tHJo2FAIyfWxTNe9TLVe Y4HKSzd5GBOLk2cFESeX2e/TAjjmTxd8g5rUVVur93k3fZt1e3pBTf0HdI64UE6nGBog dMkZSYeBq0om8qFhjG1K4wTL59lDFccbRzm9q3i2Rm3hfuuDfdt7+gAJmi0NQKS7mptu z0bma9C2MxPkIDJ1VsYzHUHkvKChmfkCh3njYbqRd13LIsEsYPB3dOq+zHcQwXxRAb8W rw4apML8G7/JsYnMmzVb+WJIkCpLqcDYBbvEZ/4EKv7YoJbUOJzcukIYmDd7OK74pg7h gUvQ== X-Gm-Message-State: AOAM530tmXVzqhbKfuV+Zpnjshh8KzL+TUQePIJo9NijJ1yDM7Zfz/0D oSG4f3VqN5+WLpxgSTahlLUTW9Z1EH7s+rCYwMfXQtiS X-Google-Smtp-Source: ABdhPJy1eezCu2AqKpw8baojILcEeAcvOeLa6VnkbfDHEpwQ15m/ndKzjIiAdDjxhG6c/RT3eKUZakufru+mrSPhFQA= X-Received: by 2002:a05:651c:1508:b0:24b:1fd1:37e9 with SMTP id e8-20020a05651c150800b0024b1fd137e9mr10029409ljf.233.1650372456605; Tue, 19 Apr 2022 05:47:36 -0700 (PDT) List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Received: by 2002:a05:6520:6145:b0:1bb:7433:4cdd with HTTP; Tue, 19 Apr 2022 05:47:35 -0700 (PDT) In-Reply-To: References: <202204182311.23INBqfC025671@gitrepo.freebsd.org> <960b9be3-c3b5-bd48-8038-97511f2f7909@FreeBSD.org> From: Mateusz Guzik Date: Tue, 19 Apr 2022 14:47:35 +0200 Message-ID: Subject: Re: git: 8b83d7e0ee54 - main - Make -Wunused-but-set-variable a fatal error for clang 13+ for kernel builds. To: Stefan Esser Cc: John Baldwin , src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: 4KjNqt5S1dz4TXc X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20210112 header.b=IFugra3p; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (mx1.freebsd.org: domain of mjguzik@gmail.com designates 2a00:1450:4864:20::22f as permitted sender) smtp.mailfrom=mjguzik@gmail.com X-Spamd-Result: default: False [-2.29 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-0.996]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20210112]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+ip6:2a00:1450:4000::/36:c]; FREEMAIL_FROM(0.00)[gmail.com]; MIME_GOOD(-0.10)[text/plain]; TO_MATCH_ENVRCPT_ALL(0.00)[]; NEURAL_HAM_LONG(-0.60)[-0.596]; RCPT_COUNT_FIVE(0.00)[5]; MID_RHS_MATCH_FROMTLD(0.00)[]; NEURAL_SPAM_SHORT(0.30)[0.301]; DKIM_TRACE(0.00)[gmail.com:+]; DMARC_POLICY_ALLOW(-0.50)[gmail.com,none]; RCVD_IN_DNSWL_NONE(0.00)[2a00:1450:4864:20::22f:from]; MLMMJ_DEST(0.00)[dev-commits-src-all,dev-commits-src-main]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:15169, ipnet:2a00:1450::/32, country:US]; RCVD_COUNT_TWO(0.00)[2]; RCVD_TLS_ALL(0.00)[]; DWL_DNSWL_NONE(0.00)[gmail.com:dkim] X-ThisMailContainsUnwantedMimeParts: N As of 19447fc4888379e539dfca7e4c62362d6c279357 the amd64 kernel + modules build without with a config with these options removed: diff --git a/sys/amd64/conf/GENERIC b/sys/amd64/conf/GENERIC index 53c6043a0146..98b4be69dc94 100644 --- a/sys/amd64/conf/GENERIC +++ b/sys/amd64/conf/GENERIC @@ -69,43 +69,14 @@ options COMPAT_FREEBSD11 # Compatible with FreeBSD11 options COMPAT_FREEBSD12 # Compatible with FreeBSD12 options COMPAT_FREEBSD13 # Compatible with FreeBSD13 options SCSI_DELAY=5000 # Delay (in ms) before probing SCSI -options KTRACE # ktrace(1) support -options STACK # stack(9) support options SYSVSHM # SYSV-style shared memory options SYSVMSG # SYSV-style message queues options SYSVSEM # SYSV-style semaphores options _KPOSIX_PRIORITY_SCHEDULING # POSIX P1003_1B real-time extensions options PRINTF_BUFR_SIZE=128 # Prevent printf output being interspersed. options KBD_INSTALL_CDEV # install a CDEV entry in /dev -options HWPMC_HOOKS # Necessary kernel hooks for hwpmc(4) -options AUDIT # Security event auditing -options CAPABILITY_MODE # Capsicum capability mode -options CAPABILITIES # Capsicum capabilities -options MAC # TrustedBSD MAC Framework -options KDTRACE_FRAME # Ensure frames are compiled in -options KDTRACE_HOOKS # Kernel DTrace hooks -options DDB_CTF # Kernel ELF linker loads CTF data options INCLUDE_CONFIG_FILE # Include this file in kernel -options RACCT # Resource accounting framework -options RACCT_DEFAULT_TO_DISABLED # Set kern.racct.enable=0 by default -options RCTL # Resource limits - -# Debugging support. Always need this: -options KDB # Enable kernel debugger support. -options KDB_TRACE # Print a stack trace for a panic. -# For full debugger support use (turn off in stable branch): -options BUF_TRACKING # Track buffer history -options DDB # Support DDB. -options FULL_BUF_TRACKING # Track more buffer history -options GDB # Support remote GDB. -options DEADLKRES # Enable the deadlock resolver -options INVARIANTS # Enable calls of extra sanity checking -options INVARIANT_SUPPORT # Extra sanity checks of internal structures, required by INVARIANTS -options QUEUE_MACRO_DEBUG_TRASH # Trash queue(2) internal pointers on invalidation -options WITNESS # Enable checks to detect deadlocks and cycles -options WITNESS_SKIPSPIN # Don't run witness on spinlocks for speed -options MALLOC_DEBUG_MAXZONES=8 # Separate malloc(9) zones -options VERBOSE_SYSINIT=0 # Support debug.verbose_sysinit, off by default On 4/19/22, Mateusz Guzik wrote: > Looks like this needs a pass on a kernel without AUDIT, MAC, > CAPABILITIES, dtrace and probably some other default stuff which also > happens to be enabled in all kernel built with tinderbox. > > On 4/19/22, Stefan Esser wrote: >> Am 19.04.22 um 01:11 schrieb John Baldwin: >>> The branch main has been updated by jhb: >>> >>> URL: >>> https://cgit.FreeBSD.org/src/commit/?id=8b83d7e0ee54416b0ee58bd85f9c0ae7fb3357a1 >>> >>> commit 8b83d7e0ee54416b0ee58bd85f9c0ae7fb3357a1 >>> Author: John Baldwin >>> AuthorDate: 2022-04-18 23:06:27 +0000 >>> Commit: John Baldwin >>> CommitDate: 2022-04-18 23:06:27 +0000 >>> >>> Make -Wunused-but-set-variable a fatal error for clang 13+ for >>> kernel >>> builds. >>> >>> Reviewed by: imp, emaste >>> Differential Revision: https://reviews.freebsd.org/D34949 >> >> I'm seeing kernel build issues in several drivers (at commit >> f2edc9155721). >> >> The first one could be fixed this way: >> >> diff --git a/sys/dev/cxgbe/tom/t4_cpl_io.c >> b/sys/dev/cxgbe/tom/t4_cpl_io.c >> index 4c8b1fa27579..470f03313b72 100644 >> --- a/sys/dev/cxgbe/tom/t4_cpl_io.c >> +++ b/sys/dev/cxgbe/tom/t4_cpl_io.c >> @@ -2192,7 +2192,7 @@ static void >> t4_aiotx_process_job(struct toepcb *toep, struct socket *so, struct >> kaiocb >> *job) >> { >> struct sockbuf *sb; >> +#ifdef MAC >> struct file *fp; >> +#endif >> struct inpcb *inp; >> struct tcpcb *tp; >> struct mbuf *m; >> @@ -2201,10 +2201,10 @@ t4_aiotx_process_job(struct toepcb *toep, struct >> socket >> *so, struct kaiocb *job) >> >> sb = &so->so_snd; >> SOCKBUF_UNLOCK(sb); >> - fp = job->fd_file; >> m = NULL; >> >> #ifdef MAC >> + fp = job->fd_file; >> error = mac_socket_check_send(fp->f_cred, so); >> if (error != 0) >> goto out; >> >> But then the build failed again at: >> >> /usr/src/sys/fs/ext2fs/ext2_extents.c:452:8: error: variable 'error_msg' >> set >> but not used [-Werror,-Wunused-but-set-variable] >> Building /usr/obj/usr-14/git/src/amd64.amd64/sys/SE/vdev_mirror.o >> >> I have stopped trying to fix this and (any remaining) issues and have >> locally reverted the commit that made this warning fatal ... >> >> Regards, STefan >> > > > -- > Mateusz Guzik > -- Mateusz Guzik