lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CA+icZUVPXFkc7ow5-vF4bxggE63LqQkmaXA6m9cAZVCOnbS1fQ@mail.gmail.com>
Date:   Fri, 9 Oct 2020 08:46:47 +0200
From:   Sedat Dilek <sedat.dilek@...il.com>
To:     Ritesh Harjani <riteshh@...ux.ibm.com>
Cc:     linux-ext4@...r.kernel.org, linux-fsdevel@...r.kernel.org,
        tytso@....edu, jack@...e.cz, anju@...ux.vnet.ibm.com,
        "Aneesh Kumar K . V" <aneesh.kumar@...ux.ibm.com>
Subject: Re: [PATCH 1/1] ext4: Fix bs < ps issue reported with dioread_nolock
 mount opt

On Thu, Oct 8, 2020 at 5:56 PM Ritesh Harjani <riteshh@...ux.ibm.com> wrote:
>
> left shifting m_lblk by blkbits was causing value overflow and hence
> it was not able to convert unwritten to written extent.
> So, make sure we typecast it to loff_t before do left shift operation.
> Also in func ext4_convert_unwritten_io_end_vec(), make sure to initialize
> ret variable to avoid accidentally returning an uninitialized ret.
>
> This patch fixes the issue reported in ext4 for bs < ps with
> dioread_nolock mount option.
>
> Fixes: c8cc88163f40df39e50c ("ext4: Add support for blocksize < pagesize in dioread_nolock")

Fixes: tag should be 12 digits (see [1]).
( Seen while walking through ext-dev Git commits. )

- Sedat -

[1] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/process/submitting-patches.rst#n183

> Reported-by: Aneesh Kumar K.V <aneesh.kumar@...ux.ibm.com>
> Signed-off-by: Ritesh Harjani <riteshh@...ux.ibm.com>
> ---
>  fs/ext4/extents.c | 2 +-
>  fs/ext4/inode.c   | 2 +-
>  2 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/fs/ext4/extents.c b/fs/ext4/extents.c
> index a0481582187a..32d610cc896d 100644
> --- a/fs/ext4/extents.c
> +++ b/fs/ext4/extents.c
> @@ -4769,7 +4769,7 @@ int ext4_convert_unwritten_extents(handle_t *handle, struct inode *inode,
>
>  int ext4_convert_unwritten_io_end_vec(handle_t *handle, ext4_io_end_t *io_end)
>  {
> -       int ret, err = 0;
> +       int ret = 0, err = 0;
>         struct ext4_io_end_vec *io_end_vec;
>
>         /*
> diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c
> index bf596467c234..3021235deaa1 100644
> --- a/fs/ext4/inode.c
> +++ b/fs/ext4/inode.c
> @@ -2254,7 +2254,7 @@ static int mpage_process_page(struct mpage_da_data *mpd, struct page *page,
>                                         err = PTR_ERR(io_end_vec);
>                                         goto out;
>                                 }
> -                               io_end_vec->offset = mpd->map.m_lblk << blkbits;
> +                               io_end_vec->offset = (loff_t)mpd->map.m_lblk << blkbits;
>                         }
>                         *map_bh = true;
>                         goto out;
> --
> 2.26.2
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ