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:   Tue, 12 Jan 2021 09:55:26 +0530
From:   Anshuman Khandual <anshuman.khandual@....com>
To:     David Hildenbrand <david@...hat.com>, linux-kernel@...r.kernel.org
Cc:     linux-mm@...ck.org, "Michael S. Tsirkin" <mst@...hat.com>,
        Jason Wang <jasowang@...hat.com>,
        Pankaj Gupta <pankaj.gupta.linux@...il.com>,
        Michal Hocko <mhocko@...nel.org>,
        Oscar Salvador <osalvador@...e.de>,
        Wei Yang <richard.weiyang@...ux.alibaba.com>,
        Andrew Morton <akpm@...ux-foundation.org>,
        catalin.marinas@....com, teawater <teawaterz@...ux.alibaba.com>,
        Pankaj Gupta <pankaj.gupta@...ud.ionos.com>,
        Jonathan Cameron <Jonathan.Cameron@...wei.com>,
        hca@...ux.ibm.com, Vasily Gorbik <gor@...ux.ibm.com>,
        Will Deacon <will@...nel.org>,
        Ard Biesheuvel <ardb@...nel.org>,
        Mark Rutland <mark.rutland@....com>
Subject: Re: [PATCH RFC] virtio-mem: check against memhp_get_pluggable_range()
 which memory we can hotplug



On 1/11/21 6:11 PM, David Hildenbrand wrote:
> Right now, we only check against MAX_PHYSMEM_BITS - but turns out there
> are more restrictions of which memory we can actually hotplug, especially
> om arm64 or s390x once we support them: we might receive something like
> -E2BIG or -ERANGE from add_memory_driver_managed(), stopping device
> operation.
> 
> So, check right when initializing the device which memory we can add,
> warning the user. Try only adding actually pluggable ranges: in the worst
> case, no memory provided by our device is pluggable.
> 
> In the usual case, we expect all device memory to be pluggable, and in
> corner cases only some memory at the end of the device-managed memory
> region to not be pluggable.
> 
> Cc: "Michael S. Tsirkin" <mst@...hat.com>
> Cc: Jason Wang <jasowang@...hat.com>
> Cc: Pankaj Gupta <pankaj.gupta.linux@...il.com>
> Cc: Michal Hocko <mhocko@...nel.org>
> Cc: Oscar Salvador <osalvador@...e.de>
> Cc: Wei Yang <richard.weiyang@...ux.alibaba.com>
> Cc: Andrew Morton <akpm@...ux-foundation.org>
> Cc: catalin.marinas@....com
> Cc: teawater <teawaterz@...ux.alibaba.com>
> Cc: Anshuman Khandual <anshuman.khandual@....com>
> Cc: Pankaj Gupta <pankaj.gupta@...ud.ionos.com>
> Cc: Jonathan Cameron <Jonathan.Cameron@...wei.com>
> Cc: hca@...ux.ibm.com
> Cc: Vasily Gorbik <gor@...ux.ibm.com>
> Cc: Will Deacon <will@...nel.org>
> Cc: Ard Biesheuvel <ardb@...nel.org>
> Cc: Mark Rutland <mark.rutland@....com>
> Cc: Heiko Carstens <hca@...ux.ibm.com>
> Cc: Michal Hocko <mhocko@...nel.org>
> Signed-off-by: David Hildenbrand <david@...hat.com>
> ---
> 
> This is an example how virito-mem intends to use an interface like
> memhp_get_pluggable_range() once around. See:
> 
> "[PATCH V2 0/3] mm/hotplug: Pre-validate the address range with platform"
> https://lkml.kernel.org/r/1608218912-28932-1-git-send-email-anshuman.khandual@arm.com
> 
> @Anshuman, feel free to pick up and carry this patch. I'll retest the final
> result / new versions of you series.

Makes sense, will carry this patch in the series.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ