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: <d53256fe-678b-12d8-ca7e-6a5beea0c155@ozlabs.ru>
Date:   Mon, 1 Jul 2019 13:13:29 +1000
From:   Alexey Kardashevskiy <aik@...abs.ru>
To:     Thiago Jung Bauermann <bauerman@...ux.ibm.com>
Cc:     linuxppc-dev@...ts.ozlabs.org, linux-kernel@...r.kernel.org,
        Anshuman Khandual <anshuman.linux@...il.com>,
        Benjamin Herrenschmidt <benh@...nel.crashing.org>,
        Christoph Hellwig <hch@....de>,
        Michael Ellerman <mpe@...erman.id.au>,
        Mike Anderson <andmike@...ux.ibm.com>,
        Paul Mackerras <paulus@...ba.org>,
        Ram Pai <linuxram@...ibm.com>,
        Claudio Carvalho <cclaudio@...ux.ibm.com>
Subject: Re: [RFC PATCH 03/12] powerpc/prom_init: Add the ESM call to
 prom_init



On 29/06/2019 08:33, Thiago Jung Bauermann wrote:
> 
> Hello Alexey,
> 
> Thanks for reviewing this patch!
> 
> Alexey Kardashevskiy <aik@...abs.ru> writes:
> 
>> On 21/05/2019 14:49, Thiago Jung Bauermann wrote:
>>> @@ -1707,6 +1723,43 @@ static void __init prom_close_stdin(void)
>>>  	}
>>>  }
>>>  
>>> +#ifdef CONFIG_PPC_SVM
>>> +static int prom_rtas_os_term_hcall(uint64_t args)
>>
>>
>> This is just an rtas hcall, nothing special about "os-term".
> 
> Sorry, unfortunately I don't understand how we're treating os-term
> especially. Do you mean that we should inline this function directly
> into prom_rtas_os_term()?

I meant the function name - prom_rtas_os_term_hcall - should rather be
prom_rtas_hcall.



> 
>>> +{
>>> +	register uint64_t arg1 asm("r3") = 0xf000;
>>> +	register uint64_t arg2 asm("r4") = args;
>>> +
>>> +	asm volatile("sc 1\n" : "=r" (arg1) :
>>> +			"r" (arg1),
>>> +			"r" (arg2) :);
>>> +	return arg1;
>>> +}
>>> +
>>> +static struct rtas_args __prombss os_term_args;
>>> +
>>> +static void __init prom_rtas_os_term(char *str)
>>> +{
>>> +	phandle rtas_node;
>>> +	__be32 val;
>>> +	u32 token;
>>> +
>>> +	prom_printf("%s: start...\n", __func__);
>>> +	rtas_node = call_prom("finddevice", 1, 1, ADDR("/rtas"));
>>> +	prom_printf("rtas_node: %x\n", rtas_node);
>>> +	if (!PHANDLE_VALID(rtas_node))
>>> +		return;
>>> +
>>> +	val = 0;
>>> +	prom_getprop(rtas_node, "ibm,os-term", &val, sizeof(val));
>>> +	token = be32_to_cpu(val);
>>> +	prom_printf("ibm,os-term: %x\n", token);
>>> +	if (token == 0)
>>> +		prom_panic("Could not get token for ibm,os-term\n");
>>> +	os_term_args.token = cpu_to_be32(token);
>>> +	prom_rtas_os_term_hcall((uint64_t)&os_term_args);
>>> +}
>>> +#endif /* CONFIG_PPC_SVM */
>>> +
>>>  /*
>>>   * Allocate room for and instantiate RTAS
>>>   */
> 

-- 
Alexey

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ