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]
Date:   Wed, 16 Jun 2021 09:52:18 -0700
From:   Bart Van Assche <bvanassche@....org>
To:     Christoph Hellwig <hch@....de>, Jens Axboe <axboe@...nel.dk>,
        Thomas Gleixner <tglx@...utronix.de>
Cc:     linux-arch@...r.kernel.org, linux-block@...r.kernel.org,
        Thomas Bogendoerfer <tsbogend@...ha.franken.de>,
        Chaitanya Kulkarni <chaitanya.kulkarni@....com>,
        Mike Snitzer <snitzer@...hat.com>,
        Geoff Levand <geoff@...radead.org>,
        linuxppc-dev@...ts.ozlabs.org, linux-mips@...r.kernel.org,
        Dongsheng Yang <dongsheng.yang@...ystack.cn>,
        linux-kernel@...r.kernel.org,
        "James E.J. Bottomley" <James.Bottomley@...senPartnership.com>,
        dm-devel@...hat.com, Ilya Dryomov <idryomov@...il.com>,
        Ira Weiny <ira.weiny@...el.com>, ceph-devel@...r.kernel.org
Subject: Re: [dm-devel] [PATCH 06/18] bvec: add a bvec_kmap_local helper

On 6/15/21 6:24 AM, Christoph Hellwig wrote:
> +/**
> + * bvec_kmap_local - map a bvec into the kernel virtual address space
> + * @bvec: bvec to map
> + *
> + * Must be called on single-page bvecs only.  Call kunmap_local on the returned
> + * address to unmap.
> + */
> +static inline void *bvec_kmap_local(struct bio_vec *bvec)
> +{
> +	return kmap_local_page(bvec->bv_page) + bvec->bv_offset;
> +}

Hi Christoph,

Would it be appropriate to add WARN_ON_ONCE(bvec->bv_offset >=
PAGE_SIZE) in this function?

Thanks,

Bart.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ