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: <20210305125548.GA20940@amd>
Date:   Fri, 5 Mar 2021 13:55:48 +0100
From:   Pavel Machek <pavel@...x.de>
To:     Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Cc:     linux-kernel@...r.kernel.org, stable@...r.kernel.org,
        Chao Yu <yuchao0@...wei.com>, Jaegeuk Kim <jaegeuk@...nel.org>,
        Sasha Levin <sashal@...nel.org>
Subject: Re: [PATCH 5.11 070/104] f2fs: handle unallocated section and zone
 on pinned/atgc

Hi!

> [ Upstream commit 632faca72938f9f63049e48a8c438913828ac7a9 ]
> 
> If we have large section/zone, unallocated segment makes them corrupted.
> 
> E.g.,
> 
>   - Pinned file:       -1 119304647 119304647
>   - ATGC   data:       -1 119304647 119304647

Ok.

> +++ b/fs/f2fs/segment.h
> @@ -101,11 +101,11 @@ static inline void sanity_check_seg_type(struct f2fs_sb_info *sbi,
>  #define BLKS_PER_SEC(sbi)					\
>  	((sbi)->segs_per_sec * (sbi)->blocks_per_seg)
>  #define GET_SEC_FROM_SEG(sbi, segno)				\
> -	((segno) / (sbi)->segs_per_sec)
> +	(((segno) == -1) ? -1: (segno) / (sbi)->segs_per_sec)

But now we have macro that evaluates its argument two times, and we
have users passing non-trivial arguments to it. Should these become
inline functions?

fs/f2fs/segment.h:  return GET_SEC_FROM_SEG(sbi, (unsigned int)reserved_segments(sbi));

Best regards,
								Pavel
-- 
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany

Download attachment "signature.asc" of type "application/pgp-signature" (182 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ