Received: by 2002:a05:6a10:6d10:0:0:0:0 with SMTP id gq16csp1440688pxb; Thu, 14 Apr 2022 06:21:21 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwnSBnyyTvHDAPp5qEOVQSGeWo/QIFtrRyooBpBq1Rv257u6GNa8lswdrcw3yiA270plnnp X-Received: by 2002:a17:902:ce87:b0:156:5c6e:b6e4 with SMTP id f7-20020a170902ce8700b001565c6eb6e4mr46934207plg.12.1649942481106; Thu, 14 Apr 2022 06:21:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649942481; cv=none; d=google.com; s=arc-20160816; b=iyKEslmBQ9pmj8KfdmKcwcQiyWHcaxqhNj9hicaO6GBlMyPRQnBp7G2TDsqXqVT/HV axT0ONzwdA7cuC5ieAzomhbo/5RVCi3m93uye8AQdxrS72nNhKWIdvh5M4RiCW2XnDYE 4LJ3YQlJ8WLAeKPUFt5/d6jvW8VhHlouIjSOUfhuJV8tCfnjKoI6fXPypeXI5bHjc1Ui UB+KM72ibGn3Yi3cov6ijhPRxA0Aegx3pN37FwcUh2t2mCj96e2pfyCdW1YHm7Lohj6E 9RYegsx4HttIauo3hDj5Bjbpl8WC95Zyl0Zt7HAU3qT2RW97mrBpnb0TDFgeL84z3/0/ JS1g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent:references:message-id :in-reply-to:subject:cc:to:from:date; bh=/+7gqNvJ3e87zkfd2632h/pIhgT+/EY2YIl94rywz/U=; b=MJQo9KH8UuWv/Ai060mcBrxG8r3DX9zK2fPo7ZCFNhyrFfyMU7LqHRifwO7p/ACCnn Mkem9UvycYh6UfMhSJWc734fg+ESPnr+IwwJFzYDL1KfSD8fZIATryhlhQwaKOum8ZGD UfvsORTRwoFYkT0Q9XsaLxsU2GmMnuPXyj+5HOscc0fnypyUhrFCGT/dBC8yoLcCSZ6T 4alADwDrA4RTrDp+kLcbeitfjYIOuB3RuMLBtlZ6h45e1IpyfMfHSpsa/f6RfViq5zNo KsasoJ8y+s+A2HdeQ0yeVcK4bAZW+NUCbmXHx0da6ZlI2Qg2OV474DuYlkigaQEm9b4C gh1g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id w16-20020a170902d71000b0015866d0a301si2486106ply.399.2022.04.14.06.21.06; Thu, 14 Apr 2022 06:21:20 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233716AbiDNKAa (ORCPT + 99 others); Thu, 14 Apr 2022 06:00:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54560 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229599AbiDNKA3 (ORCPT ); Thu, 14 Apr 2022 06:00:29 -0400 X-Greylist: delayed 154583 seconds by postgrey-1.37 at lindbergh.monkeyblade.net; Thu, 14 Apr 2022 02:58:04 PDT Received: from gentwo.de (gentwo.de [161.97.139.209]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 570C96E540 for ; Thu, 14 Apr 2022 02:58:04 -0700 (PDT) Received: by gentwo.de (Postfix, from userid 1001) id 592E6B002FC; Thu, 14 Apr 2022 11:58:01 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by gentwo.de (Postfix) with ESMTP id 57F2BB00268; Thu, 14 Apr 2022 11:58:01 +0200 (CEST) Date: Thu, 14 Apr 2022 11:58:01 +0200 (CEST) From: Christoph Lameter To: Hyeonggon Yoo <42.hyeyoo@gmail.com> cc: Vlastimil Babka , Marco Elver , Matthew WilCox , Pekka Enberg , David Rientjes , Joonsoo Kim , Andrew Morton , Roman Gushchin , linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2 23/23] mm/sl[au]b: check if large object is valid in __ksize() In-Reply-To: <20220414085727.643099-24-42.hyeyoo@gmail.com> Message-ID: References: <20220414085727.643099-1-42.hyeyoo@gmail.com> <20220414085727.643099-24-42.hyeyoo@gmail.com> User-Agent: Alpine 2.22 (DEB 394 2020-01-19) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_PASS, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 14 Apr 2022, Hyeonggon Yoo wrote: > If address of large object is not beginning of folio or size of > the folio is too small, it must be invalid. Return zero in such cases. This looks like a slab usage error on the part of the caller that would benefit from a kernel log entry. A warning or an error?