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, 25 Jan 2022 22:29:26 +0000
From:   David Laight <David.Laight@...LAB.COM>
To:     'Jessica Clarke' <jrtc27@...c27.com>,
        Atish Patra <atishp@...osinc.com>
CC:     Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        Anup Patel <anup@...infault.org>,
        Albert Ou <aou@...s.berkeley.edu>,
        Atish Patra <atishp@...shpatra.org>,
        Damien Le Moal <damien.lemoal@....com>,
        devicetree <devicetree@...r.kernel.org>,
        Jisheng Zhang <jszhang@...nel.org>,
        "Krzysztof Kozlowski" <krzysztof.kozlowski@...onical.com>,
        linux-riscv <linux-riscv@...ts.infradead.org>,
        Palmer Dabbelt <palmer@...belt.com>,
        "Paul Walmsley" <paul.walmsley@...ive.com>,
        Rob Herring <robh+dt@...nel.org>
Subject: RE: [PATCH v3 6/6] RISC-V: Do not use cpumask data structure for
 hartid bitmap

> On 20 Jan 2022, at 09:09, Atish Patra <atishp@...osinc.com> wrote:
> >
> > Currently, SBI APIs accept a hartmask that is generated from struct
> > cpumask. Cpumask data structure can hold upto NR_CPUs value. Thus, it
> > is not the correct data structure for hartids as it can be higher
> > than NR_CPUs for platforms with sparse or discontguous hartids.
> >
> > Remove all association between hartid mask and struct cpumask.
....
> > -static int __sbi_rfence_v01(int fid, const unsigned long *hart_mask,
> > +static int __sbi_rfence_v01(int fid, const struct cpumask *cpu_mask,
> > 			    unsigned long start, unsigned long size,
> > 			    unsigned long arg4, unsigned long arg5)
> > {
> > 	int result = 0;
> > +	unsigned long hart_mask;
> > +
> > +	if (!cpu_mask)
> > +		cpu_mask = cpu_online_mask;
> > +	hart_mask = __sbi_v01_cpumask_to_hartmask(cpu_mask);
> >
> > 	/* v0.2 function IDs are equivalent to v0.1 extension IDs */
> > 	switch (fid) {
> > 	case SBI_EXT_RFENCE_REMOTE_FENCE_I:
> > 		sbi_ecall(SBI_EXT_0_1_REMOTE_FENCE_I, 0,
> > -			  (unsigned long)hart_mask, 0, 0, 0, 0, 0);
> > +			  (unsigned long)&hart_mask, 0, 0, 0, 0, 0);

You don't need the cast.

	David

-
Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK
Registration No: 1397386 (Wales)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ