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] [day] [month] [year] [list]
Message-ID: <20190813154008.GB8686@lst.de>
Date:   Tue, 13 Aug 2019 17:40:08 +0200
From:   Christoph Hellwig <hch@....de>
To:     Palmer Dabbelt <palmer@...ive.com>
Cc:     Atish Patra <Atish.Patra@....com>, Christoph Hellwig <hch@....de>,
        Paul Walmsley <paul.walmsley@...ive.com>, linux-mm@...ck.org,
        Damien Le Moal <Damien.LeMoal@....com>,
        linux-riscv@...ts.infradead.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 16/17] riscv: clear the instruction cache and all
 registers when booting

On Mon, Jul 08, 2019 at 01:26:33AM -0700, Palmer Dabbelt wrote:
>>> +	csrs	sstatus, t1
>
> You need to check that the write stuck and branch around the FP instructions.
> Specifically, CONFIG_FPU means there may be an FPU, not there's definately an
> FPU.  You should also turn the FPU back off after zeroing the state.

Well, that is why we check the hwcaps from misa just above and skip
this fp reg clearing if it doesn't contain the 'F' or 'D' extension.

The caller disables the FPU a few instructions later:

	/*
         * Disable FPU to detect illegal usage of
	 * floating point in kernel space
	 */
	li t0, SR_FS
	csrc CSR_XSTATUS, t0

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ