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:   Thu, 01 Feb 2018 14:09:30 -0800
From:   Joe Perches <joe@...ches.com>
To:     David Miller <davem@...emloft.net>, Sam Ravnborg <sam@...nborg.org>
Cc:     khalid.aziz@...cle.com, dave.hansen@...ux.intel.com,
        mhocko@...e.com, mingo@...nel.org, gregkh@...uxfoundation.org,
        kstewart@...uxfoundation.org, vijay.ac.kumar@...cle.com,
        kirill.shutemov@...ux.intel.com, nitin.m.gupta@...cle.com,
        tom.hromatka@...cle.com, allen.pais@...cle.com,
        rob.gardner@...cle.com, david.j.aldridge@...cle.com,
        babu.moger@...cle.com, bob.picco@...cle.com,
        steven.sistare@...cle.com, pasha.tatashin@...cle.com,
        vegard.nossum@...cle.com, pombredanne@...b.com,
        jane.chu@...cle.com, anthony.yznaga@...cle.com,
        sparclinux@...r.kernel.org, linux-kernel@...r.kernel.org,
        khalid@...ehiking.org
Subject: Re: [PATCH v11 03/10] sparc64: Add support for ADI register fields,
 ASIs and traps

On Thu, 2018-02-01 at 15:39 -0500, David Miller wrote:
> From: Joe Perches <joe@...ches.com>
> Date: Thu, 01 Feb 2018 12:32:02 -0800
> 
> >> diff --git a/arch/sparc/include/asm/ttable.h b/arch/sparc/include/asm/ttable.h
> > []
> >> @@ -219,6 +219,16 @@
> >>      nop;                                            \
> >>      nop;
> >>  
> >> +#define SUN4V_MCD_PRECISE                           \
> >> +    ldxa    [%g0] ASI_SCRATCHPAD, %g2;              \
> >> +    ldx     [%g2 + HV_FAULT_D_ADDR_OFFSET], %g4;    \
> >> +    ldx     [%g2 + HV_FAULT_D_CTX_OFFSET], %g5;     \
> >> +    ba,pt   %xcc, etrap;                            \
> >> +     rd     %pc, %g7;                               \
> >> +    ba,pt   %xcc, sun4v_mcd_detect_precise;         \
> >> +     nop;                                           \
> >> +    nop;
> > 
> > and here and elsewhere.
> 
> Joe, this is intentional in Sparc assembler.
> 
> Branches on sparc have delay slots, and this is annotated by indenting
> the delay slot instruction one space more than the branch preceeding
> it.

OK, that is new to me and seems a sensible convention.

btw:

There seem to be only a few instances where that
convention is not followed in arch/sparc/...

(maybe some missing or false positives below)

$ git ls-files arch/sparc/ | \
  xargs grep-2.5.4 -P -n '^([ \t]+)b\w+,p.*\n\1[^ ]\S' | \
  perl -p -e 's/(:\d+:)/\1\n/'
arch/sparc/include/asm/tsb.h:168:
	brz,pn		REG1, FAIL_LABEL; \
	sethi		%uhi(_PAGE_PUD_HUGE), REG2; \
arch/sparc/include/asm/ttable.h:281:
	ba,pt	%xcc, etrap_save;			\
	wrpr	%g1, %cwp;				\
arch/sparc/kernel/head_64.S:472:
	bne,pn	%icc, 49f
	add	%g7, 1, %g7
arch/sparc/kernel/head_64.S:474:
	bne,pt	%xcc, 41b
	add	%g1, 1, %g1
arch/sparc/kernel/rtrap_64.S:72:
		ba,pt			%xcc, rtrap_no_irq_enable
		nop
arch/sparc/kernel/rtrap_64.S:161:
		brz,pt			%l3, 1f
		mov			%g6, %l2
arch/sparc/lib/GENmemcpy.S:100:
	bne,pt		%XCC, 1b
	add		%o0, 1, %o0
arch/sparc/lib/M7memcpy.S:896:
	bgu,pt	%xcc, .Lsmallnotalign4	! loop til 3 or fewer bytes remain
	EX_ST(STORE(stb, %o3, %o0-1), memcpy_retl_o2_plus_4)
arch/sparc/lib/M7memcpy.S:902:
	bz,pt	%xcc, .Lsmallx
	EX_ST(STORE(stb, %o3, %o0), memcpy_retl_o2_plus_1)	! store one byte
arch/sparc/lib/M7memcpy.S:905:
	bz,pt	%xcc, .Lsmallx
	EX_ST(STORE(stb, %o3, %o0+1), memcpy_retl_o2_plus_1)! store second byte
arch/sparc/lib/NG2memcpy.S:299:
	bne,pt		%XCC, 1b
	add		%o0, 1, %o0
arch/sparc/lib/NG4fls.S:23:
	brz,pn	%o0, 1f
	LZCNT_O0_G2	!lzcnt	%o0, %g2
arch/sparc/lib/NGmemcpy.S:216:
	bne,pt		%XCC, 1b
	add		%o0, 1, %o0
arch/sparc/lib/csum_copy.S:103:
	ba,pt		%xcc, 1f
	LOAD(prefetch, %o0 + 0x140, #n_reads)


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ