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:   Sat, 02 Apr 2022 14:50:15 +0200
From:   "Sven Peter" <sven@...npeter.dev>
To:     "Alyssa Rosenzweig" <alyssa@...enzweig.io>
Cc:     "Hector Martin" <marcan@...can.st>,
        "Rob Herring" <robh+dt@...nel.org>,
        "Arnd Bergmann" <arnd@...db.de>, "Keith Busch" <kbusch@...nel.org>,
        "axboe@...com" <axboe@...com>, "hch@....de" <hch@....de>,
        "sagi@...mberg.me" <sagi@...mberg.me>,
        "Marc Zyngier" <maz@...nel.org>, devicetree@...r.kernel.org,
        linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org,
        linux-nvme@...ts.infradead.org
Subject: Re: [PATCH 5/9] soc: apple: Add RTKit IPC library



On Tue, Mar 22, 2022, at 18:23, Alyssa Rosenzweig wrote:
>> +enum { APPLE_RTKIT_PWR_STATE_OFF = 0x00,
>> +	APPLE_RTKIT_PWR_STATE_SLEEP = 0x01,
>> +	APPLE_RTKIT_PWR_STATE_GATED = 0x02,
>> +	APPLE_RTKIT_PWR_STATE_QUIESCED = 0x10,
>> +	APPLE_RTKIT_PWR_STATE_ON = 0x20,
>> +};
>
> It would be great to get comments added explaining what these states
> are. It's not obvious how off/sleep/gated/quiesced differ, and it's not
> obvious from the code (doesn't look like GATED is used here at all?).
> Are these Apple names or r/e'd names or a mix?

Good point. They come from XNU's serial output, I'll add comments
for those where I know exactly what they do. I'll also remove GATED
for now since that's not used yet.

>
>> +	if (!rtk->syslog_buffer.size) {
>> +		rtk_warn(
>> +			"received syslog message but syslog_buffer.size is zero");
>> +		goto done;
>> +	}
>> +	if (!rtk->syslog_buffer.buffer && !rtk->syslog_buffer.iomem) {
>> +		rtk_warn("received syslog message but no syslog_buffer.buffer or syslog_buffer.iomem");
>> +		goto done;
>> +	}
>
> Nit: Wrapping is inconsistent between these two warns.

Will fix it while getting rid of the rtk_ macros.

Sven

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ