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 kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4B97CC4332F for ; Tue, 13 Dec 2022 15:21:09 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 7C4488E0003; Tue, 13 Dec 2022 10:21:08 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 772838E0002; Tue, 13 Dec 2022 10:21:08 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 63A348E0003; Tue, 13 Dec 2022 10:21:08 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0016.hostedemail.com [216.40.44.16]) by kanga.kvack.org (Postfix) with ESMTP id 54DF08E0002 for ; Tue, 13 Dec 2022 10:21:08 -0500 (EST) Received: from smtpin14.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay10.hostedemail.com (Postfix) with ESMTP id 10A6DC0D51 for ; Tue, 13 Dec 2022 15:21:08 +0000 (UTC) X-FDA: 80237646216.14.C81AE61 Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) by imf24.hostedemail.com (Postfix) with ESMTP id 83A26180029 for ; Tue, 13 Dec 2022 15:21:04 +0000 (UTC) Authentication-Results: imf24.hostedemail.com; dkim=pass header.d=suse.cz header.s=susede2_rsa header.b=nx8nCOKH; dkim=pass header.d=suse.cz header.s=susede2_ed25519 header.b=dkWRA5cJ; spf=pass (imf24.hostedemail.com: domain of vbabka@suse.cz designates 195.135.220.29 as permitted sender) smtp.mailfrom=vbabka@suse.cz; dmarc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1670944864; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=YiZIoKh/H3JB8O+68Jo0nbSuac+QbMa/5AjW72iFLcQ=; b=pQ33J25bVikjZmVU502b4sj2JXxVw4CCQhTqT3fIaDD5FPD0cWTdnmn/4jXIdiqY9VOVCO qhkzfhRC542jDpw/xUvoeolfz+zQbZg9TgGuJBpg/H9Ufo4ZYhzyR/Fm2phFbN48P07v81 /z0cQEh4xv2aQ2uOYTLrKMu+C+VYDPY= ARC-Authentication-Results: i=1; imf24.hostedemail.com; dkim=pass header.d=suse.cz header.s=susede2_rsa header.b=nx8nCOKH; dkim=pass header.d=suse.cz header.s=susede2_ed25519 header.b=dkWRA5cJ; spf=pass (imf24.hostedemail.com: domain of vbabka@suse.cz designates 195.135.220.29 as permitted sender) smtp.mailfrom=vbabka@suse.cz; dmarc=none ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1670944864; a=rsa-sha256; cv=none; b=2IjcHsd6oupHiaBy9uazvCUZ/+S474xmMTmZXJGtZw6i4211CR9+61iW3TdyWPrnT0q3Go X0huBoZt8RyJWa23SxKNBrrpoMWc9WoXEjqQSDKLS/IgpxN7Y40xlPk7KCECJfkuXqJ7Gv p6+4Ap2uihrepb0lR9hSxF77XFajWM0= Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id DB4461F8B6; Tue, 13 Dec 2022 15:21:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1670944862; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=YiZIoKh/H3JB8O+68Jo0nbSuac+QbMa/5AjW72iFLcQ=; b=nx8nCOKHYinmvJBznXJr0NA9gdC5KMVz9qPLNdQE6sVahekKBMny6UcB+kY0kVu3rdBuh9 +xpPCU/ABaSFcaa3T1Dx6v5V1IAUUoCRb5RAG0lusSMOTSxqAil4SfD+tdqY7zSvovMm4A exey6C+8+FLWNlD3UbfK0eFMnyjDASo= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1670944862; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=YiZIoKh/H3JB8O+68Jo0nbSuac+QbMa/5AjW72iFLcQ=; b=dkWRA5cJTlAyO8220c3/QpJ+x2bQ553egsrAzIwu7czAfDF4JJXITzdORx1NC2l3YEbZ3R 7GUJLCEvf6Ar/ADA== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id A849D138EE; Tue, 13 Dec 2022 15:21:02 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id c/e2J16YmGMsEgAAMHmgww (envelope-from ); Tue, 13 Dec 2022 15:21:02 +0000 Message-ID: <97c5df42-c6ea-8af5-a727-f1fd77484a59@suse.cz> Date: Tue, 13 Dec 2022 16:21:02 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.5.1 Subject: Re: mainline build failure due to e240e53ae0ab ("mm, slub: add CONFIG_SLUB_TINY") Content-Language: en-US To: Guenter Roeck , "Sudip Mukherjee (Codethink)" Cc: Andrey Ryabinin , Alexander Potapenko , Andrey Konovalov , Dmitry Vyukov , Vincenzo Frascino , Andrew Morton , kasan-dev@googlegroups.com, linux-kernel@vger.kernel.org, linux-mm@kvack.org, Linus Torvalds , Marco Elver References: <20221213131140.GA3622636@roeck-us.net> <48cd0d18-a13c-bf20-e064-2041f63b05bf@suse.cz> From: Vlastimil Babka In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Rspamd-Server: rspam07 X-Rspamd-Queue-Id: 83A26180029 X-Rspam-User: X-Stat-Signature: ezg5ufpuudjfcs9bx4oxmya3drtq9j3a X-HE-Tag: 1670944864-401213 X-HE-Meta: U2FsdGVkX1/kpE3tbOxei/7BIPvDa6WbEg7gLBf2BQa5Fv+aFK0xpQkNQxV7yEyz4IHzErZIh3hDSUligZ7DgYNBPLkrMFNrwsPbQbIVW9sjiEk6iBxuI8qWRHwwi563L/v9AIzVItsDswB9/3dKLivr6lXoO3Z5QMh83Hr1pqrZcAQiEVBcywMq6wFfsNfqkbI7VpQ7B/bg+Zz8nSbkHD4L9dGsQbzu0MuGynr540lokFNJv+umzj81vK60QP76M/PBwXSH+Gi1B6ghLRT1hZvMiUe/V9AYZdc4cVMdTUs/Zgu13xeqeULJhsRSRCmj7h5N5anAl6uxc5T54Cixni0B6/BYBmmLOa2CL1cVpq7mksGFTN6QGGFRLPc+Pq56ZJdEVb88PHGNKPdyPVRCtsqmAZTKVzpYEv1yPKywrDh1VJQ5qlj+6M3pGjlauqQZi07bg5baRisb4MzGfrWzsGf3Ka9xsI/uYy4xZG6V22YgrTiLCEiqo5Xjz57lJ54OaxdJPteqiO+asNdG+Pa9nGn1mmLi6yDvB6JKcOEbfELSnGfYBucKwmNtVPIoRamBe/0/kW+v00FlM9alI9Gxy8D7P/1Cr2R/o+N7ZxdLRVyGx8UpXG50p8a+DmBb5FZ3H+TmIAf43VX0EmbSHO6wCggiLot8S9rm9Gpq4Po+s6LDlKWtVo++Oo6BeZ7L8BxoF+NmIeLkTIbZoX2qudYNdNeTIgUhx7O6Dso7ootw1MKxxZwlv7vvCzg81tip/Lc7pGaRJo1wuezqSQKegxWC1l2bOBN+VLc4zHHei8+s7mGb6nc2UgHBb4haOxHWNb4tJ5oczZJrtj28Zg+I1A3AZe+nJgTw0YLJvpngP9KA4faIt20Tddjb6cwX3/lMsfOC0K+0M9UMU5rK0g8c4sN7UOEIU/iu5iKTiDlTRbdvF1OC/7N3xWlyDRfBI/xsP41WUiW0UOEZh5gpanAoqGT KRxEAvOi PaPtAiLXAkdAos0v+qa/QNMqQSUCAdNP416n+lpWCy3rsVOZmFxA0j+BjvA== X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On 12/13/22 15:11, Guenter Roeck wrote: > On 12/13/22 05:27, Vlastimil Babka wrote: >> On 12/13/22 14:11, Guenter Roeck wrote: >>> On Tue, Dec 13, 2022 at 10:26:20AM +0000, Sudip Mukherjee (Codethink) wrote: >>>> Hi All, >>>> >>>> The latest mainline kernel branch fails to build xtensa allmodconfig >>>> with gcc-11 with the error: >>>> >>>> kernel/kcsan/kcsan_test.c: In function '__report_matches': >>>> kernel/kcsan/kcsan_test.c:257:1: error: the frame size of 1680 bytes is larger than 1536 bytes [-Werror=frame-larger-than=] >>>> 257 | } >>>> | ^ >>>> >>>> git bisect pointed to e240e53ae0ab ("mm, slub: add CONFIG_SLUB_TINY") >>>> >>> >>> In part that is because above commit changes Kconfig dependencies such >>> that xtensa:allmodconfig actually tries to build kernel/kcsan/kcsan_test.o. >>> In v6.1, CONFIG_KCSAN_KUNIT_TEST is not enabled for xtensa:allmodconfig. >> >> OK, so IIUC >> - e240e53ae0ab introduces SLUB_TINY and adds !SLUB_TINY to KASAN's depend >> - allyesconfig/allmodconfig will enable SLUB_TINY >> - thus KASAN is disabled where it was previously enabled >> - thus KCSAN which depends on !KASAN is enabled where it was previously disabled >> - also arch/xtensa/Kconfig: select ARCH_HAS_STRNCPY_FROM_USER if !KASAN >> >>> Downside of the way SLUB_TINY is defined is that it is enabled for all >>> allmodconfig / allyesconfig builds, which then disables building a lot >>> of the more sophisticated memory allocation options. >> >> It does disable KASAN, but seems that on the other hand allows enabling >> other stuff. >> Is there a way to exclude the SLUB_TINY option from all(mod/yes)config? Or >> it needs to be removed to SLUB_FULL and logically reversed? >> > > "depends on !COMPILE_TEST" should do it. Not sure though if that would just > hide the other compile failures seen with powerpc and arm allmodconfig > builds. Hmm yeah it seems rather arbitrary and not fixing the root cause(s). If some options are broken and it becomes apparent due to a change affecting allmodconfig in a way that enables them, then I'd assume the same could have already happened with randconfig? So it's best to fix that, or at least disable those failing options on the respective arches deterministically. Also worth noting why I resorted to making KASAN depend on !SLUB_TINY: https://lore.kernel.org/all/14bd73b0-5480-2b35-7b89-161075d9f444@suse.cz/ It's because KASAN_GENERIC and KASAN_SW_TAGS will "select SLUB_DEBUG if SLUB" and apparently Kconfig doesn't consider it an error, but just a warning, if that conficts with SLUB_DEBUG depending on !SLUB_TINY. I just realized that KASAN_HW_TAGS doesn't have this 'select' so it could be compatible with SLUB_TINY but I disabled that combination as well. I suppose something like "select SLUB_TINY=n" doesn't exist, as that would make the KASAN choice "stronger" than SLUB_TINY. It would probably be the cleanest if the KASAN modes that need SLUB_DEBUG just depended on it instead of selecting it. > Guenter >