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: <PH7PR11MB7605493349915A168A80CDD8E5222@PH7PR11MB7605.namprd11.prod.outlook.com>
Date: Tue, 5 Mar 2024 12:54:09 +0000
From: "Winkler, Tomas" <tomas.winkler@...el.com>
To: Linus Walleij <linus.walleij@...aro.org>, Jens Wiklander
	<jens.wiklander@...aro.org>
CC: "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"linux-mmc@...r.kernel.org" <linux-mmc@...r.kernel.org>,
	"op-tee@...ts.trustedfirmware.org" <op-tee@...ts.trustedfirmware.org>, "Shyam
 Saini" <shyamsaini@...ux.microsoft.com>, Ulf Hansson
	<ulf.hansson@...aro.org>, Jerome Forissier <jerome.forissier@...aro.org>,
	Sumit Garg <sumit.garg@...aro.org>, Ilias Apalodimas
	<ilias.apalodimas@...aro.org>, Bart Van Assche <bvanassche@....org>, "Randy
 Dunlap" <rdunlap@...radead.org>, Ard Biesheuvel <ardb@...nel.org>, "Arnd
 Bergmann" <arnd@...db.de>, Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
	Alex Bennée <alex.bennee@...aro.org>
Subject: RE: [PATCH v3 1/3] rpmb: add Replay Protected Memory Block (RPMB)
 subsystem


> 
> Hi Jens,
> 
> I realized there is one thing I wonder about:
> 
> On Tue, Feb 27, 2024 at 4:31 PM Jens Wiklander <jens.wiklander@...aro.org>
> wrote:
> 
> > +struct rpmb_frame {
> > +       u8     stuff[196];
> > +       u8     key_mac[32];
> > +       u8     data[256];
> > +       u8     nonce[16];
> > +       __be32 write_counter;
> > +       __be16 addr;
> > +       __be16 block_count;
> > +       __be16 result;
> > +       __be16 req_resp;
> > +} __packed;
> 
> I didn't quite get why these things are encoded big-endian?


By the spec.

> 
> As on the producer side (the eMMC backend) it seems we are anyway calling
> cpu_to_be* to convert them into this format.
> 
> If this is a requirement on the consumer side (such as TEE) I think the
> consumer should swap the bytes rather than the producer, but I guess that
> kind of assumes that we foresee there will be other consumers in the first
> place.
> 
This is end 2 end. 

> Yours,
> Linus Walleij

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ