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: <20210210122929.rgqfkoop4rsso3yo@maple.lan>
Date:   Wed, 10 Feb 2021 12:29:29 +0000
From:   Daniel Thompson <daniel.thompson@...aro.org>
To:     "Maciej W. Rozycki" <macro@...am.me.uk>
Cc:     Arnd Bergmann <arnd@...nel.org>,
        Thomas Bogendoerfer <tsbogend@...ha.franken.de>,
        Arnd Bergmann <arnd@...db.de>,
        kernel test robot <lkp@...el.com>,
        Jiaxun Yang <jiaxun.yang@...goat.com>,
        Paul Cercueil <paul@...pouillou.net>,
        Paul Burton <paulburton@...nel.org>,
        linux-mips@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 2/2] MIPS: make kgdb depend on FPU support

On Wed, Feb 10, 2021 at 01:11:28PM +0100, Maciej W. Rozycki wrote:
> On Wed, 10 Feb 2021, Daniel Thompson wrote:
> 
> > >  Wrapping the relevant parts of this file into #ifdef MIPS_FP_SUPPORT 
> > > would be as easy though and would qualify as a proper fix given that we 
> > > have no XML description support for the MIPS target (so we need to supply 
> > > the inexistent registers in the protocol; or maybe we can return NULL in 
> > > `dbg_get_reg' to get them padded out in the RSP packet, I haven't checked 
> > > if generic KGDB code supports this feature).
> > 
> > Returning NULL should be fine.
> > 
> > The generic code will cope OK. The values in the f.p. registers may
> > act a little odd if gdb uses a 'G' packet to set them to non-zero values
> > (since kgdb will cache the values gdb sent it) but the developer
> > operating the debugger will probably figure out what is going on without
> > too much pain.
> 
>  Ack, thanks!
> 
>  NB if GDB sees a register padded out (FAOD it means all-x's rather than a 
> hex string placed throughout the respective slot) in a `g' packet, then it 
> will mark the register internally as "unavailable" and present it to the 
> receiver of the information as such rather than giving any specific value.  
> I don't remember offhand what the syntax for the `G' packet is in that 
> case; possibly GDB just sends all-zeros, and in any case you can't make 
> GDB write any specific value to such a register via any user
> interface.

kgdb doesn't track register validity and adding would be a fairly big
change. Everything internally (including some of the interactions with
arch code) is based on updating a binary shadow of register state which
is only bin2hex'ed just before transmitting a packet.

It will simply default them to zero and update them on a 'G' packet.

>  The way the unavailability is shown depends on the interface used, i.e. 
> it will be different between the `info all-registers'/`info register $reg' 
> commands, and the `p $reg' command (or any expression involving `$reg'), 
> and the MI interface.  But in any case it will be unambiguous.

I guess this probably does create a technical protocol violation since
kgdb will reject per-register read/write for register that its report
says are zero rather then invalid.


Daniel.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ