Received: by 2002:a05:6a10:6d10:0:0:0:0 with SMTP id gq16csp759629pxb; Tue, 12 Apr 2022 12:42:39 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwDpAabO3pjUBMK7EBewiExQwM3phfhICFIaeSJC1t+bTmViZ+DvlyTnlrVIQBXI2bifTZq X-Received: by 2002:a17:90a:7d10:b0:1c9:7939:c70 with SMTP id g16-20020a17090a7d1000b001c979390c70mr6649924pjl.203.1649792559776; Tue, 12 Apr 2022 12:42:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649792559; cv=none; d=google.com; s=arc-20160816; b=Q3SzaWNdYAQHaVltgQ2oImqrua9ke904wPpC7rmuweEpOehJwlkViCSEPan+z8yYbx Tib1FiYCEiPZow4/SC44Ne+b3+MnZ+M5XZAaYCajP6AGHJXwjqJRs8fxDkzfEvhsWM3w wrE+YkXIyinoYEldxgQzGBSzo0UUWHF/wnH5IafZZPjABNBcwtJHvGXGJI6YZJSCh81v 4M6QkpOduqOLEUscLJWJokw3y7FJjoQMFYP8s27LHhUmVpSKMOggFXwBAbMAdB7FogqA dDnncbGj/I6H5gnKpX6twv2yv7I3dk67vNeKBh/1GzhH3Tpk9ZAJNjfznmCjVDHM3gWE bd9g== 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=3qfLzylTmD5eT5BXZnPtAlMO07FvNOAdh6aSbUfZPjc=; b=mDEf4ECF1qojrePuA+yk1+rk1V6dKQVTljt4n4ctEFTvrlPt+zs5uzmErvnu684WH9 ag+7JS2wO5xYq7d/D1t4gyICdUADeqFAOYayt9X1c08qMLLSwxEQHOdj2Y8tUn9Tv0t8 +y9pJX7sz59lZ4Z2VOaZ96jadXrUWQQ85uxtVEEfZfwoPgPw8y/yG9n7uGDI1QmWXaWa vNrvamrLXKtDUq50THGSndNnMIv95PpPxQu7//9EcVnRjNu9he8Vw8GyiDH2l8O0hDaC ctTn8Mvk3fJWATDrpU/fYYSeYw0tWKsJUhwUeb1MIXzn4bJy/flx5xas/0ABfDQLehc7 gnGg== ARC-Authentication-Results: i=1; mx.google.com; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id h2-20020a170902f54200b00153b2d16407si13950757plf.15.2022.04.12.12.42.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Apr 2022 12:42:39 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 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 C18D150068; Tue, 12 Apr 2022 12:41:28 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1352398AbiDLJeV (ORCPT + 99 others); Tue, 12 Apr 2022 05:34:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43754 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1380244AbiDLJVJ (ORCPT ); Tue, 12 Apr 2022 05:21:09 -0400 X-Greylist: delayed 431 seconds by postgrey-1.37 at lindbergh.monkeyblade.net; Tue, 12 Apr 2022 01:26:32 PDT Received: from mail-out.m-online.net (mail-out.m-online.net [212.18.0.9]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id ED8F338BD9; Tue, 12 Apr 2022 01:26:32 -0700 (PDT) Received: from frontend01.mail.m-online.net (unknown [192.168.8.182]) by mail-out.m-online.net (Postfix) with ESMTP id 4KczCJ4Nnwz1r4JD; Tue, 12 Apr 2022 10:19:08 +0200 (CEST) Received: from localhost (dynscan1.mnet-online.de [192.168.6.70]) by mail.m-online.net (Postfix) with ESMTP id 4KczCJ2GNVz1qty4; Tue, 12 Apr 2022 10:19:08 +0200 (CEST) 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 rXjb5LFYsQQh; Tue, 12 Apr 2022 10:19:07 +0200 (CEST) X-Auth-Info: /mg83ax7YgZuCI0/7BlnjE0KpBKb9OSSgf4yqYyYL/rip/QnkSIDtPEXLMW/Bvw9 Received: from igel.home (ppp-46-244-183-143.dynamic.mnet-online.de [46.244.183.143]) (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; Tue, 12 Apr 2022 10:19:07 +0200 (CEST) Received: by igel.home (Postfix, from userid 1000) id 2092F2C3625; Tue, 12 Apr 2022 10:19:07 +0200 (CEST) From: Andreas Schwab To: Linus Torvalds Cc: Mikulas Patocka , Alexander Viro , linux-fsdevel , Linux Kernel Mailing List , Matthew Wilcox Subject: Re: [PATCH] stat: don't fail if the major number is >= 256 References: X-Yow: Yow! Now we can become alcoholics! Date: Tue, 12 Apr 2022 10:19:07 +0200 In-Reply-To: (Linus Torvalds's message of "Mon, 11 Apr 2022 19:37:44 -1000") Message-ID: <87tuayn284.fsf@igel.home> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.1 (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 Apr 11 2022, Linus Torvalds wrote: >> For me, the failure happens in cp_compat_stat (I have a 64-bit kernel). In >> struct compat_stat in arch/x86/include/asm/compat.h, st_dev and st_rdev >> are compat_dev_t which is 16-bit. But they are followed by 16-bit >> paddings, so they could be extended. > > Ok, that actually looks like a bug. > > The compat structure should match the native structure. Those "u16 > __padX" fields seem to be just a symptom of the bug. Looks like the move to 32-bit st_[r]dev was never applied to struct compat_stat, see commit e95b206567 ("[PATCH] struct stat - support larger dev_t") from tglx/history.git. -- 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."