Received: by 2002:a05:6a10:1a4d:0:0:0:0 with SMTP id nk13csp6018184pxb; Mon, 14 Feb 2022 13:15:05 -0800 (PST) X-Google-Smtp-Source: ABdhPJzZpkT2Xt0qqKiOflB3/uA1QvWgAWQZ4L4VEip28d67f/CAip8jEEg0olyJjLDs7j1AKjr/ X-Received: by 2002:a63:2c16:: with SMTP id s22mr758750pgs.297.1644873304837; Mon, 14 Feb 2022 13:15:04 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1644873304; cv=none; d=google.com; s=arc-20160816; b=qCipEQXfloSMud9xoOA4HZYaGGLhRnvsJ0oxTuSRwj4VN0cBN9an+2XFCalYAf1blr b4KPnpmHJzfmijig1RRng3X3vj3fhCrBZl9INpgFy6wKmhdOA++CVGAx2SEyvIyP+cpX ztKFBNzoBaeVOI1ZvKIBDNM+MpWKj4/Kv4Kpg1RgSaZs35YJ2zEcY/3aRud7TuQm1wnk eeISZM0mj+8i2GEkCS+EMcP5lIA5DWyKLp1BGUJUM5SB0sfhMgDm5Iw3By6LhgF1rDqx ZfFLucy6ipEcfd/nsbyG3WZ++yijqJW7vtDm+E6rnPWX5G0ZjHKrQcMZ9Cl63yrgUEWZ Mgmw== 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:message-id:in-reply-to :date:references:subject:cc:to:from; bh=TOfq8V3h3vCMJg6oRMLn5zXnOUxXmYuKpqJ2kc4H+xI=; b=GuEL4MYcPuvTLniMbEwZBIWKjSZnq8C7FKdRswVptzV2nrTPiZHRSitrTPkv2DvcE5 9Q1R1nBY94TFSq2ldgQaxqTXR5WyvKiNzLlDN7QrN6vijpwhO/oUc24C3uQ5qmCVJepX 2oKMkDfoHOa2OKAIyJ7XOHb8AlkvTqCbf/wwyBYF69zO6NcdEIc+IMQsj5Rcvri0Bz56 3DcgaV9CGYcwqupOVz0v/O8lnupMdJIpkE9OHzkEfuB/LLWuI9nXXCA9chkXbZ2Wa1oB fueZdE4rcGOo1wPifJo6uYOJuMVk+jcUuF5Vyh1UrDj1qqWN8Y1pBrCkTbQXW0NU+gFS 6UJA== 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: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 z6si33242627pfe.233.2022.02.14.13.15.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 14 Feb 2022 13:15:04 -0800 (PST) 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; 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 BEB2D14A6C1; Mon, 14 Feb 2022 12:33:53 -0800 (PST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242913AbiBNJ1o (ORCPT + 99 others); Mon, 14 Feb 2022 04:27:44 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:40556 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232064AbiBNJ1n (ORCPT ); Mon, 14 Feb 2022 04:27:43 -0500 Received: from mail-out.m-online.net (mail-out.m-online.net [212.18.0.9]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 99EE260A8C for ; Mon, 14 Feb 2022 01:27:36 -0800 (PST) Received: from frontend01.mail.m-online.net (unknown [192.168.8.182]) by mail-out.m-online.net (Postfix) with ESMTP id 4JxzQZ21l3z1r5Sf; Mon, 14 Feb 2022 10:27:34 +0100 (CET) Received: from localhost (dynscan1.mnet-online.de [192.168.6.70]) by mail.m-online.net (Postfix) with ESMTP id 4JxzQZ1HbSz1qqkD; Mon, 14 Feb 2022 10:27:34 +0100 (CET) X-Virus-Scanned: amavisd-new at mnet-online.de Received: from mail.mnet-online.de ([192.168.8.182]) by localhost (dynscan1.mail.m-online.net [192.168.6.70]) (amavisd-new, port 10024) with ESMTP id aNRyA1YptquK; Mon, 14 Feb 2022 10:27:33 +0100 (CET) X-Auth-Info: R0XjbQXb2+5gGB2bT5bpBZHuDOLFj/16nNUnBauej6c6LUkDgKfgDP03UTXie8CI Received: from igel.home (ppp-46-244-178-131.dynamic.mnet-online.de [46.244.178.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.mnet-online.de (Postfix) with ESMTPSA; Mon, 14 Feb 2022 10:27:33 +0100 (CET) Received: by igel.home (Postfix, from userid 1000) id D80442C39FF; Mon, 14 Feb 2022 10:27:32 +0100 (CET) From: Andreas Schwab To: David Laight Cc: 'Helge Deller' , OGAWA Hirofumi , "linux-kernel@vger.kernel.org" , Andrew Morton , "linux-parisc@vger.kernel.org" Subject: Re: [PATCH] fat: Use pointer to d_name[0] in put_user() for compat case References: <49a26b7a30254d9fb9653c2f815eaa28@AcuMS.aculab.com> X-Yow: YOU PICKED KARL MALDEN'S NOSE!! Date: Mon, 14 Feb 2022 10:27:32 +0100 In-Reply-To: <49a26b7a30254d9fb9653c2f815eaa28@AcuMS.aculab.com> (David Laight's message of "Mon, 14 Feb 2022 09:12:01 +0000") Message-ID: <8735klx0fv.fsf@igel.home> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.91 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RDNS_NONE, SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no 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 Feb 14 2022, David Laight wrote: > The 'bug' is caused by put_user() trying to do: > __typeof__(ptr) __ptr = ptr; > where __typeof__ is returning char[n] not char *. > > I've tried a few things but can't get __typeof__ to > generate a suitable type for both a simple type and array. Does it work to use __typeof__(&*(ptr))? -- Andreas Schwab, schwab@linux-m68k.org GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510 2552 DF73 E780 A9DA AEC1 "And now for something completely different."