Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: fixes vendoring issue #22

Merged
merged 2 commits into from Oct 19, 2018
Merged

fix: fixes vendoring issue #22

merged 2 commits into from Oct 19, 2018

Conversation

kriskwiatkowski
Copy link
Contributor

@kriskwiatkowski kriskwiatkowski commented Oct 16, 2018

fix: fixes vendoring issue

* Assembly code can't reffer to variables which are not in the
  same package.
* utils/cpu.go keeps flags indicating CPU capabilities. Currently this
  file keeps flags specific to X86, those flags are set only if program
  is run on X86, hence on ARM they always be false. Flags are coppied
  to variables which are local to P503 and P751 (so that assembly code
  can access them).
* we dont need workaround in utils/utils.go anymore as utils/cpu.go is
  never ignored by the buildtags.

See also:
https://github.com/golang/go/issues/28230

Fixes #21

@kriskwiatkowski
Copy link
Contributor Author

kriskwiatkowski commented Oct 18, 2018

@Ko- @marten-seemann @alxdavids can you guys take a look?

Copy link

@alxdavids alxdavids left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks good to me. Although, should probably should get the other approvals as I am not an expert with assembly.

Copy link

@marten-seemann marten-seemann left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems to work now. Thanks for the fix!

p503/consts.go Outdated
@@ -23,6 +24,17 @@ const (
NumWords = 8
)

// CPU Capabilities. Those flags are reffered by assembly code. According to
// https://github.com/golang/go/issues/28230, variables reffered from the
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Typo: referred. (2x here + 2x in p751)

p503/arith_amd64_test.go Show resolved Hide resolved
Kris Kwiatkowski and others added 2 commits October 19, 2018 14:40
* Assembly code can't reffer to variables which are not in the
  same package.
* utils/cpu.go keeps flags indicating CPU capabilities. Currently this
  file keeps flags specific to X86, those flags are set only if program
  is run on X86, hence on ARM they always be false. Flags are coppied
  to variables which are local to P503 and P751 (so that assembly code
  can access them).
* we dont need workaround in utils/utils.go anymore as utils/cpu.go is
  never ignored by the buildtags.

See also:
golang/go#28230

Fixes #21
@kriskwiatkowski kriskwiatkowski merged commit 00da959 into cloudflarearchive:master Oct 19, 2018
@kriskwiatkowski
Copy link
Contributor Author

Thnx guys!

kriskwiatkowski pushed a commit to cloudflare/circl that referenced this pull request Oct 24, 2018
fix: fixes vendoring issue

* Assembly code can't reffer to variables which are not in the
  same package.
* utils/cpu.go keeps flags indicating CPU capabilities. Currently this
  file keeps flags specific to X86, those flags are set only if program
  is run on X86, hence on ARM they always be false. Flags are coppied
  to variables which are local to P503 and P751 (so that assembly code
  can access them).
* we dont need workaround in utils/utils.go anymore as utils/cpu.go is
  never ignored by the buildtags.

See also:
golang/go#28230
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

vendoring this repository fails
4 participants