Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp3521341pxb; Mon, 4 Apr 2022 19:45:11 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwf3b6V1dqFdr6n4En5o9T4T/mgIRzprvE6ODLGLv577MuaUhR0Gnlyb5wNUeWh0KD2WuN6 X-Received: by 2002:a63:78c3:0:b0:398:2d6d:c275 with SMTP id t186-20020a6378c3000000b003982d6dc275mr1007111pgc.565.1649126711508; Mon, 04 Apr 2022 19:45:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649126711; cv=none; d=google.com; s=arc-20160816; b=FPp7uI0L5bhyh+lZ0xOKUQyzc7EnjfKASGu2vaubPcJ/b3YmyHoXyttBf3Y57rs2lA 9i8d64DJGAflNd4mStj3smD7Eai2m4wp1npSn5CKq2bh78RzlaJ1kYAsS6n1WIA18Kzj CB4OES53LUMKrX8fMw12qW7iKZF/vfwYvpHrwW3R1o0hsIbdPa65Ag5bAOd/Hm6me+Uw 6BFQDYFvCbIG9GIXHQS5cu3zWIJSVtFwo4ybuc+ma9kqlgrYuZjDxZNEPFATZD7u0+xO am/wY2BliQjLtpvKPrEcN8Wz0wj8WG1YD1RTYPK4KQcwRj+6FAqQYje/uZcTa8QXqLZf JzWw== 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:subject :from:references:cc:to:content-language:user-agent:mime-version:date :message-id:dkim-signature; bh=CgLJGJBzJnPgbiyezytbODN5GX3z41tdhpJwDoaReLw=; b=iBTo7ODcvngHFH6/vx09cL14UqIrBjUpl6Xa9q2DqQGsXLSWcDJyZXNRXVcpPHdjGq dAxvKxNGuiWVxvDlJ/kpGVBLq0daksLV4eJzM9k18BBwPfHGRzL4g2YKrNGO6u5SfPGI xm4YsbAhF87+AtklsPMYlT3gR4xepq8fZRpuVAsSmRipEzp5zL4xrmYkDp6cSuphs6R3 4cH8RF/Ch6fl6AOem07YSjmH4sm68/mH6eaqkufvPQ1v57SOh62OWjOqUHyQC9o95lJ/ z/ibIwBDLoJT4x2cGhMmJdUIK/3/Ndz+Hv5cm0o9iJcvM7BL9Fcl2baB8ApCFjBcsswY JelA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@roeck-us.net header.s=default header.b=iGIiOuyx; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id p9-20020a634f49000000b003816043f054si11774140pgl.585.2022.04.04.19.45.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 04 Apr 2022 19:45:11 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=fail header.i=@roeck-us.net header.s=default header.b=iGIiOuyx; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 5599114ACB5; Mon, 4 Apr 2022 18:07:23 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1377085AbiDDEZI (ORCPT + 99 others); Mon, 4 Apr 2022 00:25:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41650 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233038AbiDDEZG (ORCPT ); Mon, 4 Apr 2022 00:25:06 -0400 Received: from gateway33.websitewelcome.com (gateway33.websitewelcome.com [192.185.146.85]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 316AF2C676 for ; Sun, 3 Apr 2022 21:23:10 -0700 (PDT) Received: from cm13.websitewelcome.com (cm13.websitewelcome.com [100.42.49.6]) by gateway33.websitewelcome.com (Postfix) with ESMTP id 9C10F1989F for ; Sun, 3 Apr 2022 23:23:09 -0500 (CDT) Received: from 162-215-252-75.unifiedlayer.com ([208.91.199.152]) by cmsmtp with SMTP id bEFBn8A2Db6UBbEFBn5we4; Sun, 03 Apr 2022 23:23:09 -0500 X-Authority-Reason: nr=8 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=roeck-us.net; s=default; h=Content-Transfer-Encoding:Content-Type: In-Reply-To:Subject:From:References:Cc:To:MIME-Version:Date:Message-ID:Sender :Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help: List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=CgLJGJBzJnPgbiyezytbODN5GX3z41tdhpJwDoaReLw=; b=iGIiOuyxI81cbv1cHNavG9rMsP W0YrrPh2OFLRUYt+dBve9N5xoqkV6EzT2Jk+uotHWnr0TFpTiEhL8kgkioq/mHFRhfgmp3Z77eqRM sYPvvyTnc1Vn66xQP3TrNja48OYk+QQ7KZn4DlclCZxHEej6fTEz4arepQf+Df1SZ29dYFMIu4x9+ T2cyJ3U2xdEsRdG6BpsgTUh20MXY69gHIRiaPU8XmNW6ePK0HPdCjQXF4wllLv/j3r77bjYSQRh0g 5F2zOynF4roZnPjWxhRFvXnVfvG3y9GcoeVrxsFVmPb+bqruNboyVbicXkRn5mDJfjf+vSEQk7ABd rXMyNEMg==; Received: from 108-223-40-66.lightspeed.sntcca.sbcglobal.net ([108.223.40.66]:54712) by bh-25.webhostbox.net with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1nbEFB-002kTA-6t; Mon, 04 Apr 2022 04:23:09 +0000 Message-ID: Date: Sun, 3 Apr 2022 21:23:07 -0700 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.7.0 Content-Language: en-US To: Linus Torvalds , Larry Finger , Oded Gabbay , Jiri Slaby Cc: Linux Kernel Mailing List , Greg Kroah-Hartman References: <20220404022239.GA1186352@roeck-us.net> From: Guenter Roeck Subject: Re: Linux 5.18-rc1 In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - bh-25.webhostbox.net X-AntiAbuse: Original Domain - vger.kernel.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - roeck-us.net X-BWhitelist: no X-Source-IP: 108.223.40.66 X-Source-L: No X-Exim-ID: 1nbEFB-002kTA-6t X-Source: X-Source-Args: X-Source-Dir: X-Source-Sender: 108-223-40-66.lightspeed.sntcca.sbcglobal.net [108.223.40.66]:54712 X-Source-Auth: linux@roeck-us.net X-Email-Count: 2 X-Source-Cap: cm9lY2s7YWN0aXZzdG07YmgtMjUud2ViaG9zdGJveC5uZXQ= X-Local-Domain: yes X-Spam-Status: No, score=-2.3 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, NICE_REPLY_A,RDNS_NONE,SPF_HELO_NONE,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 lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 4/3/22 20:29, Linus Torvalds wrote: > On Sun, Apr 3, 2022 at 7:22 PM Guenter Roeck wrote: >> >> In function '__nat25_add_pppoe_tag', >> inlined from 'nat25_db_handle' at drivers/staging/r8188eu/core/rtw_br_ext.c:479:11: >> arch/alpha/include/asm/string.h:22:16: error: '__builtin_memcpy' forming offset [40, 2051] is out of the bounds [0, 40] of object 'tag_buf' with type 'unsigned char[40]' >> >> Exposed by commit e6148767825c ("Makefile: Enable -Warray-bounds"). >> Fix at https://lore.kernel.org/lkml/20220403123628.3113382-1-linux@roeck-us.net/ > > Funky. Apparently nobody else does that pppoe_tag thing, and this > driver does it wrong on little-endian, which is the common thing to > test. > > Your email that you point to is a bit confused, though, in how it says > "when building the driver on a big endian system such as alpha". > > Alpha is little-endian, not big-endian. > Oops. Sorry, I thought it was big endian. No idea why. I'll update subject and description and resend. > Now, why it apparently only warns on alpha, I have absolutely no idea. > It should warn on other things too afaik, since that > > tag->tag_len = htons(MAGIC_CODE_LEN+RTL_RELAY_TAG_LEN+old_tag_len); > > should be visible not just on alpha. > Maybe htons() and ntohs() are modeled differently on other architectures, and the compiler doesn't see the context ? > Weird. But your patch looks correct. > >> Building arm:allmodconfig ... failed >> Building csky:allmodconfig ... failed >> Building i386:allyesconfig ... failed >> Building mips:allmodconfig ... failed >> Building parisc:allmodconfig ... failed >> Building powerpc:ppc32_allmodconfig ... failed >> Building xtensa:allmodconfig ... failed >> -------------- >> Error log: >> drivers/misc/habanalabs/common/memory.c: In function 'alloc_device_memory': >> drivers/misc/habanalabs/common/memory.c:153:49: error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast] >> 153 | (u64) gen_pool_dma_alloc_align(vm->dram_pg_pool, >> >> Fix at https://lore.kernel.org/lkml/20220401151450.3414694-1-linux@roeck-us.net/ > > Gaah - both of those "(u64)" look pointless. > > Either the thing is a pointer, in which case that (uinptr_t) - or just > (unsigned long) - is the right thing to do, or it's already an integer > type, in which case castring it to (u64) just do do that > > phys_pg_pack->pages[i] = ... > > assignment seems entirely pointless. > > So I think the patch should also remove those pointless (u64) casts. > > Yes, yes, the pages[] array in 'struct hl_vm_phys_pg_pack' 'pages[]' > is of u64's, but casting integers like that is just silly. > Double casts are quite common, though. Try 'git grep "(u64)(uintptr_t)"'. But I think you are right, a cast to (uintptr_t) should be sufficient here. I'll resend that patch as well. Guenter