Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp4575286rdb; Tue, 12 Dec 2023 03:42:57 -0800 (PST) X-Google-Smtp-Source: AGHT+IFMt+FmCNN1v142TpOkHjSYAPTTrSBzBmo8ELOUyAW/TXw9uGUp/ef7jtw5V+AV5IRWlaWz X-Received: by 2002:a17:902:e88f:b0:1d0:8876:7078 with SMTP id w15-20020a170902e88f00b001d088767078mr3298308plg.44.1702381377069; Tue, 12 Dec 2023 03:42:57 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702381377; cv=none; d=google.com; s=arc-20160816; b=yMJVWjkWYvxlocS3xDvHPtBX3c00fA5vm0779WhU0xozmlS2N9y4RPl8EiRMw/pkpw SKENvxyjYZB7X7RtWTZVUa29rRE8XtHG8jxJqd2BgzFq0IgNXkn0qGLVLot5ZcBDxYbs SZ6OVbolkD9y8zQz37pqhFa0QdAdQzXNPh4srPYl9nKY47WLoWevR9s4YZx1SY+YIZsc lhGckiaGLxsjf8CvMfcEfOSMfmrHKL0JRWKZOG8LfrdFuJJf0ysLogBIMUD6bxP3QEMs q/FtGs778LWpb0nAdxcS11y+fGsfWgo+Vez7aEkkcYktXugDM3G1hKXJj8Gvitk66IvU SN2A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :content-language:references:cc:to:subject:user-agent:mime-version :date:message-id:dkim-signature:dkim-signature:dkim-signature :dkim-signature; bh=r8rQdTbhdfN1Wpyhb5CblYIrwW052Y/FkuDWvW+nn5c=; fh=CExjVUaK55C3nA7ZEh+wz8l2NJon2WwLoXSLRnktXc0=; b=EdvLqN+axmlFwThWgSDR0GcYGSW/x+TwHrP4Zma8NOQsJlK50CpBBXTJkUrqozIs9p 47w6VKM4GfJcIfYP6NBdkOPgOtJp8oiWyl+tav3C8XqSJbrK8SrqNHdZvhEF1lw4ocAI yFlRbhfcMjYGcr691wboMpXS/vuTEb2nwHyW/6s+QwL6rtNq5FIUMIzm2AnopMrUBt68 yzXpB+cJ5b62gLMwPaHqQYg/sq4RknYnUuJLUCs47ta9OYKgRe216FAkOybuz9EUTDW3 hc9lgq0F/n275m3f4J7O8cW3lEDc0RFekoIFjnM/aIrKNgmpfrUVStFQYuySCRMhQDNR xleQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.cz header.s=susede2_rsa header.b=F0XdSCEx; dkim=neutral (no key) header.i=@suse.cz; dkim=pass header.i=@suse.cz header.s=susede2_rsa header.b=F0XdSCEx; dkim=neutral (no key) header.i=@suse.cz header.s=susede2_ed25519; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from lipwig.vger.email (lipwig.vger.email. [2620:137:e000::3:3]) by mx.google.com with ESMTPS id m2-20020a170902bb8200b001cfd360a185si7484747pls.100.2023.12.12.03.42.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Dec 2023 03:42:57 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) client-ip=2620:137:e000::3:3; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.cz header.s=susede2_rsa header.b=F0XdSCEx; dkim=neutral (no key) header.i=@suse.cz; dkim=pass header.i=@suse.cz header.s=susede2_rsa header.b=F0XdSCEx; dkim=neutral (no key) header.i=@suse.cz header.s=susede2_ed25519; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id 1534A8051A34; Tue, 12 Dec 2023 03:42:54 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232072AbjLLLmi (ORCPT + 99 others); Tue, 12 Dec 2023 06:42:38 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53604 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231372AbjLLLmg (ORCPT ); Tue, 12 Dec 2023 06:42:36 -0500 Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.223.131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 019DCC3 for ; Tue, 12 Dec 2023 03:42:42 -0800 (PST) Received: from imap1.dmz-prg2.suse.org (imap1.dmz-prg2.suse.org [IPv6:2a07:de40:b281:104:10:150:64:97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id 6E5891F381; Tue, 12 Dec 2023 11:42:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1702381361; 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=r8rQdTbhdfN1Wpyhb5CblYIrwW052Y/FkuDWvW+nn5c=; b=F0XdSCExJqByYR9ejmbJJF1d5HVGZ1xnmjJRpPrWTgU8roT16ijdNACw6mKGPOQTrD0UsM aAddTYbU48cA2rx+4yNuSGoYZRtkoFeKr+ZZRMazOQ5I39WXUjnbZazdb3aD7uZ7IF2V6e q1T/ohUabLi00N5EB+/5QeXOcIHBPD4= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1702381361; 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=r8rQdTbhdfN1Wpyhb5CblYIrwW052Y/FkuDWvW+nn5c=; b=gX/Xrx7WOsX36NX6N9ByCFiML4/HWpf1XmY01VyWuZM0uoHhjmhf7dEpYTl/rNKLzXMtym UjAtS0o7BMRlpAAw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1702381361; 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=r8rQdTbhdfN1Wpyhb5CblYIrwW052Y/FkuDWvW+nn5c=; b=F0XdSCExJqByYR9ejmbJJF1d5HVGZ1xnmjJRpPrWTgU8roT16ijdNACw6mKGPOQTrD0UsM aAddTYbU48cA2rx+4yNuSGoYZRtkoFeKr+ZZRMazOQ5I39WXUjnbZazdb3aD7uZ7IF2V6e q1T/ohUabLi00N5EB+/5QeXOcIHBPD4= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1702381361; 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=r8rQdTbhdfN1Wpyhb5CblYIrwW052Y/FkuDWvW+nn5c=; b=gX/Xrx7WOsX36NX6N9ByCFiML4/HWpf1XmY01VyWuZM0uoHhjmhf7dEpYTl/rNKLzXMtym UjAtS0o7BMRlpAAw== Received: from imap1.dmz-prg2.suse.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id 4D17E13725; Tue, 12 Dec 2023 11:42:41 +0000 (UTC) Received: from dovecot-director2.suse.de ([2a07:de40:b281:106:10:150:64:167]) by imap1.dmz-prg2.suse.org with ESMTPSA id hcdiEjFHeGXqPAAAD6G6ig (envelope-from ); Tue, 12 Dec 2023 11:42:41 +0000 Message-ID: Date: Tue, 12 Dec 2023 12:42:40 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.15.1 Subject: Re: [PATCH 4/4] mm/slub: free KFENCE objects in slab_free_hook() To: Andrey Konovalov , Marco Elver Cc: Chengming Zhou , Christoph Lameter , Pekka Enberg , David Rientjes , Joonsoo Kim , Andrew Morton , Roman Gushchin , Hyeonggon Yoo <42.hyeyoo@gmail.com>, Alexander Potapenko , Dmitry Vyukov , linux-mm@kvack.org, linux-kernel@vger.kernel.org, kasan-dev@googlegroups.com References: <20231204-slub-cleanup-hooks-v1-0-88b65f7cd9d5@suse.cz> <20231204-slub-cleanup-hooks-v1-4-88b65f7cd9d5@suse.cz> <44421a37-4343-46d0-9e5c-17c2cd038cf2@linux.dev> <79e29576-12a2-a423-92f3-d8a7bcd2f0ce@suse.cz> Content-Language: en-US From: Vlastimil Babka In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Score: 1.39 X-Spamd-Bar: +++++ Authentication-Results: smtp-out2.suse.de; dkim=pass header.d=suse.cz header.s=susede2_rsa header.b=F0XdSCEx; dkim=pass header.d=suse.cz header.s=susede2_ed25519 header.b="gX/Xrx7W"; dmarc=none; spf=softfail (smtp-out2.suse.de: 2a07:de40:b281:104:10:150:64:97 is neither permitted nor denied by domain of vbabka@suse.cz) smtp.mailfrom=vbabka@suse.cz X-Rspamd-Server: rspamd2 X-Spamd-Result: default: False [5.79 / 50.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; SPAMHAUS_XBL(0.00)[2a07:de40:b281:104:10:150:64:97:from]; TO_DN_SOME(0.00)[]; R_SPF_SOFTFAIL(4.60)[~all]; R_RATELIMIT(0.00)[to_ip_from(RLhc4kaujr6ihojcnjq7c1jwbi)]; RCVD_COUNT_THREE(0.00)[3]; DKIM_TRACE(0.00)[suse.cz:+]; MX_GOOD(-0.01)[]; NEURAL_HAM_SHORT(-0.20)[-1.000]; FREEMAIL_TO(0.00)[gmail.com,google.com]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; MID_RHS_MATCH_FROM(0.00)[]; BAYES_HAM(-0.00)[16.11%]; ARC_NA(0.00)[]; R_DKIM_ALLOW(-0.20)[suse.cz:s=susede2_rsa,suse.cz:s=susede2_ed25519]; FROM_HAS_DN(0.00)[]; FREEMAIL_ENVRCPT(0.00)[gmail.com]; TO_MATCH_ENVRCPT_ALL(0.00)[]; TAGGED_RCPT(0.00)[]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(1.20)[suse.cz]; NEURAL_HAM_LONG(-1.00)[-1.000]; DKIM_SIGNED(0.00)[suse.cz:s=susede2_rsa,suse.cz:s=susede2_ed25519]; RCPT_COUNT_TWELVE(0.00)[15]; FUZZY_BLOCKED(0.00)[rspamd.com]; FREEMAIL_CC(0.00)[linux.dev,linux.com,kernel.org,google.com,lge.com,linux-foundation.org,gmail.com,kvack.org,vger.kernel.org,googlegroups.com]; RCVD_TLS_ALL(0.00)[]; SUSPICIOUS_RECIPS(1.50)[]; RBL_SPAMHAUS_BLOCKED_OPENRESOLVER(0.00)[2a07:de40:b281:104:10:150:64:97:from] X-Spam-Score: 5.79 X-Rspamd-Queue-Id: 6E5891F381 X-Spam-Status: No, score=-3.4 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lipwig.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (lipwig.vger.email [0.0.0.0]); Tue, 12 Dec 2023 03:42:54 -0800 (PST) On 12/11/23 23:11, Andrey Konovalov wrote: > On Wed, Dec 6, 2023 at 3:45 PM Marco Elver wrote: >> >> The is_kfence_address() implementation tolerates tagged addresses, >> i.e. if it receives a tagged non-kfence address, it will never return >> true. So just to be sure, it can't happen that a genuine kfence address would then become KASAN tagged and handed out, and thus when tested by is_kfence_address() it would be a false negative? >> The KASAN_HW_TAGS patches and KFENCE patches were in development >> concurrently, and at the time there was some conflict resolution that >> happened when both were merged. The >> is_kfence_address(kasan_reset_tag(..)) initially came from [1] but was >> squashed into 2b8305260fb. >> >> [1] https://lore.kernel.org/all/9dc196006921b191d25d10f6e611316db7da2efc.1611946152.git.andreyknvl@google.com/ >> >> Andrey, do you recall what issue you encountered that needed kasan_reset_tag()? > > I don't remember at this point, but this could have been just a safety measure. > > If is_kfence_address tolerates tagged addresses, we should be able to > drop these kasan_reset_tag calls. Will drop it once the above is confirmed. Thanks!