From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-22.3 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,INCLUDES_PULL_REQUEST,MAILING_LIST_MULTI,MENTIONS_GIT_HOSTING, SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id A785FC433DB for ; Fri, 19 Feb 2021 11:37:40 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 3E84B64E67 for ; Fri, 19 Feb 2021 11:37:40 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230087AbhBSLhY (ORCPT ); Fri, 19 Feb 2021 06:37:24 -0500 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:22167 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229524AbhBSLhU (ORCPT ); Fri, 19 Feb 2021 06:37:20 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1613734554; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type; bh=xn1ULpHqjYib2erd8HgDp+bnvgqHCYqsU53nsfSrm1E=; b=M5UltLR4Awei/2wwRz4sarKRUSPqtb/0LHy391PYqPqvohUXtAbQpfLp+R5WSZDEQmb6bL focqADOO+lKZV2DGhRPm5VtT3LKH1pVqREv8NRcvS9ZZ4LHT/eB3xUwZ6KLAStt68HujZb WPe3sgP3IltWXY1wb9zX6QOHyHSloW0= Received: from mail-pg1-f200.google.com (mail-pg1-f200.google.com [209.85.215.200]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-243-jI2XVixWMa2WWhqkYu7IJQ-1; Fri, 19 Feb 2021 06:35:52 -0500 X-MC-Unique: jI2XVixWMa2WWhqkYu7IJQ-1 Received: by mail-pg1-f200.google.com with SMTP id n2so3430909pgj.12 for ; Fri, 19 Feb 2021 03:35:52 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:mime-version :content-disposition:user-agent; bh=xn1ULpHqjYib2erd8HgDp+bnvgqHCYqsU53nsfSrm1E=; b=GXutmPmRgsaBo2etSdAE1Mq5MDBoV1oOnIBM8pLxKGBMEjwtCUIfIlG8ZGNkCGy2ZQ 0CgMNSG6X2T39AS+NoxaY2cSBRWXl3J13LdNh9xM2tsKbLeaQqDX3HwalYIfhHWZyrB1 T1NtCNfmlEr3JVNU6SYkW5y7elHDCiuWWqqPgw8ZxbGpNpsjf0kidRTC9qfwC4uNjHqG Q6ysF+prdJqsVng0UhJUAAaeEjXb75FiVDr63aIeaumyuzwOOxU2afDogA4QZCZ6Z53C S7zfdFqsyJWEyyZJrjulcpq9Gj8nILVnNvjIVcADANffFsmU8RVKmhM7iswiyM46UwHz /K0g== X-Gm-Message-State: AOAM533u0X7SLYx2NGh9WLA0P0s5QuxEXaw+Ly2w5KycKIzjxyGJbrQR TA76mAVo3lkeg4G5gldYVnEBU6ZnAODFa1OcJk5QkG5yS4EmAwANjfXJyn3Dwm6ZXRxPUck2Caa cU5ueNmWEittbdXIB7t4SpjFh X-Received: by 2002:a62:7a0b:0:b029:1de:7e70:955d with SMTP id v11-20020a627a0b0000b02901de7e70955dmr1552746pfc.49.1613734551558; Fri, 19 Feb 2021 03:35:51 -0800 (PST) X-Google-Smtp-Source: ABdhPJzJ4N/87dUKkv79oaKb1TdgD+7zCbqUbQNPc48eJdnHyHp82QLrzhF66Kh7W0cIjvCa2LqetQ== X-Received: by 2002:a62:7a0b:0:b029:1de:7e70:955d with SMTP id v11-20020a627a0b0000b02901de7e70955dmr1552727pfc.49.1613734551296; Fri, 19 Feb 2021 03:35:51 -0800 (PST) Received: from xiangao.remote.csb ([209.132.188.80]) by smtp.gmail.com with ESMTPSA id ke13sm8360941pjb.44.2021.02.19.03.35.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 19 Feb 2021 03:35:50 -0800 (PST) Date: Fri, 19 Feb 2021 19:35:37 +0800 From: Gao Xiang To: Linus Torvalds Cc: linux-erofs@lists.ozlabs.org, LKML , Stephen Rothwell , Greg Kroah-Hartman , Al Viro , Andrew Morton , Miao Xie , Chao Yu , Fang Wei , Li Guifu , Huang Jianan , Guo Weichao , Gao Xiang Subject: [GIT PULL] erofs update for 5.12-rc1 Message-ID: <20210219113537.GA492321@xiangao.remote.csb> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline User-Agent: Mutt/1.10.1 (2018-07-13) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Linus, Could you consider this pull request for 5.12-rc1? This contains a somewhat important but rarely reproduced fix reported month ago for platforms which have weak memory model (e.g. arm64). The root cause is that test_bit/set_bit atomic operations are actually implemented in relaxed forms, and uninitialized fields governed by an atomic bit could be observed in advance due to memory reordering thus memory barrier pairs should be used. There is also a trivial fix of crafted blkszbits generated by syzkaller. All commits have been tested and have been in linux-next for more than a week. This merges cleanly with master. Thanks, Gao Xiang The following changes since commit 19c329f6808995b142b3966301f217c831e7cf31: Linux 5.11-rc4 (2021-01-17 16:37:05 -0800) are available in the Git repository at: git://git.kernel.org/pub/scm/linux/kernel/git/xiang/erofs.git tags/erofs-for-5.12-rc1 for you to fetch changes up to ce063129181312f8781a047a50be439c5859747b: erofs: initialized fields can only be observed after bit is set (2021-02-11 11:55:28 +0800) ---------------------------------------------------------------- Changes since last update: - fix shift-out-of-bounds of crafted blkszbits generated by syzkaller; - ensure initialized fields can only be observed after bit is set. ---------------------------------------------------------------- Gao Xiang (2): erofs: fix shift-out-of-bounds of blkszbits erofs: initialized fields can only be observed after bit is set fs/erofs/super.c | 4 ++-- fs/erofs/xattr.c | 10 +++++++++- fs/erofs/zmap.c | 10 +++++++++- 3 files changed, 20 insertions(+), 4 deletions(-)