From 84d51da2401b6641e4e55b136e09c217df181f9b Mon Sep 17 00:00:00 2001 From: Vikram Raj Date: Tue, 26 Nov 2024 20:14:46 +0530 Subject: [PATCH 001/102] Add optional build strategy params under ExpandCollapse --- .../locales/en/shipwright-plugin.json | 3 + .../build-form/ParameterSection.tsx | 131 +++++++++++------- 2 files changed, 85 insertions(+), 49 deletions(-) diff --git a/frontend/packages/shipwright-plugin/locales/en/shipwright-plugin.json b/frontend/packages/shipwright-plugin/locales/en/shipwright-plugin.json index a8276e78f81..99d8ed77434 100644 --- a/frontend/packages/shipwright-plugin/locales/en/shipwright-plugin.json +++ b/frontend/packages/shipwright-plugin/locales/en/shipwright-plugin.json @@ -39,6 +39,9 @@ "Image": "Image", "Example for OpenShift internal registry: image-registry.openshift-image-registry.svc:5000//:latest": "Example for OpenShift internal registry: image-registry.openshift-image-registry.svc:5000//:latest", "Parameters": "Parameters", + "No required parameters are associated with the selected build strategy.": "No required parameters are associated with the selected build strategy.", + "Hide optional parameters": "Hide optional parameters", + "Show optional parameters": "Show optional parameters", "Select a Secret": "Select a Secret", "Push Secret": "Push Secret", "Create new Secret": "Create new Secret", diff --git a/frontend/packages/shipwright-plugin/src/components/build-form/ParameterSection.tsx b/frontend/packages/shipwright-plugin/src/components/build-form/ParameterSection.tsx index d318e132305..919bee02b02 100644 --- a/frontend/packages/shipwright-plugin/src/components/build-form/ParameterSection.tsx +++ b/frontend/packages/shipwright-plugin/src/components/build-form/ParameterSection.tsx @@ -3,6 +3,7 @@ import { TextInputTypes } from '@patternfly/react-core'; import { FieldArray, useFormikContext } from 'formik'; import { useTranslation } from 'react-i18next'; import FormSection from '@console/dev-console/src/components/import/section/FormSection'; +import { ExpandCollapse } from '@console/internal/components/utils/expand-collapse'; import { InputField, TextColumnField } from '@console/shared'; import { BuildFormikValues, BuildParam, ModalParameter } from './types'; @@ -14,62 +15,94 @@ type ParametersSectionProps = { autoCompleteValues?: string[]; }; +type ParameterFieldsProps = { + params: any[]; +}; + +const ParameterFields: React.FC = ({ params }) => { + return ( + + params.length > 0 && ( + + {params?.map((parameter: ModalParameter, index) => { + const name = `formData.parameters.${index}.value`; + const isRequired = paramIsRequired(parameter); + const input = (ref?) => ( + + ); + return parameter.type === 'array' ? ( + + {({ name: arrayName, ...additionalProps }) => ( + + )} + + ) : ( + {input()} + ); + })} + + ) + } + /> + ); +}; + const ParameterSection: React.FC = () => { const { t } = useTranslation(); const { values: { formData }, } = useFormikContext(); + const requiredParams = formData?.parameters.filter((param) => paramIsRequired(param)); + const optionalParams = formData?.parameters.filter((param) => !paramIsRequired(param)); + return ( - - - formData?.parameters.length > 0 && ( - - {formData?.parameters.map((parameter: ModalParameter, index) => { - const name = `formData.parameters.${index}.value`; - const isRequired = paramIsRequired(parameter); - const input = (ref?) => ( - - ); - return parameter.type === 'array' ? ( - - {({ name: arrayName, ...additionalProps }) => ( - - )} - - ) : ( - {input()} - ); - })} - - ) - } - /> - + formData?.parameters.length > 0 && ( + + {requiredParams.length > 0 ? ( + + ) : ( + + {t( + 'shipwright-plugin~No required parameters are associated with the selected build strategy.', + )} + + )} + {optionalParams.length > 0 && ( + + + + )} + + ) ); }; From 50fd331845461446e742e45c172c75eb2a503c01 Mon Sep 17 00:00:00 2001 From: Vikram Raj Date: Tue, 19 Nov 2024 21:26:10 +0530 Subject: [PATCH 002/102] Filter out empty params before Shipwright build creation --- .../src/components/build-form/EditBuild.tsx | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/frontend/packages/shipwright-plugin/src/components/build-form/EditBuild.tsx b/frontend/packages/shipwright-plugin/src/components/build-form/EditBuild.tsx index 5f3058cc261..0b59ac4bea8 100644 --- a/frontend/packages/shipwright-plugin/src/components/build-form/EditBuild.tsx +++ b/frontend/packages/shipwright-plugin/src/components/build-form/EditBuild.tsx @@ -1,5 +1,6 @@ import * as React from 'react'; import { Formik, FormikHelpers } from 'formik'; +import * as _ from 'lodash'; import { useTranslation } from 'react-i18next'; import { history, resourcePathFromModel } from '@console/internal/components/utils'; import { k8sCreate, k8sUpdate } from '@console/internal/module/k8s'; @@ -52,7 +53,11 @@ const EditBuild: React.FC = ({ heading, build: watchedBuild, nam values.editorType === EditorType.Form ? convertFormDataToBuild(parsedBuild, values) : parsedBuild; - + const buildParams = changedBuild?.spec?.paramValues; + const filterEmptyValueParams = buildParams?.filter( + (param) => !_.isEmpty(param.value) || !_.isEmpty(param.values), + ); + changedBuild.spec.paramValues = filterEmptyValueParams; try { const isNew = !name; const updatedBuildConfig: Build = isNew From 10858ddb339a765669c7e521af6c32f9826ecc8b Mon Sep 17 00:00:00 2001 From: Lokananda Prabhu Date: Fri, 22 Nov 2024 15:06:45 +0530 Subject: [PATCH 003/102] Handled duplicate image pull secrets issue in D & DC edit form --- .../src/components/deployments/utils/deployment-utils.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/frontend/packages/dev-console/src/components/deployments/utils/deployment-utils.ts b/frontend/packages/dev-console/src/components/deployments/utils/deployment-utils.ts index 591baf694a1..21f2028b5c6 100644 --- a/frontend/packages/dev-console/src/components/deployments/utils/deployment-utils.ts +++ b/frontend/packages/dev-console/src/components/deployments/utils/deployment-utils.ts @@ -595,7 +595,12 @@ export const convertEditFormToDeployment = ( containers: getUpdatedContainers(containers, fromImageStreamTag, isi, imageName, envs), imagePullSecrets: [ ...(deployment.spec.template.spec.imagePullSecrets ?? []), - ...(imagePullSecret ? [{ name: imagePullSecret }] : []), + ...(imagePullSecret && + !(deployment.spec.template.spec.imagePullSecrets ?? []).some( + (secret) => secret.name === imagePullSecret, + ) + ? [{ name: imagePullSecret }] + : []), ], }, }, From bb6de9440ded7254218c42dd6b08b8809d716058 Mon Sep 17 00:00:00 2001 From: Lokananda Prabhu Date: Wed, 6 Nov 2024 14:35:55 +0530 Subject: [PATCH 004/102] Resolved rerun issue for plr when using resolver --- .../src/components/pipelines/modals/common/utils.ts | 11 ++++++++--- .../pipelines-plugin/src/types/pipelineRun.ts | 4 ++-- .../pipelines-plugin/src/utils/pipeline-actions.tsx | 2 +- 3 files changed, 11 insertions(+), 6 deletions(-) diff --git a/frontend/packages/pipelines-plugin/src/components/pipelines/modals/common/utils.ts b/frontend/packages/pipelines-plugin/src/components/pipelines/modals/common/utils.ts index 97a9d07fe8c..1fbede65933 100644 --- a/frontend/packages/pipelines-plugin/src/components/pipelines/modals/common/utils.ts +++ b/frontend/packages/pipelines-plugin/src/components/pipelines/modals/common/utils.ts @@ -148,9 +148,14 @@ export const getPipelineRunData = ( spec: { ...(latestRun?.spec || {}), ...((latestRun?.spec.pipelineRef || pipeline) && { - pipelineRef: { - name: pipelineName, - }, + pipelineRef: latestRun?.spec.pipelineRef?.resolver + ? { + resolver: latestRun.spec.pipelineRef?.resolver, + params: latestRun.spec.pipelineRef?.params, + } + : { + name: pipelineName, + }, }), ...(params && { params }), workspaces, diff --git a/frontend/packages/pipelines-plugin/src/types/pipelineRun.ts b/frontend/packages/pipelines-plugin/src/types/pipelineRun.ts index bfdb7546505..a4d835bcae4 100644 --- a/frontend/packages/pipelines-plugin/src/types/pipelineRun.ts +++ b/frontend/packages/pipelines-plugin/src/types/pipelineRun.ts @@ -4,7 +4,7 @@ import { ObjectMetadata, } from '@console/internal/module/k8s'; import { TektonResultsRun, TektonTaskSpec } from './coreTekton'; -import { PipelineKind, PipelineSpec } from './pipeline'; +import { PipelineKind, PipelineSpec, PipelineTaskParam } from './pipeline'; export type PLRTaskRunStep = { container: string; @@ -155,7 +155,7 @@ export type PipelineRunStatus = { export type PipelineRunKind = K8sResourceCommon & { spec: { - pipelineRef?: { name: string }; + pipelineRef?: { name?: string; resolver?: string; params?: PipelineTaskParam[] }; pipelineSpec?: PipelineSpec; params?: PipelineRunParam[]; workspaces?: PipelineRunWorkspace[]; diff --git a/frontend/packages/pipelines-plugin/src/utils/pipeline-actions.tsx b/frontend/packages/pipelines-plugin/src/utils/pipeline-actions.tsx index f16c3427018..7d1952cbbb8 100644 --- a/frontend/packages/pipelines-plugin/src/utils/pipeline-actions.tsx +++ b/frontend/packages/pipelines-plugin/src/utils/pipeline-actions.tsx @@ -56,7 +56,7 @@ export const reRunPipelineRun: KebabAction = (kind: K8sKind, pipelineRun: Pipeli callback: () => { const namespace = _.get(pipelineRun, 'metadata.namespace'); const { pipelineRef, pipelineSpec } = pipelineRun.spec; - if (namespace && (pipelineRef?.name || pipelineSpec)) { + if (namespace && (pipelineRef?.name || pipelineSpec || pipelineRef?.resolver)) { k8sCreate(returnValidPipelineRunModel(pipelineRun), getPipelineRunData(null, pipelineRun)); } else { errorModal({ From abbee36df3b7c10867b544fd042aef1ec1fbf85a Mon Sep 17 00:00:00 2001 From: Vikram Raj Date: Mon, 12 Aug 2024 20:30:04 +0530 Subject: [PATCH 005/102] Fix Function Import: An error occurred Cannot read properties of undefined (reading 'filter') --- .../import/serverless-function/AddServerlessFunctionForm.tsx | 4 ++-- .../src/components/import/serverless-function/FuncSection.tsx | 4 ++-- .../import/serverless-function/ServerlessFunctionSection.tsx | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/frontend/packages/dev-console/src/components/import/serverless-function/AddServerlessFunctionForm.tsx b/frontend/packages/dev-console/src/components/import/serverless-function/AddServerlessFunctionForm.tsx index ed0626d28da..7dcb0f29504 100644 --- a/frontend/packages/dev-console/src/components/import/serverless-function/AddServerlessFunctionForm.tsx +++ b/frontend/packages/dev-console/src/components/import/serverless-function/AddServerlessFunctionForm.tsx @@ -92,8 +92,8 @@ const AddServerlessFunctionForm: React.FC< .then((res) => { if (res) { setStatus({}); - setFieldValue('build.env', res?.values?.builderEnvs); - setFieldValue('deployment.env', res?.values?.runtimeEnvs); + setFieldValue('build.env', res?.values?.builderEnvs || []); + setFieldValue('deployment.env', res?.values?.runtimeEnvs || []); setFieldValue( 'image.selected', notSupportedRuntime.indexOf(res?.values?.runtime) === -1 diff --git a/frontend/packages/dev-console/src/components/import/serverless-function/FuncSection.tsx b/frontend/packages/dev-console/src/components/import/serverless-function/FuncSection.tsx index e1ab83fdeec..5955c6c18af 100644 --- a/frontend/packages/dev-console/src/components/import/serverless-function/FuncSection.tsx +++ b/frontend/packages/dev-console/src/components/import/serverless-function/FuncSection.tsx @@ -50,8 +50,8 @@ const FuncSection = ({ builderImages }) => { ); } setFieldValue('resources', Resources.KnativeService); - setFieldValue('build.env', res.values.builderEnvs); - setFieldValue('deployment.env', res.values.runtimeEnvs); + setFieldValue('build.env', res?.values?.builderEnvs || []); + setFieldValue('deployment.env', res?.values?.runtimeEnvs || []); }) .catch((err) => { // eslint-disable-next-line no-console diff --git a/frontend/packages/dev-console/src/components/import/serverless-function/ServerlessFunctionSection.tsx b/frontend/packages/dev-console/src/components/import/serverless-function/ServerlessFunctionSection.tsx index e84d80fda3f..6e4e6555a74 100644 --- a/frontend/packages/dev-console/src/components/import/serverless-function/ServerlessFunctionSection.tsx +++ b/frontend/packages/dev-console/src/components/import/serverless-function/ServerlessFunctionSection.tsx @@ -50,8 +50,8 @@ const ServerlessFunctionSection = ({ builderImages }) => { ); } setFieldValue('resources', Resources.KnativeService); - setFieldValue('build.env', res.values.builderEnvs); - setFieldValue('deployment.env', res.values.runtimeEnvs); + setFieldValue('build.env', res?.values?.builderEnvs || []); + setFieldValue('deployment.env', res?.values?.runtimeEnvs || []); }) .catch((err) => { // eslint-disable-next-line no-console From feaeea60616a2ae88f92e1cfcb5a8feacd7f8b40 Mon Sep 17 00:00:00 2001 From: Vikram Raj Date: Mon, 12 Aug 2024 15:18:53 +0530 Subject: [PATCH 006/102] use default StorageClass for ServerlessFunction pipelineVolumeClaimTemplate --- .../pipeline/pipeline-template-utils.ts | 7 ++++--- .../pipelines/modals/common/utils.ts | 19 ++++++++++++++++--- 2 files changed, 20 insertions(+), 6 deletions(-) diff --git a/frontend/packages/pipelines-plugin/src/components/import/pipeline/pipeline-template-utils.ts b/frontend/packages/pipelines-plugin/src/components/import/pipeline/pipeline-template-utils.ts index ad1472cc55b..013d68a01e6 100644 --- a/frontend/packages/pipelines-plugin/src/components/import/pipeline/pipeline-template-utils.ts +++ b/frontend/packages/pipelines-plugin/src/components/import/pipeline/pipeline-template-utils.ts @@ -136,14 +136,15 @@ export const createPipelineRunForImportFlow = async ( ): Promise => { const isServerlessFunctionPipeline = pipeline?.metadata?.labels?.['function.knative.dev'] === 'true'; + const defaultPVC = isServerlessFunctionPipeline + ? await getServerlessFunctionDefaultPersistentVolumeClaim(pipeline?.metadata?.name) + : getDefaultVolumeClaimTemplate(pipeline?.metadata?.name); const pipelineInitialValues: StartPipelineFormValues = { ...convertPipelineToModalData(pipeline), workspaces: (pipeline.spec.workspaces || []).map((workspace: TektonWorkspace) => ({ ...workspace, type: VolumeTypes.VolumeClaimTemplate, - data: isServerlessFunctionPipeline - ? getServerlessFunctionDefaultPersistentVolumeClaim(pipeline?.metadata?.name) - : getDefaultVolumeClaimTemplate(pipeline?.metadata?.name), + data: defaultPVC, })), secretOpen: false, }; diff --git a/frontend/packages/pipelines-plugin/src/components/pipelines/modals/common/utils.ts b/frontend/packages/pipelines-plugin/src/components/pipelines/modals/common/utils.ts index 97a9d07fe8c..3110cb5e331 100644 --- a/frontend/packages/pipelines-plugin/src/components/pipelines/modals/common/utils.ts +++ b/frontend/packages/pipelines-plugin/src/components/pipelines/modals/common/utils.ts @@ -1,5 +1,8 @@ import * as _ from 'lodash'; +import { K8sResourceCommon } from '@console/dynamic-plugin-sdk/src'; +import { k8sListResourceItems } from '@console/dynamic-plugin-sdk/src/utils/k8s'; import { getActiveUserName } from '@console/internal/actions/ui'; +import { StorageClassModel } from '@console/internal/models'; import { getRandomChars } from '@console/shared'; import { DELETED_RESOURCE_IN_K8S_ANNOTATION, @@ -178,9 +181,19 @@ export const getDefaultVolumeClaimTemplate = (pipelineName: string): VolumeClaim }; }; -export const getServerlessFunctionDefaultPersistentVolumeClaim = ( +export const getServerlessFunctionDefaultPersistentVolumeClaim = async ( pipelineName: string, -): VolumeClaimTemplateType => { +): Promise => { + const storageClasses: K8sResourceCommon[] = await k8sListResourceItems({ + model: StorageClassModel, + queryParams: {}, + }); + const defaultStorageClass = storageClasses?.find((storageClass) => { + return ( + storageClass.metadata?.annotations?.['storageclass.kubernetes.io/is-default-class'] === 'true' + ); + }); + const defaultStorageClassName = defaultStorageClass?.metadata?.name; return { volumeClaimTemplate: { metadata: { @@ -199,7 +212,7 @@ export const getServerlessFunctionDefaultPersistentVolumeClaim = ( storage: '1Gi', }, }, - storageClassName: 'gp3-csi', + storageClassName: defaultStorageClassName, volumeMode: 'Filesystem', }, }, From 4b6beb3bb6242447aa3b866462c1238946903dd9 Mon Sep 17 00:00:00 2001 From: cyril-ui-developer Date: Fri, 15 Nov 2024 11:49:38 -0500 Subject: [PATCH 007/102] chore(i18n): update translations Adding latest translations from Memsource project https://cloud.memsource.com/web/project2/show/vdXybaUzWcrb1Wd0viGCo5 --- frontend/i18n-scripts/languages.sh | 2 +- .../console-app/locales/fr/console-app.json | 3 +- .../console-app/locales/ja/console-app.json | 5 +- .../console-app/locales/ko/console-app.json | 3 +- .../console-app/locales/zh/console-app.json | 3 +- .../locales/fr/console-shared.json | 2 +- .../locales/ja/console-shared.json | 2 +- .../locales/ko/console-shared.json | 2 +- .../locales/zh/console-shared.json | 2 +- .../dev-console/locales/fr/devconsole.json | 1 - .../dev-console/locales/ja/devconsole.json | 1 - .../dev-console/locales/ko/devconsole.json | 1 - .../dev-console/locales/zh/devconsole.json | 1 - .../locales/ja/gitops-plugin.json | 2 +- .../locales/fr/knative-plugin.json | 2 +- .../locales/ja/knative-plugin.json | 2 +- .../locales/ko/knative-plugin.json | 2 +- .../locales/zh/knative-plugin.json | 2 +- .../locales/ja/olm.json | 2 +- .../locales/fr/pipelines-plugin.json | 12 ++--- .../locales/ja/pipelines-plugin.json | 12 ++--- .../locales/ko/pipelines-plugin.json | 12 ++--- .../locales/zh/pipelines-plugin.json | 12 ++--- .../locales/ja/service-binding-plugin.json | 2 +- .../topology/locales/ja/topology.json | 2 +- frontend/public/locales/fr/public.json | 24 ++-------- frontend/public/locales/ja/public.json | 48 +++++++------------ frontend/public/locales/ko/public.json | 24 ++-------- frontend/public/locales/zh/public.json | 24 ++-------- 29 files changed, 74 insertions(+), 138 deletions(-) diff --git a/frontend/i18n-scripts/languages.sh b/frontend/i18n-scripts/languages.sh index 9d480871643..165dae602e4 100755 --- a/frontend/i18n-scripts/languages.sh +++ b/frontend/i18n-scripts/languages.sh @@ -1,3 +1,3 @@ #!/bin/bash -export LANGUAGES=( 'ja' 'zh-cn' 'ko' 'fr' 'es') +export LANGUAGES=( 'ja' 'zh-cn' 'ko' 'fr') diff --git a/frontend/packages/console-app/locales/fr/console-app.json b/frontend/packages/console-app/locales/fr/console-app.json index d3828081190..3778dc92c86 100644 --- a/frontend/packages/console-app/locales/fr/console-app.json +++ b/frontend/packages/console-app/locales/fr/console-app.json @@ -186,6 +186,7 @@ "Edit Pod selector": "Modifier le sélecteur de pod", "Edit tolerations": "Modifier les tolérances", "Add storage": "Ajouter du stockage", + "Start Job": "Commencer la tâche", "Edit update strategy": "Modifier la stratégie de mise à jour", "Resume rollouts": "Reprendre les déploiements", "Pause rollouts": "Suspendre les déploiements", @@ -226,8 +227,8 @@ "Name": "Nom", "Version": "Version", "Status": "Statut", - "Console operator spec.managementState is unmanaged. Changes to plugins will have no effect.": "L’opérateur de console spec.managementState n’est pas géré. Les modifications apportées aux plug-ins n’auront aucun effet.", "Console plugins table": "Tableau des plug-ins de console", + "Console operator spec.managementState is unmanaged. Changes to plugins will have no effect.": "L’opérateur de console spec.managementState n’est pas géré. Les modifications apportées aux plug-ins n’auront aucun effet.", "console plugins": "plug-ins de console", "Console plugins": "Plug-ins de console", "Customize": "Personnaliser", diff --git a/frontend/packages/console-app/locales/ja/console-app.json b/frontend/packages/console-app/locales/ja/console-app.json index 6d096391133..5bb5fb1c26e 100644 --- a/frontend/packages/console-app/locales/ja/console-app.json +++ b/frontend/packages/console-app/locales/ja/console-app.json @@ -186,6 +186,7 @@ "Edit Pod selector": "Pod セレクターの編集", "Edit tolerations": "容認の編集", "Add storage": "ストレージの追加", + "Start Job": "ジョブの開始", "Edit update strategy": "更新ストラテジーの編集", "Resume rollouts": "ロールアウトの再開", "Pause rollouts": "ロールアウトの一時停止", @@ -210,7 +211,7 @@ "Volume Snapshot is not Ready": "ボリュームスナップショットの準備ができていません", "Rollback": "ロールバック", "Cancel rollout": "ロールアウトのキャンセル", - "Are you sure you want to cancel this rollout?": "このロールアウトをキャンセルしてもよいですか?", + "Are you sure you want to cancel this rollout?": "このロールアウトをキャンセルしてもよろしいですか?", "Yes, cancel": "はい、キャンセルします", "No, don't cancel": "いいえ、キャンセルしません", "Retry rollout": "ロールアウトの再試行", @@ -226,8 +227,8 @@ "Name": "名前", "Version": "バージョン", "Status": "ステータス", - "Console operator spec.managementState is unmanaged. Changes to plugins will have no effect.": "コンソール Operator の spec.managementState は非管理的です。プラグインへの変更は影響を受けません。", "Console plugins table": "コンソールプラグインテーブル", + "Console operator spec.managementState is unmanaged. Changes to plugins will have no effect.": "コンソール Operator の spec.managementState は非管理的です。プラグインへの変更は影響を受けません。", "console plugins": "コンソールプラグイン", "Console plugins": "コンソールプラグイン", "Customize": "カスタマイズ", diff --git a/frontend/packages/console-app/locales/ko/console-app.json b/frontend/packages/console-app/locales/ko/console-app.json index 389e4933011..1cb4abe9747 100644 --- a/frontend/packages/console-app/locales/ko/console-app.json +++ b/frontend/packages/console-app/locales/ko/console-app.json @@ -186,6 +186,7 @@ "Edit Pod selector": "Pod 선택기 편집", "Edit tolerations": "허용 오차 편집", "Add storage": "스토리지 추가", + "Start Job": "작업 시작", "Edit update strategy": "업데이트 전략 편집", "Resume rollouts": "롤아웃 재개", "Pause rollouts": "롤아웃 일시 중지", @@ -226,8 +227,8 @@ "Name": "이름", "Version": "버전", "Status": "상태", - "Console operator spec.managementState is unmanaged. Changes to plugins will have no effect.": "콘솔 Operator spec.managementState는 관리되지 않습니다. 플러그인 변경 사항은 적용되지 않습니다.", "Console plugins table": "콘솔 플러그인 표", + "Console operator spec.managementState is unmanaged. Changes to plugins will have no effect.": "콘솔 Operator spec.managementState는 관리되지 않습니다. 플러그인 변경 사항은 적용되지 않습니다.", "console plugins": "콘솔 플러그인", "Console plugins": "콘솔 플러그인", "Customize": "사용자 정의", diff --git a/frontend/packages/console-app/locales/zh/console-app.json b/frontend/packages/console-app/locales/zh/console-app.json index 3359bb7cdca..e01ffc238b3 100644 --- a/frontend/packages/console-app/locales/zh/console-app.json +++ b/frontend/packages/console-app/locales/zh/console-app.json @@ -186,6 +186,7 @@ "Edit Pod selector": "编辑 Pod 选择器", "Edit tolerations": "编辑容限", "Add storage": "添加存储", + "Start Job": "启动作业", "Edit update strategy": "编辑更新策略", "Resume rollouts": "恢复推出部署", "Pause rollouts": "暂停推出部署", @@ -226,8 +227,8 @@ "Name": "名称", "Version": "版本", "Status": "状态", - "Console operator spec.managementState is unmanaged. Changes to plugins will have no effect.": "控制台 operator spec.managementState 是非受管状态。对插件的更改将无效。", "Console plugins table": "控制台插件表", + "Console operator spec.managementState is unmanaged. Changes to plugins will have no effect.": "控制台 operator spec.managementState 是非受管状态。对插件的更改将无效。", "console plugins": "控制台插件", "Console plugins": "控制台插件", "Customize": "自定义", diff --git a/frontend/packages/console-shared/locales/fr/console-shared.json b/frontend/packages/console-shared/locales/fr/console-shared.json index f2cefcfd070..e1adf760cff 100644 --- a/frontend/packages/console-shared/locales/fr/console-shared.json +++ b/frontend/packages/console-shared/locales/fr/console-shared.json @@ -252,8 +252,8 @@ "OLSConfigs": "Configurations OLS", "{{label}} details": "Détails de {{label}}", "Provisioned as node": "Provisionné en tant que nœud", - "Select input": "Sélectionner une entrée", "Select options": "Sélectionner des options", + "Select input": "Sélectionner une entrée", "Pod": "Pod", "Pods": "Pods", "Scaled to 0": "Mis à l’échelle vers 0", diff --git a/frontend/packages/console-shared/locales/ja/console-shared.json b/frontend/packages/console-shared/locales/ja/console-shared.json index edf810481e1..4149dfa17c1 100644 --- a/frontend/packages/console-shared/locales/ja/console-shared.json +++ b/frontend/packages/console-shared/locales/ja/console-shared.json @@ -252,8 +252,8 @@ "OLSConfigs": "OLSConfigs", "{{label}} details": "{{label}} の詳細", "Provisioned as node": "ノードとしてプロビジョニング", - "Select input": "入力の選択", "Select options": "プロジェクトの選択", + "Select input": "入力の選択", "Pod": "Pod", "Pods": "Pods", "Scaled to 0": "0 にスケーリング", diff --git a/frontend/packages/console-shared/locales/ko/console-shared.json b/frontend/packages/console-shared/locales/ko/console-shared.json index a5618801376..6c1fd8da93e 100644 --- a/frontend/packages/console-shared/locales/ko/console-shared.json +++ b/frontend/packages/console-shared/locales/ko/console-shared.json @@ -252,8 +252,8 @@ "OLSConfigs": "OLSConfigs", "{{label}} details": "{{label}} 세부 정보", "Provisioned as node": "노드로 프로비저닝", - "Select input": "입력 선택", "Select options": "옵션 선택", + "Select input": "입력 선택", "Pod": "Pod", "Pods": "Pod", "Scaled to 0": "0으로 스케일링", diff --git a/frontend/packages/console-shared/locales/zh/console-shared.json b/frontend/packages/console-shared/locales/zh/console-shared.json index a95d838c94d..de4a1b8aa61 100644 --- a/frontend/packages/console-shared/locales/zh/console-shared.json +++ b/frontend/packages/console-shared/locales/zh/console-shared.json @@ -252,8 +252,8 @@ "OLSConfigs": "OLSConfigs", "{{label}} details": "{{label}}详情", "Provisioned as node": "置备为节点", - "Select input": "选择输入", "Select options": "项目选项", + "Select input": "选择输入", "Pod": "Pod", "Pods": "Pod", "Scaled to 0": "缩放到 0", diff --git a/frontend/packages/dev-console/locales/fr/devconsole.json b/frontend/packages/dev-console/locales/fr/devconsole.json index 4803ff1f162..f6b38ce7426 100644 --- a/frontend/packages/dev-console/locales/fr/devconsole.json +++ b/frontend/packages/dev-console/locales/fr/devconsole.json @@ -525,7 +525,6 @@ "Path that the router watches to route traffic to the service.": "Chemin que le routeur surveille pour acheminer le trafic vers le service.", "Target port": "Port cible", "Target port for traffic.": "Port cible pour le trafic.", - "No results found": "Aucun résultat trouvé", "Edge": "Périphérie", "Passthrough": "Intermédiaire", "Re-encrypt": "Rechiffrer", diff --git a/frontend/packages/dev-console/locales/ja/devconsole.json b/frontend/packages/dev-console/locales/ja/devconsole.json index bb413acea74..ccd545b12e1 100644 --- a/frontend/packages/dev-console/locales/ja/devconsole.json +++ b/frontend/packages/dev-console/locales/ja/devconsole.json @@ -525,7 +525,6 @@ "Path that the router watches to route traffic to the service.": "ルーターがトラフィックをサービスにルーティングするために監視するパス。", "Target port": "ターゲットポート", "Target port for traffic.": "トラフィックのターゲットポート。", - "No results found": "結果が見つかりません", "Edge": "Edge", "Passthrough": "passthrough", "Re-encrypt": "Re-encrypt", diff --git a/frontend/packages/dev-console/locales/ko/devconsole.json b/frontend/packages/dev-console/locales/ko/devconsole.json index 676b305049f..3d465534783 100644 --- a/frontend/packages/dev-console/locales/ko/devconsole.json +++ b/frontend/packages/dev-console/locales/ko/devconsole.json @@ -525,7 +525,6 @@ "Path that the router watches to route traffic to the service.": "라우터가 트래픽을 서비스로 라우팅하기 위해 모니터링하는 경로입니다.", "Target port": "대상 포트", "Target port for traffic.": "트래픽 대상 포트입니다.", - "No results found": "결과 없음", "Edge": "Edge", "Passthrough": "Passthrough", "Re-encrypt": "Re-encrypt", diff --git a/frontend/packages/dev-console/locales/zh/devconsole.json b/frontend/packages/dev-console/locales/zh/devconsole.json index 905854d518d..f79b0a6844a 100644 --- a/frontend/packages/dev-console/locales/zh/devconsole.json +++ b/frontend/packages/dev-console/locales/zh/devconsole.json @@ -525,7 +525,6 @@ "Path that the router watches to route traffic to the service.": "路由监视流向服务路由的路径。", "Target port": "目标端口", "Target port for traffic.": "流量的目标端口。", - "No results found": "未找到结果", "Edge": "Edge", "Passthrough": "Passthrough", "Re-encrypt": "Re-encrypt", diff --git a/frontend/packages/gitops-plugin/locales/ja/gitops-plugin.json b/frontend/packages/gitops-plugin/locales/ja/gitops-plugin.json index 22f0e8c82de..8b899d237c8 100644 --- a/frontend/packages/gitops-plugin/locales/ja/gitops-plugin.json +++ b/frontend/packages/gitops-plugin/locales/ja/gitops-plugin.json @@ -22,7 +22,7 @@ "Resources": "リソース", "Deployments": "Deployments", "Secrets": "シークレット", - "Services": "Service", + "Services": "Services", "Routes": "Routes", "Role Bindings": "ロールバインディング", "Cluster Roles": "クラスターロール", diff --git a/frontend/packages/knative-plugin/locales/fr/knative-plugin.json b/frontend/packages/knative-plugin/locales/fr/knative-plugin.json index d55b6563bd8..86f2093a21f 100644 --- a/frontend/packages/knative-plugin/locales/fr/knative-plugin.json +++ b/frontend/packages/knative-plugin/locales/fr/knative-plugin.json @@ -252,6 +252,7 @@ "Target URI:": "URI cible :", "No sink found for this resource.": "Aucun récepteur n’a été trouvé pour cette ressource.", "Filter": "Filtre", + "Attribute": "Attribut", "View all ({{revLength}})": "Afficher tout ({{revLength}})", "No Revisions found for this resource.": "Aucune révision n’a été trouvée pour cette ressource.", "No Routes found for this resource.": "Aucun itinéraire trouvé pour cette ressource.", @@ -260,7 +261,6 @@ "Function": "Fonction", "Subscription details": "Détails de l’abonnement", "Trigger details": "Détails du déclencheur", - "Attribute": "Attribut", "No Subscriber available": "Aucun abonné disponible", "To create a Subscriber, first create a Knative Service from the <1>Add page.": "Pour créer un abonné, créez d'abord un service Knative à partir de <1> Ajouter une page.", "Select Subscriber": "Sélectionner un abonné", diff --git a/frontend/packages/knative-plugin/locales/ja/knative-plugin.json b/frontend/packages/knative-plugin/locales/ja/knative-plugin.json index 30e71d380de..f6ff22e65b9 100644 --- a/frontend/packages/knative-plugin/locales/ja/knative-plugin.json +++ b/frontend/packages/knative-plugin/locales/ja/knative-plugin.json @@ -252,6 +252,7 @@ "Target URI:": "ターゲット URI:", "No sink found for this resource.": "このリソースのシンクが見つかりません。", "Filter": "フィルター", + "Attribute": "属性", "View all ({{revLength}})": "すべてを表示 ({{revLength}})", "No Revisions found for this resource.": "このリソースの Revision が見つかりません。", "No Routes found for this resource.": "このリソースの Route が見つかりません。", @@ -260,7 +261,6 @@ "Function": "関数", "Subscription details": "Subscription の詳細", "Trigger details": "トリガーの詳細", - "Attribute": "属性", "No Subscriber available": "選択可能なサブスクライバーがありません", "To create a Subscriber, first create a Knative Service from the <1>Add page.": "サブスクライバーを作成するには、最初に <1>Add page から Knative サービスを作成します。", "Select Subscriber": "サブスクライバーの選択", diff --git a/frontend/packages/knative-plugin/locales/ko/knative-plugin.json b/frontend/packages/knative-plugin/locales/ko/knative-plugin.json index 76116e82310..1d36ae462b0 100644 --- a/frontend/packages/knative-plugin/locales/ko/knative-plugin.json +++ b/frontend/packages/knative-plugin/locales/ko/knative-plugin.json @@ -252,6 +252,7 @@ "Target URI:": "대상 URI:", "No sink found for this resource.": "이 리소스에 대한 싱크가 없습니다.", "Filter": "필터", + "Attribute": "특성", "View all ({{revLength}})": "모두보기 ({{revLength}})", "No Revisions found for this resource.": "이 리소스에 대한 개정 버전이 없습니다.", "No Routes found for this resource.": "이 리소스의 경로를 찾을 수 없습니다.", @@ -260,7 +261,6 @@ "Function": "함수", "Subscription details": "서브스크립션 세부 정보", "Trigger details": "트리거 세부 정보", - "Attribute": "특성", "No Subscriber available": "사용 가능한 구독자가 없습니다.", "To create a Subscriber, first create a Knative Service from the <1>Add page.": "구독자를 만들려면 먼저 <1>추가 페이지에서 Knative 서비스를 만듭니다.", "Select Subscriber": "구독자 선택", diff --git a/frontend/packages/knative-plugin/locales/zh/knative-plugin.json b/frontend/packages/knative-plugin/locales/zh/knative-plugin.json index 81db2dbd8b8..10176d3d215 100644 --- a/frontend/packages/knative-plugin/locales/zh/knative-plugin.json +++ b/frontend/packages/knative-plugin/locales/zh/knative-plugin.json @@ -252,6 +252,7 @@ "Target URI:": "目标 URI:", "No sink found for this resource.": "没有找到此资源的 sink。", "Filter": "过滤器", + "Attribute": "属性", "View all ({{revLength}})": "查看所有 ({{revLength}} )", "No Revisions found for this resource.": "没有找到此资源的修订。", "No Routes found for this resource.": "没有找到此资源的路由。", @@ -260,7 +261,6 @@ "Function": "功能", "Subscription details": "订阅详情", "Trigger details": "触发器详情", - "Attribute": "属性", "No Subscriber available": "没有可用的订阅者", "To create a Subscriber, first create a Knative Service from the <1>Add page.": "要创建一个订阅者,首先从<1>添加页中创建一个 Knative 服务。", "Select Subscriber": "选择订阅者", diff --git a/frontend/packages/operator-lifecycle-manager/locales/ja/olm.json b/frontend/packages/operator-lifecycle-manager/locales/ja/olm.json index 954c4e907fa..2952c0d9c79 100644 --- a/frontend/packages/operator-lifecycle-manager/locales/ja/olm.json +++ b/frontend/packages/operator-lifecycle-manager/locales/ja/olm.json @@ -141,7 +141,7 @@ "No InstallPlans found": "InstallPlan が見つかりません", "InstallPlans are created automatically by subscriptions or manually using the CLI.": "InstallPlan はサブスクリプションによって自動的に作成されるか、または CLI を使用して手動で作成されます。", "Components": "コンポーネント", - "Subscriptions": "Subscription", + "Subscriptions": "Subscriptions", "InstallPlans": "InstallPlan", "Missing sufficient privileges for manual InstallPlan approval": "手動 InstallPlan を承認するのに十分な権限がありません", "User \"{{user}}\" does not have permissions to patch resource InstallPlans in API group \"{{apiGroup}}\" in the namespace \"{{namespace}}.\"": "ユーザー \"{{user}}\" には、namespace \"{{namespace}}\" の API グループ \"{{apiGroup}}\" のリソース InstallPlan にパッチを適用するパーミッションがありません。", diff --git a/frontend/packages/pipelines-plugin/locales/fr/pipelines-plugin.json b/frontend/packages/pipelines-plugin/locales/fr/pipelines-plugin.json index e2c218d812f..995aeff862b 100644 --- a/frontend/packages/pipelines-plugin/locales/fr/pipelines-plugin.json +++ b/frontend/packages/pipelines-plugin/locales/fr/pipelines-plugin.json @@ -23,6 +23,12 @@ "EventListeners": "Écouteurs d’événements", "Repository": "Dépôt", "Repositories": "Dépôts", + "TektonConfig": "Configuration de Tekton", + "TektonConfigs": "Configurations de Tekton", + "TektonHub": "Hub Tekton", + "TektonHubs": "Hubs Tekton", + "TektonResult": "Résultat Tekton", + "TektonResults": "Résultats Tekton", "Create a Tekton Pipeline to automate delivery of your application": "Créez un pipeline Tekton pour automatiser la livraison de votre application", "Triggers": "Déclencheurs", "Red Hat": "Red Hat", @@ -440,12 +446,6 @@ "{{taskLabel}} details": "Détails de {{taskLabel}}", "CustomRun": "Exécution personnalisée", "CustomRuns": "Exécutions personnalisées", - "TektonConfig": "Configuration de Tekton", - "TektonConfigs": "Configurations de Tekton", - "TektonHub": "Hub Tekton", - "TektonHubs": "Hubs Tekton", - "TektonResult": "Résultat Tekton", - "TektonResults": "Résultats Tekton", "Pipeline {{status}}": "Pipeline {{status}}", "Pipeline status is {{status}}. View logs.": "L’état du pipeline est {{status}}. Consultez les journaux.", "Pipeline not started. Start pipeline.": "Le pipeline n’a pas démarré. Démarrez le pipeline.", diff --git a/frontend/packages/pipelines-plugin/locales/ja/pipelines-plugin.json b/frontend/packages/pipelines-plugin/locales/ja/pipelines-plugin.json index 4ae091d9fd7..c133109fa73 100644 --- a/frontend/packages/pipelines-plugin/locales/ja/pipelines-plugin.json +++ b/frontend/packages/pipelines-plugin/locales/ja/pipelines-plugin.json @@ -23,6 +23,12 @@ "EventListeners": "EventListeners", "Repository": "Repository", "Repositories": "Repositories", + "TektonConfig": "TektonConfig", + "TektonConfigs": "TektonConfigs", + "TektonHub": "TektonHub", + "TektonHubs": "TektonHubs", + "TektonResult": "TektonResult", + "TektonResults": "TektonResults", "Create a Tekton Pipeline to automate delivery of your application": "Tekton Pipeline を作成してアプリケーションの配信を自動化します", "Triggers": "Trigger", "Red Hat": "Red Hat", @@ -440,12 +446,6 @@ "{{taskLabel}} details": "{{taskLabel}} の詳細", "CustomRun": "CustomRun", "CustomRuns": "CustomRuns", - "TektonConfig": "TektonConfig", - "TektonConfigs": "TektonConfigs", - "TektonHub": "TektonHub", - "TektonHubs": "TektonHubs", - "TektonResult": "TektonResult", - "TektonResults": "TektonResults", "Pipeline {{status}}": "Pipeline {{status}}", "Pipeline status is {{status}}. View logs.": "Pipeline のステータスは {{status}} です。ログを確認してください。", "Pipeline not started. Start pipeline.": "Pipeline が起動していません。Pipeline を起動します。", diff --git a/frontend/packages/pipelines-plugin/locales/ko/pipelines-plugin.json b/frontend/packages/pipelines-plugin/locales/ko/pipelines-plugin.json index f07bb9b7047..0c5efe31529 100644 --- a/frontend/packages/pipelines-plugin/locales/ko/pipelines-plugin.json +++ b/frontend/packages/pipelines-plugin/locales/ko/pipelines-plugin.json @@ -23,6 +23,12 @@ "EventListeners": "이벤트 리스너", "Repository": "리포지터리", "Repositories": "리포지토리", + "TektonConfig": "TektonConfig", + "TektonConfigs": "tektonconfigs", + "TektonHub": "TektonHub", + "TektonHubs": "TektonHubs", + "TektonResult": "TektonResult", + "TektonResults": "TektonResults", "Create a Tekton Pipeline to automate delivery of your application": "애플리케이션 제공을 자동화하는 Tekton 파이프 라인 생성", "Triggers": "트리거", "Red Hat": "Red Hat", @@ -440,12 +446,6 @@ "{{taskLabel}} details": "{{taskLabel}} 세부 정보", "CustomRun": "CustomRun", "CustomRuns": "CustomRuns", - "TektonConfig": "TektonConfig", - "TektonConfigs": "tektonconfigs", - "TektonHub": "TektonHub", - "TektonHubs": "TektonHubs", - "TektonResult": "TektonResult", - "TektonResults": "TektonResults", "Pipeline {{status}}": "파이프 라인 {{status}}", "Pipeline status is {{status}}. View logs.": "파이프 라인 상태는 {{status}}입니다. 로그를 살펴봅니다.", "Pipeline not started. Start pipeline.": "파이프 라인이 시작되지 않았습니다. 파이프 라인을 시작합니다.", diff --git a/frontend/packages/pipelines-plugin/locales/zh/pipelines-plugin.json b/frontend/packages/pipelines-plugin/locales/zh/pipelines-plugin.json index f8184c2f2e5..b94e419db85 100644 --- a/frontend/packages/pipelines-plugin/locales/zh/pipelines-plugin.json +++ b/frontend/packages/pipelines-plugin/locales/zh/pipelines-plugin.json @@ -23,6 +23,12 @@ "EventListeners": "事件监听器", "Repository": "软件仓库", "Repositories": "存储库", + "TektonConfig": "TektonConfig", + "TektonConfigs": "TektonConfigs", + "TektonHub": "TektonHub", + "TektonHubs": "TektonHubs", + "TektonResult": "TektonResult", + "TektonResults": "TektonResults", "Create a Tekton Pipeline to automate delivery of your application": "创建一个 Tekton 管道来自动交付应用程序", "Triggers": "触发器", "Red Hat": "Red Hat", @@ -440,12 +446,6 @@ "{{taskLabel}} details": "{{taskLabel}} 详情", "CustomRun": "CustomRun", "CustomRuns": "CustomRuns", - "TektonConfig": "TektonConfig", - "TektonConfigs": "TektonConfigs", - "TektonHub": "TektonHub", - "TektonHubs": "TektonHubs", - "TektonResult": "TektonResult", - "TektonResults": "TektonResults", "Pipeline {{status}}": "管道{{status}}", "Pipeline status is {{status}}. View logs.": "管道状态是 {{status}}。查看日志。", "Pipeline not started. Start pipeline.": "管道未启动。启动管道。", diff --git a/frontend/packages/service-binding-plugin/locales/ja/service-binding-plugin.json b/frontend/packages/service-binding-plugin/locales/ja/service-binding-plugin.json index 141f7f7b5c6..7323b7235c7 100644 --- a/frontend/packages/service-binding-plugin/locales/ja/service-binding-plugin.json +++ b/frontend/packages/service-binding-plugin/locales/ja/service-binding-plugin.json @@ -6,7 +6,7 @@ "Status": "ステータス", "Label Selector": "ラベルセレクター", "Application": "アプリケーション", - "Services": "Service", + "Services": "Services", "Connected": "接続済み", "Error": "エラー", "Name": "名前", diff --git a/frontend/packages/topology/locales/ja/topology.json b/frontend/packages/topology/locales/ja/topology.json index 27dbe3d19ed..01fafecfac1 100644 --- a/frontend/packages/topology/locales/ja/topology.json +++ b/frontend/packages/topology/locales/ja/topology.json @@ -125,7 +125,7 @@ "Service port:": "サービスポート:", "Pod port:": "Pod ポート:", "Location:": "場所:", - "Services": "Service", + "Services": "Services", "No Services found for this resource.": "このリソースの Service が見つかりません。", "Routes": "Routes", "No Routes found for this resource.": "このリソースの Route が見つかりません。", diff --git a/frontend/public/locales/fr/public.json b/frontend/public/locales/fr/public.json index 1e12cd05748..9447989ab96 100644 --- a/frontend/public/locales/fr/public.json +++ b/frontend/public/locales/fr/public.json @@ -924,6 +924,9 @@ "Are you sure you want to remove volume <2>{{volumeName}} from <5>{{label}}: <7>{{resourceName}}?": "Voulez-vous vraiment supprimer le volume <2>{{volumeName}} de <5>{{label}} : <7>{{resourceName}} ?", "Note: This will not remove the underlying {{type}}.": "Remarque : cette opération ne supprimera pas le {{type}} sous-jacent.", "Remove volume": "Supprimer le volume", + "Replace current content?": "Souhaitez-vous remplacer le contenu actuel ?", + "Keep both": "Gardez les deux", + "Existing content will be replaced. Do you want to continue?": "Le contenu existant sera remplacé. Voulez-vous continuer ?", "You cannot rollback a paused {{ deployType }}. You must resume it first.": "Vous ne pouvez pas restaurer un {{ deployType }} mis en pause. Vous devez d’abord le relancer.", "Use the following settings from <2>{{resourceName}} when rolling back:": "Utilisez les paramètres suivants de <2>{{resourceName}} lors de la restauration :", "Replica count and selector": "Nombre de réplicas et sélecteur", @@ -1042,12 +1045,6 @@ "Update this YAML to configure Routes, Receivers, Groupings and other Alertmanager settings.": "Mettez à jour ce code YAML pour configurer les itinéraires, les destinataires, les groupements et d’autres paramètres du Gestionnaire d’alertes.", "Show graph": "Afficher le graphique", "Hide graph": "Masquer le graphique", - "Show series": "Afficher la série", - "Hide series": "Masquer la série", - "Error loading values": "Erreur lors du chargement des valeurs", - "Unselect all": "Tout désélectionner", - "Select all": "Tout sélectionner", - "query results table": "tableau des résultats de la requête", "Refresh off": "Actualiser", "{{count}} minute_one": "{{count}} minute", "{{count}} minute_other": "{{count}} minutes", @@ -1055,10 +1052,6 @@ "{{count}} hour_other": "{{count}} heures", "{{count}} day_one": "{{count}} jour", "{{count}} day_other": "{{count}} jours", - "Expression (press Shift+Enter for newlines)": "Expression (appuyez sur Maj+Entrée pour insérer de nouvelles lignes)", - "Access restricted.": "Accès limité.", - "Failed to load metrics list.": "Échec du chargement de la liste des métriques.", - "Clear query": "Effacer la requête", "Your default receiver will automatically receive all alerts from this cluster that are not caught by other receivers first.": "Votre destinataire par défaut recevra automatiquement toutes les alertes de ce cluster qui ne sont pas interceptées en premier par d’autres destinataires.", "The routing labels for this receiver are configured to capture critical alerts. Finish setting up this receiver by selecting a \"Receiver Type\" to choose a destination for these alerts. If this receiver is deleted, critical alerts will go to the default receiver instead.": "Les étiquettes de routage de ce destinataire sont configurées pour intercepter les alertes critiques. Terminez la configuration de ce destinataire en sélectionnant un « Type de destinataire » pour choisir une destination pour ces alertes. Si ce destinataire est supprimé, les alertes critiques seront envoyées au destinataire par défaut.", "The Watchdog alert fires constantly to confirm that your alerting stack is functioning correctly. This receiver is configured to prevent it from creating unnecessary notifications. You can edit this receiver if you plan to use the information that Watchdog provides, otherwise this receiver should remain in its current state with no set receiver type.": "L’alerte Watchdog se déclenche constamment pour confirmer que votre pile d’alertes fonctionne correctement. Ce destinataire est configuré pour l’empêcher de créer des notifications inutiles. Vous pouvez modifier ce destinataire si vous envisagez d’utiliser les informations fournies par Watchdog. Sinon, ce destinataire doit rester dans son état actuel sans type de destinataire défini.", @@ -1161,16 +1154,6 @@ "Silence": "Mettre en sourdine", "Overwriting current silence": "Remplacer le silence actuel", "When changes are saved, the currently existing silence will be expired and a new silence with the new configuration will take its place.": "Lorsque les modifications sont enregistrées, le silence existant expire et un nouveau silence avec la nouvelle configuration prend sa place.", - "<0>{{firstIndex}} - {{lastIndex}} of <3>{{itemCount}} {{itemsTitle}}": "<0>{{firstIndex}} -{{lastIndex}} sur <3>{{itemCount}} {{itemsTitle}}", - "Items per page": "Éléments par page", - "per page": "par page", - "Go to first page": "Atteindre la première page", - "Go to previous page": "Atteindre la page précédente", - "Go to last page": "Atteindre la dernière page", - "Go to next page": "Atteindre la page suivante", - "Current page": "Page actuelle", - "Pagination": "Pagination", - "of": "sur", "Up": "Vers le haut", "Down": "Vers le bas", "Target details": "Détails de la cible", @@ -1402,6 +1385,7 @@ "Clear history": "Effacer l’historique", "Recently used": "Utilisé récemment", "No results found": "Aucun résultat trouvé", + "Clear input value": "Effacer la valeur d'entrée", "Edit AppliedClusterResourceQuota": "Modifier AppliedClusterResourceQuota", "Affects pods that have an active deadline. These pods usually include builds, deployers, and jobs.": "Affecte les pods qui ont une date limite active. Ces pods incluent généralement des compilations, des outils de déploiement et des tâches.", "Affects pods that do not have an active deadline. These pods usually include your applications.": "Affecte les pods qui n’ont pas de date limite active. Ces pods incluent généralement vos applications.", diff --git a/frontend/public/locales/ja/public.json b/frontend/public/locales/ja/public.json index 447ac7809e8..58f6731a5f0 100644 --- a/frontend/public/locales/ja/public.json +++ b/frontend/public/locales/ja/public.json @@ -88,7 +88,7 @@ "Input required": "入力が必要", "Rebuild": "再ビルド", "Cancel build": "ビルドのキャンセル", - "Are you sure you want to cancel this build?": "このビルドをキャンセルしてもよいですか?", + "Are you sure you want to cancel this build?": "このビルドをキャンセルしてもよろしいですか?", "Yes, cancel": "はい、キャンセルします", "No, don't cancel": "いいえ、キャンセルしません", "Memory usage": "メモリー使用量", @@ -890,8 +890,8 @@ "Shut down all existing pods before creating new ones": "新規 Pod を作成する前に、既存 Pod をすべてシャットダウンします", "Confirm": "確定", "Delete {{kind}}?": "{{kind}} を削除しますか?", - "Are you sure you want to delete <2>{{resourceName}} in namespace <5>{{namespace}}?": "namespace <5>{{namespace}} の <2>{{resourceName}} を削除してもよいですか?", - "Are you sure you want to delete <2>{{resourceName}}?": "<2>{{resourceName}} を削除してもよいですか?", + "Are you sure you want to delete <2>{{resourceName}} in namespace <5>{{namespace}}?": "namespace <5>{{namespace}} の <2>{{resourceName}} を削除してもよろしいですか?", + "Are you sure you want to delete <2>{{resourceName}}?": "<2>{{resourceName}} を削除してもよろしいですか?", "Delete dependent objects of this resource": "このリソースの依存オブジェクトを削除する", "Delete other resources created by console": "コンソールが作成したその他のリソースを削除する", "Managed resource": "管理対象リソース", @@ -903,7 +903,7 @@ "Enter name": "名前を入力してください", "Enter the name of the {{label}} to delete": "削除する {{label}} の名前を入力します", "Delete PersistentVolumeClaim": "PersistentVolumeClaim の削除", - "Are you sure you want to delete <2>{{pvcName}} PersistentVolumeClaim?": "<2>{{pvcName}} PersistentVolumeClaim を削除してもよいですか?", + "Are you sure you want to delete <2>{{pvcName}} PersistentVolumeClaim?": "<2>{{pvcName}} PersistentVolumeClaim を削除してもよろしいですか?", "OK": "OK", "Expand {{kind}}": "{{kind}} の拡張", "Increase the capacity of PVC <2>{{resourceName}}. Note that capacity can't be less than the current PVC size. This can be a time-consuming process.": "PVC <2>{{resourceName}} の容量を増やします。 容量は、現在の PVC サイズよりも小さくできないことに注意してください。このプロセスには時間がかかる場合があります。", @@ -921,15 +921,18 @@ "Remove User {{ user }} from Group {{ name }}?": "グループ {{ name }} からユーザー {{ user }} を削除しますか?", "Remove": "削除", "Remove volume?": "ボリュームを削除しますか?", - "Are you sure you want to remove volume <2>{{volumeName}} from <5>{{label}}: <7>{{resourceName}}?": "ボリューム <2>{{volumeName}} を <5>{{label}}: <7>{{resourceName}} から削除してもよいですか?", + "Are you sure you want to remove volume <2>{{volumeName}} from <5>{{label}}: <7>{{resourceName}}?": "ボリューム <2>{{volumeName}} を <5>{{label}}: <7>{{resourceName}} から削除してもよろしいですか?", "Note: This will not remove the underlying {{type}}.": "注: これにより、基礎となる {{type}} は削除されません。", - "Remove volume": "ボリュームの削除", + "Remove volume": "ボリュームを削除する", + "Replace current content?": "現在のコンテンツを置き換えますか?", + "Keep both": "両方を維持する", + "Existing content will be replaced. Do you want to continue?": "既存のコンテンツが置き換えられます。続行してもよろしいですか?", "You cannot rollback a paused {{ deployType }}. You must resume it first.": "一時停止した {{ deployType }} をロールバックすることはできません。まず、これを再開する必要があります。", "Use the following settings from <2>{{resourceName}} when rolling back:": "ロールバック時には、<2>{{resourceName}} から以下の設定を使用します:", "Replica count and selector": "レプリカ数およびセレクター", "Deployment strategy": "デプロイメントストラテジー", "Deployment trigger": "デプロイメントトリガー", - "Are you sure you want to rollback to <2>{{resourceName}}?": "<2>{{resourceName}} にロールバックしてもよいですか?", + "Are you sure you want to rollback to <2>{{resourceName}}?": "<2>{{resourceName}} にロールバックしてもよろしいですか?", "Rollback": "ロールバック", "Unable to Rollback": "ロールバックできません", "Duplicate keys found.": "重複するキーが見つかりました。", @@ -1020,7 +1023,7 @@ "Edit Receiver": "レシーバーの編集", "Delete Receiver": "レシーバーの削除", "Cannot delete the default receiver, or a receiver which has a sub-route": "デフォルトのレシーバー、またはサブルートを持つレシーバーを削除できません", - "Are you sure you want to delete receiver {{receiverName}}?": "レシーバー {{receiverName}} を削除してもよいですか?", + "Are you sure you want to delete receiver {{receiverName}}?": "レシーバー {{receiverName}} を削除してもよろしいですか?", "Configure": "設定", "All (default receiver)": "すべて (デフォルトレシーバー)", "No Receivers match filter {{filterValue}}": "フィルター {{filterValue}} に一致するレシーバーがありません", @@ -1042,12 +1045,6 @@ "Update this YAML to configure Routes, Receivers, Groupings and other Alertmanager settings.": "この YAML を更新して、Route、Receiver、Grouping、その他の Alertmanager 設定を行います。", "Show graph": "グラフの表示", "Hide graph": "グラフの非表示", - "Show series": "シリーズを表示する", - "Hide series": "シリーズを非表示にする", - "Error loading values": "値の読み込みエラー", - "Unselect all": "すべて選択解除", - "Select all": "すべて選択", - "query results table": "クエリー結果テーブル", "Refresh off": "更新オフ", "{{count}} minute_one": "{{count}} 分", "{{count}} minute_other": "{{count}} 分", @@ -1055,10 +1052,6 @@ "{{count}} hour_other": "{{count}} 時間", "{{count}} day_one": "{{count}} 日", "{{count}} day_other": "{{count}} 日", - "Expression (press Shift+Enter for newlines)": "式 (Shift+Enter で改行)", - "Access restricted.": "アクセスが制限されています。", - "Failed to load metrics list.": "メトリクス一覧の読み込みに失敗しました。", - "Clear query": "クエリーをクリアする", "Your default receiver will automatically receive all alerts from this cluster that are not caught by other receivers first.": "デフォルトのレシーバーは、他のレシーバーがキャッチしていないすべてのアラートをこのクラスターから自動的に受信します。", "The routing labels for this receiver are configured to capture critical alerts. Finish setting up this receiver by selecting a \"Receiver Type\" to choose a destination for these alerts. If this receiver is deleted, critical alerts will go to the default receiver instead.": "このレシーバーのルーティングラベルは、重大なアラートをキャプチャーするように設定されています。「レシーバータイプ」を選択してこれらのアラートの宛先を選択することにより、このレシーバーの設定を完了します。このレシーバーが削除されると、重大なアラートはデフォルトのレシーバーに送信されます。", "The Watchdog alert fires constantly to confirm that your alerting stack is functioning correctly. This receiver is configured to prevent it from creating unnecessary notifications. You can edit this receiver if you plan to use the information that Watchdog provides, otherwise this receiver should remain in its current state with no set receiver type.": "Watchdog アラートは常に発生し、アラートスタックが正しく機能していることを確認します。このレシーバーは、不要な通知が作成されないように設定されています。Watchdog が提供する情報を使用する場合は、このレシーバーを編集できます。それ以外の場合、このレシーバーは、レシーバータイプが設定されていない現在の状態のままになります。", @@ -1161,16 +1154,6 @@ "Silence": "サイレンス", "Overwriting current silence": "現在のサイレンスの上書き", "When changes are saved, the currently existing silence will be expired and a new silence with the new configuration will take its place.": "変更が保存されると、現時点で既存のサイレンスが期限切れになり、新規の設定を使用した新規サイレンスがこの代わりとして実行されます。", - "<0>{{firstIndex}} - {{lastIndex}} of <3>{{itemCount}} {{itemsTitle}}": "<0>{{firstIndex}} - {{lastIndex}}/<3>{{itemCount}} {{itemsTitle}}", - "Items per page": "1 ページの項目数", - "per page": "ページあたり", - "Go to first page": "最初のページに移動", - "Go to previous page": "前のページに移動", - "Go to last page": "最後のページに移動", - "Go to next page": "次のページに移動", - "Current page": "現在のページ", - "Pagination": "ページネーション", - "of": "/", "Up": "起動中", "Down": "停止中", "Target details": "Target の詳細", @@ -1261,7 +1244,7 @@ "Service port:": "サービスポート:", "Pod port:": "Pod ポート:", "Location:": "場所:", - "Services": "Service", + "Services": "Services", "No Services found for this resource.": "このリソースの Service が見つかりません。", "Routes": "Routes", "No Routes found for this resource.": "このリソースの Route が見つかりません。", @@ -1344,7 +1327,7 @@ "Duplicate {{kindLabel}}": "{{kindLabel}} の複製", "Edit {{kindLabel}} subject": "{{kindLabel}} サブジェクトの編集", "Delete {{label}} subject": "{{label}} サブジェクトの削除", - "Are you sure you want to delete subject {{name}} of type {{kind}}?": "タイプ {{kind}} のサブジェクト {{name}} を削除してもよいですか?", + "Are you sure you want to delete subject {{name}} of type {{kind}}?": "タイプ {{kind}} のサブジェクト {{name}} を削除してもよろしいですか?", "Delete subject": "サブジェクトの削除", "Impersonate {{kind}} \"{{name}}\"": "{{kind}} \"{{name}}\" への切り替え", "Role ref": "ロール参照", @@ -1391,7 +1374,7 @@ "Actions": "アクション", "API groups": "API グループ", "Delete rule": "ルールの削除", - "Are you sure you want to delete rule #{{ruleNumber}}?": "ルール #{{ruleNumber}} を削除してもよいですか?", + "Are you sure you want to delete rule #{{ruleNumber}}?": "ルール #{{ruleNumber}} を削除してもよろしいですか?", "ReplicaSet details": "ReplicaSet の詳細", "Deployment revision": "デプロイメントのリビジョン", "{{count1}} of {{count2}} pods": "{{count1}}/{{count2}} Pod", @@ -1402,6 +1385,7 @@ "Clear history": "履歴のクリア", "Recently used": "最近使用", "No results found": "結果が見つかりません", + "Clear input value": "入力値のクリア", "Edit AppliedClusterResourceQuota": "AppliedClusterResourceQuota の編集", "Affects pods that have an active deadline. These pods usually include builds, deployers, and jobs.": "期限が有効な Pod に影響を与えます。通常、これらの Pod にはビルド、デプロイヤーおよびジョブが含まれます。", "Affects pods that do not have an active deadline. These pods usually include your applications.": "期限が有効ではない Pod に影響を与えます。通常、これらの Pod にはアプリケーションが含まれています。", @@ -1935,7 +1919,7 @@ "TCP socket (port)": "TCP ソケット (ポート)", "Admission Webhook Warning": "受付 Webhook の警告", "{{kind}} {{name}} violates policy {{warning}}": "{{kind}} {{name}} がポリシーに違反しています {{warning}}", - "Are you sure you want to remove <1>{{label}} from navigation?": "<1>{{label}} をナビゲーションから削除してもよいですか?", + "Are you sure you want to remove <1>{{label}} from navigation?": "<1>{{label}} をナビゲーションから削除してもよろしいですか?", "Refer to your cluster administrator to know which network provider is used.": "クラスター管理者を参照して、使用するネットワークプロバイダーを確認します。", "Input error: selectors must start and end by a letter or number, and can only contain -, _, / or . Offending value: {{offendingSelector}}": "入力エラー: セレクターは文字または数字で開始および終了する必要があり、-、_、/、または . しか含めることができません。無効な値: {{offendingSelector}}", "Can't preview pods": "Pod をプレビューできません", diff --git a/frontend/public/locales/ko/public.json b/frontend/public/locales/ko/public.json index cd434444172..42389259722 100644 --- a/frontend/public/locales/ko/public.json +++ b/frontend/public/locales/ko/public.json @@ -924,6 +924,9 @@ "Are you sure you want to remove volume <2>{{volumeName}} from <5>{{label}}: <7>{{resourceName}}?": "<5>{{label}}: <7>{{resourceName}}에서 <2>{{volumeName}} 볼륨을 삭제하시겠습니까?", "Note: This will not remove the underlying {{type}}.": "참고: 이렇게 해도 기본값 {{type}}이 제거되지는 않습니다.", "Remove volume": "볼륨 제거", + "Replace current content?": "현재 콘텐츠를 교체하시겠습니까?", + "Keep both": "둘 다 유지", + "Existing content will be replaced. Do you want to continue?": "기존 콘텐츠가 교체됩니다. 계속하시겠습니까?", "You cannot rollback a paused {{ deployType }}. You must resume it first.": "일시 중지된 {{ deployType }}은 롤백할 수 없습니다. 먼저 재개해야 합니다.", "Use the following settings from <2>{{resourceName}} when rolling back:": "롤백 할 때 <2>{{resourceName}}에서 다음 설정을 사용하십시오.", "Replica count and selector": "복제본 수 및 선택기", @@ -1042,12 +1045,6 @@ "Update this YAML to configure Routes, Receivers, Groupings and other Alertmanager settings.": "이 YAML을 업데이트하여 경로, 수신자, 그룹화 및 기타 Alertmanager 등을 구성합니다.", "Show graph": "그래프 표시", "Hide graph": "그래프 숨기기", - "Show series": "시리즈 보기", - "Hide series": "시리즈 숨기기", - "Error loading values": "값을 로드하는 동안 오류 발생", - "Unselect all": "모두 선택 취소", - "Select all": "모두 선택", - "query results table": "쿼리 결과 테이블", "Refresh off": "새로 고침 해제", "{{count}} minute_one": "{{count}} 분", "{{count}} minute_other": "{{count}} 분", @@ -1055,10 +1052,6 @@ "{{count}} hour_other": "{{count}} 시", "{{count}} day_one": "{{count}} 일", "{{count}} day_other": "{{count}} 일", - "Expression (press Shift+Enter for newlines)": "표현식 (Shift+Enter 줄 바꿈)", - "Access restricted.": "액세스가 제한되어 있습니다.", - "Failed to load metrics list.": "메트릭을 로드하지 못했습니다.", - "Clear query": "쿼리 지우기", "Your default receiver will automatically receive all alerts from this cluster that are not caught by other receivers first.": "기본 수신자는 다른 수신자가 캡처하지 않은 클러스터의 모든 알림을 자동으로 수신합니다.", "The routing labels for this receiver are configured to capture critical alerts. Finish setting up this receiver by selecting a \"Receiver Type\" to choose a destination for these alerts. If this receiver is deleted, critical alerts will go to the default receiver instead.": "이 수신자의 라우팅 레이블은 심각한 경고 알림을 캡처하도록 구성되어 있습니다. 이러한 알림의 대상을 선택하려면 \"수신자 유형\"을 선택하여 이 수신자 설정을 완료하십시오. 이 수신자를 삭제하면 심각한 경고 알림이 기본 수신자에게로 전송됩니다.", "The Watchdog alert fires constantly to confirm that your alerting stack is functioning correctly. This receiver is configured to prevent it from creating unnecessary notifications. You can edit this receiver if you plan to use the information that Watchdog provides, otherwise this receiver should remain in its current state with no set receiver type.": "Watchdog 알림은 알림 스택이 올바르게 작동하는지 확인하기 위해 지속적으로 발행됩니다. 불필요한 알림을 생성하지 않도록 수신자가 구성되어 있습니다. Watchdog에서 제공하는 정보를 사용하려는 경우 이 수신자를 편집할 수 있습니다. 그렇지 않으면 수신자가 수신자 유형을 설정하지 않고 현재 상태로 유지됩니다.", @@ -1161,16 +1154,6 @@ "Silence": "음소거", "Overwriting current silence": "현재 음소거 상태 덮어 쓰기", "When changes are saved, the currently existing silence will be expired and a new silence with the new configuration will take its place.": "변경 사항이 저장되면 현재 음소거 상태가 만료되고 새 설정을 사용하여 새 음소거가 대신 적용됩니다.", - "<0>{{firstIndex}} - {{lastIndex}} of <3>{{itemCount}} {{itemsTitle}}": "<0>{{firstIndex}} - {{lastIndex}} / <3>{{itemCount}} {{itemsTitle}}", - "Items per page": "페이지 당 항목", - "per page": "페이지 당", - "Go to first page": "첫 페이지로 이동", - "Go to previous page": "이전 페이지로 이동", - "Go to last page": "마지막 페이지로 이동", - "Go to next page": "다음 페이지로 이동", - "Current page": "현재 페이지", - "Pagination": "페이지수 매기기", - "of": "/", "Up": "실행", "Down": "중지", "Target details": "대상 세부정보", @@ -1402,6 +1385,7 @@ "Clear history": "기록 지우기", "Recently used": "최근 사용됨", "No results found": "결과 없음", + "Clear input value": "입력 값 지우기", "Edit AppliedClusterResourceQuota": "적용된 클러스터 리소스 쿼터 편집", "Affects pods that have an active deadline. These pods usually include builds, deployers, and jobs.": "만료 기간이 유효한 Pod에 영향을 미칩니다. 일반적으로 이러한 Pod에는 빌드, 배포자 및 작업이 포함됩니다.", "Affects pods that do not have an active deadline. These pods usually include your applications.": "만료 기간이 유효하지 않는 Pod에 영향을 미칩니다. 일반적으로 이러한 Pod에는 애플리케이션이 포함됩니다.", diff --git a/frontend/public/locales/zh/public.json b/frontend/public/locales/zh/public.json index 4148c9584d7..c82639fa49b 100644 --- a/frontend/public/locales/zh/public.json +++ b/frontend/public/locales/zh/public.json @@ -924,6 +924,9 @@ "Are you sure you want to remove volume <2>{{volumeName}} from <5>{{label}}: <7>{{resourceName}}?": "您确定要从 <5>{{label}}: <7>{{resourceName}} 中删除卷 <2>{{volumeName}} 吗?", "Note: This will not remove the underlying {{type}}.": "注: 这不会删除底层 {{type}}。", "Remove volume": "删除卷", + "Replace current content?": "替换当前内容?", + "Keep both": "都保留", + "Existing content will be replaced. Do you want to continue?": "现有内容将被替换。您是否希望继续?", "You cannot rollback a paused {{ deployType }}. You must resume it first.": "您无法回滚一个暂停的 {{ deployType }}。您必须首先恢复它。", "Use the following settings from <2>{{resourceName}} when rolling back:": "在回滚时使用 <2>{{resourceName}} 中的以下设置:", "Replica count and selector": "副本数和选择器", @@ -1042,12 +1045,6 @@ "Update this YAML to configure Routes, Receivers, Groupings and other Alertmanager settings.": "更新此 YAML,以配置路由,接收器,分组和其他 Alertmanager 设置。", "Show graph": "显示图", "Hide graph": "隐藏图", - "Show series": "显示系列", - "Hide series": "隐藏系列", - "Error loading values": "加载值错误", - "Unselect all": "取消选择所有", - "Select all": "选择所有", - "query results table": "查询结果表", "Refresh off": "刷新", "{{count}} minute_one": "{{count}} 分钟", "{{count}} minute_other": "{{count}} 分钟", @@ -1055,10 +1052,6 @@ "{{count}} hour_other": "{{count}} 小时", "{{count}} day_one": "{{count}} 天", "{{count}} day_other": "{{count}} 天", - "Expression (press Shift+Enter for newlines)": "表达式(按 Shift+Enter 键进入新行)", - "Access restricted.": "限制的访问。", - "Failed to load metrics list.": "加载指标列表失败。", - "Clear query": "清除查询", "Your default receiver will automatically receive all alerts from this cluster that are not caught by other receivers first.": "您的默认接收者将会自动从该群集接收所有其他接收者未捕获的警报。", "The routing labels for this receiver are configured to capture critical alerts. Finish setting up this receiver by selecting a \"Receiver Type\" to choose a destination for these alerts. If this receiver is deleted, critical alerts will go to the default receiver instead.": "该接收者的路由标签被配置为用于捕获紧急警报。选择“接收器类型”以选择这些警报的目的地。如果删除了此接收者,则紧急警报将改为发送到默认接收者。", "The Watchdog alert fires constantly to confirm that your alerting stack is functioning correctly. This receiver is configured to prevent it from creating unnecessary notifications. You can edit this receiver if you plan to use the information that Watchdog provides, otherwise this receiver should remain in its current state with no set receiver type.": "Watchdog 警报会不断发出以确认您的警报堆栈在正常运行。配置该接收者来防止其创建不必要的通知。如果您计划使用 Watchdog 提供的信息,则可以编辑此接收者,否则,该接收者应保持其当前状态,不设置任何接收者类型。", @@ -1161,16 +1154,6 @@ "Silence": "静默", "Overwriting current silence": "覆盖当前的静默", "When changes are saved, the currently existing silence will be expired and a new silence with the new configuration will take its place.": "保存更改后,当前存在的静默将会到期,新配置的新静默将会生效。", - "<0>{{firstIndex}} - {{lastIndex}} of <3>{{itemCount}} {{itemsTitle}}": "<0>{{firstIndex}} - {{lastIndex}}(共 <3>{{itemCount}} 个 {{itemsTitle}})", - "Items per page": "每页的项", - "per page": "每页", - "Go to first page": "转至第一页", - "Go to previous page": "转至上一页", - "Go to last page": "转至最后一页", - "Go to next page": "转至下一页", - "Current page": "当前页", - "Pagination": "分页", - "of": "共", "Up": "可使用", "Down": "下", "Target details": "目标详情", @@ -1402,6 +1385,7 @@ "Clear history": "清除历史记录", "Recently used": "目前使用的", "No results found": "未找到结果", + "Clear input value": "清除输入值", "Edit AppliedClusterResourceQuota": "编辑 AppliedClusterResourceQuota", "Affects pods that have an active deadline. These pods usually include builds, deployers, and jobs.": "对存在有效截止日期的 pod 有影响。这些 pod 通常会包括构建、部署和作业。", "Affects pods that do not have an active deadline. These pods usually include your applications.": "对没有有效截止日期的 pod 有影响。这些 pod 通常包括您的应用程序。", From f65f4c07d5ffd67d0f15385848f0336486b99414 Mon Sep 17 00:00:00 2001 From: Mylanos Date: Thu, 21 Nov 2024 19:12:16 +0100 Subject: [PATCH 008/102] OCPBUGS-43859: Some PackageManifests did not have a currentCSVDesc.annotations property resulting in console crashing for attempting to read from undefined --- .../components/operator-hub/operator-hub-item-details.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/frontend/packages/operator-lifecycle-manager/src/components/operator-hub/operator-hub-item-details.tsx b/frontend/packages/operator-lifecycle-manager/src/components/operator-hub/operator-hub-item-details.tsx index 31a9bc4d5a1..b35aaea0f20 100644 --- a/frontend/packages/operator-lifecycle-manager/src/components/operator-hub/operator-hub-item-details.tsx +++ b/frontend/packages/operator-lifecycle-manager/src/components/operator-hub/operator-hub-item-details.tsx @@ -253,11 +253,11 @@ export const OperatorHubItemDetails: React.FC = ({ setDeprecatedPackage(_.pick(item?.obj?.status, 'deprecation')); }, [item?.obj?.status, setDeprecatedPackage]); const currentChannel = obj?.status.channels.find((ch) => ch.name === installChannel); - const selectedChannelContainerImage = currentChannel?.currentCSVDesc.annotations.containerImage; + const selectedChannelContainerImage = currentChannel?.currentCSVDesc.annotations?.containerImage; const selectedChannelDescription = currentChannel?.currentCSVDesc.description || longDescription; - const selectedChannelCreatedAt = currentChannel?.currentCSVDesc.annotations.createdAt; + const selectedChannelCreatedAt = currentChannel?.currentCSVDesc.annotations?.createdAt; const selectedChannelCapabilityLevel = - currentChannel?.currentCSVDesc.annotations.capabilities ?? item.capabilityLevel; + currentChannel?.currentCSVDesc.annotations?.capabilities ?? item.capabilityLevel; const installedChannel = item?.subscription?.spec?.channel; const notAvailable = ( From b01b73a9e656462aa855fac15dbc633c8e519317 Mon Sep 17 00:00:00 2001 From: cyril-ui-developer Date: Mon, 25 Nov 2024 11:15:54 -0500 Subject: [PATCH 009/102] i18n Read Write-Once Pod for zh --- frontend/public/locales/zh/public.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/public/locales/zh/public.json b/frontend/public/locales/zh/public.json index 4148c9584d7..eebfb44b315 100644 --- a/frontend/public/locales/zh/public.json +++ b/frontend/public/locales/zh/public.json @@ -1628,7 +1628,7 @@ "Single user (RWO)": "单一用户(RWO)", "Shared access (RWX)": "共享的访问(RWX)", "Read only (ROX)": "只读(ROX)", - "Read write once pod (RWOP)": "Read write once pod (RWOP)", + "Read write once pod (RWOP)": "读写一次 pod (RWOP)", "Block": "块", "TemplateInstances": "模板实例", "TemplateInstance details": "模块实例详情", From b41238113a01b21e0b20520b3877aaec560abc6d Mon Sep 17 00:00:00 2001 From: Lucifergene <47265560+Lucifergene@users.noreply.github.com> Date: Tue, 3 Dec 2024 17:02:47 +0530 Subject: [PATCH 010/102] Added Telemetry for the OLS Code Import Feature Signed-off-by: Lucifergene <47265560+Lucifergene@users.noreply.github.com> --- frontend/public/components/edit-yaml.jsx | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/frontend/public/components/edit-yaml.jsx b/frontend/public/components/edit-yaml.jsx index 4896e43fae7..9bbed3a3ce0 100644 --- a/frontend/public/components/edit-yaml.jsx +++ b/frontend/public/components/edit-yaml.jsx @@ -21,6 +21,7 @@ import { getResourceSidebarSamples, SHOW_YAML_EDITOR_TOOLTIPS_USER_SETTING_KEY, SHOW_YAML_EDITOR_TOOLTIPS_LOCAL_STORAGE_KEY, + useTelemetry, useUserSettingsCompatibility, } from '@console/shared'; @@ -113,6 +114,7 @@ const EditYAMLInner = (props) => { } = props; const navigate = useNavigate(); + const fireTelemetryEvent = useTelemetry(); const [errors, setErrors] = React.useState(null); const [success, setSuccess] = React.useState(null); const [initialized, setInitialized] = React.useState(false); @@ -247,6 +249,18 @@ const EditYAMLInner = (props) => { [appendYAMLString, allowMultiple, checkEditAccess, t], ); + const getResourceKindfromYAML = React.useCallback( + (yaml) => { + try { + const obj = safeLoad(yaml); + return getModel(obj)?.kind; + } catch (e) { + return 'unknown'; + } + }, + [getModel], + ); + const loadYaml = React.useCallback( (reloaded = false, obj = props.obj) => { if (initialized && !reloaded) { @@ -267,6 +281,10 @@ const EditYAMLInner = (props) => { getEditor()?.setValue(olsCodeBlock?.value); } else if (_event.target.id === 'keep-both') { getEditor()?.setValue(appendYAMLString(olsCodeBlock?.value)); + fireTelemetryEvent('OLS Code Imported', { + triggeredFrom: olsCodeBlock?.triggeredFrom, + resourceType: getResourceKindfromYAML(olsCodeBlock?.value), + }); } setShowReplaceCodeModal(false); }; @@ -292,6 +310,10 @@ const EditYAMLInner = (props) => { if (_.isEmpty(currentYAML) || currentYAML === olsCode) { getEditor()?.setValue(olsCodeBlock?.value); + fireTelemetryEvent('OLS Code Imported', { + triggeredFrom: olsCodeBlock?.triggeredFrom, + resourceType: getResourceKindfromYAML(olsCodeBlock?.value), + }); } else { setShowReplaceCodeModal(true); } From 828f2f2493d33f7a71700228869028865b84c81f Mon Sep 17 00:00:00 2001 From: Robb Hamilton Date: Wed, 4 Dec 2024 08:51:12 -0500 Subject: [PATCH 011/102] OCPBUGS-45242: fix runtime error when backend service details don't exist --- .../components/console-operator/ConsolePluginBackendDetail.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/packages/console-app/src/components/console-operator/ConsolePluginBackendDetail.tsx b/frontend/packages/console-app/src/components/console-operator/ConsolePluginBackendDetail.tsx index 8ba2b13a499..954ded51b21 100644 --- a/frontend/packages/console-app/src/components/console-operator/ConsolePluginBackendDetail.tsx +++ b/frontend/packages/console-app/src/components/console-operator/ConsolePluginBackendDetail.tsx @@ -14,7 +14,7 @@ const ConsolePluginBackendDetail: React.FC = ({ }, }) => // only Service is supported per the ConsolePlugin schema - backend.type === ServiceModel.label ? ( + backend.type === ServiceModel.label && backend.service ? ( Date: Wed, 4 Dec 2024 11:55:40 -0500 Subject: [PATCH 012/102] OCPBUGS-45198: fix bug where ConsolePlugins list does not display if not loaded plugins are present --- .../console-operator/ConsoleOperatorConfig.tsx | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/frontend/packages/console-app/src/components/console-operator/ConsoleOperatorConfig.tsx b/frontend/packages/console-app/src/components/console-operator/ConsoleOperatorConfig.tsx index 6f042129fee..2b6bead53a1 100644 --- a/frontend/packages/console-app/src/components/console-operator/ConsoleOperatorConfig.tsx +++ b/frontend/packages/console-app/src/components/console-operator/ConsoleOperatorConfig.tsx @@ -313,7 +313,7 @@ const DevPluginsPage: React.FCC = (props) => { }; const PluginsPage: React.FC = (props) => { - const [pluginInfo, pluginInfoLoaded] = useDynamicPluginInfo(); + const [pluginInfo] = useDynamicPluginInfo(); const [consolePlugins, consolePluginsLoaded] = useK8sWatchResource({ isList: true, kind: referenceForModel(ConsolePluginModel), @@ -322,7 +322,7 @@ const PluginsPage: React.FC = (props) => { props?.obj?.spec?.plugins, ]); const rows = React.useMemo(() => { - if (!pluginInfoLoaded || !consolePluginsLoaded) { + if (!consolePluginsLoaded) { return []; } return consolePlugins.map((plugin) => { @@ -356,10 +356,8 @@ const PluginsPage: React.FC = (props) => { : undefined, }; }); - }, [pluginInfoLoaded, consolePluginsLoaded, consolePlugins, pluginInfo, enabledPlugins]); - return ( - - ); + }, [consolePluginsLoaded, consolePlugins, pluginInfo, enabledPlugins]); + return ; }; const ConsoleOperatorConfigPluginsPage: React.FC = developmentMode From 1c8168e85bfb3f5b44ed5164940f8e44b1ecf77a Mon Sep 17 00:00:00 2001 From: Cyril Ajieh Date: Mon, 16 Sep 2024 17:01:28 -0400 Subject: [PATCH 013/102] incorrect-pod-status-listpage --- frontend/public/module/k8s/pods.ts | 6 ++++++ frontend/public/module/k8s/types.ts | 1 + 2 files changed, 7 insertions(+) diff --git a/frontend/public/module/k8s/pods.ts b/frontend/public/module/k8s/pods.ts index b0d5b47cc56..183fa6ef2b6 100644 --- a/frontend/public/module/k8s/pods.ts +++ b/frontend/public/module/k8s/pods.ts @@ -235,10 +235,16 @@ export const podPhase = (pod: PodKind): PodPhase => { _.each(pod.status.initContainerStatuses, (container: ContainerStatus, i: number) => { const { terminated, waiting } = container.state; + const initContainerSpec = pod.spec.initContainers.find((c) => c.name === container.name); + if (terminated && terminated.exitCode === 0) { return true; } + if (initContainerSpec?.restartPolicy === 'Always' && container.started) { + return true; + } + initializing = true; if (terminated && terminated.reason) { phase = `Init:${terminated.reason}`; diff --git a/frontend/public/module/k8s/types.ts b/frontend/public/module/k8s/types.ts index 0e62fc53632..ca10c639cbf 100644 --- a/frontend/public/module/k8s/types.ts +++ b/frontend/public/module/k8s/types.ts @@ -245,6 +245,7 @@ export type ContainerStatus = { image: string; imageID: string; containerID?: string; + started?: boolean; }; export type PodCondition = { From feaff7ed79cf3eff43ac92533a85d745952b15d9 Mon Sep 17 00:00:00 2001 From: PeterYurkovich Date: Tue, 10 Dec 2024 09:53:04 -0500 Subject: [PATCH 014/102] OCPBUGS-45987: Fix alert rule link to alert in dev perspective --- .../monitoring/alerts/useRuleAlertsPoller.tsx | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/frontend/packages/dev-console/src/components/monitoring/alerts/useRuleAlertsPoller.tsx b/frontend/packages/dev-console/src/components/monitoring/alerts/useRuleAlertsPoller.tsx index d085be0fc39..ec95e005c28 100644 --- a/frontend/packages/dev-console/src/components/monitoring/alerts/useRuleAlertsPoller.tsx +++ b/frontend/packages/dev-console/src/components/monitoring/alerts/useRuleAlertsPoller.tsx @@ -1,7 +1,7 @@ import * as React from 'react'; import * as _ from 'lodash'; import { Dispatch } from 'redux'; -import { PrometheusRulesResponse } from '@console/dynamic-plugin-sdk'; +import { PrometheusRulesResponse, useActivePerspective } from '@console/dynamic-plugin-sdk'; import { alertingErrored, alertingLoaded, @@ -26,6 +26,8 @@ export const useRulesAlertsPoller = ( getAlertingRules: (namespace?: string) => Promise; }[], ) => { + const [perspective] = useActivePerspective(); + React.useEffect(() => { const url = getPrometheusURL({ endpoint: PrometheusEndpoint.RULES, @@ -36,7 +38,10 @@ export const useRulesAlertsPoller = ( const poller = (): void => { fetchAlerts(url, alertsSource, namespace) .then(({ data }) => { - const { alerts: fetchedAlerts, rules: fetchedRules } = getAlertsAndRules(data); + const { alerts: fetchedAlerts, rules: fetchedRules } = getAlertsAndRules( + data, + perspective, + ); const sortThanosRules = _.sortBy(fetchedRules, alertingRuleStateOrder); dispatch(alertingSetRules('devRules', sortThanosRules, 'dev')); dispatch(alertingLoaded('devAlerts', fetchedAlerts, 'dev')); @@ -57,5 +62,5 @@ export const useRulesAlertsPoller = ( clearTimeout(pollerTimeout); } }; - }, [namespace, alertsSource, dispatch]); + }, [namespace, alertsSource, dispatch, perspective]); }; From 358ddeaa03ffb8692af3126df6eef92da5337262 Mon Sep 17 00:00:00 2001 From: cyril-ui-developer Date: Wed, 4 Dec 2024 16:42:26 -0500 Subject: [PATCH 015/102] i18n: Missing translations for "PodDisruptionBudget violated" string --- frontend/packages/console-app/locales/fr/console-app.json | 4 ++-- frontend/packages/console-app/locales/ko/console-app.json | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/frontend/packages/console-app/locales/fr/console-app.json b/frontend/packages/console-app/locales/fr/console-app.json index 3778dc92c86..0b8ae1d3ee3 100644 --- a/frontend/packages/console-app/locales/fr/console-app.json +++ b/frontend/packages/console-app/locales/fr/console-app.json @@ -501,8 +501,8 @@ "Requirement": "Exigence", "Availability": "Disponibilité", "Allowed disruptions": "Perturbations autorisées", - "{{count}} PodDisruptionBudget violated_one": "{{count}} PodDisruptionBudget violated_one", - "{{count}} PodDisruptionBudget violated_other": "{{count}} PodDisruptionBudget violated_other", + "{{count}} PodDisruptionBudget violated_one": "{{count}} PodDisruptionBudget transgressé", + "{{count}} PodDisruptionBudget violated_other": "{{count}} PodDisruptionBudget transgressés", "PodDisruptionBudget details": "Détails de l’objet PodDisruptionBudget", "Min available": "Minimum disponible", "Max unavailable": "Maximum non disponible", diff --git a/frontend/packages/console-app/locales/ko/console-app.json b/frontend/packages/console-app/locales/ko/console-app.json index 1cb4abe9747..7350cfe33a4 100644 --- a/frontend/packages/console-app/locales/ko/console-app.json +++ b/frontend/packages/console-app/locales/ko/console-app.json @@ -501,8 +501,8 @@ "Requirement": "요구 사항", "Availability": "가용성", "Allowed disruptions": "허용된 중단", - "{{count}} PodDisruptionBudget violated_one": "{{count}} PodDisruptionBudget violated_one", - "{{count}} PodDisruptionBudget violated_other": "{{count}} PodDisruptionBudget violated_other", + "{{count}} PodDisruptionBudget violated_one": "{{count}} 위반된 PodDisruptionBudget 수:", + "{{count}} PodDisruptionBudget violated_other": "{{count}} 위반된 PodDisruptionBudget 수:", "PodDisruptionBudget details": "PodDisruptionBudget 세부 정보", "Min available": "최소 사용 가능한 수", "Max unavailable": "최대 사용 불가 수", From cd3fba5179a63c3e64cd929b4d108e54b6ac4a06 Mon Sep 17 00:00:00 2001 From: cyril-ui-developer Date: Fri, 6 Dec 2024 10:04:59 -0500 Subject: [PATCH 016/102] ERROR in search tool: Cannot read properties of undefined (reading 'state') --- .../src/components/subscription.tsx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/frontend/packages/operator-lifecycle-manager/src/components/subscription.tsx b/frontend/packages/operator-lifecycle-manager/src/components/subscription.tsx index d30571aeb35..d2c7202b98d 100644 --- a/frontend/packages/operator-lifecycle-manager/src/components/subscription.tsx +++ b/frontend/packages/operator-lifecycle-manager/src/components/subscription.tsx @@ -167,7 +167,7 @@ export const SubscriptionStatus: React.FC<{ subscription: SubscriptionKind }> = subscription, }) => { const { t } = useTranslation(); - switch (subscription.status?.state) { + switch (subscription?.status?.state) { case SubscriptionState.SubscriptionStateUpgradeAvailable: return ( @@ -175,7 +175,7 @@ export const SubscriptionStatus: React.FC<{ subscription: SubscriptionKind }> = ); case SubscriptionState.SubscriptionStateUpgradePending: - return upgradeRequiresApproval(subscription) && subscription.status.installPlanRef ? ( + return upgradeRequiresApproval(subscription) && subscription?.status?.installPlanRef ? ( ) : ( @@ -190,8 +190,8 @@ export const SubscriptionStatus: React.FC<{ subscription: SubscriptionKind }> = ); default: return ( - - {subscription.status.state || t('olm~Unknown failure')} + + {subscription?.status?.state || t('olm~Unknown failure')} ); } From 28d987cf629960831d7db7d0d565bb2ae58554b2 Mon Sep 17 00:00:00 2001 From: cyril-ui-developer Date: Mon, 4 Nov 2024 10:11:13 -0500 Subject: [PATCH 017/102] Console CI catches CSP violations --- .../operator-lifecycle-manager/src/components/subscription.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/packages/operator-lifecycle-manager/src/components/subscription.tsx b/frontend/packages/operator-lifecycle-manager/src/components/subscription.tsx index d2c7202b98d..234842776b6 100644 --- a/frontend/packages/operator-lifecycle-manager/src/components/subscription.tsx +++ b/frontend/packages/operator-lifecycle-manager/src/components/subscription.tsx @@ -190,7 +190,7 @@ export const SubscriptionStatus: React.FC<{ subscription: SubscriptionKind }> = ); default: return ( - + {subscription?.status?.state || t('olm~Unknown failure')} ); From 7faa4e077a4a30b4752d39ccf945426a06a9fd3b Mon Sep 17 00:00:00 2001 From: rawagner Date: Thu, 17 Oct 2024 12:45:18 +0200 Subject: [PATCH 018/102] Disable GQL introspection --- pkg/server/server.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/server/server.go b/pkg/server/server.go index 79bd0301bda..de0cf9c4b2a 100644 --- a/pkg/server/server.go +++ b/pkg/server/server.go @@ -336,7 +336,7 @@ func (s *Server) HTTPHandler() (http.Handler, error) { if err != nil { panic(err) } - opts := []graphql.SchemaOpt{graphql.UseFieldResolvers()} + opts := []graphql.SchemaOpt{graphql.UseFieldResolvers(), graphql.DisableIntrospection()} k8sResolver := resolver.K8sResolver{K8sProxy: k8sProxy} rootResolver := resolver.RootResolver{K8sResolver: &k8sResolver} schema := graphql.MustParseSchema(string(graphQLSchema), &rootResolver, opts...) From 70b1cbce7ae499679f1e99589e6bc699e96c08ae Mon Sep 17 00:00:00 2001 From: cyril-ui-developer Date: Mon, 16 Dec 2024 07:34:27 -0500 Subject: [PATCH 019/102] chore(i18n): update translations Adding latest translations from Memsource project https://cloud.memsource.com/web/project2/show/czLu2Z7vXdE3f9GbAIkcm0 --- .../console-app/locales/es/console-app.json | 42 ++++--- .../console-app/locales/fr/console-app.json | 33 ++++-- .../console-app/locales/ja/console-app.json | 29 +++-- .../console-app/locales/ko/console-app.json | 45 +++++--- .../console-app/locales/zh/console-app.json | 29 +++-- .../locales/es/console-shared.json | 14 ++- .../locales/ja/console-shared.json | 4 +- .../locales/ko/console-shared.json | 6 +- .../locales/zh/console-shared.json | 4 +- .../dev-console/locales/es/devconsole.json | 4 - .../dev-console/locales/fr/devconsole.json | 2 - .../dev-console/locales/ja/devconsole.json | 2 - .../dev-console/locales/ko/devconsole.json | 2 - .../dev-console/locales/zh/devconsole.json | 2 - .../locales/ko/insights-plugin.json | 2 +- .../locales/es/knative-plugin.json | 22 ++-- .../locales/fr/knative-plugin.json | 13 ++- .../locales/ja/knative-plugin.json | 13 ++- .../locales/ko/knative-plugin.json | 13 ++- .../locales/zh/knative-plugin.json | 13 ++- .../locales/es/olm.json | 11 +- .../locales/fr/olm.json | 2 + .../locales/ja/olm.json | 2 + .../locales/ko/olm.json | 6 +- .../locales/zh/olm.json | 2 + .../locales/ko/notification-drawer.json | 2 +- .../locales/es/pipelines-plugin.json | 18 ++- .../locales/fr/pipelines-plugin.json | 6 +- .../locales/ja/pipelines-plugin.json | 6 +- .../locales/ko/pipelines-plugin.json | 6 +- .../locales/zh/pipelines-plugin.json | 6 +- .../locales/es/shipwright-plugin.json | 4 + .../locales/fr/shipwright-plugin.json | 4 + .../locales/ja/shipwright-plugin.json | 12 +- .../locales/ko/shipwright-plugin.json | 4 + .../locales/zh/shipwright-plugin.json | 4 + frontend/public/locales/es/public.json | 109 ++++++------------ frontend/public/locales/fr/public.json | 29 +++-- frontend/public/locales/ja/public.json | 33 +++--- frontend/public/locales/ko/public.json | 29 +++-- frontend/public/locales/zh/public.json | 31 ++--- 41 files changed, 345 insertions(+), 275 deletions(-) diff --git a/frontend/packages/console-app/locales/es/console-app.json b/frontend/packages/console-app/locales/es/console-app.json index 6b848592609..0e4bbf4f7e6 100644 --- a/frontend/packages/console-app/locales/es/console-app.json +++ b/frontend/packages/console-app/locales/es/console-app.json @@ -108,7 +108,7 @@ "Replication type": "Tipo de replicación", "Select Replication type": "Seleccionar tipo de replicación", "Glusterfs": "Glusterfs", - "Gluster REST/Heketi URL": "Usuario de Gluster REST/Heketi", + "Gluster REST/Heketi URL": "URL de Gluster REST/Heketi", "Gluster REST/Heketi user": "Usuario de Gluster REST/Heketi", "Secret Namespace": "Espacio de nombres del secreto", "Secret name": "Nombre del secreto", @@ -140,7 +140,7 @@ "Quobyte tenant ID used to create/delete the volume": "ID de inquilino de Quobyte utilizado para crear/eliminar el volumen", "vSphere Volume": "Volumen de vSphere", "Disk format": "Formato de disco", - "Select disk format": "Seleccionar tipos de disco", + "Select disk format": "Seleccionar formato de disco", "Datastore": "Almacén de datos", "Portworx Volume": "Volumen de Portworx", "Filesystem": "Sistema de archivos", @@ -178,6 +178,18 @@ "Namespace where the API configuration secret is located": "Espacio de nombres donde se encuentra el secreto de configuración de API", "Scheduling disabled": "Programación deshabilitada", "Approval required": "Aprobación requerida", + "Display Name": "Nombre para mostrar", + "Information describing the plugin.": "Información que describe el complemento.", + "Version": "Versión", + "The specific update of the plugin.": "La actualización específica del complemento.", + "Status": "Estado", + "The state of the plugin.": "El estado del complemento.", + "Enabled": "Activado", + "Whether or not the plugin renders in console.": "Si el complemento se representa o no en la consola.", + "CSP Violations": "Violaciones a la CSP", + "Whether or not the plugin might have violated the Console Content Security Policy.": "Si el complemento podría haber infringido o no la Política de seguridad de contenido de la consola.", + "Backend Service": "Servicio de backend", + "Proxy Services": "Servicios de proxy", "Delete {{kind}}": "Eliminar {{kind}}", "Edit {{kind}}": "Editar {{kind}}", "Edit labels": "Editar etiquetas", @@ -186,6 +198,7 @@ "Edit Pod selector": "Editar selector de pods", "Edit tolerations": "Editar tolerancias", "Add storage": "Agregar almacenamiento", + "Start Job": "Iniciar tarea", "Edit update strategy": "Editar estrategia de actualización", "Resume rollouts": "Reanudar implementaciones", "Pause rollouts": "Pausar implementaciones", @@ -221,16 +234,16 @@ "Insufficient permissions": "Permisos insuficientes", "You do not have sufficient permissions to read any cluster configuration.": "No tiene permisos suficientes para leer ninguna configuración del clúster.", "{{section}} not found": "{{section}} no encontrado", - "Enabled": "Activado", "Disabled": "Desactivado", + "This plugin might have violated the Console Content Security Policy. Refer to the browser's console logs for details.": "Es posible que este complemento haya infringido la Política de seguridad de contenido de la consola. Consulte los registros de la consola del navegador para obtener más información.", + "Yes": "Sí", + "No": "No", "Name": "Nombre", - "Version": "Versión", - "Status": "Estado", + "CSP violations": "Violaciones a la CSP", "Console operator spec.managementState is unmanaged. Changes to plugins will have no effect.": "El operador de consola spec.managementState no está administrado. Los cambios en los complementos no tendrán ningún efecto.", - "Console plugins table": "Tabla de complementos de consola", - "console plugins": "complementos de consola", "Console plugins": "Complementos de consola", "Customize": "Personalizar", + "Plugin manifest": "Manifiesto del complemento", "Updating cluster to {{version}}": "Actualizando el clúster a {{version}}", "API Servers": "Servidores API", "Controller Managers": "Gerentes de controladores", @@ -244,6 +257,7 @@ "Pending plugins": "Complementos pendientes", "Loaded plugins": "Complementos cargados", "{{enabledCount}}/{{totalCount}} enabled": "{{enabledCount}}/{{totalCount}} habilitado(s)", + "One or more plugins might have Content Security Policy violations.": "Es posible que uno o más complementos tengan infracciones a la Política de seguridad de contenido.", "View all": "Ver todo", "Single control plane node": "Nodo de plano de control único", "Perspectives are enabled by default.": "Las perspectivas están habilitadas de forma predeterminada.", @@ -258,7 +272,7 @@ "Incompatible file type": "Tipo de archivo incompatible", "{{fileName}} cannot be uploaded. Only {{fileExtensions}} files are supported currently. Try another file.": "{{fileName}} no se puede cargar. Solo se admiten los archivos {{fileExtensions}} actualmente. Pruebe con otro archivo.", "Red Hat OpenShift Lightspeed": "Red Hat OpenShift Lightspeed", - "Meet OpenShift Lightspeed": "Conozca OpenShift Lightspeed", + "Meet OpenShift Lightspeed": "Conozca Openshift Lightspeed", "Unlock possibilities and enhance productivity with the AI-powered assistant's expert guidance in your OpenShift web console.": "Descubra posibilidades y mejore la productividad con la guía experta del asistente impulsado por IA en su consola web de OpenShift.", "Benefits:": "Beneficios:", "Get fast answers to questions you have related to OpenShift": "Obtenga respuestas rápidas a las preguntas que tenga relacionadas con OpenShift", @@ -309,7 +323,7 @@ "Create by manually entering YAML or JSON definitions, or by dragging and dropping a file into the editor.": "Crear ingresando manualmente definiciones YAML o JSON, o arrastrando y soltando un archivo en el editor.", "Not all YAML property values are supported in the form editor. Some data would be lost.": "No todos los valores de propiedades YAML son compatibles con el editor de formularios. Algunos datos se perderían.", "Create {{kind}}": "Crear {{kind}}", - "Policy for": "política", + "Policy for": "Política para", "Select one or more NetworkAttachmentDefinitions": "Seleccione una o más NetworkAttachmentDefinitions", "Allow pods from the same namespace": "Permitir pods del mismo espacio de nombres", "Allow pods from inside the cluster": "Permitir pods desde dentro del clúster", @@ -386,7 +400,7 @@ "Remove peer": "Quitar par", "Current selections": "Selecciones actuales", "Clear input value": "Borrar valor de entrada", - "No results found for \"{{inputValue}}\"": "{{inputValue}} resultado encontrados para ", + "No results found for \"{{inputValue}}\"": "No se encontraron resultados para “”", "Mark as schedulable": "Marcar como programable", "Mark as unschedulable": "Marcar como no programable", "This action cannot be undone. Deleting a node will instruct Kubernetes that the node is down or unrecoverable and delete all pods scheduled to that node. If the node is still running but unresponsive and the node is deleted, stateful workloads and persistent volumes may suffer corruption or data loss. Only delete a node that you have confirmed is completely stopped and cannot be restored.": "Esta acción no se puede deshacer. Eliminar un nodo le indicará a Kubernetes que el nodo está inactivo o es irrecuperable y eliminará todos los pods programados para ese nodo. Si el nodo sigue ejecutándose pero no responde y se elimina, las cargas de trabajo con estado y los volúmenes persistentes pueden sufrir daños o pérdida de datos. Elimine únicamente un nodo que haya confirmado que está completamente detenido y no se puede restaurar.", @@ -510,7 +524,7 @@ "Resource is already covered by another PodDisruptionBudget": "El recurso ya está cubierto por otro PodDisruptionBudget", "Availability requirement value": "Valor del requisito de disponibilidad", "Value (% or number)": "Valor (% o número)", - "Availability requirement value warning": "Valor del requisito de disponibilidad", + "Availability requirement value warning": "Advertencia del valor del requisito de disponibilidad", "A maxUnavailable of 0% or 0 or a minAvailable of 100% or greater than or equal to the number of replicas is permitted but can block nodes from being drained.": "Se permite un maxUnavailable de 0% o 0 o un minAvailable de 100% o superior o igual a la cantidad de réplicas, pero puede impedir que se agoten los nodos.", "Create {{label}}": "Crear {{label}}", "Edit {{label}}": "Editar {{label}}", @@ -552,8 +566,6 @@ "In this quick start, you will complete {{count, number}} task_other": "En este inicio rápido, completará {{count, number}} tareas", "{{taskIndex, number}}": "{{taskIndex, number}}", "Check your work": "Revise su trabajo", - "Yes": "Sí", - "No": "No", "{{index, number}} of {{tasks, number}}": "{{index, number}} de {{tasks, number}}", "Leave quick start?": "¿Salir del inicio rápido?", "Leave": "Salir", @@ -606,7 +618,7 @@ "Volume handle": "Control de volumen", "Snapshot handle": "Controlador de instantáneas", "SnapshotClass": "SnapshotClass", - "Create VolumeSnapshotContent": "VolumeSnapshotContent", + "Create VolumeSnapshotContent": "Crear VolumeSnapshotContent", "VolumeSnapshot details": "Detalles de VolumeSnapshot", "Source": "Fuente", "VolumeSnapshotContent": "VolumeSnapshotContent", @@ -619,4 +631,4 @@ "Control Plane": "Plano de control", "Control Plane status": "Estado del plano de control", "Cluster operators": "Operadores de clúster" -} +} \ No newline at end of file diff --git a/frontend/packages/console-app/locales/fr/console-app.json b/frontend/packages/console-app/locales/fr/console-app.json index 0b8ae1d3ee3..be7ee00a0f1 100644 --- a/frontend/packages/console-app/locales/fr/console-app.json +++ b/frontend/packages/console-app/locales/fr/console-app.json @@ -178,6 +178,18 @@ "Namespace where the API configuration secret is located": "Espace de noms où se trouve le secret de configuration de l’API", "Scheduling disabled": "Planification désactivée", "Approval required": "Approbation exigée", + "Display Name": "Nom complet", + "Information describing the plugin.": "Informations décrivant le plugin.", + "Version": "Version", + "The specific update of the plugin.": "La mise à jour spécifique du plugin.", + "Status": "Statut", + "The state of the plugin.": "L'état du plugin.", + "Enabled": "Activé", + "Whether or not the plugin renders in console.": "Si le plugin s'affiche ou non dans la console.", + "CSP Violations": "Violations du CSP", + "Whether or not the plugin might have violated the Console Content Security Policy.": "Si le plugin a pu ou non violer la politique de sécurité du contenu de la console.", + "Backend Service": "Backend Service", + "Proxy Services": "Services Proxy", "Delete {{kind}}": "Supprimer {{kind}}", "Edit {{kind}}": "Modifier {{kind}}", "Edit labels": "Modifier les étiquettes", @@ -222,16 +234,16 @@ "Insufficient permissions": "Autorisations insuffisantes", "You do not have sufficient permissions to read any cluster configuration.": "Vous ne disposez pas des autorisations suffisantes pour lire une configuration de cluster.", "{{section}} not found": "{{section}} introuvable", - "Enabled": "Activé", "Disabled": "Désactivé", + "This plugin might have violated the Console Content Security Policy. Refer to the browser's console logs for details.": "Ce plugin a peut-être violé la politique de sécurité du contenu de la console. Reportez-vous aux journaux de la console du navigateur pour plus de détails.", + "Yes": "Oui", + "No": "Non", "Name": "Nom", - "Version": "Version", - "Status": "Statut", - "Console plugins table": "Tableau des plug-ins de console", + "CSP violations": "Violations du CSP", "Console operator spec.managementState is unmanaged. Changes to plugins will have no effect.": "L’opérateur de console spec.managementState n’est pas géré. Les modifications apportées aux plug-ins n’auront aucun effet.", - "console plugins": "plug-ins de console", "Console plugins": "Plug-ins de console", "Customize": "Personnaliser", + "Plugin manifest": "Manifeste du plugin", "Updating cluster to {{version}}": "Mise à jour du cluster vers la version {{version}}", "API Servers": "Serveurs d’API", "Controller Managers": "Gestionnaires de contrôleurs", @@ -245,6 +257,7 @@ "Pending plugins": "Plug-ins en attente", "Loaded plugins": "Plug-ins chargés", "{{enabledCount}}/{{totalCount}} enabled": "{{enabledCount}}/{{totalCount}} activé(s)", + "One or more plugins might have Content Security Policy violations.": "Un ou plusieurs plugins peuvent présenter des violations de la politique de sécurité du contenu.", "View all": "Afficher tout", "Single control plane node": "Nœud de plan de contrôle unique", "Perspectives are enabled by default.": "Les perspectives sont activées par défaut.", @@ -259,7 +272,7 @@ "Incompatible file type": "Type de fichier incompatible", "{{fileName}} cannot be uploaded. Only {{fileExtensions}} files are supported currently. Try another file.": "{{fileName}} ne peut pas être téléchargé. Seuls les fichiers {{fileExtensions}} sont actuellement pris en charge. Essayez un autre fichier.", "Red Hat OpenShift Lightspeed": "Red Hat OpenShift Lightspeed", - "Meet OpenShift Lightspeed": "Découvrez OpenShift Lightspeed", + "Meet OpenShift Lightspeed": "Découvrez Openshift Lightspeed", "Unlock possibilities and enhance productivity with the AI-powered assistant's expert guidance in your OpenShift web console.": "Libérez des possibilités et améliorez votre productivité grâce aux conseils d'experts de l'assistant basé sur l'IA dans votre console Web OpenShift.", "Benefits:": "Avantages :", "Get fast answers to questions you have related to OpenShift": "Obtenez des réponses rapides aux questions que vous vous posez sur OpenShift", @@ -501,8 +514,8 @@ "Requirement": "Exigence", "Availability": "Disponibilité", "Allowed disruptions": "Perturbations autorisées", - "{{count}} PodDisruptionBudget violated_one": "{{count}} PodDisruptionBudget transgressé", - "{{count}} PodDisruptionBudget violated_other": "{{count}} PodDisruptionBudget transgressés", + "{{count}} PodDisruptionBudget violated_one": "{{count}} PodDisruptionBudget transgressé", + "{{count}} PodDisruptionBudget violated_other": "{{count}} PodDisruptionBudget transgressés", "PodDisruptionBudget details": "Détails de l’objet PodDisruptionBudget", "Min available": "Minimum disponible", "Max unavailable": "Maximum non disponible", @@ -553,8 +566,6 @@ "In this quick start, you will complete {{count, number}} task_other": "Dans ce démarrage rapide, vous effectuerez {{count, number}} tâches", "{{taskIndex, number}}": "{{taskIndex, number}}", "Check your work": "Vérifier votre travail", - "Yes": "Oui", - "No": "Non", "{{index, number}} of {{tasks, number}}": "{{index, number}} sur {{tasks, number}}", "Leave quick start?": "Quitter le démarrage rapide ?", "Leave": "Quitter", @@ -620,4 +631,4 @@ "Control Plane": "Plan de contrôle", "Control Plane status": "Statut du plan de contrôle", "Cluster operators": "Opérateurs de cluster" -} +} \ No newline at end of file diff --git a/frontend/packages/console-app/locales/ja/console-app.json b/frontend/packages/console-app/locales/ja/console-app.json index 5bb5fb1c26e..2a6159a6975 100644 --- a/frontend/packages/console-app/locales/ja/console-app.json +++ b/frontend/packages/console-app/locales/ja/console-app.json @@ -178,6 +178,18 @@ "Namespace where the API configuration secret is located": "API 設定シークレットを配置する namespace", "Scheduling disabled": "スケジュールの無効化", "Approval required": "承認が必要です", + "Display Name": "表示名", + "Information describing the plugin.": "プラグインを記述する情報。", + "Version": "バージョン", + "The specific update of the plugin.": "プラグインの特定の更新。", + "Status": "ステータス", + "The state of the plugin.": "プラグインの状態。", + "Enabled": "有効化", + "Whether or not the plugin renders in console.": "プラグインがコンソールでレンダリングされるかどうか。", + "CSP Violations": "CSP 違反", + "Whether or not the plugin might have violated the Console Content Security Policy.": "プラグインがコンソールコンテンツセキュリティーポリシーに違反している可能性があるかどうか。", + "Backend Service": "バックエンドサービス", + "Proxy Services": "プロキシーサービス", "Delete {{kind}}": "{{kind}} の削除", "Edit {{kind}}": "{{kind}} の編集", "Edit labels": "ラベルの編集", @@ -222,16 +234,16 @@ "Insufficient permissions": "不十分なパーミッション", "You do not have sufficient permissions to read any cluster configuration.": "クラスター設定を読み取るための十分なパーミッションがありません。", "{{section}} not found": "{{section}} が見つかりません", - "Enabled": "有効化", "Disabled": "無効", + "This plugin might have violated the Console Content Security Policy. Refer to the browser's console logs for details.": "このプラグインはコンソールコンテンツセキュリティーポリシーに違反している可能性があります。詳細は、ブラウザーのコンソールログを参照してください。", + "Yes": "Yes", + "No": "No", "Name": "名前", - "Version": "バージョン", - "Status": "ステータス", - "Console plugins table": "コンソールプラグインテーブル", + "CSP violations": "CSP 違反", "Console operator spec.managementState is unmanaged. Changes to plugins will have no effect.": "コンソール Operator の spec.managementState は非管理的です。プラグインへの変更は影響を受けません。", - "console plugins": "コンソールプラグイン", "Console plugins": "コンソールプラグイン", "Customize": "カスタマイズ", + "Plugin manifest": "プラグインマニフェスト", "Updating cluster to {{version}}": "クラスターの {{version}} への更新", "API Servers": "API サーバー", "Controller Managers": "コントローラーマネージャー", @@ -245,6 +257,7 @@ "Pending plugins": "保留中のプラグイン", "Loaded plugins": "ロードされたプラグイン", "{{enabledCount}}/{{totalCount}} enabled": "{{enabledCount}}/{{totalCount}} 有効化", + "One or more plugins might have Content Security Policy violations.": "1 つ以上のプラグインが、コンテンツセキュリティーポリシーに違反している可能性があります。", "View all": "すべてを表示", "Single control plane node": "1 つのコントロールプレーンノード", "Perspectives are enabled by default.": "パースペクティブはデフォルトで有効になっています。", @@ -259,7 +272,7 @@ "Incompatible file type": "互換性のないファイルタイプ", "{{fileName}} cannot be uploaded. Only {{fileExtensions}} files are supported currently. Try another file.": "{{fileName}} をアップロードできません。現時点で、{{fileExtensions}} ファイルのみがサポートされています。別のファイルを試してください。", "Red Hat OpenShift Lightspeed": "Red Hat OpenShift Lightspeed", - "Meet OpenShift Lightspeed": "OpenShift Lightspeed とは", + "Meet OpenShift Lightspeed": "Openshift Lightspeed とは", "Unlock possibilities and enhance productivity with the AI-powered assistant's expert guidance in your OpenShift web console.": "OpenShift Web コンソールで AI 対応アシスタントの専門的なガイダンスを使用することで、可能性が広がり、生産性が向上します。", "Benefits:": "利点:", "Get fast answers to questions you have related to OpenShift": "OpenShift 関連の質問に対し、迅速に回答を得ることができます", @@ -553,8 +566,6 @@ "In this quick start, you will complete {{count, number}} task_other": "このクイックスタートでは、タスク {{count, number}} 件を実行します", "{{taskIndex, number}}": "{{taskIndex, number}}", "Check your work": "作業を確認する", - "Yes": "Yes", - "No": "No", "{{index, number}} of {{tasks, number}}": "{{index, number}}/{{tasks, number}}", "Leave quick start?": "クイックスタートを終了しますか?", "Leave": "終了", @@ -620,4 +631,4 @@ "Control Plane": "コントロールプレーン", "Control Plane status": "コントロールプレーンのステータス", "Cluster operators": "クラスター Operator" -} +} \ No newline at end of file diff --git a/frontend/packages/console-app/locales/ko/console-app.json b/frontend/packages/console-app/locales/ko/console-app.json index 7350cfe33a4..0682c4fc903 100644 --- a/frontend/packages/console-app/locales/ko/console-app.json +++ b/frontend/packages/console-app/locales/ko/console-app.json @@ -178,6 +178,18 @@ "Namespace where the API configuration secret is located": "API 구성 시크릿이 있는 네임스페이스", "Scheduling disabled": "예약 비활성화", "Approval required": "승인 필요", + "Display Name": "이름 표시", + "Information describing the plugin.": "플러그인을 설명하는 정보입니다.", + "Version": "버전", + "The specific update of the plugin.": "플러그인의 특정 업데이트입니다.", + "Status": "상태", + "The state of the plugin.": "플러그인의 상태입니다.", + "Enabled": "활성화됨", + "Whether or not the plugin renders in console.": "플러그인이 콘솔에 렌더링되는지 여부입니다.", + "CSP Violations": "CSP 위반", + "Whether or not the plugin might have violated the Console Content Security Policy.": "플러그인이 콘솔 콘텐츠 보안 정책을 위반했는지 여부입니다.", + "Backend Service": "백엔드 서비스", + "Proxy Services": "프록시 서비스", "Delete {{kind}}": "{{kind}} 삭제", "Edit {{kind}}": "{{kind}} 편집", "Edit labels": "라벨 편집", @@ -222,16 +234,16 @@ "Insufficient permissions": "권한 부족", "You do not have sufficient permissions to read any cluster configuration.": "클러스터 구성을 읽을 수 있는 충분한 권한이 없습니다.", "{{section}} not found": "{{section}} 찾을 수 없음", - "Enabled": "활성화됨", "Disabled": "비활성화됨", + "This plugin might have violated the Console Content Security Policy. Refer to the browser's console logs for details.": "이 플러그인은 콘솔 콘텐츠 보안 정책을 위반했을 수 있습니다. 자세한 내용은 브라우저의 콘솔 로그를 참조하십시오.", + "Yes": "예", + "No": "아니요", "Name": "이름", - "Version": "버전", - "Status": "상태", - "Console plugins table": "콘솔 플러그인 표", + "CSP violations": "CSP 위반", "Console operator spec.managementState is unmanaged. Changes to plugins will have no effect.": "콘솔 Operator spec.managementState는 관리되지 않습니다. 플러그인 변경 사항은 적용되지 않습니다.", - "console plugins": "콘솔 플러그인", "Console plugins": "콘솔 플러그인", "Customize": "사용자 정의", + "Plugin manifest": "플러그인 매니페스트", "Updating cluster to {{version}}": "{{version}}으로 클러스터 업데이트", "API Servers": "API 서버", "Controller Managers": "컨트롤러 관리자", @@ -245,6 +257,7 @@ "Pending plugins": "보류중인 플러그인", "Loaded plugins": "로드된 플러그인", "{{enabledCount}}/{{totalCount}} enabled": "{{enabledCount}}/{{totalCount}} 활성화됨", + "One or more plugins might have Content Security Policy violations.": "하나 이상의 플러그인에 콘텐츠 보안 정책 위반이 있을 수 있습니다.", "View all": "모두 보기", "Single control plane node": "단일 컨트롤 플레인 노드", "Perspectives are enabled by default.": "화면 모드는 기본적으로 활성화되어 있습니다.", @@ -259,7 +272,7 @@ "Incompatible file type": "호환되지 않는 파일 형식", "{{fileName}} cannot be uploaded. Only {{fileExtensions}} files are supported currently. Try another file.": "{{fileName}} 파일을 업로드 할 수 없습니다. 현재 {{fileExtensions}} 파일만 지원됩니다. 다른 파일을 시도해 보십시오.", "Red Hat OpenShift Lightspeed": "Red Hat OpenShift Lightspeed", - "Meet OpenShift Lightspeed": "OpenShift Lightspeed 보기", + "Meet OpenShift Lightspeed": "Openshift Lightspeed 보기", "Unlock possibilities and enhance productivity with the AI-powered assistant's expert guidance in your OpenShift web console.": "OpenShift 웹 콘솔의 AI 지원 도우미의 전문 가이드를 사용하여 가능성을 확보하고 생산성을 향상시킵니다.", "Benefits:": "혜택", "Get fast answers to questions you have related to OpenShift": "OpenShift와 관련된 질문에 대한 빠른 답변을 얻을 수 있습니다.", @@ -431,10 +444,10 @@ "External ID": "외부 ID", "Labels": "라벨", "Taints": "테인트", - "Taint_one": "Taint_one", + "Taint_one": "테인트", "Taint_other": "Taint_other", "Annotations": "주석", - "Annotation_one": "Annotation_one", + "Annotation_one": "주석", "Annotation_other": "Annotation_other", "Machine": "시스템", "Provider ID": "공급자 ID", @@ -484,9 +497,9 @@ "Authentication is being reconfigured. The new identity provider will be available once reconfiguration is complete.": "인증이 재구성되고 있습니다. 재구성이 완료되면 새 ID 공급자를 사용할 수 있습니다.", "View authentication conditions for reconfiguration status.": "재구성 상태에 대한 인증 조건을 확인합니다.", "Add": "추가", - "Min available {{minAvailable}} of {{count}} pod_one": "사용 가능한 최소 pod_one 수 ({{minAvailable}} / {{count}})", + "Min available {{minAvailable}} of {{count}} pod_one": "사용 가능한 최소 pod 수 ({{minAvailable}} / {{count}})", "Min available {{minAvailable}} of {{count}} pod_other": "사용 가능한 최소 pod_other 수 ({{minAvailable}} / {{count}})", - "Max unavailable {{maxUnavailable}} of {{count}} pod_one": "최대 사용 불가한 pod_one 수 ({{maxUnavailable}} / {{count}})", + "Max unavailable {{maxUnavailable}} of {{count}} pod_one": "최대 사용 불가한 pod 수 ({{maxUnavailable}} / {{count}})", "Max unavailable {{maxUnavailable}} of {{count}} pod_other": "최대 사용 불가한 pod_other 수 ({{maxUnavailable}} / {{count}})", "Availability requirement": "가용성 요구 사항", "maxUnavailable": "maxUnavailable", @@ -501,8 +514,8 @@ "Requirement": "요구 사항", "Availability": "가용성", "Allowed disruptions": "허용된 중단", - "{{count}} PodDisruptionBudget violated_one": "{{count}} 위반된 PodDisruptionBudget 수:", - "{{count}} PodDisruptionBudget violated_other": "{{count}} 위반된 PodDisruptionBudget 수:", + "{{count}} PodDisruptionBudget violated_one": "위반된 PodDisruptionBudget 수: {{count}}", + "{{count}} PodDisruptionBudget violated_other": "위반된 PodDisruptionBudget 수: {{count}}", "PodDisruptionBudget details": "PodDisruptionBudget 세부 정보", "Min available": "최소 사용 가능한 수", "Max unavailable": "최대 사용 불가 수", @@ -530,7 +543,7 @@ "Not started ({{statusCount, number}})": "시작하지 않음 ({{statusCount, number}})", "Filter by keyword...": "키워드로 필터링...", "Select filter": "필터 선택", - "{{count, number}} item_one": "{{count, number}} item_one", + "{{count, number}} item_one": "{{count, number}} 항목", "{{count, number}} item_other": "{{count, number}} item_other", "Prerequisites ({{totalPrereqs}})": "전제 조건 ({{totalPrereqs}})", "View Prerequisites ({{totalPrereqs}})": "전제 조건 표시 {{totalPrereqs}}", @@ -549,12 +562,10 @@ "Close": "닫기", "Back": "이전", "Restart": "재시작", - "In this quick start, you will complete {{count, number}} task_one": "이 퀵스타트에서는 {{count, number}} task_one 작업을 완료합니다", + "In this quick start, you will complete {{count, number}} task_one": "이 퀵스타트에서는 {{count, number}} 작업을 완료합니다", "In this quick start, you will complete {{count, number}} task_other": "이 퀵스타트에서는 {{count, number}} task_other 작업을 완료합니다", "{{taskIndex, number}}": "{{taskIndex, number}}", "Check your work": "작업 확인", - "Yes": "예", - "No": "아니요", "{{index, number}} of {{tasks, number}}": "{{index, number}} / {{tasks, number}}", "Leave quick start?": "퀵스타트를 종료하시겠습니까?", "Leave": "종료", @@ -620,4 +631,4 @@ "Control Plane": "컨트롤 플레인", "Control Plane status": "컨트롤 플레인 상태", "Cluster operators": "클러스터 Operator" -} +} \ No newline at end of file diff --git a/frontend/packages/console-app/locales/zh/console-app.json b/frontend/packages/console-app/locales/zh/console-app.json index e01ffc238b3..493bb6e9ef9 100644 --- a/frontend/packages/console-app/locales/zh/console-app.json +++ b/frontend/packages/console-app/locales/zh/console-app.json @@ -178,6 +178,18 @@ "Namespace where the API configuration secret is located": "API 配置 secret 所在的命名空间", "Scheduling disabled": "调度被禁用", "Approval required": "需要批准", + "Display Name": "显示名称", + "Information describing the plugin.": "描述插件的信息。", + "Version": "版本", + "The specific update of the plugin.": "插件的特定更新。", + "Status": "状态", + "The state of the plugin.": "插件的状态。", + "Enabled": "已启用", + "Whether or not the plugin renders in console.": "插件是否在控制台中呈现。", + "CSP Violations": "CSP 违规", + "Whether or not the plugin might have violated the Console Content Security Policy.": "插件是否违反了控制台内容安全策略。", + "Backend Service": "后端服务", + "Proxy Services": "代理服务", "Delete {{kind}}": "删除{{kind}}", "Edit {{kind}}": "编辑{{kind}}", "Edit labels": "编辑标签", @@ -222,16 +234,16 @@ "Insufficient permissions": "没有足够的权限", "You do not have sufficient permissions to read any cluster configuration.": "您没有足够的权限来读取任何集群配置。", "{{section}} not found": "{{section}} 没有找到", - "Enabled": "已启用", "Disabled": "禁用", + "This plugin might have violated the Console Content Security Policy. Refer to the browser's console logs for details.": "此插件可能违反了控制台内容安全策略。详情请参阅浏览器的控制台日志。", + "Yes": "是", + "No": "否", "Name": "名称", - "Version": "版本", - "Status": "状态", - "Console plugins table": "控制台插件表", + "CSP violations": "CSP 违规", "Console operator spec.managementState is unmanaged. Changes to plugins will have no effect.": "控制台 operator spec.managementState 是非受管状态。对插件的更改将无效。", - "console plugins": "控制台插件", "Console plugins": "控制台插件", "Customize": "自定义", + "Plugin manifest": "插件清单", "Updating cluster to {{version}}": "更新集群到 {{version}}", "API Servers": "API 服务器", "Controller Managers": "Controller Managers", @@ -245,6 +257,7 @@ "Pending plugins": "待处理的插件", "Loaded plugins": "载入的插件", "{{enabledCount}}/{{totalCount}} enabled": "{{enabledCount}}/{{totalCount}} 已启用", + "One or more plugins might have Content Security Policy violations.": "一个或多个插件可能会有内容安全策略违规的情况。", "View all": "查看所有", "Single control plane node": "一个控制平面节点", "Perspectives are enabled by default.": "视角被默认启用。", @@ -258,7 +271,7 @@ "Access review rules": "访问复查规则", "Incompatible file type": "不兼容文件类型", "{{fileName}} cannot be uploaded. Only {{fileExtensions}} files are supported currently. Try another file.": "{{fileName}} 无法上传。目前只支持 {{fileExtensions}} 文件。尝试另一个文件。", - "Red Hat OpenShift Lightspeed": "OpenShift Lightspeed", + "Red Hat OpenShift Lightspeed": "Red Hat OpenShift Lightspeed", "Meet OpenShift Lightspeed": "OpenShift LightSpeed 简介", "Unlock possibilities and enhance productivity with the AI-powered assistant's expert guidance in your OpenShift web console.": "通过 OpenShift Web 控制台中基于 AI 的专家指导,释放可能性并提高工作效率。", "Benefits:": "优点:", @@ -553,8 +566,6 @@ "In this quick start, you will complete {{count, number}} task_other": "在此快速开始中,您将完成 {{count, number}} 个任务", "{{taskIndex, number}}": "{{taskIndex, number}}", "Check your work": "检查您的网络", - "Yes": "是", - "No": "否", "{{index, number}} of {{tasks, number}}": "{{tasks, number}} 的 {{index, number}}", "Leave quick start?": "离开快速开始?", "Leave": "离开", @@ -620,4 +631,4 @@ "Control Plane": "控制平面", "Control Plane status": "控制平面状态", "Cluster operators": "集群 operators" -} +} \ No newline at end of file diff --git a/frontend/packages/console-shared/locales/es/console-shared.json b/frontend/packages/console-shared/locales/es/console-shared.json index ab03294019e..0c310b29b62 100644 --- a/frontend/packages/console-shared/locales/es/console-shared.json +++ b/frontend/packages/console-shared/locales/es/console-shared.json @@ -119,6 +119,11 @@ "View property descriptions": "Ver descripciones de propiedades", "Save": "Guardar", "View shortcuts": "Ver accesos directos", + "Restricted access": "Acceso restringido", + "You don't have access to this section due to cluster policy": "No tiene acceso a esta sección debido a la política del clúster", + "Error details": "Error de detalles", + "No {{label}} found": "No se encontró {{label}}", + "Not found": "No encontrado", "Extension error": "Error de extensión", "Show details": "Mostrar detalles", "Oh no! Something went wrong.": "¡Ay, no! Algo salió mal.", @@ -146,6 +151,8 @@ "Add key/value": "Agregar clave/valor", "Add values": "Agregar valores", "Remove": "Eliminar", + "Create new option \"{{option}}\"": "Crear nueva opción “{{option}}”", + "Current selections": "Selecciones actuales", "Configure via:": "Configurar a través de:", "Form view": "Vista de formulario", "YAML view": "Vista YAML", @@ -169,6 +176,8 @@ "Are you sure you want to remove the {{hpaLabel}}": "¿Está seguro de que desea quitar {{hpaLabel}}", "from": "de", "The resources that are attached to the {{hpaLabel}} will be deleted.": "Se eliminarán los recursos que están adjuntos a {{hpaLabel}}.", + "Try again": "Intentar de nuevo", + "Error loading {{label}}": "Error al cargar {{label}}", "Copy to clipboard": "Copiar al portapapeles", "Run in Web Terminal": "Ejecutar en terminal web", "Successfully copied to clipboard!": "¡Copiado correctamente al portapapeles!", @@ -228,6 +237,9 @@ "Click": "Hacer clic", "Right click": "Hacer clic con el botón derecho", "Drag + Drop": "Arrastrar + Soltar", + "404: Not Found": "404: No encontrado", + "{{labels}} content is not available in the catalog at this time due to loading failures.": "El contenido {{labels}} no está disponible en el catálogo en este momento debido a fallas en la carga.", + "Timed out fetching new data. The data below is stale.": "Se agotó el tiempo para obtener nuevos datos. Los datos a continuación son obsoletos.", "Information": "Información", "In progress": "En curso", "Healthy": "En buen estado", @@ -240,8 +252,8 @@ "OLSConfigs": "OLSConfigs", "{{label}} details": "Detalles de {{label}}", "Provisioned as node": "Aprovisionado como nodo", - "Select input": "Seleccionar entrada", "Select options": "Seleccionar opciones", + "Select input": "Seleccionar entrada", "Pod": "Pod", "Pods": "Pods", "Scaled to 0": "Escalado a 0", diff --git a/frontend/packages/console-shared/locales/ja/console-shared.json b/frontend/packages/console-shared/locales/ja/console-shared.json index 4149dfa17c1..844159e92ab 100644 --- a/frontend/packages/console-shared/locales/ja/console-shared.json +++ b/frontend/packages/console-shared/locales/ja/console-shared.json @@ -109,7 +109,7 @@ "false": "false", "Select {{label}}": "{{label}} の選択", "Cluster does not have resource {{groupVersionKind}}": "クラスターにはリソース {{groupVersionKind}} がありません", - "Ask OpenShift Lightspeed": "OpenShift Lightspeed に質問する", + "Ask OpenShift Lightspeed": "OpenShift LightSpeed に質問する", "Accessibility help": "アクセシビリティーヘルプ", "Shortcuts": "ショートカット", "View all editor shortcuts": "すべてのエディターショートカットの表示", @@ -328,4 +328,4 @@ "Name must consist of lower-case letters, numbers and hyphens. It must start with a letter and end with a letter or number.": "名前は、小文字、数字、およびハイフンで構成される必要があります。これは文字で始まり、文字または数字で終了する必要があります。", "Cannot be longer than {{characterCount}} characters.": "{{characterCount}} 文字を超えることはできません。", "Required": "必須" -} +} \ No newline at end of file diff --git a/frontend/packages/console-shared/locales/ko/console-shared.json b/frontend/packages/console-shared/locales/ko/console-shared.json index 6c1fd8da93e..08ed7c98609 100644 --- a/frontend/packages/console-shared/locales/ko/console-shared.json +++ b/frontend/packages/console-shared/locales/ko/console-shared.json @@ -41,7 +41,7 @@ "There are no ongoing activities.": "진행중인 활동이 없습니다.", "Ongoing": "진행 중", "Not available": "사용할 수 없음", - "{{count}} resource_one": "{{count}} resource_one", + "{{count}} resource_one": "{{count}} 리소스", "{{count}} resource_other": "{{count}} resource_other", "{{count}} resource reached quota_one": "{{count}} 리소스가 할당량에 도달했습니다", "{{count}} resource reached quota_other": "{{count}} 리소스가 할당량에 도달했습니다", @@ -141,7 +141,7 @@ "Add value": "값 추가", "Filter by type...": "유형별 필터링 ...", "Filter by type": "유형별 필터링", - "{{count}} item_one": "{{count}} item_one", + "{{count}} item_one": "{{count}} 항목", "{{count}} item_other": "{{count}} item_other", "No results match the filter criteria": "필터 기준과 일치하는 결과가 없습니다.", "Clear filter": "필터 지우기", @@ -261,7 +261,7 @@ "Autoscaled": "자동 스케일링", "to 0": "0", "Autoscaling": "자동 스케일링", - "to {{count}} Pod_one": "{{count}} Pod_one", + "to {{count}} Pod_one": "{{count}} Pod", "to {{count}} Pod_other": "{{count}} Pod_other", "Allow reading Nodes in the core API groups (for ClusterRoleBinding)": "코어 API 그룹의 노드 읽기 허용 (클러스터 역할 바인딩 용)", "This \"ClusterRole\" is allowed to read the resource \"Nodes\" in the core group (because a Node is cluster-scoped, this must be bound with a \"ClusterRoleBinding\" to be effective).": "이 \"클러스터 역할\"은 코어 그룹에서 \"노드\" 리소스를 읽을 수 있습니다 (노드가 클러스터 범위에 있으므로 \"클러스터 역할 바인딩\"으로 바인딩되어야 함).", diff --git a/frontend/packages/console-shared/locales/zh/console-shared.json b/frontend/packages/console-shared/locales/zh/console-shared.json index de4a1b8aa61..54546d51b7c 100644 --- a/frontend/packages/console-shared/locales/zh/console-shared.json +++ b/frontend/packages/console-shared/locales/zh/console-shared.json @@ -109,7 +109,7 @@ "false": "假", "Select {{label}}": "选择 {{label}}", "Cluster does not have resource {{groupVersionKind}}": "集群没有资源 {{groupVersionKind}}", - "Ask OpenShift Lightspeed": "询问 OpenShift Lightspeed", + "Ask OpenShift Lightspeed": "询问 OpenShift LightSpeed", "Accessibility help": "无障碍访问帮助", "Shortcuts": "捷径", "View all editor shortcuts": "查看所有编辑器快捷键", @@ -328,4 +328,4 @@ "Name must consist of lower-case letters, numbers and hyphens. It must start with a letter and end with a letter or number.": "名称必须由小写字母、数字和连字符组成。且需要以字母或数字开头。", "Cannot be longer than {{characterCount}} characters.": "不能超过 {{characterCount}} 个字符。", "Required": "必需" -} +} \ No newline at end of file diff --git a/frontend/packages/dev-console/locales/es/devconsole.json b/frontend/packages/dev-console/locales/es/devconsole.json index dfb2f78bd3f..9f1deb7b02b 100644 --- a/frontend/packages/dev-console/locales/es/devconsole.json +++ b/frontend/packages/dev-console/locales/es/devconsole.json @@ -525,7 +525,6 @@ "Path that the router watches to route traffic to the service.": "Ruta que observa el enrutador para enrutar el tráfico al servicio.", "Target port": "Puerto de destino", "Target port for traffic.": "Puerto de destino para el tráfico.", - "No results found": "No se encontraron resultados", "Edge": "Edge", "Passthrough": "Pasar por", "Re-encrypt": "Volver a cifrar", @@ -624,11 +623,8 @@ "Invalid Git URL.": "URL de Git no válida.", "We failed to detect the Git type. Please choose a Git type.": "No pudimos detectar el tipo Git. Elija un tipo de Git.", "Container port should be an integer": "El puerto de contenedores debe ser un número entero.", - "Silence for": "Silencio para", "Inspect": "Inspeccionar", "View metrics for {{title}}": "Ver métricas para {{title}}", - "Dashboards": "Paneles de control", - "Silences": "Silencios", "Events": "Eventos", "Select a Project to view monitoring metrics<1>.": "Seleccione un proyecto para ver las métricas de monitoreo<1>.", "Alerts": "Alertas", diff --git a/frontend/packages/dev-console/locales/fr/devconsole.json b/frontend/packages/dev-console/locales/fr/devconsole.json index f6b38ce7426..6d6a1ac374b 100644 --- a/frontend/packages/dev-console/locales/fr/devconsole.json +++ b/frontend/packages/dev-console/locales/fr/devconsole.json @@ -623,10 +623,8 @@ "Invalid Git URL.": "URL Git non valide.", "We failed to detect the Git type. Please choose a Git type.": "Nous n’avons pas réussi à détecter le type Git. Veuillez choisir un type Git.", "Container port should be an integer": "Le port du conteneur doit être un nombre entier.", - "Silence for": "Mettre en sourdine pendant", "Inspect": "Inspecter", "View metrics for {{title}}": "Afficher les métriques pour {{title}}", - "Silences": "Silences", "Events": "Événements", "Select a Project to view monitoring metrics<1>.": "Sélectionnez un projet pour afficher les métriques de surveillance<1>.", "Alerts": "Alertes", diff --git a/frontend/packages/dev-console/locales/ja/devconsole.json b/frontend/packages/dev-console/locales/ja/devconsole.json index ccd545b12e1..83830bd9d97 100644 --- a/frontend/packages/dev-console/locales/ja/devconsole.json +++ b/frontend/packages/dev-console/locales/ja/devconsole.json @@ -623,10 +623,8 @@ "Invalid Git URL.": "無効な Git URL。", "We failed to detect the Git type. Please choose a Git type.": "git タイプの検出に失敗しました。git タイプを選択してください。", "Container port should be an integer": "コンテナーポートは整数である必要があります", - "Silence for": "サイレンス:", "Inspect": "検査", "View metrics for {{title}}": "{{title}} のメトリクスの表示", - "Silences": "サイレンス", "Events": "イベント", "Select a Project to view monitoring metrics<1>.": "プロジェクトを選択してモニタリングメトリクスを表示します。<1>。", "Alerts": "アラート", diff --git a/frontend/packages/dev-console/locales/ko/devconsole.json b/frontend/packages/dev-console/locales/ko/devconsole.json index 3d465534783..18c6c190d5b 100644 --- a/frontend/packages/dev-console/locales/ko/devconsole.json +++ b/frontend/packages/dev-console/locales/ko/devconsole.json @@ -623,10 +623,8 @@ "Invalid Git URL.": "잘못된 Git URL입니다.", "We failed to detect the Git type. Please choose a Git type.": "Git 유형을 감지하지 못했습니다. Git 유형을 선택하십시오.", "Container port should be an integer": "컨테이너 포트는 정수여야 합니다.", - "Silence for": "음소거", "Inspect": "검사", "View metrics for {{title}}": "{{title}}의 메트릭 보기", - "Silences": "음소거", "Events": "이벤트", "Select a Project to view monitoring metrics<1>.": "모니터링 메트릭<1>을 표시할 프로젝트를 선택합니다.", "Alerts": "알림", diff --git a/frontend/packages/dev-console/locales/zh/devconsole.json b/frontend/packages/dev-console/locales/zh/devconsole.json index f79b0a6844a..25cff49cc7a 100644 --- a/frontend/packages/dev-console/locales/zh/devconsole.json +++ b/frontend/packages/dev-console/locales/zh/devconsole.json @@ -623,10 +623,8 @@ "Invalid Git URL.": "无效的 Git URL。", "We failed to detect the Git type. Please choose a Git type.": "无法检测到 git 类型。请选择 git 类型。", "Container port should be an integer": "容器端口应该是一个整数", - "Silence for": "静默", "Inspect": "检查", "View metrics for {{title}}": "查看 {{title}} 的指标数据", - "Silences": "静默", "Events": "事件", "Select a Project to view monitoring metrics<1>.": "选择要查看监控指标的项目<1>。", "Alerts": "警报", diff --git a/frontend/packages/insights-plugin/locales/ko/insights-plugin.json b/frontend/packages/insights-plugin/locales/ko/insights-plugin.json index bdbd561f931..9bd5b76b17f 100644 --- a/frontend/packages/insights-plugin/locales/ko/insights-plugin.json +++ b/frontend/packages/insights-plugin/locales/ko/insights-plugin.json @@ -8,7 +8,7 @@ "Temporarily unavailable.": "일시적으로 사용할 수 없습니다.", "Disabled.": "비활성화되어 있습니다.", "Waiting for results.": "결과를 기다리고 있습니다.", - "Total issue_one": "총 issue_one", + "Total issue_one": "총 문제 수", "Total issue_other": "총 issue_other", "Total risk": "총 위험 수", "Fixable issues": "해결 가능한 문제", diff --git a/frontend/packages/knative-plugin/locales/es/knative-plugin.json b/frontend/packages/knative-plugin/locales/es/knative-plugin.json index 58f49a1b48d..944440c5b2f 100644 --- a/frontend/packages/knative-plugin/locales/es/knative-plugin.json +++ b/frontend/packages/knative-plugin/locales/es/knative-plugin.json @@ -1,11 +1,15 @@ { "Functions": "Funciones", - "Events": "Eventos", - "​​Events available that can be consumed with Serverless Functions or regular Deployments.": "Eventos disponibles que se pueden consumir con funciones sin servidor o implementaciones regulares.", - "​​**Events** available that can be consumed with Serverless Functions or regular Deployments.": "**Eventos** disponibles que se pueden consumir con funciones sin servidor o implementaciones regulares.", + "Event Types": "Tipos de eventos", + "​​Event Types available that can be consumed with Serverless Functions or regular Deployments.": "Tipos de eventos disponibles que pueden usarse con funciones sin servidor o implementaciones regulares.", + "​​**Event Types** available that can be consumed with Serverless Functions or regular Deployments.": "**Tipos de eventos** disponibles que pueden usarse con funciones sin servidor o implementaciones regulares.", "Provider": "Proveedor", + "Event Type": "Tipo de evento", + "​​Event Types available that can be consumed with Serverless Functions or regular Deployments": "Tipos de eventos disponibles que pueden usarse con funciones sin servidor o implementaciones regulares", "Event Source": "Fuente del evento", "Create an Event source to register interest in a class of events from a particular system": "Cree una fuente de eventos para registrar interés en una clase de eventos de un sistema en particular", + "Event Sink": "Sumidero de eventos", + "Create an Event sink to receive incoming events from a particular source": "Cree un sumidero de eventos para recibir eventos entrantes de una fuente particular", "Import from Git": "Importar desde Git", "Create and deploy stateless, Serverless functions": "Cree e implemente funciones sin estado y sin servidor", "Samples": "Muestras", @@ -14,9 +18,6 @@ "Create a Broker to define an event mesh for collecting a pool of events and route those events based on attributes, through triggers": "Cree un corredor para definir una malla de eventos a fin de recopilar un grupo de eventos y enrutar esos eventos en función de atributos, a través de desencadenantes", "Channel": "Canal", "Create a Knative Channel to create an event forwarding and persistence layer with in-memory and reliable implementations": "Cree un canal Knative para crear una capa de persistencia y reenvío de eventos con implementaciones confiables y en memoria", - "Event Sink": "Sumidero de eventos", - "Create an Event sink to receive incoming events from a particular source": "Cree un sumidero de eventos para recibir eventos entrantes de una fuente particular", - "​​Events available that can be consumed with Serverless Functions or regular Deployments": "Eventos disponibles que se pueden consumir con funciones sin servidor o implementaciones regulares", "Event Sources": "Fuentes de eventos", "Event sources are objects that link to an event producer and an event sink or consumer. Cluster administrators can customize the content made available in the catalog.": "Las fuentes de eventos son objetos que se vinculan a un productor de eventos y a un receptor o consumidor de eventos. Los administradores de clústeres pueden personalizar el contenido disponible en el catálogo.", "**Event sources** are objects that link to an event producer and an event sink or consumer.": "**Fuentes de eventos** son objetos que se vinculan a un productor de eventos y a un sumidero o consumidor de eventos.", @@ -198,6 +199,8 @@ "You do not have create access for Event Source in this project.": "No tiene acceso para crear la fuente del evento en este proyecto.", "Create an Event source to register interest in a class of events from a particular system. Configure using YAML and form views.": "Cree una fuente del evento para registrar interés en una clase de eventos de un sistema en particular. Configure usando YAML y vistas de formulario.", "URI": "URI", + "An error occurred. Please try again": "Ocurrió un error. Inténtelo de nuevo", + "Subscribe to": "Suscribirse a", "Provided by {{provider}}": "Proporcionado por {{provider}}", "Service Account name": "Nombre de la cuenta de servicio", "Select a Service Account name": "Seleccione un nombre de cuenta de servicio", @@ -209,7 +212,7 @@ "{{OKcount}} OK / {{conditionsSize}}": "{{OKcount}} DE ACUERDO / {{conditionsSize}}", "Attributes": "Atributos", "Values": "Valores", - "Event details": "Detalles del cliente", + "Event details": "Datos del cliente", "Event": "Evento", "Subscriber": "Suscriptor", "Filters": "Filtros", @@ -250,6 +253,7 @@ "Target URI:": "URI de destino:", "No sink found for this resource.": "No se encontró ningún sumidero para este recurso.", "Filter": "Filtrar", + "Attribute": "Atributo", "View all ({{revLength}})": "Ver todo ({{revLength}})", "No Revisions found for this resource.": "No se encontraron revisiones para este recurso.", "No Routes found for this resource.": "No se encontraron rutas para este recurso.", @@ -258,11 +262,9 @@ "Function": "Función", "Subscription details": "Detalles de suscripción", "Trigger details": "Detalles del desencadenante", - "Attribute": "Atributo", "No Subscriber available": "No hay suscriptor disponible", - "To create a Subscriber, first create a Knative Service from the Add page.": "Para crear un suscriptor, primero cree un servicio Knative desde la página Agregar.", + "To create a Subscriber, first create a Knative Service from the <1>Add page.": "Para crear un suscriptor, primero cree un servicio Knative desde <1>Add page.", "Select Subscriber": "Seleccionar suscriptor", - "An error occurred. Please try again": "Ocurrió un error. Inténtelo de nuevo", "Add {{kind}}": "Agregar {{kind}}", "Add": "Agregar", "Delete {{revlabel}}?": "¿Eliminar {{revlabel}}?", diff --git a/frontend/packages/knative-plugin/locales/fr/knative-plugin.json b/frontend/packages/knative-plugin/locales/fr/knative-plugin.json index 86f2093a21f..e934183d804 100644 --- a/frontend/packages/knative-plugin/locales/fr/knative-plugin.json +++ b/frontend/packages/knative-plugin/locales/fr/knative-plugin.json @@ -1,11 +1,15 @@ { "Functions": "Fonctions", - "Events": "Événements", - "​​Events available that can be consumed with Serverless Functions or regular Deployments.": "Événements disponibles pouvant être consommés avec des fonctions sans serveur ou des déploiements réguliers.", - "​​**Events** available that can be consumed with Serverless Functions or regular Deployments.": "**Événements** disponibles pouvant être consommés avec des fonctions sans serveur ou des déploiements réguliers.", + "Event Types": "Types d’événement", + "​​Event Types available that can be consumed with Serverless Functions or regular Deployments.": "Types d'événements disponibles pouvant être consommés avec des fonctions sans serveur ou des déploiements réguliers.", + "​​**Event Types** available that can be consumed with Serverless Functions or regular Deployments.": "**Types d’événements** disponibles pouvant être consommés avec des fonctions sans serveur ou des déploiements réguliers.", "Provider": "Fournisseur", + "Event Type": "Type d’événement", + "​​Event Types available that can be consumed with Serverless Functions or regular Deployments": "Types d’événements disponibles pouvant être consommés avec des fonctions sans serveur ou des déploiements réguliers", "Event Source": "Source d’événements", "Create an Event source to register interest in a class of events from a particular system": "Créer une source d’événements pour marquer votre intérêt pour une classe d’événements d’un système en particulier", + "Event Sink": "Récepteur d’événements", + "Create an Event sink to receive incoming events from a particular source": "Créer un récepteur d’événements pour recevoir les événements entrants d’une source particulière", "Import from Git": "Importer depuis Git", "Create and deploy stateless, Serverless functions": "Créer et déployer des fonctions sans état et Serverless", "Samples": "Exemples", @@ -14,9 +18,6 @@ "Create a Broker to define an event mesh for collecting a pool of events and route those events based on attributes, through triggers": "Créez un broker pour définir un maillage d’événements permettant de collecter un pool d’événements et d’acheminer ces événements en fonction d’attributs, via des déclencheurs.", "Channel": "Canal", "Create a Knative Channel to create an event forwarding and persistence layer with in-memory and reliable implementations": "Créer un canal Knative pour créer une couche de transfert et de persistance des événements avec des implémentations en mémoire et fiables", - "Event Sink": "Récepteur d’événements", - "Create an Event sink to receive incoming events from a particular source": "Créer un récepteur d’événements pour recevoir les événements entrants d’une source particulière", - "​​Events available that can be consumed with Serverless Functions or regular Deployments": "Événements disponibles pouvant être consommés avec des fonctions sans serveur ou des déploiements réguliers", "Event Sources": "Sources d’événements", "Event sources are objects that link to an event producer and an event sink or consumer. Cluster administrators can customize the content made available in the catalog.": "Les sources d’événements sont des objets liés à un producteur d’événements et à un récepteur ou consommateur d’événements. Les administrateurs de cluster peuvent personnaliser le contenu mis à disposition dans le catalogue.", "**Event sources** are objects that link to an event producer and an event sink or consumer.": "Les **sources d’événements** sont des objets liés à un producteur d’événements et à un récepteur ou consommateur d’événements.", diff --git a/frontend/packages/knative-plugin/locales/ja/knative-plugin.json b/frontend/packages/knative-plugin/locales/ja/knative-plugin.json index f6ff22e65b9..518bd350feb 100644 --- a/frontend/packages/knative-plugin/locales/ja/knative-plugin.json +++ b/frontend/packages/knative-plugin/locales/ja/knative-plugin.json @@ -1,11 +1,15 @@ { "Functions": "関数", - "Events": "イベント", - "​​Events available that can be consumed with Serverless Functions or regular Deployments.": "Serverless 関数または通常のデプロイメントで使用できる利用可能なイベント。", - "​​**Events** available that can be consumed with Serverless Functions or regular Deployments.": "Serverless 関数または通常のデプロイメントで使用できる利用可能な​ ** イベント**。", + "Event Types": "Event タイプ", + "​​Event Types available that can be consumed with Serverless Functions or regular Deployments.": "Serverless 関数または通常のデプロイメントで利用可能な Event タイプ。", + "​​**Event Types** available that can be consumed with Serverless Functions or regular Deployments.": "Serverless 関数または通常のデプロイメントで利用可能な​ ​​**Event タイプ**。", "Provider": "プロバイダー", + "Event Type": "Event タイプ", + "​​Event Types available that can be consumed with Serverless Functions or regular Deployments": "Serverless 関数または通常のデプロイメントで利用可能な Event タイプ", "Event Source": "Event ソース", "Create an Event source to register interest in a class of events from a particular system": "特定のシステムから興味のあるイベント分野を登録するために Event ソースを作成します", + "Event Sink": "Event シンク", + "Create an Event sink to receive incoming events from a particular source": "特定のソースから受信イベントを受信するために Event シンクを作成します", "Import from Git": "Git からのインポート", "Create and deploy stateless, Serverless functions": "ステートレス、Serverless 関数を作成してデプロイする", "Samples": "サンプル", @@ -14,9 +18,6 @@ "Create a Broker to define an event mesh for collecting a pool of events and route those events based on attributes, through triggers": "ブローカーを作成して、イベントのプールを収集するイベントメッシュを定義し、トリガーを使用して属性をもとにこれらのイベントをルーティングします", "Channel": "チャネル", "Create a Knative Channel to create an event forwarding and persistence layer with in-memory and reliable implementations": "Knative チャネルを作成し、インメモリーの信頼性の高い実装を備えたイベント転送および永続化層を作成します", - "Event Sink": "Event シンク", - "Create an Event sink to receive incoming events from a particular source": "特定のソースから受信イベントを受信するために Event シンクを作成します", - "​​Events available that can be consumed with Serverless Functions or regular Deployments": "Serverless 関数または通常のデプロイメントで使用できる利用可能なイベント", "Event Sources": "Event ソース", "Event sources are objects that link to an event producer and an event sink or consumer. Cluster administrators can customize the content made available in the catalog.": "Event ソースは、イベントプロデューサーとイベントシンクまたはコンシューマーにリンクするオブジェクトです。クラスター管理者は、カタログで利用可能にされるコンテンツをカスタマイズできます。", "**Event sources** are objects that link to an event producer and an event sink or consumer.": "**Event ソース** は、イベントプロデューサーとイベントシンクまたはコンシューマーにリンクするオブジェクトです。", diff --git a/frontend/packages/knative-plugin/locales/ko/knative-plugin.json b/frontend/packages/knative-plugin/locales/ko/knative-plugin.json index 1d36ae462b0..470e3d0d892 100644 --- a/frontend/packages/knative-plugin/locales/ko/knative-plugin.json +++ b/frontend/packages/knative-plugin/locales/ko/knative-plugin.json @@ -1,11 +1,15 @@ { "Functions": "함수", - "Events": "이벤트", - "​​Events available that can be consumed with Serverless Functions or regular Deployments.": "서버리스 기능 또는 일반 배포에서 사용할 수 있는 이벤트입니다.", - "​​**Events** available that can be consumed with Serverless Functions or regular Deployments.": "서버리스 기능 또는 일반 배포에서 사용할 수 있는 이벤트**", + "Event Types": "이벤트 유형", + "​​Event Types available that can be consumed with Serverless Functions or regular Deployments.": "서버리스 기능 또는 일반 배포에서 사용할 수 있는 이벤트 유형입니다.", + "​​**Event Types** available that can be consumed with Serverless Functions or regular Deployments.": "서버리스 기능 또는 일반 배포에서 사용할 수 있는 **이벤트 유형**입니다.", "Provider": "공급자", + "Event Type": "이벤트 유형", + "​​Event Types available that can be consumed with Serverless Functions or regular Deployments": "서버리스 기능 또는 일반 배포에서 사용할 수 있는 이벤트 유형", "Event Source": "이벤트 소스", "Create an Event source to register interest in a class of events from a particular system": "이벤트 소스를 생성하여 특정 시스템에서 관심있는 이벤트 클래스에 등록합니다.", + "Event Sink": "이벤트 싱크", + "Create an Event sink to receive incoming events from a particular source": "특정 소스에서 들어오는 이벤트를 수신하는 이벤트 싱크 만들기", "Import from Git": "Git에서 가져 오기", "Create and deploy stateless, Serverless functions": "상태 비저장 서버리스 함수 생성 및 배포", "Samples": "샘플", @@ -14,9 +18,6 @@ "Create a Broker to define an event mesh for collecting a pool of events and route those events based on attributes, through triggers": "이벤트 풀을 수집하기 위한 이벤트 메시를 정의하고 속성을 기반으로 트리거를 통해 해당 이벤트를 라우팅하는 브로커를 생성합니다.", "Channel": "채널", "Create a Knative Channel to create an event forwarding and persistence layer with in-memory and reliable implementations": "Knative Channel을 만들고 인 메모리의 안정적인 구현을 갖춘 이벤트 전송 및 지속성 계층을 생성합니다.", - "Event Sink": "이벤트 싱크", - "Create an Event sink to receive incoming events from a particular source": "특정 소스에서 들어오는 이벤트를 수신하는 이벤트 싱크 만들기", - "​​Events available that can be consumed with Serverless Functions or regular Deployments": "서버리스 기능 또는 일반 배포에서 사용할 수 있는 이벤트", "Event Sources": "이벤트 소스", "Event sources are objects that link to an event producer and an event sink or consumer. Cluster administrators can customize the content made available in the catalog.": "이벤트 소스는 이벤트 생성자 및 이벤트 싱크 또는 소비자에 연결되는 개체입니다. 클러스터 관리자는 카탈로그에서 사용 가능한 콘텐츠를 사용자 지정할 수 있습니다.", "**Event sources** are objects that link to an event producer and an event sink or consumer.": "** 이벤트 소스 **는 이벤트 생성자 및 이벤트 싱크 또는 소비자에 연결되는 개체입니다.", diff --git a/frontend/packages/knative-plugin/locales/zh/knative-plugin.json b/frontend/packages/knative-plugin/locales/zh/knative-plugin.json index 10176d3d215..00be76ec4b2 100644 --- a/frontend/packages/knative-plugin/locales/zh/knative-plugin.json +++ b/frontend/packages/knative-plugin/locales/zh/knative-plugin.json @@ -1,11 +1,15 @@ { "Functions": "功能", - "Events": "事件", - "​​Events available that can be consumed with Serverless Functions or regular Deployments.": "可以被​ Serverless Function 或正常的部署使用的可用事件。", - "​​**Events** available that can be consumed with Serverless Functions or regular Deployments.": "可以被​ Serverless Function 或正常的部署使用的可用​​**事件*。", + "Event Types": "事件类型", + "​​Event Types available that can be consumed with Serverless Functions or regular Deployments.": "可以被​ Serverless Function 或正常的部署使用的可用事件类型", + "​​**Event Types** available that can be consumed with Serverless Functions or regular Deployments.": "可以被​ Serverless Function 或正常的部署使用的可用​​**事件类型*。", "Provider": "供应商", + "Event Type": "事件类型", + "​​Event Types available that can be consumed with Serverless Functions or regular Deployments": "可以被​ Serverless Function 或正常的部署使用的可用事件类型", "Event Source": "事件源", "Create an Event source to register interest in a class of events from a particular system": "创建一个事件源以注册对特定系统中的一类事件的兴趣", + "Event Sink": "事件接收器", + "Create an Event sink to receive incoming events from a particular source": "创建事件接收器以接收来自特定源的传入事件", "Import from Git": "从 Git 导入", "Create and deploy stateless, Serverless functions": "创建和部署无状态、Serverless 功能", "Samples": "样本", @@ -14,9 +18,6 @@ "Create a Broker to define an event mesh for collecting a pool of events and route those events based on attributes, through triggers": "通过触发器创建代理来定义事件网格,以收集事件池并根据属性路由这些事件", "Channel": "频道", "Create a Knative Channel to create an event forwarding and persistence layer with in-memory and reliable implementations": "创建一个 Knative 频道以创建一个事件转发,使用内存的持久性层以及可靠的实现", - "Event Sink": "事件接收器", - "Create an Event sink to receive incoming events from a particular source": "创建事件接收器以接收来自特定源的传入事件", - "​​Events available that can be consumed with Serverless Functions or regular Deployments": "可以被​ Serverless Function 或正常的部署使用的可用事件", "Event Sources": "事件源", "Event sources are objects that link to an event producer and an event sink or consumer. Cluster administrators can customize the content made available in the catalog.": "事件源是链接到事件生成器和事件接收器或消费者的对象。集群管理员可以自定义目录中提供的内容。", "**Event sources** are objects that link to an event producer and an event sink or consumer.": "**事件源**是链接到事件生成器和事件接收器或消费者的对象。", diff --git a/frontend/packages/operator-lifecycle-manager/locales/es/olm.json b/frontend/packages/operator-lifecycle-manager/locales/es/olm.json index 81fb10a66e0..676d6e279bc 100644 --- a/frontend/packages/operator-lifecycle-manager/locales/es/olm.json +++ b/frontend/packages/operator-lifecycle-manager/locales/es/olm.json @@ -232,8 +232,9 @@ "Show operands in:": "Mostrar operandos en:", "All namespaces": "Todos los espacios de nombres", "Current namespace only": "Solo espacio de nombres actual", + "Create an OperatorGroup for this Namespace": "Crear un OperatorGroup para este espacio de nombre", + "Namespace not enabled": "Espacio de nombre no habilitado", "The Operator Lifecycle Manager will not watch this Namespace because it is not configured with an OperatorGroup.": "El administrador de ciclos de vida del Operador no observará este espacio de nombres porque no está configurado con un grupo de operadores.", - "Create one here.": "Crear uno aquí.", "Select OperatorGroup": "Seleccionar grupo de operadores", "Select a channel": "Seleccionar un canal", "Select a version": "Seleccionar una versión", @@ -283,7 +284,7 @@ "Not Installed": "No instalado", "provided by {{provider}}": "proporcionado por {{provider}}", "No Operators available": "No hay operadores disponibles", - "There are no Operators that match operating system {{os}} and architecture {{arch}}.": "No existen Operadores que coincidan con el sistema operativo {{os}} y la arquitectura {{arch}}.", + "There are no Operators that match operating system {{os}} and architecture {{arch}}.": "No existen Operadores que coincidan con el sistema operativo {{os}} y la arquitectura {{arch}}.", "Install state": "Estado de instalación", "Valid subscription": "Suscripción válida", "No Results Match the Filter Criteria": "Ningún resultado coincide con los criterios de filtro", @@ -291,9 +292,9 @@ "Purchase": "Comprar", "Install": "Instalar", "Uninstall": "Desinstalar", + "More info": "Más información", "No OperatorHub items found": "No se encontraron elementos de OperatorHub", - "Please check that the OperatorHub is running and that you have created a valid CatalogSource. For more information about OperatorHub, please click <2>.": "Verifique que OperatorHub se esté ejecutando y que haya creado un CatalogSource válido. Para obtener más información sobre OperatorHub, haga clic en <2>.", - "here": "aquí", + "Check that the OperatorHub is running and that you have created a valid CatalogSource.": "Verifique que OperatorHub esté ejecutándose y que haya creado un CatalogSource válido.", "Discover Operators from the Kubernetes community and Red Hat partners, curated by Red Hat. You can purchase commercial software through <2>Red Hat Marketplace. You can install Operators on your clusters to provide optional add-ons and shared services to your developers. After installation, the Operator capabilities will appear in the <4>Developer Catalog providing a self-service experience.": "Descubra operadores de la comunidad de Kubernetes y socios de Red Hat, seleccionados por Red Hat. Puede adquirir software comercial a través de <2>Red Hat Marketplace. Puede instalar operadores en sus clústeres para proporcionar complementos opcionales y servicios compartidos a sus desarrolladores. Después de la instalación, las capacidades del operador aparecerán en el <4>Catálogo de desarrolladores para proporcionar una experiencia de autoservicio.", "Discover Operators from the Kubernetes community and Red Hat partners, curated by Red Hat. You can purchase commercial software through <2>Red Hat Marketplace. You can install Operators on your clusters to provide optional add-ons and shared services to your developers. The Operator Backed Developer Catalog is currently disabled, thus Operator capabilities will not be exposed to developers.": "Descubra operadores de la comunidad de Kubernetes y socios de Red Hat, seleccionados por Red Hat. Puede adquirir software comercial a través de <2>Red Hat Marketplace. Puede instalar operadores en sus clústeres para proporcionar complementos opcionales y servicios compartidos a sus desarrolladores. El catálogo de desarrolladores respaldado por el operador está actualmente deshabilitado, por lo que las capacidades del operador no estarán expuestas a los desarrolladores.", "{{item}} can't be installed": "{{item}} no se puede instalar", @@ -371,6 +372,8 @@ "View Operator": "Ver operador", "The Operator is being installed. This may take a few minutes.": "Se está instalando el Operador. Esto puede demorar unos minutos.", "Once the Operator is installed the required custom resource will be available for creation.": "Una vez que el Operador esté instalado, el recurso personalizado requerido estará disponible para su creación.", + "Not found": "No encontrado", + "Error: {{loadError}}": "Error: {{loadError}}", "Installing...": "Instalando...", "CatalogSource": "CatalogSource", "No PackageManifests Found": "No se encontraron PackageManifests", diff --git a/frontend/packages/operator-lifecycle-manager/locales/fr/olm.json b/frontend/packages/operator-lifecycle-manager/locales/fr/olm.json index 86236b63d52..7e77340ed81 100644 --- a/frontend/packages/operator-lifecycle-manager/locales/fr/olm.json +++ b/frontend/packages/operator-lifecycle-manager/locales/fr/olm.json @@ -372,6 +372,8 @@ "View Operator": "Afficher l’opérateur", "The Operator is being installed. This may take a few minutes.": "L’opérateur est en cours d’installation. Cette opération peut prendre quelques minutes.", "Once the Operator is installed the required custom resource will be available for creation.": "Une fois l’opérateur installé, la ressource personnalisée requise sera disponible pour création.", + "Not found": "Introuvable", + "Error: {{loadError}}": "Erreur : {{loadError}}", "Installing...": "Installation...", "CatalogSource": "Source du catalogue", "No PackageManifests Found": "Aucun manifeste de package trouvé", diff --git a/frontend/packages/operator-lifecycle-manager/locales/ja/olm.json b/frontend/packages/operator-lifecycle-manager/locales/ja/olm.json index 2952c0d9c79..fba2276182c 100644 --- a/frontend/packages/operator-lifecycle-manager/locales/ja/olm.json +++ b/frontend/packages/operator-lifecycle-manager/locales/ja/olm.json @@ -372,6 +372,8 @@ "View Operator": "Operator の表示", "The Operator is being installed. This may take a few minutes.": "Operator がインストールされています。数分の時間がかかる可能性があります。", "Once the Operator is installed the required custom resource will be available for creation.": "Operator のインストール後に、必要なカスタムリソースは作成可能になります。", + "Not found": "見つかりません", + "Error: {{loadError}}": "エラー: {{loadError}}", "Installing...": "インストール...", "CatalogSource": "CatalogSource", "No PackageManifests Found": "PackageManifest が見つかりません", diff --git a/frontend/packages/operator-lifecycle-manager/locales/ko/olm.json b/frontend/packages/operator-lifecycle-manager/locales/ko/olm.json index 1b517e12196..b0cfdf9dd61 100644 --- a/frontend/packages/operator-lifecycle-manager/locales/ko/olm.json +++ b/frontend/packages/operator-lifecycle-manager/locales/ko/olm.json @@ -33,9 +33,9 @@ "Unknown": "알 수 없음", "All Namespaces": "모든 네임 스페이스", "Managed Namespaces": "관리 대상 네임 스페이스", - "{{count}} Namespaces_one": "{{count}} Namespaces_one", + "{{count}} Namespaces_one": "{{count}} 네임스페이스", "{{count}} Namespaces_other": "{{count}} Namespaces_other", - "Console plugin_one": "콘솔 plugin_one", + "Console plugin_one": "콘솔 플로그인", "Console plugin_other": "콘솔 plugin_other", "{{plugin}}:": "{{plugin}}:", "Enabled": "활성화됨", @@ -372,6 +372,8 @@ "View Operator": "Operator 보기", "The Operator is being installed. This may take a few minutes.": "Operator가 설치 중입니다. 이 작업은 몇 분 정도 걸릴 수 있습니다.", "Once the Operator is installed the required custom resource will be available for creation.": "Operator가 설치되면 필요한 사용자 지정 리소스를 생성할 수 있습니다.", + "Not found": "찾을 수 없음", + "Error: {{loadError}}": "오류: {{loadError}}", "Installing...": "설치 중 ...", "CatalogSource": "CatalogSource", "No PackageManifests Found": "PackageManifests를 찾을 수 없습니다.", diff --git a/frontend/packages/operator-lifecycle-manager/locales/zh/olm.json b/frontend/packages/operator-lifecycle-manager/locales/zh/olm.json index 578834b5861..892f32cd63d 100644 --- a/frontend/packages/operator-lifecycle-manager/locales/zh/olm.json +++ b/frontend/packages/operator-lifecycle-manager/locales/zh/olm.json @@ -372,6 +372,8 @@ "View Operator": "查看 Operator", "The Operator is being installed. This may take a few minutes.": "Operator 正在被安装。这可能需要几分钟。", "Once the Operator is installed the required custom resource will be available for creation.": "安装 Operator 后,就可以创建所需的自定义资源。", + "Not found": "没有找到", + "Error: {{loadError}}": "错误:{{loadError}}", "Installing...": "安装......", "CatalogSource": "CatalogSource", "No PackageManifests Found": "未找到 PackageManifests 信息", diff --git a/frontend/packages/patternfly/locales/ko/notification-drawer.json b/frontend/packages/patternfly/locales/ko/notification-drawer.json index cd072ade907..23fdf914bb7 100644 --- a/frontend/packages/patternfly/locales/ko/notification-drawer.json +++ b/frontend/packages/patternfly/locales/ko/notification-drawer.json @@ -1,6 +1,6 @@ { "Notifications": "알림", - "{{count}} unread_one": "{{count}} unread_one", + "{{count}} unread_one": "{{count}} 읽지 않음", "{{count}} unread_other": "{{count}} unread_other", "Close": "닫기", "Warning notification:": "경고 알림 :", diff --git a/frontend/packages/pipelines-plugin/locales/es/pipelines-plugin.json b/frontend/packages/pipelines-plugin/locales/es/pipelines-plugin.json index 3cfcde812bf..2b5c40f9242 100644 --- a/frontend/packages/pipelines-plugin/locales/es/pipelines-plugin.json +++ b/frontend/packages/pipelines-plugin/locales/es/pipelines-plugin.json @@ -23,6 +23,12 @@ "EventListeners": "EventListeners", "Repository": "Repositorio", "Repositories": "Repositorios", + "TektonConfig": "TektonConfig", + "TektonConfigs": "TektonConfigs", + "TektonHub": "TektonHub", + "TektonHubs": "TektonHubs", + "TektonResult": "TektonResult", + "TektonResults": "TektonResults", "Create a Tekton Pipeline to automate delivery of your application": "Cree una canalización de Tekton para automatizar la entrega de su aplicación", "Triggers": "Desencadenantes", "Red Hat": "Red Hat", @@ -243,7 +249,6 @@ "Add parameter": "Agregar parámetro", "Add workspace": "Agregar espacio de trabajo", "Error loading the tasks.": "Error al cargar las tareas.", - "Unable to locate any tasks.": "No se puede localizar ninguna tarea.", "Invalid runAfter": "runAfter no válido", "TaskSpec or TaskRef must be provided.": "Se debe proporcionar TaskSpec o TaskRef.", "Use this format when you reference variables in this form: <2>$(": "Utilice este formato cuando haga referencia a variables en este formulario: <2>$(", @@ -332,7 +337,6 @@ "Add a parallel task": "Agregar una tarea paralela", "Installing": "Instalación", "Add task": "Agregar tarea", - "No tasks": "Sin tareas", "Delete task": "Eliminar tarea", "When expression was met": "Se cumplió con la expresión when", "When expression was not met": "No se cumplió con la expresión when", @@ -357,8 +361,6 @@ "Task version will be updated across all instances": "La versión de la tarea se actualizará en todas las instancias.", "Only update this task's version if you'd like to replace all of its references in the namespace.": "Actualice la versión de esta tarea solo si desea reemplazar todas sus referencias en el espacio de nombres.", "{{version}} (latest)": "{{version}} (más reciente)", - "Copied to clipboard": "Copiado al portapapeles", - "Copy to clipboard": "Copiar al portapapeles", "Pipeline Repositories": "Repositorios de canalizaciones", "Event type": "Tipo de evento", "Last run duration": "Duración de la última ejecución", @@ -398,6 +400,8 @@ "<0>In your repository, create the <1>.tekton directory to store you pipeline.": "<0>En su repositorio, cree el directorio <1>.tekton para almacenar su canalización.", "Step 2": "Paso 2", "<0>In the <1>.tekton directory, create a new file called<3>push.yaml and add the following code:": "<0>En el directorio <1>.tekton, cree un nuevo archivo llamado <3>push.yaml y agregue el siguiente código:", + "Copy to clipboard": "Copiar al portapapeles", + "Copied to clipboard": "Copiado al portapapeles", "Step 3": "Paso 3", "Commit these changes and push them to your Git repository.": "Confirme estos cambios e insértelos en su repositorio Git.", "Step 4": "Paso 4", @@ -440,12 +444,6 @@ "{{taskLabel}} details": "Detalles de {{taskLabel}}", "CustomRun": "CustomRun", "CustomRuns": "CustomRuns", - "TektonConfig": "TektonConfig", - "TektonConfigs": "TektonConfigs", - "TektonHub": "TektonHub", - "TektonHubs": "TektonHubs", - "TektonResult": "TektonResult", - "TektonResults": "TektonResults", "Pipeline {{status}}": "Canalización {{status}}", "Pipeline status is {{status}}. View logs.": "El estado de la canalización es {{status}}. Ver los registros.", "Pipeline not started. Start pipeline.": "Canalización no iniciada. Iniciar canalización.", diff --git a/frontend/packages/pipelines-plugin/locales/fr/pipelines-plugin.json b/frontend/packages/pipelines-plugin/locales/fr/pipelines-plugin.json index 995aeff862b..82bc6c1586a 100644 --- a/frontend/packages/pipelines-plugin/locales/fr/pipelines-plugin.json +++ b/frontend/packages/pipelines-plugin/locales/fr/pipelines-plugin.json @@ -249,7 +249,6 @@ "Add parameter": "Ajouter un paramètre", "Add workspace": "Ajouter un espace de travail", "Error loading the tasks.": "Erreur lors du chargement des tâches.", - "Unable to locate any tasks.": "Impossible de localiser des tâches.", "Invalid runAfter": "runAfter non valide", "TaskSpec or TaskRef must be provided.": "TaskSpec ou TaskRef doit être fourni.", "Use this format when you reference variables in this form: <2>$(": "Utilisez ce format lorsque vous référencez des variables dans ce formulaire : <2>$(", @@ -338,7 +337,6 @@ "Add a parallel task": "Ajouter une tâche parallèle", "Installing": "Installation", "Add task": "Ajouter une tâche", - "No tasks": "Aucune tâche", "Delete task": "Supprimer la tâche", "When expression was met": "L’expression when a été satisfaite", "When expression was not met": "L’expression when n’a pas été satisfaite", @@ -363,8 +361,6 @@ "Task version will be updated across all instances": "La version de la tâche sera mise à jour dans toutes les instances.", "Only update this task's version if you'd like to replace all of its references in the namespace.": "Mettez à jour la version de cette tâche uniquement si vous souhaitez remplacer toutes ses références dans l’espace de noms.", "{{version}} (latest)": "{{version}} (la plus récente)", - "Copied to clipboard": "Copié dans le Presse-papiers", - "Copy to clipboard": "Copier dans le Presse-papiers", "Pipeline Repositories": "Dépôts de pipelines", "Event type": "Type d’événement", "Last run duration": "Durée de la dernière exécution", @@ -404,6 +400,8 @@ "<0>In your repository, create the <1>.tekton directory to store you pipeline.": "<0>Dans votre dépôt, créez le répertoire <1>.tekton dans lequel stocker votre pipeline.", "Step 2": "Étape 2", "<0>In the <1>.tekton directory, create a new file called<3>push.yaml and add the following code:": "<0>Dans le répertoire <1>.tekton, créez un fichier appelé <3>push.yaml et ajoutez le code suivant : ", + "Copy to clipboard": "Copier dans le Presse-papiers", + "Copied to clipboard": "Copié dans le Presse-papiers", "Step 3": "Étape 3", "Commit these changes and push them to your Git repository.": "Validez ces modifications et transférez-les vers votre dépôt Git.", "Step 4": "Étape 4", diff --git a/frontend/packages/pipelines-plugin/locales/ja/pipelines-plugin.json b/frontend/packages/pipelines-plugin/locales/ja/pipelines-plugin.json index c133109fa73..20fc6833fde 100644 --- a/frontend/packages/pipelines-plugin/locales/ja/pipelines-plugin.json +++ b/frontend/packages/pipelines-plugin/locales/ja/pipelines-plugin.json @@ -249,7 +249,6 @@ "Add parameter": "パラメーターの追加", "Add workspace": "ワークスペースの追加", "Error loading the tasks.": "Task の読み込みエラー。", - "Unable to locate any tasks.": "Task を特定できません。", "Invalid runAfter": "無効な runAfter", "TaskSpec or TaskRef must be provided.": "TaskSpec または TaskRef を指定する必要があります。", "Use this format when you reference variables in this form: <2>$(": "このフォームで変数を参照する際は、この形式を使用します: <2>$(", @@ -338,7 +337,6 @@ "Add a parallel task": "並列 Task の追加", "Installing": "インストール", "Add task": "Task の追加", - "No tasks": "Task なし", "Delete task": "Task の削除", "When expression was met": "when 式が一致", "When expression was not met": "when 式が一致しない", @@ -363,8 +361,6 @@ "Task version will be updated across all instances": "Task のバージョンはすべてのインスタンスで更新されます", "Only update this task's version if you'd like to replace all of its references in the namespace.": "この Task のバージョンは、namespace にあるすべての参照を置き換える場合にのみ更新します。", "{{version}} (latest)": "{{version}} (最新)", - "Copied to clipboard": "クリップボードにコピー済み", - "Copy to clipboard": "クリップボードにコピー", "Pipeline Repositories": "Pipeline リポジトリー", "Event type": "Event タイプ", "Last run duration": "最終実行期間", @@ -404,6 +400,8 @@ "<0>In your repository, create the <1>.tekton directory to store you pipeline.": "<0>リポジトリーで、<1>.tekton ディレクトリーを作成し、Pipeline を保存します。", "Step 2": "ステップ 2", "<0>In the <1>.tekton directory, create a new file called<3>push.yaml and add the following code:": "<0><1>.tekton ディレクトリーで、<3>push.yaml という名前の新規ファイルを作成し、以下のコードを追加します:", + "Copy to clipboard": "クリップボードにコピー", + "Copied to clipboard": "クリップボードにコピー済み", "Step 3": "ステップ 3", "Commit these changes and push them to your Git repository.": "これらの変更をコミットし、Git リポジトリーにプッシュします。", "Step 4": "ステップ 4", diff --git a/frontend/packages/pipelines-plugin/locales/ko/pipelines-plugin.json b/frontend/packages/pipelines-plugin/locales/ko/pipelines-plugin.json index 0c5efe31529..4dfea532280 100644 --- a/frontend/packages/pipelines-plugin/locales/ko/pipelines-plugin.json +++ b/frontend/packages/pipelines-plugin/locales/ko/pipelines-plugin.json @@ -249,7 +249,6 @@ "Add parameter": "매개 변수 추가", "Add workspace": "작업 공간 추가", "Error loading the tasks.": "작업을 로드하는 중에 오류가 발생했습니다.", - "Unable to locate any tasks.": "작업을 찾을 수 없습니다.", "Invalid runAfter": "잘못된 runAfter", "TaskSpec or TaskRef must be provided.": "TaskSpec 또는 TaskRef를 제공해야합니다.", "Use this format when you reference variables in this form: <2>$(": "이 형식의 변수를 참조할 때 다음 형식을 사용하십시오: <2>$(", @@ -338,7 +337,6 @@ "Add a parallel task": "병렬 작업 추가", "Installing": "설치", "Add task": "작업 추가", - "No tasks": "작업 없음", "Delete task": "작업 삭제", "When expression was met": "When 표현식 일치", "When expression was not met": "When 표현식 불일치", @@ -363,8 +361,6 @@ "Task version will be updated across all instances": "모든 인스턴스에서 작업 버전이 업데이트됩니다.", "Only update this task's version if you'd like to replace all of its references in the namespace.": "네임스페이스에 있는 모든 참조를 교체하려는 경우에만 이 작업의 버전을 업데이트하십시오.", "{{version}} (latest)": "{{version}} (latest)", - "Copied to clipboard": "클립 보드에 복사됨", - "Copy to clipboard": "클립 보드에 복사", "Pipeline Repositories": "파이프라인 리포지토리", "Event type": "이벤트 유형", "Last run duration": "마지막 실행 기간", @@ -404,6 +400,8 @@ "<0>In your repository, create the <1>.tekton directory to store you pipeline.": "<0>리포지토리에서 <1> tekton 디렉터리를 생성하여 파이프라인을 저장합니다.", "Step 2": "2 단계", "<0>In the <1>.tekton directory, create a new file called<3>push.yaml and add the following code:": "<0><1>.tekton 디렉터리에서<3>push.yaml라는 새 파일을 생성하고 다음 코드를 추가합니다.", + "Copy to clipboard": "클립 보드에 복사", + "Copied to clipboard": "클립 보드에 복사됨", "Step 3": "3 단계", "Commit these changes and push them to your Git repository.": "이러한 변경 사항을 커밋하고 Git 리포지토리로 내보냅니다.", "Step 4": "4 단계", diff --git a/frontend/packages/pipelines-plugin/locales/zh/pipelines-plugin.json b/frontend/packages/pipelines-plugin/locales/zh/pipelines-plugin.json index b94e419db85..996ff10da2f 100644 --- a/frontend/packages/pipelines-plugin/locales/zh/pipelines-plugin.json +++ b/frontend/packages/pipelines-plugin/locales/zh/pipelines-plugin.json @@ -249,7 +249,6 @@ "Add parameter": "添加参数", "Add workspace": "添加工作区", "Error loading the tasks.": "加载任务时出错。", - "Unable to locate any tasks.": "无法找到任何任务。", "Invalid runAfter": "无效的 runAfter", "TaskSpec or TaskRef must be provided.": "必须提供 TaskSpec 或 TaskRef。", "Use this format when you reference variables in this form: <2>$(": "在引用变量时使用此格式:<2>$(", @@ -338,7 +337,6 @@ "Add a parallel task": "添加一个并行任务", "Installing": "安装", "Add task": "添加任务", - "No tasks": "没有任务", "Delete task": "删除任务", "When expression was met": "当表达式满足时", "When expression was not met": "当表达式不满足时", @@ -363,8 +361,6 @@ "Task version will be updated across all instances": "任务版本将在所有实例中更新", "Only update this task's version if you'd like to replace all of its references in the namespace.": "如果您想替换命名空间中的所有引用,则只更新此任务的版本。", "{{version}} (latest)": "{{version}}(最新)", - "Copied to clipboard": "复制到剪贴板", - "Copy to clipboard": "复制到剪贴板", "Pipeline Repositories": "管道仓库", "Event type": "事件类型", "Last run duration": "最新运行的持续时间", @@ -404,6 +400,8 @@ "<0>In your repository, create the <1>.tekton directory to store you pipeline.": "<0>在您的仓库中,创建 <1>.tekton 目录来存储管道。", "Step 2": "第 2 步", "<0>In the <1>.tekton directory, create a new file called<3>push.yaml and add the following code:": "<0>在 <1>.tekton 目录中,创建一个名为<3>push.yaml 的新文件并添加以下代码:", + "Copy to clipboard": "复制到剪贴板", + "Copied to clipboard": "复制到剪贴板", "Step 3": "第 3 步", "Commit these changes and push them to your Git repository.": "提交这些更改并将其推送到您的 Git 仓库。", "Step 4": "第 4 步", diff --git a/frontend/packages/shipwright-plugin/locales/es/shipwright-plugin.json b/frontend/packages/shipwright-plugin/locales/es/shipwright-plugin.json index d867e4e42c4..e206261e32a 100644 --- a/frontend/packages/shipwright-plugin/locales/es/shipwright-plugin.json +++ b/frontend/packages/shipwright-plugin/locales/es/shipwright-plugin.json @@ -37,7 +37,11 @@ "Select a ConfigMap": "Seleccionar un ConfigMap", "Invalid YAML - {{err}}": "YAML no válido: {{err}}", "Image": "Imagen", + "Example for OpenShift internal registry: image-registry.openshift-image-registry.svc:5000//:latest": "Ejemplo de registro interno de OpenShift: image-registry.openshift-image-registry.svc:5000//:latest", "Parameters": "Parámetros", + "No required parameters are associated with the selected build strategy.": "No hay parámetros obligatorios asociados con la estrategia de compilación seleccionada.", + "Hide optional parameters": "Ocultar parámetros opcionales", + "Show optional parameters": "Mostrar parámetros opcionales", "Select a Secret": "Seleccionar un secreto", "Push Secret": "Insertar secreto", "Create new Secret": "Crear nuevo secreto", diff --git a/frontend/packages/shipwright-plugin/locales/fr/shipwright-plugin.json b/frontend/packages/shipwright-plugin/locales/fr/shipwright-plugin.json index b819c3854b3..47fcbaf1683 100644 --- a/frontend/packages/shipwright-plugin/locales/fr/shipwright-plugin.json +++ b/frontend/packages/shipwright-plugin/locales/fr/shipwright-plugin.json @@ -37,7 +37,11 @@ "Select a ConfigMap": "Sélectionner une ConfigMap", "Invalid YAML - {{err}}": "YAML non valide - {{err}}", "Image": "Image", + "Example for OpenShift internal registry: image-registry.openshift-image-registry.svc:5000//:latest": "Exemple pour le registre interne d'OpenShift : image-registry.openshift-image-registry.svc:5000/ / :latest", "Parameters": "Paramètres", + "No required parameters are associated with the selected build strategy.": "Aucun paramètre requis n'est associé à la stratégie de build sélectionnée.", + "Hide optional parameters": "Masquer les paramètres facultatifs", + "Show optional parameters": "Afficher les paramètres facultatifs", "Select a Secret": "Sélectionner un secret", "Push Secret": "Pousser le secret", "Create new Secret": "Créer un secret", diff --git a/frontend/packages/shipwright-plugin/locales/ja/shipwright-plugin.json b/frontend/packages/shipwright-plugin/locales/ja/shipwright-plugin.json index ea54f507f7a..ea218ab035f 100644 --- a/frontend/packages/shipwright-plugin/locales/ja/shipwright-plugin.json +++ b/frontend/packages/shipwright-plugin/locales/ja/shipwright-plugin.json @@ -2,7 +2,7 @@ "Build": "Build", "Builds": "Builds", "BuildRun": "BuildRun", - "BuildRuns": "BuildRun", + "BuildRuns": "BuildRuns", "Shipwright": "Shipwright", "Start": "開始", "Start last run": "最終実行の開始", @@ -37,7 +37,11 @@ "Select a ConfigMap": "ConfigMap の選択", "Invalid YAML - {{err}}": "無効な YAML - {{err}}", "Image": "イメージ", + "Example for OpenShift internal registry: image-registry.openshift-image-registry.svc:5000//:latest": "OpenShift 内部レジストリーの例: image-registry.openshift-image-registry.svc:5000//:latest", "Parameters": "パラメーター", + "No required parameters are associated with the selected build strategy.": "選択したビルドストラテジーには、必須のパラメーターが関連付けられていません。", + "Hide optional parameters": "オプションのパラメーターの非表示", + "Show optional parameters": "オプションのパラメーターの表示", "Select a Secret": "シークレットの選択", "Push Secret": "シークレットのプッシュ", "Create new Secret": "新規シークレットの作成", @@ -89,8 +93,8 @@ "Started": "開始済み", "BuildStrategy": "BuildStrategy", "ClusterBuildStrategy": "ClusterBuildStrategy", - "ClusterBuildStrategies": "ClusterBuildStrategy", - "BuildStrategies": "BuildStrategy", + "ClusterBuildStrategies": "ClusterBuildStrategies", + "BuildStrategies": "BuildStrategies", "Buildah": "Buildah", - "Source-to-Image": "Source-to-Image (S2I)" + "Source-to-Image": "Source-to-Image" } \ No newline at end of file diff --git a/frontend/packages/shipwright-plugin/locales/ko/shipwright-plugin.json b/frontend/packages/shipwright-plugin/locales/ko/shipwright-plugin.json index 2d50a1f172e..31dfb0a0f97 100644 --- a/frontend/packages/shipwright-plugin/locales/ko/shipwright-plugin.json +++ b/frontend/packages/shipwright-plugin/locales/ko/shipwright-plugin.json @@ -37,7 +37,11 @@ "Select a ConfigMap": "ConfigMap 선택", "Invalid YAML - {{err}}": "잘못된 YAML - {{err}}", "Image": "이미지", + "Example for OpenShift internal registry: image-registry.openshift-image-registry.svc:5000//:latest": "OpenShift 내부 레지스트리의 예: image-registry.openshift-image-registry.svc:5000//:latest", "Parameters": "매개 변수", + "No required parameters are associated with the selected build strategy.": "선택한 빌드 전략과 연결된 필수 매개변수가 없습니다.", + "Hide optional parameters": "선택적 매개변수 숨기기", + "Show optional parameters": "선택적 매개변수 표시", "Select a Secret": "시크릿 선택", "Push Secret": "시크릿 푸시", "Create new Secret": "새로운 시크릿 생성", diff --git a/frontend/packages/shipwright-plugin/locales/zh/shipwright-plugin.json b/frontend/packages/shipwright-plugin/locales/zh/shipwright-plugin.json index a6d88a6c378..ec0406c8ccc 100644 --- a/frontend/packages/shipwright-plugin/locales/zh/shipwright-plugin.json +++ b/frontend/packages/shipwright-plugin/locales/zh/shipwright-plugin.json @@ -37,7 +37,11 @@ "Select a ConfigMap": "选择一个 ConfigMap", "Invalid YAML - {{err}}": "无效的 YAML - {{err}}", "Image": "镜像", + "Example for OpenShift internal registry: image-registry.openshift-image-registry.svc:5000//:latest": "OpenShift 内部 registry 示例 : image-registry.openshift-image-registry.svc:5000//:latest", "Parameters": "参数", + "No required parameters are associated with the selected build strategy.": "没有所需的参数与所选构建策略关联。", + "Hide optional parameters": "隐藏可选参数", + "Show optional parameters": "显示可选参数", "Select a Secret": "选择一个 secret", "Push Secret": "推送 secret", "Create new Secret": "创建新 Secret", diff --git a/frontend/public/locales/es/public.json b/frontend/public/locales/es/public.json index a38a93cc740..0041a9df324 100644 --- a/frontend/public/locales/es/public.json +++ b/frontend/public/locales/es/public.json @@ -133,15 +133,6 @@ "Operand versions": "Versiones de operandos", "Related objects": "Objetos relacionados", "Not configured": "No configurado", - "Invalid cluster version": "Versión de clúster no válida", - "Cancel update": "Cancelar actualización", - "Release not accepted": "Lanzamiento no aceptado", - "Available updates": "Actualizaciones disponibles", - "Failing": "Con errores", - "View conditions": "Ver condiciones", - "Update to {{version}} in progress": "Actualización a {{version}} en curso", - "Not retrieving updates": "No recuperar actualizaciones", - "Up to date": "Al día de hoy", "Select a version": "Seleccionar una versión", "Current version": "Versión actual", "Last completed version": "Última versión completa", @@ -181,6 +172,15 @@ "Release notes": "Notas de la versión", "Cluster Settings": "Configuración del clúster", "Configuration": "Configuración", + "View conditions": "Ver condiciones", + "Invalid cluster version": "Versión de clúster no válida", + "Cancel update": "Cancelar actualización", + "Release not accepted": "Lanzamiento no aceptado", + "Available updates": "Actualizaciones disponibles", + "Failing": "Con errores", + "Update to {{version}} in progress": "Actualización a {{version}} en curso", + "Not retrieving updates": "No recuperar actualizaciones", + "Up to date": "Al día de hoy", "ClusterVersion details": "Detalles de ClusterVersion", "Specify either organizations or teams, but not both.": "Especifique organizaciones o equipos, pero no ambos.", "Add Identity Provider: GitHub": "Agregar proveedor de identidad: GitHub", @@ -285,9 +285,9 @@ "Save file": "Guardar el archivo", "binary data": "datos binarios", "No value": "Sin valor", - "Data": "Datos", "Hide values": "Ocultar valores", "Reveal values": "Mostrar valores", + "Data": "Datos", "Size": "Tamaño", "Created": "Creado", "ConfigMaps": "ConfigMaps", @@ -560,6 +560,7 @@ "Modal": "Modal", "Submit": "Enviar", "Reset": "Reiniciar", + "Row select": "Selección de fila", "Back": "Atrás", "Bug Reported": "Error reportado", "Close": "Cerrar", @@ -696,6 +697,8 @@ "Ingresses": "Ingresos", "View documentation": "Ver documentación", "Get support": "Obtener soporte", + "Compress to a single line of content. This may strip any new lines you have entered.": "Comprimir a una sola línea de contenido. Esto puede eliminar cualquier línea nueva que haya ingresado.", + "Expand to enter multiple lines of content. This is required if you need to include newline characters.": "Expandir para ingresar varias líneas de contenido. Esto es necesario si necesita incluir caracteres de nueva línea.", "Template": "Plantilla", "(generated if empty)": "(generado si está vacío)", "Edit parallelism": "Editar paralelismo", @@ -924,6 +927,9 @@ "Are you sure you want to remove volume <2>{{volumeName}} from <5>{{label}}: <7>{{resourceName}}?": "¿Está seguro de que quiere quitar el volumen <2>{{volumeName}} de <5>{{label}}:<7>{{resourceName}}?", "Note: This will not remove the underlying {{type}}.": "Nota: Esto no quitará el {{type}} subyacente.", "Remove volume": "Quitar volumen", + "Replace current content?": "¿Desea reemplazar el contenido actual?", + "Keep both": "Mantener ambos", + "Existing content will be replaced. Do you want to continue?": "El contenido existente se reemplazará. ¿Desea continuar?", "You cannot rollback a paused {{ deployType }}. You must resume it first.": "No puede revertir un {{ deployType }} pausado. Primero, debe reanudarlo.", "Use the following settings from <2>{{resourceName}} when rolling back:": "Utilice la siguiente configuración de <2>{{resourceName}} al revertir:", "Replica count and selector": "Selector y recuento de réplicas", @@ -1040,37 +1046,8 @@ "Webhook": "Webhook", "Slack": "Slack", "Update this YAML to configure Routes, Receivers, Groupings and other Alertmanager settings.": "Actualice este YAML para configurar Rutas, Receptores, Agrupaciones y otras configuraciones de Alertmanager.", - "Custom time range": "Rango de tiempo personalizado", - "To": "Para", - "Filter options": "Opciones de filtro", - "Select a dashboard from the dropdown": "Seleccionar un panel del menú desplegable", - "Error loading options": "Error al cargar opciones", - "Dashboard": "Panel", - "Refresh interval": "Intervalo de actualización", - "Dashboards": "Paneles de control", - "Inspect": "Inspeccionar", - "Error loading card": "Error al cargar la tarjeta", - "Metrics dashboards": "Paneles de métricas", - "panel.styles attribute not found": "Atributo panel.styles no encontrado", - "No data found": "Datos no encontrados", - "query results table": "tabla de resultados de la consulta", - "Last {{count}} minute_one": "Último {{count}} minuto", - "Last {{count}} minute_other": "Últimos {{count}} minutos", - "Last {{count}} hour_one": "Última {{count}} hora", - "Last {{count}} hour_other": "Últimas {{count}} horas", - "Last {{count}} day_one": "Último {{count}} día", - "Last {{count}} day_other": "Últimos {{count}} días", - "Last {{count}} week_one": "Última {{count}} semana", - "Last {{count}} week_other": "Últimas {{count}} semanas", - "Time range": "Intervalo de tiempo", - "Could not parse JSON data for dashboard \"{{dashboard}}\"": "No se pudieron analizar los datos JSON para el panel \"{{dashboard}}\"", "Show graph": "Mostrar gráfico", "Hide graph": "Ocultar gráfico", - "Show series": "Mostrar serie", - "Hide series": "Ocultar serie", - "Error loading values": "Error al cargar valores", - "Unselect all": "Cancelar la selección de todo", - "Select all": "Seleccionar todo", "Refresh off": "Actualizar", "{{count}} minute_one": "{{count}} minuto", "{{count}} minute_other": "{{count}} minutos", @@ -1078,10 +1055,6 @@ "{{count}} hour_other": "{{count}} horas", "{{count}} day_one": "{{count}} día", "{{count}} day_other": "{{count}} días", - "Expression (press Shift+Enter for newlines)": "Expresión (presione Shift+Enter para nuevas líneas)", - "Access restricted.": "Acceso restringido.", - "Failed to load metrics list.": "No se pudo cargar la lista de métricas.", - "Clear query": "Borrar consulta", "Your default receiver will automatically receive all alerts from this cluster that are not caught by other receivers first.": "Su receptor predeterminado recibirá automáticamente todas las alertas de este clúster que no sean captadas primero por otros receptores.", "The routing labels for this receiver are configured to capture critical alerts. Finish setting up this receiver by selecting a \"Receiver Type\" to choose a destination for these alerts. If this receiver is deleted, critical alerts will go to the default receiver instead.": "Las etiquetas de enrutamiento para este receptor están configuradas para capturar alertas críticas. Termine de configurar este receptor seleccionando un \"Tipo de receptor\" para elegir un destino para estas alertas. Si se elimina este receptor, las alertas críticas se enviarán al receptor predeterminado.", "The Watchdog alert fires constantly to confirm that your alerting stack is functioning correctly. This receiver is configured to prevent it from creating unnecessary notifications. You can edit this receiver if you plan to use the information that Watchdog provides, otherwise this receiver should remain in its current state with no set receiver type.": "La alerta de vigilancia se activa constantemente para confirmar que su pila de alertas esté funcionando correctamente. Este receptor está configurado para evitar que cree notificaciones innecesarias. Puede editar este receptor si planea utilizar la información que proporciona Watchdog; de lo contrario, este receptor debe permanecer en su estado actual sin ningún tipo de receptor establecido.", @@ -1094,7 +1067,6 @@ "Receiver name": "Nombre del destinatario", "A receiver with that name already exists.": "Ya existe un receptor con ese nombre.", "Receiver type": "Tipo de receptor", - "Send resolved alerts to this receiver?": "¿Enviar alertas resueltas a este receptor?", "Alertmanager globals": "Alertmanager globales", "To address": "Dirección del destinatario", "The email address to send notifications to.": "La dirección de correo electrónico a la que se envían notificaciones.", @@ -1137,6 +1109,7 @@ "Matcher": "igualador", "Routing label names must be unique.": "Los nombres de las etiquetas de ruta deben ser únicos.", "Add label": "Agregar etiqueta", + "Send resolved alerts to this receiver?": "¿Enviar alertas resueltas a este receptor?", "Slack API URL": "URL de la API de Slack", "Save as default Slack API URL": "Guardar como URL predeterminada de la API de Slack", "Checking this box will write the API URL to the global section of the configuration file where it will become the default API URL for future Slack receivers.": "Al marcar esta casilla se escribirá la URL de la API en la sección global del archivo de configuración, donde se convertirá en la URL de la API predeterminada para futuros receptores de Slack.", @@ -1184,16 +1157,6 @@ "Silence": "Silencio", "Overwriting current silence": "Sobrescribir el silencio actual", "When changes are saved, the currently existing silence will be expired and a new silence with the new configuration will take its place.": "Cuando se guarden los cambios, el silencio existente expirará y un nuevo silencio con la nueva configuración ocupará su lugar.", - "<0>{{firstIndex}} - {{lastIndex}} of <3>{{itemCount}} {{itemsTitle}}": "<0>{{firstIndex}} -{{lastIndex}} de <3>{{itemCount}} {{itemsTitle}}", - "Items per page": "Elementos por página", - "per page": "por página", - "Go to first page": "Ir a la primera página", - "Go to previous page": "Ir a la página anterior", - "Go to last page": "Ir a la última página", - "Go to next page": "Ir a la página siguiente", - "Current page": "Página actual", - "Pagination": "Paginación", - "of": "de", "Up": "Arriba", "Down": "Abajo", "Target details": "Detalles del objetivo", @@ -1214,12 +1177,14 @@ "Display name": "Nombre para mostrar", "No display name": "Sin nombre para mostrar", "{{cores}} cores": "{{cores}} núcleos", - "No namespaces found": "No se encontraron espacios de nombres", + "No Namespaces found": "No se encontraron espacios de nombre", + "No results were found for the requested Namespaces.": "No se encontraron resultados para los espacios de nombre solicitados.", + "No matching Namespaces": "No hay espacios de nombre que coincidan", "No results match the filter criteria.": "Ningún resultado coincide con los criterios del filtro.", "Namespaces": "Espacios de nombres", "Projects": "Proyectos", "Welcome to OpenShift": "Bienvenido a OpenShift", - "No projects found": "No se encontraron proyectos", + "No matching Projects": "No hay proyectos que coincidan", "by name or display name": "por nombre o nombre para mostrar", "Project": "Proyecto", "Error loading default pull Secrets": "Error al cargar los secretos de extracción predeterminados", @@ -1232,6 +1197,7 @@ "Target pods": "Pods objetivo", "To ports": "Puertos de destino", "From pods": "Pods de origen", + "To": "Para", "Any peer": "Cualquier par", "NS selector": "Selector NS", "Any namespace": "Cualquier espacio de nombres", @@ -1293,14 +1259,14 @@ "View all {{podSize}}": "Ver todo {{podSize}}", "Terminating": "Terminando", "No PersistentVolume": "Sin PersistentVolume", + "Used": "Usado", + "Total": "Total", "PersistentVolumeClaim details": "Detalles de PersistentVolumeClaim", "Available versus used capacity": "Capacidad disponible versus capacidad utilizada", "Total capacity": "Capacidad total", - "Total": "Total", "Label selector": "Selector de etiquetas", "Requested capacity": "Capacidad solicitada", "Capacity": "Capacidad", - "Used": "Usado", "Access modes": "Modos de acceso", "Volume mode": "Modo de volumen", "StorageClasses": "StorageClasses", @@ -1355,6 +1321,12 @@ "Create Pod": "Crear pod", "Service monitor selector": "Selector de monitor de servicio", "Promethesuses": "Promethesuses", + "Quick create": "Creación rápida", + "Create resources from their YAML or JSON definitions": "Crear recursos a partir de sus definiciones YAML o JSON", + "Import code from your Git repository to be built and deployed": "Importe código desde su repositorio Git para compilarlo e implementarlo", + "Import from Git": "Importar desde Git", + "Deploy an existing Image from an Image registry or Image stream tag": "Implemente una imagen existente desde un registro de imágenes o una etiqueta de flujo de imágenes", + "Container images": "Imágenes de contenedores", "Duplicate {{kindLabel}}": "Duplicar {{kindLabel}}", "Edit {{kindLabel}} subject": "Editar {{kindLabel}} asunto", "Delete {{label}} subject": "Eliminar {{label}} asunto", @@ -1416,6 +1388,7 @@ "Clear history": "Borrar historial", "Recently used": "Recientemente usado", "No results found": "No se encontraron resultados", + "Clear input value": "Borrar valor de entrada", "Edit AppliedClusterResourceQuota": "Editar AppliedClusterResourceQuota", "Affects pods that have an active deadline. These pods usually include builds, deployers, and jobs.": "Afecta a los pods que tienen una fecha límite activa. Estos pods suelen incluir compilaciones, implementadores y trabajos.", "Affects pods that do not have an active deadline. These pods usually include your applications.": "Afecta a los pods que no tienen una fecha límite activa. Estos pods suelen incluir sus aplicaciones.", @@ -1680,8 +1653,8 @@ "minute": "minuto", "seconds": "segundos", "second": "segundo", - "Copied": "Copiado", "Copy to clipboard": "Copiar al portapapeles", + "Copied": "Copiado", "Just now": "En este momento", "{{count}} toleration_one": "{{count}} tolerancia", "{{count}} toleration_other": "{{count}} tolerancias", @@ -1713,10 +1686,11 @@ "Add storage": "Agregar almacenamiento", "Expand PVC": "Ampliar PVC", "Create snapshot": "Crear instantánea", + "PVC is not Bound": "La PVC no está vinculada", "Clone PVC": "Clonar PVC", "Restore as new PVC": "Restaurar como PVC nueva", + "Volume Snapshot is not Ready": "La instantánea del volumen no está lista", "Resource is being deleted.": "El recurso se está eliminando.", - "Copied to clipboard": "Copiado al portapapeles", "Error loading {{desc}}": "Error al cargar {{desc}}", "No {{selection}} found": "No se encontró {{selection}}", "Create {{resourceKindLabel}}": "Crear {{resourceKindLabel}}", @@ -1778,17 +1752,8 @@ "Your 60-day self-support trial will end in {{count}} day on {{date}}._other": "Su prueba de autoayuda de 60 días finalizará en {{count}} días el {{date}}.", "This cluster is not supported.": "Este clúster no es compatible.", "For continued support, upgrade your cluster or transfer cluster ownership to an account with an active subscription.": "Para obtener soporte continuo, mejore su clúster o transfiera la propiedad del clúster a una cuenta con una suscripción activa.", - "Error Loading {{label}}: {{message}}": "Error al cargar {{label}}: {{message}}", - "Error Loading {{label}}": "Error al cargar {{label}}", - "Please <2>try again.": "<2>Inténtelo de nuevo.", - "No {{label}} found": "No se encontró {{label}}", - "Not found": "No encontrado", - "Restricted Access": "Acceso restringido", - "You don't have access to this section due to cluster policy.": "No tiene acceso a esta sección debido a la política del clúster.", - "Error details": "Error de detalles", - "404: Not Found": "404: No encontrado", - "{{labels}} content is not available in the catalog at this time due to loading failures.": "El contenido {{labels}} no está disponible en el catálogo en este momento debido a fallas en la carga.", - "Timed out fetching new data. The data below is stale.": "Se agotó el tiempo para obtener nuevos datos. Los datos a continuación son obsoletos.", + "Create new option \"{{option}}\"": "Crear nueva opción “{{option}}”", + "Filter options": "Opciones de filtro", "No default StorageClass": "Sin StorageClass predeterminada", "Select StorageClass": "Seleccionar StorageClass", "StorageClass for the new claim": "StorageClass para el nuevo reclamo", @@ -1977,6 +1942,8 @@ "Select a log file above": "Seleccione un archivo de registro arriba", "Filter by unit": "Filtrar por unidad", "Unit": "Unidad", + "Content Security Policy violation in Console plugin": "Infracción de la Política de seguridad de contenido en el complemento de consola", + "{{pluginName}} might have violated the Console Content Security Policy. Refer to the browser's console logs for details.": "Es posible que {{pluginName}} haya infringido la Política de seguridad de contenido de la consola. Consulte los registros de la consola del navegador para obtener más información.", "Loading {{title}} status": "Cargando {{title}} estado", "graph timespan": "Intervalo de tiempo del gráfico", "Reset zoom": "Restablecer zoom", diff --git a/frontend/public/locales/fr/public.json b/frontend/public/locales/fr/public.json index 9447989ab96..652d3555ebc 100644 --- a/frontend/public/locales/fr/public.json +++ b/frontend/public/locales/fr/public.json @@ -133,15 +133,6 @@ "Operand versions": "Versions d’opérande", "Related objects": "Objets associés", "Not configured": "Non configuré", - "Invalid cluster version": "Version du cluster non valide", - "Cancel update": "Annuler la mise à jour", - "Release not accepted": "Version non acceptée", - "Available updates": "Mises à jour disponibles", - "Failing": "En échec", - "View conditions": "Voir les conditions", - "Update to {{version}} in progress": "Mise à jour vers {{version}} en cours", - "Not retrieving updates": "Ne pas récupérer les mises à jour", - "Up to date": "À jour", "Select a version": "Sélectionner une version", "Current version": "Version actuelle", "Last completed version": "Dernière version terminée", @@ -181,6 +172,15 @@ "Release notes": "Notes de version", "Cluster Settings": "Paramètres du cluster", "Configuration": "Configuration", + "View conditions": "Voir les conditions", + "Invalid cluster version": "Version du cluster non valide", + "Cancel update": "Annuler la mise à jour", + "Release not accepted": "Version non acceptée", + "Available updates": "Mises à jour disponibles", + "Failing": "En échec", + "Update to {{version}} in progress": "Mise à jour vers {{version}} en cours", + "Not retrieving updates": "Ne pas récupérer les mises à jour", + "Up to date": "À jour", "ClusterVersion details": "Détails de la version du cluster", "Specify either organizations or teams, but not both.": "Spécifiez soit des organisations, soit des équipes, mais pas les deux.", "Add Identity Provider: GitHub": "Ajouter un fournisseur d’identité : GitHub", @@ -285,9 +285,9 @@ "Save file": "Enregistrer le fichier", "binary data": "données binaires", "No value": "Aucune valeur", - "Data": "Données", "Hide values": "Masquer les valeurs", "Reveal values": "Afficher les valeurs", + "Data": "Données", "Size": "Taille", "Created": "Créé", "ConfigMaps": "ConfigMaps", @@ -560,6 +560,7 @@ "Modal": "Modal", "Submit": "Envoyer", "Reset": "Réinitialiser", + "Row select": "Sélection de ligne", "Back": "Précédent", "Bug Reported": "Bogue signalé", "Close": "Fermer", @@ -696,10 +697,12 @@ "Ingresses": "Entrées", "View documentation": "Afficher la documentation", "Get support": "Obtenir de l’aide", + "Compress to a single line of content. This may strip any new lines you have entered.": "Compresser en une seule ligne de contenu. Cela peut supprimer toutes les nouvelles lignes que vous avez saisies.", + "Expand to enter multiple lines of content. This is required if you need to include newline characters.": "Développez pour saisir plusieurs lignes de contenu. Ceci est nécessaire si vous devez inclure des caractères de nouvelle ligne.", "Template": "Modèle", "(generated if empty)": "(généré si vide)", "Edit parallelism": "Modifier le parallélisme", - "{{jobsSucceeded}} of {{completions}}": "{{jobsSucceeded}} sur {{completions}}", + "{{jobsSucceeded}} of {{completions}}": "{{jobsSucceeded}} - {{completions}} de ", "Job status": "Statut du travail", "Succeeded pods": "Pods ayant réussi", "Active pods": "Pods actifs", @@ -1064,7 +1067,6 @@ "Receiver name": "Nom du destinataire", "A receiver with that name already exists.": "Un destinataire portant ce nom existe déjà.", "Receiver type": "Type de destinataire", - "Send resolved alerts to this receiver?": "Envoyer les alertes résolues à ce destinataire ?", "Alertmanager globals": "Paramètres généraux du Gestionnaire d’alertes", "To address": "Adresse du destinataire", "The email address to send notifications to.": "Adresse e-mail à laquelle envoyer les notifications.", @@ -1107,6 +1109,7 @@ "Matcher": "Correspondance", "Routing label names must be unique.": "Les noms d’étiquettes de routage doivent être uniques.", "Add label": "Ajouter une étiquette", + "Send resolved alerts to this receiver?": "Envoyer les alertes résolues à ce destinataire ?", "Slack API URL": "URL de l’API Slack", "Save as default Slack API URL": "Enregistrer comme URL de l’API Slack par défaut", "Checking this box will write the API URL to the global section of the configuration file where it will become the default API URL for future Slack receivers.": "Lorsque vous cochez cette case, l’URL d’API est écrite dans la section globale du fichier de configuration où elle devient l’URL d’API par défaut pour les futurs destinataires Slack.", @@ -1939,6 +1942,8 @@ "Select a log file above": "Sélectionnez un fichier journal ci-dessus", "Filter by unit": "Filtrer par unité", "Unit": "Unité", + "Content Security Policy violation in Console plugin": "Violation de la politique de sécurité du contenu dans le plug-in de la console", + "{{pluginName}} might have violated the Console Content Security Policy. Refer to the browser's console logs for details.": "{{pluginName}} peut avoir violé la politique de sécurité du contenu de la console. Reportez-vous aux journaux de la console du navigateur pour plus de détails.", "Loading {{title}} status": "Chargement du statut {{title}}", "graph timespan": "Durée du graphique", "Reset zoom": "Réinitialiser le zoom", diff --git a/frontend/public/locales/ja/public.json b/frontend/public/locales/ja/public.json index 58f6731a5f0..2910e2580e0 100644 --- a/frontend/public/locales/ja/public.json +++ b/frontend/public/locales/ja/public.json @@ -133,15 +133,6 @@ "Operand versions": "オペランドのバージョン", "Related objects": "関連オブジェクト", "Not configured": "未設定", - "Invalid cluster version": "無効なクラスターのバージョン", - "Cancel update": "更新のキャンセル", - "Release not accepted": "許可されないリリース", - "Available updates": "利用可能な更新", - "Failing": "失敗", - "View conditions": "条件の表示", - "Update to {{version}} in progress": "{{version}} への更新が進行中", - "Not retrieving updates": "更新の取得なし", - "Up to date": "最新", "Select a version": "バージョンの選択", "Current version": "現在のクラスター", "Last completed version": "最後に完了したバージョン", @@ -177,10 +168,19 @@ "There is a threshold for rendering update data which may cause gaps in the information below.": "更新データのレンダリングにはしきい値があり、以下の情報でギャップが生じる可能性があります。", "State": "状態", "Started": "開始済み", - "Completed": "完了", + "Completed": "完了済み", "Release notes": "リリースノート", "Cluster Settings": "クラスター設定", "Configuration": "設定", + "View conditions": "条件の表示", + "Invalid cluster version": "無効なクラスターのバージョン", + "Cancel update": "更新のキャンセル", + "Release not accepted": "許可されないリリース", + "Available updates": "利用可能な更新", + "Failing": "失敗", + "Update to {{version}} in progress": "{{version}} への更新が進行中", + "Not retrieving updates": "更新の取得なし", + "Up to date": "最新", "ClusterVersion details": "ClusterVersion の詳細", "Specify either organizations or teams, but not both.": "組織またはチームのいずれかを指定します (両方は指定できません)。", "Add Identity Provider: GitHub": "アイデンティティープロバイダーの追加: GitHub", @@ -285,9 +285,9 @@ "Save file": "ファイルの保存", "binary data": "バイナリーデータ", "No value": "値なし", - "Data": "データ", "Hide values": "値を非表示にする", "Reveal values": "値を表示する", + "Data": "データ", "Size": "サイズ", "Created": "作成済み", "ConfigMaps": "ConfigMaps", @@ -560,11 +560,12 @@ "Modal": "モーダル", "Submit": "送信", "Reset": "リセット", + "Row select": "行の選択", "Back": "戻る", "Bug Reported": "報告されているバグ", "Close": "閉じる", "Describe the bug you encountered. For urgent issues, open a support case instead.": "発生したバグについて説明してください。緊急の問題については、サポートケースを作成してください。", - "Describe the bug you encountered. Include where it is located and what action caused it. If this issue is urgent or blocking your workflow,": "発生したバグについて説明してください。どこで発生したのか、どのようなアクションが原因で発生したのかを説明に加えてください。この問題が緊急な場合、またはワークフローをブロックしている場合は、以下を実行してください", + "Describe the bug you encountered. Include where it is located and what action caused it. If this issue is urgent or blocking your workflow,": "発生したバグについて説明してください。どこで発生したのか、どのようなアクションが原因で発生したのかを説明に加えてください。この問題が緊急な場合、またはワークフローをブロックしている場合は、", "Enter your feedback": "フィードバックを入力してください", "Feedback": "フィードバック", "Feedback Sent": "フィードバックを送信しました", @@ -575,7 +576,7 @@ "Inform the direction of Red Hat": "Red Hat の方向を知らせする", "Learn about opportunities to share your feedback with our User Research Team.": "ユーザーリサーチチームにフィードバックを提供する機会について詳しく知る。", "There was a problem processing the request. Try reloading the page. If the problem persists, contact": "リクエストの処理中に問題が発生しました。ページをリロードしてみてください。問題が解決しない場合は、", - "Red Hat support": "Red Hat サポートに連絡してください", + "Red Hat support": "Red Hat Support チームに連絡してください", "Report a bug": "バグを報告する", "Response sent": "レスポンスを送信しました", "Yes, I would like to hear about research opportunities": "はい、調査の機会についてお聞かせください", @@ -696,6 +697,8 @@ "Ingresses": "Ingresses", "View documentation": "ドキュメントの表示", "Get support": "サポートの取得", + "Compress to a single line of content. This may strip any new lines you have entered.": "圧縮して 1 行のコンテンツにします。これにより、入力した改行が削除される可能性があります。", + "Expand to enter multiple lines of content. This is required if you need to include newline characters.": "展開して、コンテンツの複数行を入力します。これは、改行文字を含める必要がある場合には必須です。", "Template": "Template", "(generated if empty)": "(空白の場合は生成されます)", "Edit parallelism": "並列処理の編集", @@ -1064,7 +1067,6 @@ "Receiver name": "レシーバー名", "A receiver with that name already exists.": "この名前のレシーバーはすでに存在します。", "Receiver type": "レシーバータイプ", - "Send resolved alerts to this receiver?": "解決済みのアラートをこのレシーバーに送信しますか?", "Alertmanager globals": "Alertmanager グローバル", "To address": "宛先アドレス", "The email address to send notifications to.": "通知を送信するメールアドレス。", @@ -1107,6 +1109,7 @@ "Matcher": "マッチャー", "Routing label names must be unique.": "ルーティングラベル名は一意である必要があります。", "Add label": "ラベルの追加", + "Send resolved alerts to this receiver?": "解決済みのアラートをこのレシーバーに送信しますか?", "Slack API URL": "Slack API URL", "Save as default Slack API URL": "デフォルトの Slack API URLとして保存", "Checking this box will write the API URL to the global section of the configuration file where it will become the default API URL for future Slack receivers.": "このボックスにチェックを付けると、API URL が設定ファイルのグローバルセクションに書き込まれ、それは今後の Slack レシーバーのデフォルトの API URL になります。", @@ -1939,6 +1942,8 @@ "Select a log file above": "上記のログファイルの選択", "Filter by unit": "単位別にフィルター", "Unit": "単位", + "Content Security Policy violation in Console plugin": "コンソールプラグインのコンテンツセキュリティーポリシー違反", + "{{pluginName}} might have violated the Console Content Security Policy. Refer to the browser's console logs for details.": "{{pluginName}} は、コンソールコンテンツセキュリティーポリシーに違反している可能性があります。詳細は、ブラウザーのコンソールログを参照してください。", "Loading {{title}} status": "{{title}} ステータスの読み込み", "graph timespan": "グラフのタイムスパン", "Reset zoom": "ズームのリセット", diff --git a/frontend/public/locales/ko/public.json b/frontend/public/locales/ko/public.json index 42389259722..380f5d9297c 100644 --- a/frontend/public/locales/ko/public.json +++ b/frontend/public/locales/ko/public.json @@ -133,15 +133,6 @@ "Operand versions": "피연산자 버전", "Related objects": "관련 개체", "Not configured": "설정되지 않음", - "Invalid cluster version": "잘못된 클러스터 버전", - "Cancel update": "업데이트 취소", - "Release not accepted": "릴리스는 허용되지 않음", - "Available updates": "사용 가능한 업데이트", - "Failing": "실패", - "View conditions": "상태 표시", - "Update to {{version}} in progress": "{{version}} 업데이트 진행 중", - "Not retrieving updates": "업데이트를 검색하지 않음", - "Up to date": "최신 정보", "Select a version": "버전 선택", "Current version": "현재 버전", "Last completed version": "마지막 버전", @@ -181,6 +172,15 @@ "Release notes": "릴리스 노트", "Cluster Settings": "클러스터 설정", "Configuration": "설정", + "View conditions": "상태 표시", + "Invalid cluster version": "잘못된 클러스터 버전", + "Cancel update": "업데이트 취소", + "Release not accepted": "릴리스는 허용되지 않음", + "Available updates": "사용 가능한 업데이트", + "Failing": "실패", + "Update to {{version}} in progress": "{{version}} 업데이트 진행 중", + "Not retrieving updates": "업데이트를 검색하지 않음", + "Up to date": "최신 정보", "ClusterVersion details": "클러스터 버전 세부 정보", "Specify either organizations or teams, but not both.": "조직 또는 팀 중 하나만 지정하십시오.", "Add Identity Provider: GitHub": "아이덴티티 공급자 추가: GitHub", @@ -285,9 +285,9 @@ "Save file": "파일 저장", "binary data": "바이너리 데이터", "No value": "값 없음", - "Data": "데이터", "Hide values": "값 숨기기", "Reveal values": "값 표시", + "Data": "데이터", "Size": "크기", "Created": "작성", "ConfigMaps": "구성 맵", @@ -560,6 +560,7 @@ "Modal": "모달", "Submit": "제출", "Reset": "재설정", + "Row select": "행 선택", "Back": "이전", "Bug Reported": "버그 보고", "Close": "닫기", @@ -696,10 +697,12 @@ "Ingresses": "Ingress", "View documentation": "문서 보기", "Get support": "지원", + "Compress to a single line of content. This may strip any new lines you have entered.": "한 줄의 콘텐츠로 압축합니다. 입력 한 줄의 새 행을 제거할 수 있습니다.", + "Expand to enter multiple lines of content. This is required if you need to include newline characters.": "확장하여 여러 줄의 콘텐츠를 입력합니다. 이는 새 줄 바꿈 문자를 포함해야 하는 경우 필요합니다.", "Template": "템플릿", "(generated if empty)": "(비어 있는 경우 생성됨)", "Edit parallelism": "병렬 처리 편집", - "{{jobsSucceeded}} of {{completions}}": "{{jobsSucceeded}}{{completions}} - / ", + "{{jobsSucceeded}} of {{completions}}": "{{jobsSucceeded}} - {{completions}} / ", "Job status": "작업 상태", "Succeeded pods": "성공적으로 실행된 Pod", "Active pods": "활성 Pod", @@ -1064,7 +1067,6 @@ "Receiver name": "수신자 이름", "A receiver with that name already exists.": "해당 이름의 수신자가 이미 존재합니다.", "Receiver type": "수신자 유형", - "Send resolved alerts to this receiver?": "이 수신자에게 해결된 알림을 보내시겠습니까?", "Alertmanager globals": "글로벌 Alertmanager", "To address": "수신 주소", "The email address to send notifications to.": "알림을 받을 이메일 주소입니다.", @@ -1107,6 +1109,7 @@ "Matcher": "일치 사항", "Routing label names must be unique.": "라우팅 레이블 이름은 고유해야합니다.", "Add label": "라벨 추가", + "Send resolved alerts to this receiver?": "이 수신자에게 해결된 알림을 보내시겠습니까?", "Slack API URL": "Slack API URL", "Save as default Slack API URL": "기본 Slack API URL로 저장", "Checking this box will write the API URL to the global section of the configuration file where it will become the default API URL for future Slack receivers.": "이 체크 박스를 선택하면 설정 파일의 전역 섹션에 API URL이 기록되며, 이는 향후 Slack 수신기의 기본 API URL이 됩니다.", @@ -1939,6 +1942,8 @@ "Select a log file above": "위의 로그 파일 선택", "Filter by unit": "단위별 필터링", "Unit": "단위", + "Content Security Policy violation in Console plugin": "콘솔 플러그인의 콘텐츠 보안 정책 위반", + "{{pluginName}} might have violated the Console Content Security Policy. Refer to the browser's console logs for details.": "{{pluginName}} 콘솔 콘텐츠 보안 정책을 위반했을 수 있습니다. 자세한 내용은 브라우저의 콘솔 로그를 참조하십시오.", "Loading {{title}} status": "{{title}} 상태 로딩", "graph timespan": "그래프 시간 범위", "Reset zoom": "확대/축소 재설정", diff --git a/frontend/public/locales/zh/public.json b/frontend/public/locales/zh/public.json index 9848cf591cf..8e9778bc67a 100644 --- a/frontend/public/locales/zh/public.json +++ b/frontend/public/locales/zh/public.json @@ -133,15 +133,6 @@ "Operand versions": "Operand 版本", "Related objects": "相关对象", "Not configured": "未配置", - "Invalid cluster version": "无效的集群版本", - "Cancel update": "取消更新", - "Release not accepted": "未被接受的发行版本", - "Available updates": "可用更新", - "Failing": "失败", - "View conditions": "查看条件", - "Update to {{version}} in progress": "更新到{{version}}进行中", - "Not retrieving updates": "没有获取更新", - "Up to date": "最新", "Select a version": "选择一个版本", "Current version": "当前版本", "Last completed version": "最后完成的版本", @@ -181,6 +172,15 @@ "Release notes": "发行注记", "Cluster Settings": "集群设置", "Configuration": "配置", + "View conditions": "查看条件", + "Invalid cluster version": "无效的集群版本", + "Cancel update": "取消更新", + "Release not accepted": "未被接受的发行版本", + "Available updates": "可用更新", + "Failing": "失败", + "Update to {{version}} in progress": "更新到{{version}}进行中", + "Not retrieving updates": "没有获取更新", + "Up to date": "最新", "ClusterVersion details": "集群版本详情", "Specify either organizations or teams, but not both.": "指定组织或团队,但不能同时指定两者。", "Add Identity Provider: GitHub": "添加身份供应商:GitHub", @@ -285,9 +285,9 @@ "Save file": "保存文件", "binary data": "二进制数据", "No value": "没有值", - "Data": "数据", "Hide values": "隐藏值", "Reveal values": "显示值", + "Data": "数据", "Size": "大小", "Created": "创建", "ConfigMaps": "配置映射", @@ -402,7 +402,7 @@ "Add identity providers": "添加身份供应商", "OpenShift AI": "OpenShift AI", "Build, deploy, and manage AI-enabled applications.": "构建、部署和管理支持 AI 的应用程序。", - "OpenShift Lightspeed": "OpenShift Lightspeed", + "OpenShift Lightspeed": "OpenShift LightSpeed", "Your personal AI helper.": "您的个人 AI 助手。", "French and Spanish now available": "法语和西班牙语现在可用", "Console language options now include French and Spanish.": "控制台语言选项现在包括了法语和西班牙语。", @@ -560,6 +560,7 @@ "Modal": "模态", "Submit": "提交", "Reset": "重置", + "Row select": "行选择", "Back": "退回", "Bug Reported": "报告的错误", "Close": "关闭", @@ -696,6 +697,8 @@ "Ingresses": "Ingresses", "View documentation": "查看文档", "Get support": "获得支持", + "Compress to a single line of content. This may strip any new lines you have entered.": "压缩为一行的内容。这会删除您输入的换行符。", + "Expand to enter multiple lines of content. This is required if you need to include newline characters.": "展开以输入多行内容。如果您需要包含换行符,则需要此项。", "Template": "模板", "(generated if empty)": "(为空时生成)", "Edit parallelism": "编辑并行机制", @@ -1064,7 +1067,6 @@ "Receiver name": "收件者姓名", "A receiver with that name already exists.": "具有该名称的接收者已经存在。", "Receiver type": "接收者类型", - "Send resolved alerts to this receiver?": "发送已解决的警报到此接收器?", "Alertmanager globals": "Alertmanager 全局", "To address": "目标地址", "The email address to send notifications to.": "要将通知发送到的电子邮件地址。", @@ -1107,6 +1109,7 @@ "Matcher": "匹配器", "Routing label names must be unique.": "路由标签名称必须是唯一的。", "Add label": "添加标签", + "Send resolved alerts to this receiver?": "发送已解决的警报到此接收器?", "Slack API URL": "Slack API URL", "Save as default Slack API URL": "保存为默认 Slack API URL", "Checking this box will write the API URL to the global section of the configuration file where it will become the default API URL for future Slack receivers.": "选中此框会将 API URL 写入配置文件的全局部分,它将成为将来 Slack 接收者的默认 API URL。", @@ -1939,6 +1942,8 @@ "Select a log file above": "选择上面的一个日志文件", "Filter by unit": "按单元过滤", "Unit": "单位", + "Content Security Policy violation in Console plugin": "控制台插件中的内容安全策略违反情况", + "{{pluginName}} might have violated the Console Content Security Policy. Refer to the browser's console logs for details.": "{{pluginName}} 违反了控制台内容安全策略。详情请参阅浏览器的控制台日志。", "Loading {{title}} status": "加载 {{title}} 状态", "graph timespan": "图形化时间跨度", "Reset zoom": "重设缩放", @@ -1953,4 +1958,4 @@ "default": "默认", "Disabled": "禁用", "Enabled": "已启用" -} +} \ No newline at end of file From 483d8b28d592105fe3928a7df7113e9cad7ebf62 Mon Sep 17 00:00:00 2001 From: Robb Hamilton Date: Mon, 23 Dec 2024 13:16:04 -0500 Subject: [PATCH 020/102] OCPBUGS-46555: fix bug where two external link icons can appear in OperatorHub modal --- .../components/operator-hub/operator-hub-items.tsx | 12 ++++-------- frontend/public/components/catalog/_catalog.scss | 6 ------ frontend/public/style/_common.scss | 4 ++++ 3 files changed, 8 insertions(+), 14 deletions(-) diff --git a/frontend/packages/operator-lifecycle-manager/src/components/operator-hub/operator-hub-items.tsx b/frontend/packages/operator-lifecycle-manager/src/components/operator-hub/operator-hub-items.tsx index 593971f3db9..681b9800985 100644 --- a/frontend/packages/operator-lifecycle-manager/src/components/operator-hub/operator-hub-items.tsx +++ b/frontend/packages/operator-lifecycle-manager/src/components/operator-hub/operator-hub-items.tsx @@ -9,7 +9,6 @@ import { EmptyStateFooter, Truncate, } from '@patternfly/react-core'; -import { ExternalLinkAltIcon } from '@patternfly/react-icons/dist/esm/icons/external-link-alt-icon'; import * as classNames from 'classnames'; import * as _ from 'lodash'; import { useTranslation } from 'react-i18next'; @@ -617,15 +616,12 @@ export const OperatorHubTileView: React.FC = (props) =
{remoteWorkflowUrl && ( -
- {detailsItem.marketplaceActionText || t('olm~Purchase')} -
- - +
+ {detailsItem.marketplaceActionText || t('olm~Purchase')} +
} /> )} diff --git a/frontend/public/components/catalog/_catalog.scss b/frontend/public/components/catalog/_catalog.scss index 73d5ea0604b..effc80380cf 100644 --- a/frontend/public/components/catalog/_catalog.scss +++ b/frontend/public/components/catalog/_catalog.scss @@ -249,12 +249,6 @@ $catalog-tile-width: $co-m-catalog-tile-width; overflow-x: hidden; } - &__overlay-action-icon { - flex-shrink: 0; - font-size: $font-size-base; - margin-left: 6px; - } - &__overlay-action-label { overflow-x: hidden; text-overflow: ellipsis; diff --git a/frontend/public/style/_common.scss b/frontend/public/style/_common.scss index 26d90e183eb..dc08ef7c494 100644 --- a/frontend/public/style/_common.scss +++ b/frontend/public/style/_common.scss @@ -283,6 +283,10 @@ dl.co-inline { .co-external-link { display: inline-block; padding-right: $co-external-link-padding-right; + + &.co-catalog-page__overlay-action--external { + padding-right: $co-external-link-padding-right * 2; // extra padding for external link icon + } } // Enable break word within co-m-table-grid .co-external-link--block { From a42c4676969811350eed5fb0964b7543ca49d6e6 Mon Sep 17 00:00:00 2001 From: Samuel Padgett Date: Tue, 3 Dec 2024 12:12:08 -0500 Subject: [PATCH 021/102] OCPBUGS-45915: prefer OpenShift release version in telemetry events Previously, we were reporting the internal console version, which is opaque and difficult to correlate to a specific OpenShift version. --- .../src/hooks/__tests__/useTelemetry.spec.ts | 23 ++++++++++++++----- .../console-shared/src/hooks/useTelemetry.ts | 4 +++- 2 files changed, 20 insertions(+), 7 deletions(-) diff --git a/frontend/packages/console-shared/src/hooks/__tests__/useTelemetry.spec.ts b/frontend/packages/console-shared/src/hooks/__tests__/useTelemetry.spec.ts index 434d554eedf..2a53c6f226f 100644 --- a/frontend/packages/console-shared/src/hooks/__tests__/useTelemetry.spec.ts +++ b/frontend/packages/console-shared/src/hooks/__tests__/useTelemetry.spec.ts @@ -39,17 +39,28 @@ afterAll(() => { }); describe('getClusterProperties', () => { - it('returns undefined when consoleVersion is not configured', () => { + it('prefers releaseVersion to consoleVersion', () => { + window.SERVER_FLAGS = { + ...originServerFlags, + releaseVersion: '4.17.4', + consoleVersion: 'v6.0.6-23079-g6689498225', + }; + expect(getClusterProperties().consoleVersion).toBe('4.17.4'); + }); + + it('falls back to consoleVersion if releaseVersion is not set', () => { + window.SERVER_FLAGS = { ...originServerFlags, consoleVersion: 'v6.0.6-23079-g6689498225' }; + delete window.SERVER_FLAGS.releaseVersion; + expect(getClusterProperties().consoleVersion).toBe('v6.0.6-23079-g6689498225'); + }); + + it('returns undefined when releaseVersion and consoleVersion are not set', () => { window.SERVER_FLAGS = { ...originServerFlags }; delete window.SERVER_FLAGS.consoleVersion; + delete window.SERVER_FLAGS.releaseVersion; expect(getClusterProperties().consoleVersion).toBe(undefined); }); - it('returns the right version when it is configured', () => { - window.SERVER_FLAGS = { ...originServerFlags, consoleVersion: 'x.y.z' }; - expect(getClusterProperties().consoleVersion).toBe('x.y.z'); - }); - it('returns undefined when telemetry is missing at all', () => { window.SERVER_FLAGS = { ...originServerFlags }; delete window.SERVER_FLAGS.telemetry; diff --git a/frontend/packages/console-shared/src/hooks/useTelemetry.ts b/frontend/packages/console-shared/src/hooks/useTelemetry.ts index cdac520fce7..a2dbf3c31a0 100644 --- a/frontend/packages/console-shared/src/hooks/useTelemetry.ts +++ b/frontend/packages/console-shared/src/hooks/useTelemetry.ts @@ -31,7 +31,9 @@ export const getClusterProperties = () => { ) { clusterProperties.clusterType = 'DEVSANDBOX'; } - clusterProperties.consoleVersion = window.SERVER_FLAGS?.consoleVersion; + // Prefer to report the OCP version (releaseVersion) if available. + clusterProperties.consoleVersion = + window.SERVER_FLAGS?.releaseVersion || window.SERVER_FLAGS?.consoleVersion; clusterProperties.organizationId = window.SERVER_FLAGS?.telemetry?.ORGANIZATION_ID; return clusterProperties; }; From 3902f73c7413c09bce930793bf1891318c7ba50f Mon Sep 17 00:00:00 2001 From: Jon Jackson Date: Fri, 6 Dec 2024 12:29:01 -0500 Subject: [PATCH 022/102] OCPBUGS-45371: Authenticate user token on every auth request When a request goes through the auth middleware, the user token is now authenticated using a TokenReview. The TokenReview request is made using the console ServiceAccount token. --- pkg/auth/oauth2/auth.go | 1 + pkg/auth/oauth2/auth_oidc.go | 2 + pkg/auth/oauth2/auth_openshift.go | 86 +++++++++++++++++++++++++++++-- 3 files changed, 86 insertions(+), 3 deletions(-) diff --git a/pkg/auth/oauth2/auth.go b/pkg/auth/oauth2/auth.go index 03dd0258323..a297da9a547 100644 --- a/pkg/auth/oauth2/auth.go +++ b/pkg/auth/oauth2/auth.go @@ -203,6 +203,7 @@ func NewOAuth2Authenticator(ctx context.Context, config *Config) (*OAuth2Authent cookiePath: c.CookiePath, secureCookies: c.SecureCookies, constructOAuth2Config: a.oauth2ConfigConstructor, + internalK8sConfig: c.K8sConfig, } var tokenHandler loginMethod diff --git a/pkg/auth/oauth2/auth_oidc.go b/pkg/auth/oauth2/auth_oidc.go index 785892272f2..73b47294cca 100644 --- a/pkg/auth/oauth2/auth_oidc.go +++ b/pkg/auth/oauth2/auth_oidc.go @@ -9,6 +9,7 @@ import ( oidc "github.com/coreos/go-oidc" "golang.org/x/oauth2" + "k8s.io/client-go/rest" "github.com/openshift/console/pkg/auth" "github.com/openshift/console/pkg/auth/sessions" @@ -38,6 +39,7 @@ type oidcConfig struct { cookiePath string secureCookies bool constructOAuth2Config oauth2ConfigConstructor + internalK8sConfig *rest.Config } func newOIDCAuth(ctx context.Context, sessionStore *sessions.CombinedSessionStore, c *oidcConfig, metrics *auth.Metrics) (*oidcAuth, error) { diff --git a/pkg/auth/oauth2/auth_openshift.go b/pkg/auth/oauth2/auth_openshift.go index e4c04b59508..88a64a920cc 100644 --- a/pkg/auth/oauth2/auth_openshift.go +++ b/pkg/auth/oauth2/auth_openshift.go @@ -1,11 +1,13 @@ package oauth2 import ( + "bytes" "context" "crypto/sha256" "encoding/base64" "encoding/json" "fmt" + "io/ioutil" "net/http" "net/url" "strings" @@ -13,6 +15,7 @@ import ( "golang.org/x/oauth2" + authv1 "k8s.io/api/authentication/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/client-go/rest" "k8s.io/klog/v2" @@ -25,6 +28,8 @@ import ( "github.com/openshift/console/pkg/serverutils/asynccache" ) +const tokenReviewPath = "/apis/authentication.k8s.io/v1/tokenreviews" + // openShiftAuth implements OpenShift Authentication as defined in: // https://access.redhat.com/documentation/en-us/openshift_container_platform/4.9/html/authentication_and_authorization/understanding-authentication type openShiftAuth struct { @@ -221,18 +226,93 @@ func (o *openShiftAuth) LogoutRedirectURL() string { return o.logoutRedirectOverride } +func (o *openShiftAuth) reviewToken(token string) (*authv1.TokenReview, error) { + tokenReviewURL, err := url.Parse(o.issuerURL) + if err != nil { + return nil, err + } + tokenReviewURL.Path = tokenReviewPath + + tokenReview := &authv1.TokenReview{ + TypeMeta: metav1.TypeMeta{ + APIVersion: "authentication.k8s.io/v1", + Kind: "TokenReview", + }, + Spec: authv1.TokenReviewSpec{ + Token: token, + }, + } + + tokenReviewJSON, err := json.Marshal(tokenReview) + if err != nil { + return nil, err + } + + req, err := http.NewRequest(http.MethodPost, tokenReviewURL.String(), bytes.NewBuffer(tokenReviewJSON)) + if err != nil { + return nil, err + } + + req.Header.Set("Authorization", fmt.Sprintf("Bearer %s", o.internalK8sConfig.BearerToken)) + + res, err := o.k8sClient.Do(req) + if err != nil { + return nil, err + } + defer res.Body.Close() + + if res.StatusCode != http.StatusCreated { + return nil, fmt.Errorf("unable to validate user token: %v", res.Status) + } + + body, err := ioutil.ReadAll(res.Body) + if err != nil { + return nil, err + } + + // Unmarshal the response into a TokenReview object + var responseTokenReview authv1.TokenReview + err = json.Unmarshal(body, &responseTokenReview) + if err != nil { + return nil, err + } + + // Check if the token is authenticated + if !responseTokenReview.Status.Authenticated { + err := fmt.Errorf("invalid token: %v", token) + if responseTokenReview.Status.Error != "" { + err = fmt.Errorf("invalid token: %s", responseTokenReview.Status.Error) + } + return nil, err + } + + return tokenReview, nil +} + func (o *openShiftAuth) Authenticate(_ http.ResponseWriter, r *http.Request) (*auth.User, error) { - // TODO: This doesn't do any validation of the cookie with the assumption that the - // API server will reject tokens it doesn't recognize. If we want to keep some backend - // state we should sign this cookie. If not there's not much we can do. cookie, err := r.Cookie(sessions.OpenshiftAccessTokenCookieName) if err != nil { return nil, err } + if cookie.Value == "" { return nil, fmt.Errorf("unauthenticated, no value for cookie %s", sessions.OpenshiftAccessTokenCookieName) } + if o.internalK8sConfig.BearerToken != "" { + tokenReviewResponse, err := o.reviewToken(cookie.Value) + if err != nil { + klog.Errorf("failed to authenticate user token: %v", err) + return nil, err + } + return &auth.User{ + Token: cookie.Value, + Username: tokenReviewResponse.Status.User.Username, + ID: tokenReviewResponse.Status.User.UID, + }, nil + } + + klog.V(4).Info("TokenReview skipped, no bearer token is set on internal K8s rest config") return &auth.User{ Token: cookie.Value, }, nil From 414cc7408c6feee32b46f457960da49e6ca06a7f Mon Sep 17 00:00:00 2001 From: Robb Hamilton Date: Mon, 23 Dec 2024 12:48:55 -0500 Subject: [PATCH 023/102] OCPBUGS-46511: fix navigation from non-General User Preference tab to Lightspeed setting --- .../src/components/user-preferences/UserPreferencePage.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/frontend/packages/console-app/src/components/user-preferences/UserPreferencePage.tsx b/frontend/packages/console-app/src/components/user-preferences/UserPreferencePage.tsx index e74c46b4016..50fbcfabfa3 100644 --- a/frontend/packages/console-app/src/components/user-preferences/UserPreferencePage.tsx +++ b/frontend/packages/console-app/src/components/user-preferences/UserPreferencePage.tsx @@ -105,9 +105,10 @@ const UserPreferencePage: React.FC = () => { const [spotlightElement, setSpotlightElement] = React.useState(null); React.useEffect(() => { + setActiveTabId(groupIdFromUrl ?? 'general'); const element = document.querySelector(spotlight); setSpotlightElement(element); - }, [spotlight, userPreferenceItemResolved, userPreferenceTabContents]); + }, [groupIdFromUrl, spotlight, userPreferenceItemResolved, userPreferenceTabContents]); // utils and callbacks const handleTabClick = (event: React.MouseEvent, eventKey: string) => { From d733fd2c5fd40b1391c0fd6bf8d5175adc608d39 Mon Sep 17 00:00:00 2001 From: rawagner Date: Wed, 23 Oct 2024 15:16:14 +0200 Subject: [PATCH 024/102] Limit payload size of GQL query --- pkg/graphql/httphandler.go | 24 ++++++++++++++++++++++++ pkg/server/server.go | 7 +++---- 2 files changed, 27 insertions(+), 4 deletions(-) create mode 100644 pkg/graphql/httphandler.go diff --git a/pkg/graphql/httphandler.go b/pkg/graphql/httphandler.go new file mode 100644 index 00000000000..9f4b5edfaab --- /dev/null +++ b/pkg/graphql/httphandler.go @@ -0,0 +1,24 @@ +package graphql + +import ( + "net/http" + + graphql "github.com/graph-gophers/graphql-go" + "github.com/graph-gophers/graphql-go/relay" +) + +type handler struct { + relayHandler *relay.Handler +} + +func NewHttpHandler(schema *graphql.Schema) *handler { + h := &handler{ + relayHandler: &relay.Handler{Schema: schema}, + } + return h +} + +func (h *handler) ServeHTTP(w http.ResponseWriter, r *http.Request) { + r.Body = http.MaxBytesReader(w, r.Body, 4096) + h.relayHandler.ServeHTTP(w, r) +} diff --git a/pkg/server/server.go b/pkg/server/server.go index de0cf9c4b2a..85cd1809f4d 100644 --- a/pkg/server/server.go +++ b/pkg/server/server.go @@ -6,7 +6,6 @@ import ( "encoding/json" "fmt" "html/template" - "io/ioutil" "net/http" "net/url" "os" @@ -28,6 +27,7 @@ import ( "github.com/openshift/console/pkg/auth/sessions" devconsoleProxy "github.com/openshift/console/pkg/devconsole/proxy" "github.com/openshift/console/pkg/devfile" + gql "github.com/openshift/console/pkg/graphql" "github.com/openshift/console/pkg/graphql/resolver" helmhandlerspkg "github.com/openshift/console/pkg/helm/handlers" "github.com/openshift/console/pkg/knative" @@ -44,7 +44,6 @@ import ( "github.com/openshift/console/pkg/version" graphql "github.com/graph-gophers/graphql-go" - "github.com/graph-gophers/graphql-go/relay" "github.com/rawagner/graphql-transport-ws/graphqlws" ) @@ -332,7 +331,7 @@ func (s *Server) HTTPHandler() (http.Handler, error) { handleFunc(terminal.AvailableEndpoint, terminalProxy.HandleProxyEnabled) handleFunc(terminal.InstalledNamespaceEndpoint, terminalProxy.HandleTerminalInstalledNamespace) - graphQLSchema, err := ioutil.ReadFile("pkg/graphql/schema.graphql") + graphQLSchema, err := os.ReadFile("pkg/graphql/schema.graphql") if err != nil { panic(err) } @@ -342,7 +341,7 @@ func (s *Server) HTTPHandler() (http.Handler, error) { schema := graphql.MustParseSchema(string(graphQLSchema), &rootResolver, opts...) handler := graphqlws.NewHandler() handler.InitPayload = resolver.InitPayload - graphQLHandler := handler.NewHandlerFunc(schema, &relay.Handler{Schema: schema}) + graphQLHandler := handler.NewHandlerFunc(schema, gql.NewHttpHandler(schema)) handle("/api/graphql", authHandlerWithUser(func(user *auth.User, w http.ResponseWriter, r *http.Request) { ctx := context.WithValue(context.Background(), resolver.HeadersKey, map[string]string{ "Authorization": fmt.Sprintf("Bearer %s", user.Token), From 80b75f7bb0f575d92c57fa08d028560ff7e175f4 Mon Sep 17 00:00:00 2001 From: Jon Jackson Date: Tue, 12 Nov 2024 15:26:57 -0500 Subject: [PATCH 025/102] CONSOLE-4331: Add ocm and telemetry urls to csp allowlist --- pkg/utils/utils.go | 2 +- pkg/utils/utils_test.go | 48 ++++++++++++++++++++--------------------- 2 files changed, 25 insertions(+), 25 deletions(-) diff --git a/pkg/utils/utils.go b/pkg/utils/utils.go index 4fab84ef294..2ac525e385e 100644 --- a/pkg/utils/utils.go +++ b/pkg/utils/utils.go @@ -43,7 +43,7 @@ func BuildCSPDirectives(k8sMode, pluginsCSP, indexPageScriptNonce string) ([]str // When running on-cluster, the default sources are just 'self' (i.e. the same origin). // When running off-cluster, the default sources are 'self' and 'http://localhost:8080' and 'ws://localhost:8080' // (i.e. the same origin and the proxy endpoint). - defaultSources := "'self'" + defaultSources := "'self' console.redhat.com api.segment.io" if k8sMode == "off-cluster" { defaultSources += " http://localhost:8080 ws://localhost:8080" } diff --git a/pkg/utils/utils_test.go b/pkg/utils/utils_test.go index 1055380c480..da1cf5d4b44 100644 --- a/pkg/utils/utils_test.go +++ b/pkg/utils/utils_test.go @@ -51,12 +51,12 @@ func TestBuildCSPDirectives(t *testing.T) { contentSecurityPolicy: "", indexPageScriptNonce: "foobar", want: []string{ - "base-uri 'self'", - "default-src 'self'", - "img-src 'self' data:", - "font-src 'self' data:", - "script-src 'self' 'unsafe-eval' 'nonce-foobar'", - "style-src 'self' 'unsafe-inline'", + "base-uri 'self' console.redhat.com api.segment.io", + "default-src 'self' console.redhat.com api.segment.io", + "img-src 'self' console.redhat.com api.segment.io data:", + "font-src 'self' console.redhat.com api.segment.io data:", + "script-src 'self' console.redhat.com api.segment.io 'unsafe-eval' 'nonce-foobar'", + "style-src 'self' console.redhat.com api.segment.io 'unsafe-inline'", "frame-src 'none'", "frame-ancestors 'none'", "object-src 'none'", @@ -68,12 +68,12 @@ func TestBuildCSPDirectives(t *testing.T) { contentSecurityPolicy: "", indexPageScriptNonce: "foobar", want: []string{ - "base-uri 'self' http://localhost:8080 ws://localhost:8080", - "default-src 'self' http://localhost:8080 ws://localhost:8080", - "img-src 'self' http://localhost:8080 ws://localhost:8080 data:", - "font-src 'self' http://localhost:8080 ws://localhost:8080 data:", - "script-src 'self' http://localhost:8080 ws://localhost:8080 'unsafe-eval' 'nonce-foobar'", - "style-src 'self' http://localhost:8080 ws://localhost:8080 'unsafe-inline'", + "base-uri 'self' console.redhat.com api.segment.io http://localhost:8080 ws://localhost:8080", + "default-src 'self' console.redhat.com api.segment.io http://localhost:8080 ws://localhost:8080", + "img-src 'self' console.redhat.com api.segment.io http://localhost:8080 ws://localhost:8080 data:", + "font-src 'self' console.redhat.com api.segment.io http://localhost:8080 ws://localhost:8080 data:", + "script-src 'self' console.redhat.com api.segment.io http://localhost:8080 ws://localhost:8080 'unsafe-eval' 'nonce-foobar'", + "style-src 'self' console.redhat.com api.segment.io http://localhost:8080 ws://localhost:8080 'unsafe-inline'", "frame-src 'none'", "frame-ancestors 'none'", "object-src 'none'", @@ -93,12 +93,12 @@ func TestBuildCSPDirectives(t *testing.T) { } `, want: []string{ - "base-uri 'self'", - "default-src 'self' foo.bar", - "img-src 'self' foo.bar.baz data:", - "font-src 'self' foo.bar.baz data:", - "script-src 'self' foo.bar foo.bar.baz 'unsafe-eval' 'nonce-foobar'", - "style-src 'self' foo.bar foo.bar.baz 'unsafe-inline'", + "base-uri 'self' console.redhat.com api.segment.io", + "default-src 'self' console.redhat.com api.segment.io foo.bar", + "img-src 'self' console.redhat.com api.segment.io foo.bar.baz data:", + "font-src 'self' console.redhat.com api.segment.io foo.bar.baz data:", + "script-src 'self' console.redhat.com api.segment.io foo.bar foo.bar.baz 'unsafe-eval' 'nonce-foobar'", + "style-src 'self' console.redhat.com api.segment.io foo.bar foo.bar.baz 'unsafe-inline'", "frame-src 'none'", "frame-ancestors 'none'", "object-src 'none'", @@ -118,12 +118,12 @@ func TestBuildCSPDirectives(t *testing.T) { } `, want: []string{ - "base-uri 'self' http://localhost:8080 ws://localhost:8080", - "default-src 'self' http://localhost:8080 ws://localhost:8080 foo.bar", - "img-src 'self' http://localhost:8080 ws://localhost:8080 foo.bar.baz data:", - "font-src 'self' http://localhost:8080 ws://localhost:8080 foo.bar.baz data:", - "script-src 'self' http://localhost:8080 ws://localhost:8080 foo.bar foo.bar.baz 'unsafe-eval' 'nonce-foobar'", - "style-src 'self' http://localhost:8080 ws://localhost:8080 foo.bar foo.bar.baz 'unsafe-inline'", + "base-uri 'self' console.redhat.com api.segment.io http://localhost:8080 ws://localhost:8080", + "default-src 'self' console.redhat.com api.segment.io http://localhost:8080 ws://localhost:8080 foo.bar", + "img-src 'self' console.redhat.com api.segment.io http://localhost:8080 ws://localhost:8080 foo.bar.baz data:", + "font-src 'self' console.redhat.com api.segment.io http://localhost:8080 ws://localhost:8080 foo.bar.baz data:", + "script-src 'self' console.redhat.com api.segment.io http://localhost:8080 ws://localhost:8080 foo.bar foo.bar.baz 'unsafe-eval' 'nonce-foobar'", + "style-src 'self' console.redhat.com api.segment.io http://localhost:8080 ws://localhost:8080 foo.bar foo.bar.baz 'unsafe-inline'", "frame-src 'none'", "frame-ancestors 'none'", "object-src 'none'", From 58cef37eafdfda821ed870764f08a7cd06bfd574 Mon Sep 17 00:00:00 2001 From: Jon Jackson Date: Thu, 21 Nov 2024 13:40:31 -0500 Subject: [PATCH 026/102] adjust default CSP directive sources to be more granular --- pkg/utils/utils.go | 31 +++++++++----- pkg/utils/utils_test.go | 90 ++++++++++++++++++++++++----------------- 2 files changed, 74 insertions(+), 47 deletions(-) diff --git a/pkg/utils/utils.go b/pkg/utils/utils.go index 2ac525e385e..1acbde41e27 100644 --- a/pkg/utils/utils.go +++ b/pkg/utils/utils.go @@ -40,23 +40,32 @@ func RandomString(length int) (string, error) { // The constructed directives will include the default sources and the supplied configuration. func BuildCSPDirectives(k8sMode, pluginsCSP, indexPageScriptNonce string) ([]string, error) { // The default sources are the sources that are allowed for all directives. - // When running on-cluster, the default sources are just 'self' (i.e. the same origin). - // When running off-cluster, the default sources are 'self' and 'http://localhost:8080' and 'ws://localhost:8080' - // (i.e. the same origin and the proxy endpoint). - defaultSources := "'self' console.redhat.com api.segment.io" + // When running on-cluster, the default sources are just 'self' and 'console.redhat.com'. + // When running off-cluster, 'http://localhost:8080' and 'ws://localhost:8080' are appended to the + // default sources. Image source, font source, and style source only use 'self' and + // 'http://localhost:8080'. + defaultSrc := "'self' console.redhat.com" + imgSrc := "'self'" + fontSrc := "'self'" + scriptSrc := "'self' console.redhat.com" + styleSrc := "'self'" if k8sMode == "off-cluster" { - defaultSources += " http://localhost:8080 ws://localhost:8080" + defaultSrc += " http://localhost:8080 ws://localhost:8080" + imgSrc += " http://localhost:8080" + fontSrc += " http://localhost:8080" + scriptSrc += " http://localhost:8080 ws://localhost:8080" + styleSrc += " http://localhost:8080" } // The newCSPDirectives map is used to store the directives for each type. // The keys are the types of directives (e.g. DefaultSrc, ImgSrc, etc) and the values are the sources for each type. // The sources are strings that are concatenated together with a space separator. newCSPDirectives := map[consolev1.DirectiveType][]string{ - consolev1.DefaultSrc: {defaultSources}, - consolev1.ImgSrc: {defaultSources}, - consolev1.FontSrc: {defaultSources}, - consolev1.ScriptSrc: {defaultSources}, - consolev1.StyleSrc: {defaultSources}, + consolev1.DefaultSrc: {defaultSrc}, + consolev1.ImgSrc: {imgSrc}, + consolev1.FontSrc: {fontSrc}, + consolev1.ScriptSrc: {scriptSrc}, + consolev1.StyleSrc: {styleSrc}, } // If the plugins are providing a content security policy configuration, parse it and add it to the directives map. @@ -79,7 +88,7 @@ func BuildCSPDirectives(k8sMode, pluginsCSP, indexPageScriptNonce string) ([]str // The sources are concatenated together with a space separator. // The CSP directives string is returned as a slice of strings, where each string is a directive. cspDirectives := []string{ - fmt.Sprintf("base-uri %s", defaultSources), + fmt.Sprintf("base-uri %s", defaultSrc), fmt.Sprintf("default-src %s", strings.Join(newCSPDirectives[consolev1.DefaultSrc], " ")), fmt.Sprintf("img-src %s data:", strings.Join(newCSPDirectives[consolev1.ImgSrc], " ")), fmt.Sprintf("font-src %s data:", strings.Join(newCSPDirectives[consolev1.FontSrc], " ")), diff --git a/pkg/utils/utils_test.go b/pkg/utils/utils_test.go index da1cf5d4b44..9df36e37b3e 100644 --- a/pkg/utils/utils_test.go +++ b/pkg/utils/utils_test.go @@ -5,6 +5,24 @@ import ( "testing" ) +const ( + onClusterBaseUri = "base-uri 'self' console.redhat.com" + onClusterDefaultSrc = "default-src 'self' console.redhat.com" + onClusterImgSrc = "img-src 'self'" + onClusterFontSrc = "font-src 'self'" + onClusterScriptSrc = "script-src 'self' console.redhat.com" + onClusterStyleSrc = "style-src 'self'" + offClusterBaseUri = "base-uri 'self' console.redhat.com http://localhost:8080 ws://localhost:8080" + offClusterDefaultSrc = "default-src 'self' console.redhat.com http://localhost:8080 ws://localhost:8080" + offClusterImgSrc = "img-src 'self' http://localhost:8080" + offClusterFontSrc = "font-src 'self' http://localhost:8080" + offClusterScriptSrc = "script-src 'self' console.redhat.com http://localhost:8080 ws://localhost:8080" + offClusterStyleSrc = "style-src 'self' http://localhost:8080" + frameSrc = "frame-src 'none'" + frameAncestors = "frame-ancestors 'none'" + objectSrc = "object-src 'none'" +) + func TestParseContentSecurityPolicyConfig(t *testing.T) { tests := []struct { name string @@ -51,15 +69,15 @@ func TestBuildCSPDirectives(t *testing.T) { contentSecurityPolicy: "", indexPageScriptNonce: "foobar", want: []string{ - "base-uri 'self' console.redhat.com api.segment.io", - "default-src 'self' console.redhat.com api.segment.io", - "img-src 'self' console.redhat.com api.segment.io data:", - "font-src 'self' console.redhat.com api.segment.io data:", - "script-src 'self' console.redhat.com api.segment.io 'unsafe-eval' 'nonce-foobar'", - "style-src 'self' console.redhat.com api.segment.io 'unsafe-inline'", - "frame-src 'none'", - "frame-ancestors 'none'", - "object-src 'none'", + onClusterBaseUri, + onClusterDefaultSrc, + onClusterImgSrc + " data:", + onClusterFontSrc + " data:", + onClusterScriptSrc + " 'unsafe-eval' 'nonce-foobar'", + onClusterStyleSrc + " 'unsafe-inline'", + frameSrc, + frameAncestors, + objectSrc, }, }, { @@ -68,15 +86,15 @@ func TestBuildCSPDirectives(t *testing.T) { contentSecurityPolicy: "", indexPageScriptNonce: "foobar", want: []string{ - "base-uri 'self' console.redhat.com api.segment.io http://localhost:8080 ws://localhost:8080", - "default-src 'self' console.redhat.com api.segment.io http://localhost:8080 ws://localhost:8080", - "img-src 'self' console.redhat.com api.segment.io http://localhost:8080 ws://localhost:8080 data:", - "font-src 'self' console.redhat.com api.segment.io http://localhost:8080 ws://localhost:8080 data:", - "script-src 'self' console.redhat.com api.segment.io http://localhost:8080 ws://localhost:8080 'unsafe-eval' 'nonce-foobar'", - "style-src 'self' console.redhat.com api.segment.io http://localhost:8080 ws://localhost:8080 'unsafe-inline'", - "frame-src 'none'", - "frame-ancestors 'none'", - "object-src 'none'", + offClusterBaseUri, + offClusterDefaultSrc, + offClusterImgSrc + " data:", + offClusterFontSrc + " data:", + offClusterScriptSrc + " 'unsafe-eval' 'nonce-foobar'", + offClusterStyleSrc + " 'unsafe-inline'", + frameSrc, + frameAncestors, + objectSrc, }, }, { @@ -93,15 +111,15 @@ func TestBuildCSPDirectives(t *testing.T) { } `, want: []string{ - "base-uri 'self' console.redhat.com api.segment.io", - "default-src 'self' console.redhat.com api.segment.io foo.bar", - "img-src 'self' console.redhat.com api.segment.io foo.bar.baz data:", - "font-src 'self' console.redhat.com api.segment.io foo.bar.baz data:", - "script-src 'self' console.redhat.com api.segment.io foo.bar foo.bar.baz 'unsafe-eval' 'nonce-foobar'", - "style-src 'self' console.redhat.com api.segment.io foo.bar foo.bar.baz 'unsafe-inline'", - "frame-src 'none'", - "frame-ancestors 'none'", - "object-src 'none'", + onClusterBaseUri, + onClusterDefaultSrc + " foo.bar", + onClusterImgSrc + " foo.bar.baz data:", + onClusterFontSrc + " foo.bar.baz data:", + onClusterScriptSrc + " foo.bar foo.bar.baz 'unsafe-eval' 'nonce-foobar'", + onClusterStyleSrc + " foo.bar foo.bar.baz 'unsafe-inline'", + frameSrc, + frameAncestors, + objectSrc, }, }, { @@ -118,15 +136,15 @@ func TestBuildCSPDirectives(t *testing.T) { } `, want: []string{ - "base-uri 'self' console.redhat.com api.segment.io http://localhost:8080 ws://localhost:8080", - "default-src 'self' console.redhat.com api.segment.io http://localhost:8080 ws://localhost:8080 foo.bar", - "img-src 'self' console.redhat.com api.segment.io http://localhost:8080 ws://localhost:8080 foo.bar.baz data:", - "font-src 'self' console.redhat.com api.segment.io http://localhost:8080 ws://localhost:8080 foo.bar.baz data:", - "script-src 'self' console.redhat.com api.segment.io http://localhost:8080 ws://localhost:8080 foo.bar foo.bar.baz 'unsafe-eval' 'nonce-foobar'", - "style-src 'self' console.redhat.com api.segment.io http://localhost:8080 ws://localhost:8080 foo.bar foo.bar.baz 'unsafe-inline'", - "frame-src 'none'", - "frame-ancestors 'none'", - "object-src 'none'", + offClusterBaseUri, + offClusterDefaultSrc + " foo.bar", + offClusterImgSrc + " foo.bar.baz data:", + offClusterFontSrc + " foo.bar.baz data:", + offClusterScriptSrc + " foo.bar foo.bar.baz 'unsafe-eval' 'nonce-foobar'", + offClusterStyleSrc + " foo.bar foo.bar.baz 'unsafe-inline'", + frameSrc, + frameAncestors, + objectSrc, }, }, } From 0e31dae971a164b42cddc51355e95e010c99a0d0 Mon Sep 17 00:00:00 2001 From: Jon Jackson Date: Wed, 11 Dec 2024 16:16:25 -0500 Subject: [PATCH 027/102] Use arrays to build CSP directives --- pkg/utils/utils.go | 101 ++++++++++++++++++++++++++++----------------- 1 file changed, 63 insertions(+), 38 deletions(-) diff --git a/pkg/utils/utils.go b/pkg/utils/utils.go index 1acbde41e27..a4463a345cd 100644 --- a/pkg/utils/utils.go +++ b/pkg/utils/utils.go @@ -12,6 +12,22 @@ import ( consolev1 "github.com/openshift/api/console/v1" ) +const ( + baseURI = "base-uri" + defaultSrc = "default-src" + imgSrc = "img-src" + fontSrc = "font-src" + scriptSrc = "script-src" + styleSrc = "style-src" + consoleDot = "console.redhat.com" + httpLocalHost = "http://localhost:8080" + wsLocalHost = "ws://localhost:8080" + self = "'self'" + data = "data:" + unsafeEval = "'unsafe-eval'" + unsafeInline = "'unsafe-inline'" +) + // Generate a cryptographically secure random array of bytes. func RandomBytes(length int) ([]byte, error) { bytes := make([]byte, length) @@ -38,68 +54,77 @@ func RandomString(length int) (string, error) { // buildCSPDirectives takes the content security policy configuration from the server and constructs // a complete set of directives for the Content-Security-Policy-Report-Only header. // The constructed directives will include the default sources and the supplied configuration. + func BuildCSPDirectives(k8sMode, pluginsCSP, indexPageScriptNonce string) ([]string, error) { + nonce := fmt.Sprintf("'nonce-%s'", indexPageScriptNonce) + // The default sources are the sources that are allowed for all directives. // When running on-cluster, the default sources are just 'self' and 'console.redhat.com'. // When running off-cluster, 'http://localhost:8080' and 'ws://localhost:8080' are appended to the // default sources. Image source, font source, and style source only use 'self' and // 'http://localhost:8080'. - defaultSrc := "'self' console.redhat.com" - imgSrc := "'self'" - fontSrc := "'self'" - scriptSrc := "'self' console.redhat.com" - styleSrc := "'self'" + baseUriDirective := []string{baseURI, self, consoleDot} + defaultSrcDirective := []string{defaultSrc, self, consoleDot} + imgSrcDirective := []string{imgSrc, self} + fontSrcDirective := []string{fontSrc, self} + scriptSrcDirective := []string{scriptSrc, self, consoleDot} + styleSrcDirective := []string{styleSrc, self} if k8sMode == "off-cluster" { - defaultSrc += " http://localhost:8080 ws://localhost:8080" - imgSrc += " http://localhost:8080" - fontSrc += " http://localhost:8080" - scriptSrc += " http://localhost:8080 ws://localhost:8080" - styleSrc += " http://localhost:8080" + baseUriDirective = append(baseUriDirective, []string{httpLocalHost, wsLocalHost}...) + defaultSrcDirective = append(defaultSrcDirective, []string{httpLocalHost, wsLocalHost}...) + imgSrcDirective = append(imgSrcDirective, httpLocalHost) + fontSrcDirective = append(fontSrcDirective, httpLocalHost) + scriptSrcDirective = append(scriptSrcDirective, []string{httpLocalHost, wsLocalHost}...) + styleSrcDirective = append(styleSrcDirective, httpLocalHost) } - // The newCSPDirectives map is used to store the directives for each type. - // The keys are the types of directives (e.g. DefaultSrc, ImgSrc, etc) and the values are the sources for each type. - // The sources are strings that are concatenated together with a space separator. - newCSPDirectives := map[consolev1.DirectiveType][]string{ - consolev1.DefaultSrc: {defaultSrc}, - consolev1.ImgSrc: {imgSrc}, - consolev1.FontSrc: {fontSrc}, - consolev1.ScriptSrc: {scriptSrc}, - consolev1.StyleSrc: {styleSrc}, - } - - // If the plugins are providing a content security policy configuration, parse it and add it to the directives map. - // The configuration is a string that is parsed into a map of directive types to sources. + // If the plugins are providing a content security policy configuration, parse it and add it to + // the appropriate directive. The configuration is a string that is parsed into a map of directive types to sources. // The sources are added to the existing sources for each type. if pluginsCSP != "" { - var err error parsedCSP, err := ParseContentSecurityPolicyConfig(pluginsCSP) if err != nil { return nil, err } - for cspType, csp := range *parsedCSP { - newCSPDirectives[cspType] = append(newCSPDirectives[cspType], csp...) + for directive, sources := range *parsedCSP { + switch directive { + case consolev1.DefaultSrc: + defaultSrcDirective = append(defaultSrcDirective, sources...) + case consolev1.ImgSrc: + imgSrcDirective = append(imgSrcDirective, sources...) + case consolev1.FontSrc: + fontSrcDirective = append(fontSrcDirective, sources...) + case consolev1.ScriptSrc: + scriptSrcDirective = append(scriptSrcDirective, sources...) + case consolev1.StyleSrc: + styleSrcDirective = append(styleSrcDirective, sources...) + default: + klog.Warningf("ignored invalid CSP directive: %v", directive) + } } } - // Construct the CSP directives string from the newCSPDirectives map. - // The string is a space-separated list of directives, where each directive is a string + imgSrcDirective = append(imgSrcDirective, data) + fontSrcDirective = append(fontSrcDirective, data) + scriptSrcDirective = append(scriptSrcDirective, []string{unsafeEval, nonce}...) + styleSrcDirective = append(styleSrcDirective, unsafeInline) + + // Construct the full list of directives from the aggregated sources. + // This array is a list of directives, where each directive is a string // of the form " ". // The sources are concatenated together with a space separator. // The CSP directives string is returned as a slice of strings, where each string is a directive. - cspDirectives := []string{ - fmt.Sprintf("base-uri %s", defaultSrc), - fmt.Sprintf("default-src %s", strings.Join(newCSPDirectives[consolev1.DefaultSrc], " ")), - fmt.Sprintf("img-src %s data:", strings.Join(newCSPDirectives[consolev1.ImgSrc], " ")), - fmt.Sprintf("font-src %s data:", strings.Join(newCSPDirectives[consolev1.FontSrc], " ")), - fmt.Sprintf("script-src %s 'unsafe-eval' 'nonce-%s'", strings.Join(newCSPDirectives[consolev1.ScriptSrc], " "), indexPageScriptNonce), - fmt.Sprintf("style-src %s 'unsafe-inline'", strings.Join(newCSPDirectives[consolev1.StyleSrc], " ")), + return []string{ + strings.Join(baseUriDirective, " "), + strings.Join(defaultSrcDirective, " "), + strings.Join(imgSrcDirective, " "), + strings.Join(fontSrcDirective, " "), + strings.Join(scriptSrcDirective, " "), + strings.Join(styleSrcDirective, " "), "frame-src 'none'", "frame-ancestors 'none'", "object-src 'none'", - } - - return cspDirectives, nil + }, nil } func ParseContentSecurityPolicyConfig(csp string) (*map[consolev1.DirectiveType][]string, error) { From 35c5edab7c2342e0f2df95074507e159f361205c Mon Sep 17 00:00:00 2001 From: Jon Jackson Date: Wed, 18 Dec 2024 11:52:17 -0500 Subject: [PATCH 028/102] remove consoleDot from base-uri csp directive --- pkg/utils/utils.go | 2 +- pkg/utils/utils_test.go | 54 ++++++++++++++++++++--------------------- 2 files changed, 28 insertions(+), 28 deletions(-) diff --git a/pkg/utils/utils.go b/pkg/utils/utils.go index a4463a345cd..ced53524c5e 100644 --- a/pkg/utils/utils.go +++ b/pkg/utils/utils.go @@ -63,7 +63,7 @@ func BuildCSPDirectives(k8sMode, pluginsCSP, indexPageScriptNonce string) ([]str // When running off-cluster, 'http://localhost:8080' and 'ws://localhost:8080' are appended to the // default sources. Image source, font source, and style source only use 'self' and // 'http://localhost:8080'. - baseUriDirective := []string{baseURI, self, consoleDot} + baseUriDirective := []string{baseURI, self} defaultSrcDirective := []string{defaultSrc, self, consoleDot} imgSrcDirective := []string{imgSrc, self} fontSrcDirective := []string{fontSrc, self} diff --git a/pkg/utils/utils_test.go b/pkg/utils/utils_test.go index 9df36e37b3e..79424665a4a 100644 --- a/pkg/utils/utils_test.go +++ b/pkg/utils/utils_test.go @@ -6,21 +6,21 @@ import ( ) const ( - onClusterBaseUri = "base-uri 'self' console.redhat.com" - onClusterDefaultSrc = "default-src 'self' console.redhat.com" - onClusterImgSrc = "img-src 'self'" - onClusterFontSrc = "font-src 'self'" - onClusterScriptSrc = "script-src 'self' console.redhat.com" - onClusterStyleSrc = "style-src 'self'" - offClusterBaseUri = "base-uri 'self' console.redhat.com http://localhost:8080 ws://localhost:8080" - offClusterDefaultSrc = "default-src 'self' console.redhat.com http://localhost:8080 ws://localhost:8080" - offClusterImgSrc = "img-src 'self' http://localhost:8080" - offClusterFontSrc = "font-src 'self' http://localhost:8080" - offClusterScriptSrc = "script-src 'self' console.redhat.com http://localhost:8080 ws://localhost:8080" - offClusterStyleSrc = "style-src 'self' http://localhost:8080" - frameSrc = "frame-src 'none'" - frameAncestors = "frame-ancestors 'none'" - objectSrc = "object-src 'none'" + onClusterBaseUri = "base-uri 'self'" + onClusterDefaultSrc = "default-src 'self' console.redhat.com" + onClusterImgSrc = "img-src 'self'" + onClusterFontSrc = "font-src 'self'" + onClusterScriptSrc = "script-src 'self' console.redhat.com" + onClusterStyleSrc = "style-src 'self'" + offClusterBaseUri = "base-uri 'self' http://localhost:8080 ws://localhost:8080" + offClusterDefaultSrc = "default-src 'self' console.redhat.com http://localhost:8080 ws://localhost:8080" + offClusterImgSrc = "img-src 'self' http://localhost:8080" + offClusterFontSrc = "font-src 'self' http://localhost:8080" + offClusterScriptSrc = "script-src 'self' console.redhat.com http://localhost:8080 ws://localhost:8080" + offClusterStyleSrc = "style-src 'self' http://localhost:8080" + frameSrcDirective = "frame-src 'none'" + frameAncestorsDirective = "frame-ancestors 'none'" + objectSrcDirective = "object-src 'none'" ) func TestParseContentSecurityPolicyConfig(t *testing.T) { @@ -75,9 +75,9 @@ func TestBuildCSPDirectives(t *testing.T) { onClusterFontSrc + " data:", onClusterScriptSrc + " 'unsafe-eval' 'nonce-foobar'", onClusterStyleSrc + " 'unsafe-inline'", - frameSrc, - frameAncestors, - objectSrc, + frameSrcDirective, + frameAncestorsDirective, + objectSrcDirective, }, }, { @@ -92,9 +92,9 @@ func TestBuildCSPDirectives(t *testing.T) { offClusterFontSrc + " data:", offClusterScriptSrc + " 'unsafe-eval' 'nonce-foobar'", offClusterStyleSrc + " 'unsafe-inline'", - frameSrc, - frameAncestors, - objectSrc, + frameSrcDirective, + frameAncestorsDirective, + objectSrcDirective, }, }, { @@ -117,9 +117,9 @@ func TestBuildCSPDirectives(t *testing.T) { onClusterFontSrc + " foo.bar.baz data:", onClusterScriptSrc + " foo.bar foo.bar.baz 'unsafe-eval' 'nonce-foobar'", onClusterStyleSrc + " foo.bar foo.bar.baz 'unsafe-inline'", - frameSrc, - frameAncestors, - objectSrc, + frameSrcDirective, + frameAncestorsDirective, + objectSrcDirective, }, }, { @@ -142,9 +142,9 @@ func TestBuildCSPDirectives(t *testing.T) { offClusterFontSrc + " foo.bar.baz data:", offClusterScriptSrc + " foo.bar foo.bar.baz 'unsafe-eval' 'nonce-foobar'", offClusterStyleSrc + " foo.bar foo.bar.baz 'unsafe-inline'", - frameSrc, - frameAncestors, - objectSrc, + frameSrcDirective, + frameAncestorsDirective, + objectSrcDirective, }, }, } From 742fe24ff9328329d521b64401512f85a2661c1e Mon Sep 17 00:00:00 2001 From: Lokananda Prabhu Date: Wed, 18 Dec 2024 12:51:33 +0530 Subject: [PATCH 029/102] Removed Create a Project button if start guide is enabled --- .../src/components/projects/CreateProjectListPage.tsx | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/frontend/packages/dev-console/src/components/projects/CreateProjectListPage.tsx b/frontend/packages/dev-console/src/components/projects/CreateProjectListPage.tsx index 312201b8394..604da410155 100644 --- a/frontend/packages/dev-console/src/components/projects/CreateProjectListPage.tsx +++ b/frontend/packages/dev-console/src/components/projects/CreateProjectListPage.tsx @@ -21,6 +21,10 @@ export const CreateAProjectButton: React.FC = ({ open const { t } = useTranslation(); const canCreateNs = useFlag(FLAGS.CAN_CREATE_NS); const canCreateProject = useFlag(FLAGS.CAN_CREATE_PROJECT); + const isStartGuideEnabled = useFlag(FLAGS.SHOW_OPENSHIFT_START_GUIDE); + if (isStartGuideEnabled) { + return null; + } if (canCreateProject) { return ( From ccda90a00c5c79ca5611c1976fe28e09ba86f89d Mon Sep 17 00:00:00 2001 From: yapei Date: Tue, 21 Jan 2025 15:08:10 +0800 Subject: [PATCH 030/102] OCPBUGS-45103: update variable name for plugin name parsing --- .../src/components/modals/ConsolePluginModal.tsx | 2 +- .../packages/operator-lifecycle-manager/locales/en/olm.json | 1 - .../src/components/clusterserviceversion.tsx | 4 +--- 3 files changed, 2 insertions(+), 5 deletions(-) diff --git a/frontend/packages/console-shared/src/components/modals/ConsolePluginModal.tsx b/frontend/packages/console-shared/src/components/modals/ConsolePluginModal.tsx index 38d305ad174..538b1c240b9 100644 --- a/frontend/packages/console-shared/src/components/modals/ConsolePluginModal.tsx +++ b/frontend/packages/console-shared/src/components/modals/ConsolePluginModal.tsx @@ -41,7 +41,7 @@ export const ConsolePluginModal = withHandlePromise((props: ConsolePluginModalPr
{csvPluginsCount > 1 - ? t('console-shared~Console plugin enablement - {{plugin}}', { pluginName }) + ? t('console-shared~Console plugin enablement - {{plugin}}', { plugin: pluginName }) : t('console-shared~Console plugin enablement')} diff --git a/frontend/packages/operator-lifecycle-manager/locales/en/olm.json b/frontend/packages/operator-lifecycle-manager/locales/en/olm.json index cdaf28a58fd..4590c4a7edf 100644 --- a/frontend/packages/operator-lifecycle-manager/locales/en/olm.json +++ b/frontend/packages/operator-lifecycle-manager/locales/en/olm.json @@ -37,7 +37,6 @@ "{{count}} Namespaces_other": "{{count}} Namespaces", "Console plugin_one": "Console plugin", "Console plugin_other": "Console plugins", - "{{plugin}}:": "{{plugin}}:", "Enabled": "Enabled", "Console plugin available": "Console plugin available", "To let this operator provide a custom interface and run its own code in your console, enable its console plugin in the operator details.": "To let this operator provide a custom interface and run its own code in your console, enable its console plugin in the operator details.", diff --git a/frontend/packages/operator-lifecycle-manager/src/components/clusterserviceversion.tsx b/frontend/packages/operator-lifecycle-manager/src/components/clusterserviceversion.tsx index c658ceb2a21..c85b402a9be 100644 --- a/frontend/packages/operator-lifecycle-manager/src/components/clusterserviceversion.tsx +++ b/frontend/packages/operator-lifecycle-manager/src/components/clusterserviceversion.tsx @@ -293,9 +293,7 @@ const ConsolePlugins: React.FC = ({ csvPlugins, trusted })
{t('olm~Console plugin', { count: csvPluginsCount })}
{csvPlugins.map((pluginName) => (
- {csvPluginsCount > 1 && ( - {t('olm~{{plugin}}:', { pluginName })} - )} + {csvPluginsCount > 1 && {pluginName}: }
- + ) : ( <>{t('public~None')} @@ -587,9 +587,8 @@ export const UpdatesGraph: React.FC = ({ cv }) => { const availableUpdates = getSortedAvailableUpdates(cv); const lastVersion = getLastCompletedUpdate(cv); const newestVersion = availableUpdates[0]?.version; - const minorVersionIsNewer = newestVersion - ? isMinorVersionNewer(lastVersion, newestVersion) - : false; + const minorVersionIsNewer = + lastVersion && newestVersion ? isMinorVersionNewer(lastVersion, newestVersion) : false; const secondNewestVersion = availableUpdates[1]?.version; const currentChannel = cv.spec.channel; const currentPrefix = splitClusterVersionChannel(currentChannel)?.prefix; diff --git a/frontend/public/module/k8s/cluster-settings.ts b/frontend/public/module/k8s/cluster-settings.ts index a9ff302902e..8b2fd516953 100644 --- a/frontend/public/module/k8s/cluster-settings.ts +++ b/frontend/public/module/k8s/cluster-settings.ts @@ -85,6 +85,9 @@ export const getSortedNotRecommendedUpdates = (cv: ClusterVersionKind): Conditio export const getNewerMinorVersionUpdate = (currentVersion, availableUpdates) => { const currentVersionParsed = semver.parse(currentVersion); + if (!currentVersionParsed) { + return; + } return availableUpdates?.find( // find the next minor version update, which there should never be more than one (update) => { @@ -101,8 +104,8 @@ export const isMinorVersionNewer = (currentVersion, otherVersion) => { const currentVersionParsed = semver.parse(currentVersion); const otherVersionParsed = semver.parse(otherVersion); return semver.gt( - semver.coerce(`${otherVersionParsed.major}.${otherVersionParsed.minor}`), - semver.coerce(`${currentVersionParsed.major}.${currentVersionParsed.minor}`), + semver.coerce(`${otherVersionParsed?.major}.${otherVersionParsed?.minor}`), + semver.coerce(`${currentVersionParsed?.major}.${currentVersionParsed?.minor}`), ); }; From 457a8d2c597152a9050e3df08d5804645bb94739 Mon Sep 17 00:00:00 2001 From: Jon Jackson Date: Mon, 2 Dec 2024 16:39:53 -0500 Subject: [PATCH 036/102] Fix regression where plugins were not tracking CSP violation status and triggering too many telemetry events --- .../src/hooks/useCSPVioliationDetector.tsx | 115 +++++++++--------- 1 file changed, 58 insertions(+), 57 deletions(-) diff --git a/frontend/packages/console-app/src/hooks/useCSPVioliationDetector.tsx b/frontend/packages/console-app/src/hooks/useCSPVioliationDetector.tsx index ecb09b14df6..4cdc95a55eb 100644 --- a/frontend/packages/console-app/src/hooks/useCSPVioliationDetector.tsx +++ b/frontend/packages/console-app/src/hooks/useCSPVioliationDetector.tsx @@ -3,6 +3,7 @@ import { AlertVariant } from '@patternfly/react-core'; import * as _ from 'lodash'; import { useTranslation } from 'react-i18next'; import { pluginStore } from '@console/internal/plugins'; +import { isLoadedDynamicPluginInfo } from '@console/plugin-sdk/src/store'; import { useToast } from '@console/shared/src/components/toast'; import { ONE_DAY } from '@console/shared/src/constants/time'; import { useTelemetry } from '@console/shared/src/hooks/useTelemetry'; @@ -28,34 +29,22 @@ export const newCSPViolationReport = ( event: SecurityPolicyViolationEvent, ): CSPViolationReport => ({ ..._.pick(event, [ - // The URI of the resource that was blocked because it violates a policy. 'blockedURI', - // The column number in the document or worker at which the violation occurred. 'columnNumber', - // Whether the user agent is configured to enforce or just report the policy violation. 'disposition', - // The URI of the document or worker in which the violation occurred. 'documentURI', - // The directive that was violated. 'effectiveDirective', - // The line number in the document or worker at which the violation occurred. 'lineNumber', - // The policy whose enforcement caused the violation. 'originalPolicy', - // The URL for the referrer of the resources whose policy was violated, or null. 'referrer', - // A sample of the resource that caused the violation, usually the first 40 characters. - // This will only be populated if the resource is an inline script, event handler or style. 'sample', - // If the violation occurred as a result of a script, this will be the URL of the script. 'sourceFile', - // HTTP status code of the document or worker in which the violation occurred. 'statusCode', ]), pluginName: pluginName || 'none', }); -const useCSPViolationReporter: UseCSPVilationReporter = () => { +export const useCSPViolationDetector = () => { const { t } = useTranslation(); const toastContext = useToast(); const fireTelemetryEvent = useTelemetry(); @@ -85,8 +74,9 @@ const useCSPViolationReporter: UseCSPVilationReporter = () => { // update the timestamp. Otherwise, append the new record. const [updatedRecords] = existingRecords.reduce( ([acc, hasBeenRecorded], existingRecord, i, all) => { - const { timestamp: existingTimestamp, ...existingReport } = existingRecord; - const { timestamp: newTimestamp, ...newReport } = newRecord; + // Exclude originalPolicy and timestamp from equality comparison. + const { timestamp, originalPolicy, ...existingReport } = existingRecord; + const { timestamp: _t, originalPolicy: _o, ...newReport } = newRecord; // Replace matching report with a newly timestamped record if (_.isEqual(newReport, existingReport)) { @@ -108,23 +98,29 @@ const useCSPViolationReporter: UseCSPVilationReporter = () => { [], ); - return React.useCallback( - (pluginName, event) => { + const reportViolation = React.useCallback( + (event) => { // eslint-disable-next-line no-console console.warn('Content Security Policy violation detected', event); + + // Attempt to infer Console plugin name from SecurityPolicyViolation event + const pluginName = + getPluginNameFromResourceURL(event.blockedURI) || + getPluginNameFromResourceURL(event.sourceFile); + const existingRecords = getRecords(); - const latestOccurrance = { + const newRecord = { ...newCSPViolationReport(pluginName, event), timestamp: Date.now(), }; - const updatedRecords = updateRecords(existingRecords, latestOccurrance); + const updatedRecords = updateRecords(existingRecords, newRecord); const isNewOccurrance = updatedRecords.length > existingRecords.length; - const shouldNotify = isNewOccurrance && process.env.NODE_ENV === 'production'; + const isProduction = process.env.NODE_ENV === 'production'; window.localStorage.setItem(LOCAL_STORAGE_CSP_VIOLATIONS_KEY, JSON.stringify(updatedRecords)); - if (shouldNotify) { - fireTelemetryEvent('CSPViolation', latestOccurrance); + if (isNewOccurrance && isProduction) { + fireTelemetryEvent('CSPViolation', newRecord); } if (pluginName) { @@ -138,65 +134,70 @@ const useCSPViolationReporter: UseCSPVilationReporter = () => { }`, ); - if (validPlugin && shouldNotify) { - toastContext.addToast({ - variant: AlertVariant.warning, - title: t('public~Content Security Policy violation in Console plugin'), - content: t( - "public~{{pluginName}} might have violated the Console Content Security Policy. Refer to the browser's console logs for details.", - { - pluginName, - }, - ), - timeout: true, - dismissible: true, - }); + if (validPlugin) { + pluginStore.setCustomDynamicPluginInfo(pluginName, { hasCSPViolations: true }); + if ( + !isProduction && + isLoadedDynamicPluginInfo(pluginInfo) && + !pluginInfo.hasCSPViolations + ) { + toastContext.addToast({ + variant: AlertVariant.warning, + title: t('public~Content Security Policy violation in Console plugin'), + content: t( + "public~{{pluginName}} might have violated the Console Content Security Policy. Refer to the browser's console logs for details.", + { + pluginName, + }, + ), + timeout: true, + dismissible: true, + }); + } } } }, [fireTelemetryEvent, getRecords, t, toastContext, updateRecords], ); -}; - -export const useCSPViolationDetector = () => { - const reportViolation = useCSPViolationReporter(); - const onCSPViolation = React.useCallback( - (event) => { - // Attempt to infer Console plugin name from SecurityPolicyViolation event - const pluginName = - getPluginNameFromResourceURL(event.blockedURI) || - getPluginNameFromResourceURL(event.sourceFile); - - reportViolation(pluginName, event); - }, - [reportViolation], - ); React.useEffect(() => { - document.addEventListener('securitypolicyviolation', onCSPViolation); + document.addEventListener('securitypolicyviolation', reportViolation); return () => { - document.removeEventListener('securitypolicyviolation', onCSPViolation); + document.removeEventListener('securitypolicyviolation', reportViolation); }; - }, [onCSPViolation]); + }, [reportViolation]); }; +// A subset of properties from a SecurityPolicyViolationEvent which identify a unique CSP violation type CSPViolationReportProperties = + // The URI of the resource that was blocked because it violates a policy. | 'blockedURI' + // The column number in the document or worker at which the violation occurred. | 'columnNumber' + // Whether the user agent is configured to enforce or just report the policy violation. | 'disposition' + // The URI of the document or worker in which the violation occurred. | 'documentURI' + // The directive that was violated. | 'effectiveDirective' + // The line number in the document or worker at which the violation occurred. | 'lineNumber' + // The policy whose enforcement caused the violation. | 'originalPolicy' + // The URL for the referrer of the resources whose policy was violated, or null. | 'referrer' + // A sample of the resource that caused the violation, usually the first 40 characters. + // This will only be populated if the resource is an inline script, event handler or style. | 'sample' + // If the violation occurred as a result of a script, this will be the URL of the script. | 'sourceFile' + // HTTP status code of the document or worker in which the violation occurred. | 'statusCode'; + +// A CSPViolationReport represents a unique CSP violation per plugin type CSPViolationReport = Pick & { pluginName: string; }; + +// A CSPViolationRecord represents a unique CSP violation per plugin, per occurrance type CSPViolationRecord = CSPViolationReport & { timestamp: number }; -type UseCSPVilationReporter = () => ( - pluginName: string, - event: SecurityPolicyViolationEvent, -) => void; From 9fd44c258982417427edbf0511cd5353ed9e1f9c Mon Sep 17 00:00:00 2001 From: Jon Jackson Date: Fri, 6 Dec 2024 14:36:40 -0500 Subject: [PATCH 037/102] address feedback --- .../src/hooks/useCSPVioliationDetector.tsx | 46 +++++++++---------- 1 file changed, 22 insertions(+), 24 deletions(-) diff --git a/frontend/packages/console-app/src/hooks/useCSPVioliationDetector.tsx b/frontend/packages/console-app/src/hooks/useCSPVioliationDetector.tsx index 4cdc95a55eb..6634cc7ac69 100644 --- a/frontend/packages/console-app/src/hooks/useCSPVioliationDetector.tsx +++ b/frontend/packages/console-app/src/hooks/useCSPVioliationDetector.tsx @@ -2,8 +2,7 @@ import * as React from 'react'; import { AlertVariant } from '@patternfly/react-core'; import * as _ from 'lodash'; import { useTranslation } from 'react-i18next'; -import { pluginStore } from '@console/internal/plugins'; -import { isLoadedDynamicPluginInfo } from '@console/plugin-sdk/src/store'; +import { usePluginStore } from '@console/plugin-sdk/src/api/usePluginStore'; import { useToast } from '@console/shared/src/components/toast'; import { ONE_DAY } from '@console/shared/src/constants/time'; import { useTelemetry } from '@console/shared/src/hooks/useTelemetry'; @@ -41,12 +40,13 @@ export const newCSPViolationReport = ( 'sourceFile', 'statusCode', ]), - pluginName: pluginName || 'none', + pluginName: pluginName || '', }); export const useCSPViolationDetector = () => { const { t } = useTranslation(); const toastContext = useToast(); + const pluginStore = usePluginStore(); const fireTelemetryEvent = useTelemetry(); const getRecords = React.useCallback((): CSPViolationRecord[] => { const serializedRecords = window.localStorage.getItem(LOCAL_STORAGE_CSP_VIOLATIONS_KEY) || ''; @@ -114,18 +114,19 @@ export const useCSPViolationDetector = () => { timestamp: Date.now(), }; const updatedRecords = updateRecords(existingRecords, newRecord); - const isNewOccurrance = updatedRecords.length > existingRecords.length; + const isNewOccurrence = updatedRecords.length > existingRecords.length; const isProduction = process.env.NODE_ENV === 'production'; window.localStorage.setItem(LOCAL_STORAGE_CSP_VIOLATIONS_KEY, JSON.stringify(updatedRecords)); - if (isNewOccurrance && isProduction) { + if (isNewOccurrence && isProduction) { fireTelemetryEvent('CSPViolation', newRecord); } if (pluginName) { const pluginInfo = pluginStore.findDynamicPluginInfo(pluginName); const validPlugin = !!pluginInfo; + const pluginIsLoaded = validPlugin && pluginInfo.status === 'Loaded'; // eslint-disable-next-line no-console console.warn( @@ -136,28 +137,25 @@ export const useCSPViolationDetector = () => { if (validPlugin) { pluginStore.setCustomDynamicPluginInfo(pluginName, { hasCSPViolations: true }); - if ( - !isProduction && - isLoadedDynamicPluginInfo(pluginInfo) && - !pluginInfo.hasCSPViolations - ) { - toastContext.addToast({ - variant: AlertVariant.warning, - title: t('public~Content Security Policy violation in Console plugin'), - content: t( - "public~{{pluginName}} might have violated the Console Content Security Policy. Refer to the browser's console logs for details.", - { - pluginName, - }, - ), - timeout: true, - dismissible: true, - }); - } + } + + if (pluginIsLoaded && !isProduction && !pluginInfo.hasCSPViolations) { + toastContext.addToast({ + variant: AlertVariant.warning, + title: t('public~Content Security Policy violation in Console plugin'), + content: t( + "public~{{pluginName}} might have violated the Console Content Security Policy. Refer to the browser's console logs for details.", + { + pluginName, + }, + ), + timeout: true, + dismissible: true, + }); } } }, - [fireTelemetryEvent, getRecords, t, toastContext, updateRecords], + [fireTelemetryEvent, getRecords, t, toastContext, updateRecords, pluginStore], ); React.useEffect(() => { From 3183941c0bb4bec1b25ff78387279c1f7e9c84c0 Mon Sep 17 00:00:00 2001 From: Jon Jackson Date: Thu, 12 Dec 2024 14:44:51 -0500 Subject: [PATCH 038/102] address feedback --- .../console-app/src/hooks/useCSPVioliationDetector.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/frontend/packages/console-app/src/hooks/useCSPVioliationDetector.tsx b/frontend/packages/console-app/src/hooks/useCSPVioliationDetector.tsx index 6634cc7ac69..043f7a0c19e 100644 --- a/frontend/packages/console-app/src/hooks/useCSPVioliationDetector.tsx +++ b/frontend/packages/console-app/src/hooks/useCSPVioliationDetector.tsx @@ -166,7 +166,7 @@ export const useCSPViolationDetector = () => { }, [reportViolation]); }; -// A subset of properties from a SecurityPolicyViolationEvent which identify a unique CSP violation +/** A subset of properties from a SecurityPolicyViolationEvent which identify a unique CSP violation */ type CSPViolationReportProperties = // The URI of the resource that was blocked because it violates a policy. | 'blockedURI' @@ -192,10 +192,10 @@ type CSPViolationReportProperties = // HTTP status code of the document or worker in which the violation occurred. | 'statusCode'; -// A CSPViolationReport represents a unique CSP violation per plugin +/** A CSPViolationReport represents a unique CSP violation per plugin */ type CSPViolationReport = Pick & { pluginName: string; }; -// A CSPViolationRecord represents a unique CSP violation per plugin, per occurrance +/** A CSPViolationRecord represents a unique CSP violation per plugin, per occurrance */ type CSPViolationRecord = CSPViolationReport & { timestamp: number }; From b0c1f34bc6a55b4364ae5d9bad04508afa880724 Mon Sep 17 00:00:00 2001 From: Jakub Hadvig Date: Mon, 20 Jan 2025 16:18:13 +0100 Subject: [PATCH 039/102] OCPBUGS-48608 --- frontend/public/components/app.jsx | 10 +++++++++- pkg/server/server.go | 15 +++++++++------ 2 files changed, 18 insertions(+), 7 deletions(-) diff --git a/frontend/public/components/app.jsx b/frontend/public/components/app.jsx index 453203ad509..2bde15a9803 100644 --- a/frontend/public/components/app.jsx +++ b/frontend/public/components/app.jsx @@ -489,9 +489,17 @@ const PollConsoleUpdates = React.memo(function PollConsoleUpdates() { prevUpdateData?.capabilities, updateData?.capabilities, ); + const consoleCSPChanged = !_.isEqual( + prevUpdateData?.contentSecurityPolicy, + updateData?.contentSecurityPolicy, + ); const consoleCommitChanged = prevUpdateData?.consoleCommit !== updateData?.consoleCommit; - if (stateInitialized && (consoleCommitChanged || consoleCapabilitiesChanged) && !consoleChanged) { + if ( + stateInitialized && + (consoleCommitChanged || consoleCapabilitiesChanged || consoleCSPChanged) && + !consoleChanged + ) { setConsoleChanged(true); } diff --git a/pkg/server/server.go b/pkg/server/server.go index 85cd1809f4d..d4254c639bb 100644 --- a/pkg/server/server.go +++ b/pkg/server/server.go @@ -96,6 +96,7 @@ type jsGlobals struct { Branding string `json:"branding"` ConsolePlugins []string `json:"consolePlugins"` ConsoleVersion string `json:"consoleVersion"` + ContentSecurityPolicy string `json:"contentSecurityPolicy"` ControlPlaneTopology string `json:"controlPlaneTopology"` CopiedCSVsDisabled bool `json:"copiedCSVsDisabled"` CustomLogoURL string `json:"customLogoURL"` @@ -563,13 +564,15 @@ func (s *Server) HTTPHandler() (http.Handler, error) { return } serverutils.SendResponse(w, http.StatusOK, struct { - ConsoleCommit string `json:"consoleCommit"` - Plugins []string `json:"plugins"` - Capabilities []operatorv1.Capability `json:"capabilities,omitempty"` + ConsoleCommit string `json:"consoleCommit"` + Plugins []string `json:"plugins"` + Capabilities []operatorv1.Capability `json:"capabilities,omitempty"` + ContentSecurityPolicy string `json:"contentSecurityPolicy,omitempty"` }{ - ConsoleCommit: os.Getenv("SOURCE_GIT_COMMIT"), - Plugins: pluginsHandler.GetPluginsList(), - Capabilities: s.Capabilities, + ConsoleCommit: os.Getenv("SOURCE_GIT_COMMIT"), + Plugins: pluginsHandler.GetPluginsList(), + Capabilities: s.Capabilities, + ContentSecurityPolicy: s.ContentSecurityPolicy, }) })) From eec1c89152765660a6734371769d18fe21f5056b Mon Sep 17 00:00:00 2001 From: Vikram Raj Date: Thu, 21 Nov 2024 15:00:32 +0530 Subject: [PATCH 040/102] update the Deployment pod on change in imageStream --- .../src/components/deployments/utils/deployment-utils.ts | 2 +- .../components/edit-application/edit-application-utils.ts | 2 +- .../components/import/__tests__/import-submit-utils.spec.ts | 4 ++-- .../import/__tests__/upload-jar-submit-utils.spec.ts | 2 +- .../src/utils/__tests__/resource-label-utils-data.ts | 6 +++--- .../src/utils/__tests__/resource-label-utils.spec.tsx | 6 +++--- .../packages/dev-console/src/utils/resource-label-utils.ts | 2 +- 7 files changed, 12 insertions(+), 12 deletions(-) diff --git a/frontend/packages/dev-console/src/components/deployments/utils/deployment-utils.ts b/frontend/packages/dev-console/src/components/deployments/utils/deployment-utils.ts index 21f2028b5c6..c4236c139ad 100644 --- a/frontend/packages/dev-console/src/components/deployments/utils/deployment-utils.ts +++ b/frontend/packages/dev-console/src/components/deployments/utils/deployment-utils.ts @@ -358,7 +358,7 @@ export const getTriggersAndImageStreamValues = ( return { ...data, triggers: { - image: imageTrigger?.paused === 'false', + image: imageTrigger?.paused === false, }, fromImageStreamTag: !!imageTrigger, imageStream: { diff --git a/frontend/packages/dev-console/src/components/edit-application/edit-application-utils.ts b/frontend/packages/dev-console/src/components/edit-application/edit-application-utils.ts index 4c6991b9b9a..25166009877 100644 --- a/frontend/packages/dev-console/src/components/edit-application/edit-application-utils.ts +++ b/frontend/packages/dev-console/src/components/edit-application/edit-application-utils.ts @@ -410,7 +410,7 @@ export const getDeploymentData = (resource: K8sResourceKind) => { return { env, triggers: { - image: imageTrigger?.paused === 'false', + image: imageTrigger?.paused === false, }, replicas: resource.spec?.replicas ?? 1, }; diff --git a/frontend/packages/dev-console/src/components/import/__tests__/import-submit-utils.spec.ts b/frontend/packages/dev-console/src/components/import/__tests__/import-submit-utils.spec.ts index 7f234e09397..3efeaa666aa 100644 --- a/frontend/packages/dev-console/src/components/import/__tests__/import-submit-utils.spec.ts +++ b/frontend/packages/dev-console/src/components/import/__tests__/import-submit-utils.spec.ts @@ -58,7 +58,7 @@ describe('Import Submit Utils', () => { namespace: 'gijohn', }, fieldPath: 'spec.template.spec.containers[?(@.name=="nodejs-ex-git")].image', - paused: 'false', + paused: false, }, ]); done(); @@ -431,7 +431,7 @@ describe('Import Submit Utils', () => { 'app.openshift.io/vcs-ref': 'master', 'app.openshift.io/vcs-uri': 'https://github.com/redhat-developer/devfile-sample', 'image.openshift.io/triggers': - '[{"from":{"kind":"ImageStreamTag","name":"devfile-sample:latest","namespace":"gijohn"},"fieldPath":"spec.template.spec.containers[?(@.name==\\"devfile-sample\\")].image","paused":"false"}]', + '[{"from":{"kind":"ImageStreamTag","name":"devfile-sample:latest","namespace":"gijohn"},"fieldPath":"spec.template.spec.containers[?(@.name==\\"devfile-sample\\")].image","paused":false}]', isFromDevfile: 'true', 'openshift.io/generated-by': 'OpenShiftWebConsole', 'app.openshift.io/route-disabled': 'false', diff --git a/frontend/packages/dev-console/src/components/import/__tests__/upload-jar-submit-utils.spec.ts b/frontend/packages/dev-console/src/components/import/__tests__/upload-jar-submit-utils.spec.ts index a5a1a3b294e..43d2ab33afc 100644 --- a/frontend/packages/dev-console/src/components/import/__tests__/upload-jar-submit-utils.spec.ts +++ b/frontend/packages/dev-console/src/components/import/__tests__/upload-jar-submit-utils.spec.ts @@ -44,7 +44,7 @@ describe('Upload Jar Submit Utils', () => { namespace: 'my-app', }, fieldPath: 'spec.template.spec.containers[?(@.name=="java-ex-git")].image', - paused: 'false', + paused: false, }, ]); done(); diff --git a/frontend/packages/dev-console/src/utils/__tests__/resource-label-utils-data.ts b/frontend/packages/dev-console/src/utils/__tests__/resource-label-utils-data.ts index ef1cbcd1265..74e74206528 100644 --- a/frontend/packages/dev-console/src/utils/__tests__/resource-label-utils-data.ts +++ b/frontend/packages/dev-console/src/utils/__tests__/resource-label-utils-data.ts @@ -7,7 +7,7 @@ export const originalDeployment = { 'app.openshift.io/vcs-ref': 'master', 'app.openshift.io/vcs-uri': 'https://github.com/divyanshiGupta/nationalparks-py', 'image.openshift.io/triggers': - '[{"from":{"kind":"ImageStreamTag","name":"nationalparks-py:latest","namespace":"div"},"fieldPath":"spec.template.spec.containers[?(@.name==\\"nationalparks-py\\")].image","paused":"false"}]', + '[{"from":{"kind":"ImageStreamTag","name":"nationalparks-py:latest","namespace":"div"},"fieldPath":"spec.template.spec.containers[?(@.name==\\"nationalparks-py\\")].image","paused":false}]', 'openshift.io/generated-by': 'OpenShiftWebConsole', 'app.openshift.io/connects-to': 'database', 'deployment.kubernetes.io/revision': '4', @@ -104,7 +104,7 @@ export const newDeployment = { 'app.openshift.io/vcs-ref': 'master', 'app.openshift.io/vcs-uri': 'https://github.com/divyanshiGupta/nationalparks-py', 'image.openshift.io/triggers': - '[{"from":{"kind":"ImageStreamTag","name":"nationalparks-py:latest","namespace":"div"},"fieldPath":"spec.template.spec.containers[?(@.name==\\"nationalparks-py\\")].image","paused":"true"}]', + '[{"from":{"kind":"ImageStreamTag","name":"nationalparks-py:latest","namespace":"div"},"fieldPath":"spec.template.spec.containers[?(@.name==\\"nationalparks-py\\")].image","paused":true}]', 'openshift.io/generated-by': 'OpenShiftWebConsole', }, name: 'nationalparks-py', @@ -169,7 +169,7 @@ export const devfileDeployment = { 'app.openshift.io/vcs-ref': 'master', 'app.openshift.io/vcs-uri': 'https://github.com/divyanshiGupta/nationalparks-py', 'image.openshift.io/triggers': - '[{"from":{"kind":"ImageStreamTag","name":"nationalparks-py:latest","namespace":"div"},"fieldPath":"spec.template.spec.containers[?(@.name==\\"nationalparks-py\\")].image","paused":"true"}]', + '[{"from":{"kind":"ImageStreamTag","name":"nationalparks-py:latest","namespace":"div"},"fieldPath":"spec.template.spec.containers[?(@.name==\\"nationalparks-py\\")].image","paused":true}]', 'openshift.io/generated-by': 'OpenShiftWebConsole', isFromDevfile: 'true', }, diff --git a/frontend/packages/dev-console/src/utils/__tests__/resource-label-utils.spec.tsx b/frontend/packages/dev-console/src/utils/__tests__/resource-label-utils.spec.tsx index 4fb8f5266b6..4a4cc27fdd1 100644 --- a/frontend/packages/dev-console/src/utils/__tests__/resource-label-utils.spec.tsx +++ b/frontend/packages/dev-console/src/utils/__tests__/resource-label-utils.spec.tsx @@ -36,7 +36,7 @@ describe('resource-label-utils', () => { 'app.openshift.io/vcs-ref': 'master', 'app.openshift.io/vcs-uri': 'https://github.com/divyanshiGupta/nationalparks-py', 'image.openshift.io/triggers': - '[{"from":{"kind":"ImageStreamTag","name":"nationalparks-py:latest","namespace":"div"},"fieldPath":"spec.template.spec.containers[?(@.name==\\"nationalparks-py\\")].image","paused":"true"}]', + '[{"from":{"kind":"ImageStreamTag","name":"nationalparks-py:latest","namespace":"div"},"fieldPath":"spec.template.spec.containers[?(@.name==\\"nationalparks-py\\")].image","paused":true}]', 'openshift.io/generated-by': 'OpenShiftWebConsole', 'app.openshift.io/connects-to': 'database', 'deployment.kubernetes.io/revision': '4', @@ -125,12 +125,12 @@ describe('resource-label-utils', () => { let annotation = getTriggerAnnotation('test', 'python', 'div', true); expect(annotation).toEqual({ 'image.openshift.io/triggers': - '[{"from":{"kind":"ImageStreamTag","name":"python:latest","namespace":"div"},"fieldPath":"spec.template.spec.containers[?(@.name==\\"test\\")].image","paused":"false"}]', + '[{"from":{"kind":"ImageStreamTag","name":"python:latest","namespace":"div"},"fieldPath":"spec.template.spec.containers[?(@.name==\\"test\\")].image","paused":false}]', }); annotation = getTriggerAnnotation('test', 'test', 'div', false); expect(annotation).toEqual({ 'image.openshift.io/triggers': - '[{"from":{"kind":"ImageStreamTag","name":"test:latest","namespace":"div"},"fieldPath":"spec.template.spec.containers[?(@.name==\\"test\\")].image","paused":"true"}]', + '[{"from":{"kind":"ImageStreamTag","name":"test:latest","namespace":"div"},"fieldPath":"spec.template.spec.containers[?(@.name==\\"test\\")].image","paused":true}]', }); }); }); diff --git a/frontend/packages/dev-console/src/utils/resource-label-utils.ts b/frontend/packages/dev-console/src/utils/resource-label-utils.ts index 04b7416ad20..0f80c7a65d2 100644 --- a/frontend/packages/dev-console/src/utils/resource-label-utils.ts +++ b/frontend/packages/dev-console/src/utils/resource-label-utils.ts @@ -75,7 +75,7 @@ export const getTriggerAnnotation = ( { from: { kind: 'ImageStreamTag', name: `${imageName}:${imageTag}`, namespace: imageNamespace }, fieldPath: `spec.template.spec.containers[?(@.name=="${containerName}")].image`, - paused: `${!imageTrigger}`, + paused: !imageTrigger, }, ]), }); From 621439e41e20bbec620bf567dbd0ddb09021251b Mon Sep 17 00:00:00 2001 From: Sanket Pathak Date: Wed, 18 Sep 2024 23:12:20 +0530 Subject: [PATCH 041/102] Fix and enable web-terminal tests --- frontend/integration-tests/test-cypress.sh | 4 +- .../PULL_REQUEST_TEMPLATE/qe-automation-pr.md | 3 +- .../support/constants/global.ts | 4 ++ .../support/pageObjects/web-terminal-po.ts | 6 --- .../support/pageObjects/webterminal-po.ts | 4 ++ .../integration-tests/support/pages/app.ts | 8 ++-- .../pages/functions/addTerminalTabs.ts | 2 +- .../pages/functions/checkOperatorStatus.ts | 39 +++++++++++++++++++ .../pages/functions/checkTerminalIcon.ts | 2 +- .../installOperatorOnClusterUsingCLI.ts | 14 +++++++ .../pages/search-resources/search-page.ts | 10 +++-- .../integration-tests/README.md | 3 +- .../integration-tests/cypress.config.js | 1 + .../web-terminal/web-teminal-basic.feature | 3 +- .../web-terminal-adminuser.feature | 39 +++++++++++++------ .../support/commands/hooks.ts | 27 +++++++++++++ .../support/commands/index.ts | 2 +- .../step-definitions/common/webTerminal.ts | 2 + .../pages/web-terminal/initTerminal-page.ts | 32 ++++++++++++++- .../pages/web-terminal/webTerminal-page.ts | 9 +++++ .../web-terminal/web-terminal-adminuser.ts | 31 +++++++++++++-- .../devworkspaceOperatorSubscription.yaml | 26 +++++++++++++ 22 files changed, 231 insertions(+), 40 deletions(-) delete mode 100644 frontend/packages/dev-console/integration-tests/support/pageObjects/web-terminal-po.ts create mode 100644 frontend/packages/webterminal-plugin/integration-tests/support/commands/hooks.ts create mode 100644 frontend/packages/webterminal-plugin/integration-tests/testData/devworkspaceOperatorSubscription.yaml diff --git a/frontend/integration-tests/test-cypress.sh b/frontend/integration-tests/test-cypress.sh index 107f937fa37..f8911ae6310 100755 --- a/frontend/integration-tests/test-cypress.sh +++ b/frontend/integration-tests/test-cypress.sh @@ -84,7 +84,7 @@ if [ -n "${nightly-}" ] && [ -z "${pkg-}" ]; then yarn run test-cypress-pipelines-nightly yarn run test-cypress-topology-nightly yarn run test-cypress-knative-nightly - # yarn run test-cypress-webterminal-nightly + yarn run test-cypress-webterminal-nightly exit $err; fi @@ -93,12 +93,12 @@ if [ -n "${headless-}" ] && [ -z "${pkg-}" ]; then yarn run test-cypress-console-headless yarn run test-cypress-dev-console-headless yarn run test-cypress-olm-headless + yarn run test-cypress-webterminal-headless yarn run test-cypress-helm-headless yarn run test-cypress-knative-headless yarn run test-cypress-topology-headless yarn run test-cypress-pipelines-headless yarn run test-cypress-shipwright-headless - # yarn run test-cypress-webterminal-headless exit; fi diff --git a/frontend/packages/dev-console/integration-tests/.github/PULL_REQUEST_TEMPLATE/qe-automation-pr.md b/frontend/packages/dev-console/integration-tests/.github/PULL_REQUEST_TEMPLATE/qe-automation-pr.md index ec22c0637e9..8aca269e239 100644 --- a/frontend/packages/dev-console/integration-tests/.github/PULL_REQUEST_TEMPLATE/qe-automation-pr.md +++ b/frontend/packages/dev-console/integration-tests/.github/PULL_REQUEST_TEMPLATE/qe-automation-pr.md @@ -38,7 +38,8 @@ Example: oc login -u kubeadmin -p $BRIDGE_KUBEADMIN_PASSWORD oc apply -f ./frontend/packages/console-shared/src/test-data/htpasswd-secret.yaml oc patch oauths cluster --patch "$(cat ./frontend/packages/console-shared/src/test-data/patch-htpasswd.yaml)" --type=merge - ./test-cypress.sh -p dev-console + + ./integration-tests/test-cypress.sh -p dev-console ``` **Screen shots**: diff --git a/frontend/packages/dev-console/integration-tests/support/constants/global.ts b/frontend/packages/dev-console/integration-tests/support/constants/global.ts index 97307dc2030..a69ff5f88d5 100644 --- a/frontend/packages/dev-console/integration-tests/support/constants/global.ts +++ b/frontend/packages/dev-console/integration-tests/support/constants/global.ts @@ -54,6 +54,7 @@ export enum operators { RHOAS = 'RHOAS', Jaeger = 'Red Hat OpenShift distributed tracing platform', BuildsForOpenshiftOperator = 'builds for Red Hat OpenShift Operator', + DevWorkspaceOperator = 'DevWorkspace Operator', } export enum operatorNamespaces { @@ -63,6 +64,7 @@ export enum operatorNamespaces { BuildsForOpenshiftOperator = 'openshift-operators', WebTerminalOperator = 'openshift-operators', RedHatIntegrationCamelK = 'openshift-operators', + DevWorkspaceOperator = 'openshift-operators', } export enum operatorSubscriptions { @@ -72,6 +74,7 @@ export enum operatorSubscriptions { BuildsForOpenshiftOperator = 'openshift-builds-operator', WebTerminalOperator = 'web-terminal', RedHatIntegrationCamelK = 'red-hat-camel-k', + DevWorkspaceOperator = 'devworkspace-operator', } export enum operatorPackage { @@ -81,6 +84,7 @@ export enum operatorPackage { BuildsForOpenshiftOperator = 'openshift-builds-operator', WebTerminalOperator = 'web-terminal', RedHatIntegrationCamelK = 'red-hat-camel-k', + DevWorkspaceOperator = 'devworkspace-operator', } export enum authenticationType { diff --git a/frontend/packages/dev-console/integration-tests/support/pageObjects/web-terminal-po.ts b/frontend/packages/dev-console/integration-tests/support/pageObjects/web-terminal-po.ts deleted file mode 100644 index 6df9884f1da..00000000000 --- a/frontend/packages/dev-console/integration-tests/support/pageObjects/web-terminal-po.ts +++ /dev/null @@ -1,6 +0,0 @@ -export const webTerminalPO = { - webTerminalIcon: '[data-tour-id="tour-cloud-shell-button"]', - addTerminalIcon: '[data-test="add-terminal-icon"]', - closeTerminalIcon: '[data-test="close-terminal-icon"]', - tabsList: '[data-test="multi-tab-terminal"] ul', -}; diff --git a/frontend/packages/dev-console/integration-tests/support/pageObjects/webterminal-po.ts b/frontend/packages/dev-console/integration-tests/support/pageObjects/webterminal-po.ts index 6de58c0ac92..8641ab4cc0f 100644 --- a/frontend/packages/dev-console/integration-tests/support/pageObjects/webterminal-po.ts +++ b/frontend/packages/dev-console/integration-tests/support/pageObjects/webterminal-po.ts @@ -1,4 +1,8 @@ export const webTerminalPO = { + webTerminalIcon: '[data-tour-id="tour-cloud-shell-button"]', + addTerminalIcon: '[data-test="add-terminal-icon"]', + closeTerminalIcon: '[data-test="close-terminal-icon"]', + tabsList: '[data-test="multi-tab-terminal"] ul', openCommandLine: 'button[data-tour-id="tour-cloud-shell-button"]', terminalWindow: 'canvas.xterm-cursor-layer', terminalWindowWithEnabledMouseEvent: 'div.xterm-screen>canvas.xterm-cursor-layer', diff --git a/frontend/packages/dev-console/integration-tests/support/pages/app.ts b/frontend/packages/dev-console/integration-tests/support/pages/app.ts index 0a121cc424e..508974e5b19 100644 --- a/frontend/packages/dev-console/integration-tests/support/pages/app.ts +++ b/frontend/packages/dev-console/integration-tests/support/pages/app.ts @@ -139,7 +139,7 @@ export const navigateTo = (opt: devNavigationMenu) => { case devNavigationMenu.Search: { cy.get(devNavigationMenuPO.search).click(); cy.get('h1').contains(pageTitle.Search); - cy.testA11y('Search Page in dev perspective'); + // cy.testA11y('Search Page in dev perspective'); break; } case devNavigationMenu.Helm: { @@ -180,7 +180,7 @@ export const navigateTo = (opt: devNavigationMenu) => { } else { cy.get(devNavigationMenuPO.search).click(); cy.get('[aria-label="Options menu"]').click(); - cy.get('[placeholder="Select Resource"]').should('be.visible').type('route'); + cy.get('[placeholder="Resources"]').should('be.visible').type('route'); cy.get('[data-filter-text="RTRoute"]').then(($el) => { if ($el.text().includes('route.openshift.io/v1')) { cy.wrap($el).contains('route.openshift.io/v1').click(); @@ -206,7 +206,7 @@ export const navigateTo = (opt: devNavigationMenu) => { } else { cy.get(devNavigationMenuPO.search).click(); cy.get('[aria-label="Options menu"]').click(); - cy.get('[placeholder="Select Resource"]').should('be.visible').type('Deployment'); + cy.get('[placeholder="Resources"]').should('be.visible').type('Deployment'); cy.get('[data-filter-text="DDeployment"]').click(); cy.get('.co-search-group__pin-toggle').should('be.visible').click(); cy.wait(3000); @@ -228,7 +228,7 @@ export const navigateTo = (opt: devNavigationMenu) => { } else { cy.get(devNavigationMenuPO.search).click(); cy.get('[aria-label="Options menu"]').click(); - cy.get('[placeholder="Select Resource"]').should('be.visible').type('console'); + cy.get('[placeholder="Resources"]').should('be.visible').type('console'); cy.get('[data-filter-text="CConsole"]').then(($el) => { if ($el.text().includes('operator.openshift.io')) { cy.wrap($el).contains('operator.openshift.io').click(); diff --git a/frontend/packages/dev-console/integration-tests/support/pages/functions/addTerminalTabs.ts b/frontend/packages/dev-console/integration-tests/support/pages/functions/addTerminalTabs.ts index 73e5ffc6050..d462aa6e530 100644 --- a/frontend/packages/dev-console/integration-tests/support/pages/functions/addTerminalTabs.ts +++ b/frontend/packages/dev-console/integration-tests/support/pages/functions/addTerminalTabs.ts @@ -1,4 +1,4 @@ -import { webTerminalPO } from '../../pageObjects/web-terminal-po'; +import { webTerminalPO } from '../../pageObjects/webterminal-po'; export const addTerminals = (n: number) => { for (let i = 0; i < n; i++) { diff --git a/frontend/packages/dev-console/integration-tests/support/pages/functions/checkOperatorStatus.ts b/frontend/packages/dev-console/integration-tests/support/pages/functions/checkOperatorStatus.ts index 40b38dce534..b2503091b88 100644 --- a/frontend/packages/dev-console/integration-tests/support/pages/functions/checkOperatorStatus.ts +++ b/frontend/packages/dev-console/integration-tests/support/pages/functions/checkOperatorStatus.ts @@ -51,6 +51,45 @@ export const checkWebterminalOperatorStatus = (retries: number = 5) => { } }; +export const checkDevWorkspaceOperatorStatus = (retries: number = 5) => { + const namespace = operatorNamespaces.DevWorkspaceOperator; + const controllerResourceName = 'devworkspace-controller'; + const serverResourceName = 'devworkspace-webhook-server'; + + if (retries === 0) { + throw new Error('Failed to install devworkspace operator - Pod timeout'); + } else { + cy.exec( + `oc wait --for=condition=ready pod -l app.kubernetes.io/name=${controllerResourceName} -n ${namespace} --timeout=300s`, + { + failOnNonZeroExit: false, + }, + ).then(function (result) { + if (result.stdout.includes('condition met')) { + cy.log(`Success: ${result.stdout}`); + } else { + cy.log(result.stderr); + cy.wait(30000); + checkDevWorkspaceOperatorStatus(retries - 1); + } + }); + cy.exec( + `oc wait --for=condition=ready pod -l app.kubernetes.io/name=${serverResourceName} -n ${namespace} --timeout=300s`, + { + failOnNonZeroExit: false, + }, + ).then(function (result) { + if (result.stdout.includes('condition met')) { + cy.log(`Success: ${result.stdout}`); + } else { + cy.log(result.stderr); + cy.wait(30000); + checkDevWorkspaceOperatorStatus(retries - 1); + } + }); + } +}; + export const checkShipwrightOperatorStatus = (retries: number = 5) => { const namespace = operatorNamespaces.ShipwrightOperator; const resourceName = operatorSubscriptions.ShipwrightOperator; diff --git a/frontend/packages/dev-console/integration-tests/support/pages/functions/checkTerminalIcon.ts b/frontend/packages/dev-console/integration-tests/support/pages/functions/checkTerminalIcon.ts index cb59212d1f0..04558dc7282 100644 --- a/frontend/packages/dev-console/integration-tests/support/pages/functions/checkTerminalIcon.ts +++ b/frontend/packages/dev-console/integration-tests/support/pages/functions/checkTerminalIcon.ts @@ -1,4 +1,4 @@ -import { webTerminalPO } from '../../pageObjects/web-terminal-po'; +import { webTerminalPO } from '../../pageObjects/webterminal-po'; export const checkTerminalIcon = (tries: number = 10) => { if (tries < 1) { diff --git a/frontend/packages/dev-console/integration-tests/support/pages/functions/installOperatorOnClusterUsingCLI.ts b/frontend/packages/dev-console/integration-tests/support/pages/functions/installOperatorOnClusterUsingCLI.ts index a587ae58958..b871fa8bd21 100644 --- a/frontend/packages/dev-console/integration-tests/support/pages/functions/installOperatorOnClusterUsingCLI.ts +++ b/frontend/packages/dev-console/integration-tests/support/pages/functions/installOperatorOnClusterUsingCLI.ts @@ -12,6 +12,7 @@ import { checkBuildsForOpenshiftOperatorStatus, checkWebterminalOperatorStatus, checkRedHatIntegrationCamelKOperatorStatus, + checkDevWorkspaceOperatorStatus, } from './checkOperatorStatus'; import { createKnativeEventingUsingCLI, @@ -42,6 +43,9 @@ export const checkOperatorStatus = (operator: operators) => { case operators.WebTerminalOperator: checkWebterminalOperatorStatus(); break; + case operators.DevWorkspaceOperator: + checkDevWorkspaceOperatorStatus(); + break; case operators.RedHatIntegrationCamelK: checkRedHatIntegrationCamelKOperatorStatus(); break; @@ -101,6 +105,10 @@ export const installOperatorUsingCLI = (operator: operators) => { yamlFile = '../../shipwright-plugin/integration-tests/testData/buildsForOpenshiftOperatorInstallation/buildsSubscription.yaml'; break; + case operators.DevWorkspaceOperator: + yamlFile = + '../../webterminal-plugin/integration-tests/testData/devworkspaceOperatorSubscription.yaml'; + break; case operators.WebTerminalOperator: yamlFile = '../../webterminal-plugin/integration-tests/testData/webterminalOperatorSubscription.yaml'; @@ -154,6 +162,11 @@ export const checkSubscriptionStatus = (operator: operators) => { namespace = operatorNamespaces.BuildsForOpenshiftOperator; subscriptionName = operatorSubscriptions.BuildsForOpenshiftOperator; break; + case operators.DevWorkspaceOperator: + operatorPackageName = operatorPackage.DevWorkspaceOperator; + namespace = operatorNamespaces.DevWorkspaceOperator; + subscriptionName = operatorSubscriptions.DevWorkspaceOperator; + break; case operators.WebTerminalOperator: operatorPackageName = operatorPackage.WebTerminalOperator; namespace = operatorNamespaces.WebTerminalOperator; @@ -206,6 +219,7 @@ export const installBuildsForOpenshiftOperatorUsingCLI = () => { }; export const installWebterminalOperatorUsingCLI = () => { + // verifyAndInstallOperatorUsingCLI(operators.DevWorkspaceOperator); verifyAndInstallOperatorUsingCLI(operators.WebTerminalOperator); }; diff --git a/frontend/packages/dev-console/integration-tests/support/pages/search-resources/search-page.ts b/frontend/packages/dev-console/integration-tests/support/pages/search-resources/search-page.ts index 2d17719b056..e4873d7c197 100644 --- a/frontend/packages/dev-console/integration-tests/support/pages/search-resources/search-page.ts +++ b/frontend/packages/dev-console/integration-tests/support/pages/search-resources/search-page.ts @@ -6,9 +6,10 @@ import { navigateToAdminMenu } from '../app'; const dataTestIdPref: string = 'data-test-id'; export function performResourceSearching(resourceName: string) { - cy.get('div').contains('Resources').click(); - cy.get('input[placeholder="Select Resource"]').clear().type(resourceName); - cy.get(`input[id$=${resourceName}]`).click(); + cy.get('[aria-label="Type to filter"]').click(); + + cy.get('input[placeholder="Resources"]').clear().type(resourceName); + cy.get(`label[id$="${resourceName}"]`).click(); } export const searchResource = { @@ -26,6 +27,7 @@ export const searchResource = { }); cy.get(adminNavigationMenuPO.home.search).click(); performResourceSearching(resourceName); + cy.byLegacyTestID('close-icon').should('be.visible').click({ force: true }); }, verifyItemInSearchResults: (item: string) => { @@ -37,6 +39,6 @@ export const searchResource = { }, selectSearchedItem: (searchedItem: string) => { - cy.get(`[${dataTestIdPref}^=${searchedItem}]`).should('be.visible').click(); + cy.get(`[${dataTestIdPref}^=${searchedItem}]`).should('be.visible').click({ force: true }); }, }; diff --git a/frontend/packages/knative-plugin/integration-tests/README.md b/frontend/packages/knative-plugin/integration-tests/README.md index 34c16748564..520503b646a 100644 --- a/frontend/packages/knative-plugin/integration-tests/README.md +++ b/frontend/packages/knative-plugin/integration-tests/README.md @@ -95,5 +95,6 @@ To Execute the scripts on Remote cluster, use below commands oc login -u kubeadmin -p $BRIDGE_KUBEADMIN_PASSWORD oc apply -f ./frontend/packages/console-shared/src/test-data/htpasswd-secret.yaml oc patch oauths cluster --patch "$(cat ./frontend/packages/console-shared/src/test-data/patch-htpasswd.yaml)" --type=merge - ./test-cypress.sh -p knative -h true + + ./integration-tests/test-cypress.sh -p knative -h true ``` diff --git a/frontend/packages/webterminal-plugin/integration-tests/cypress.config.js b/frontend/packages/webterminal-plugin/integration-tests/cypress.config.js index 681c245e287..0d2541b6768 100644 --- a/frontend/packages/webterminal-plugin/integration-tests/cypress.config.js +++ b/frontend/packages/webterminal-plugin/integration-tests/cypress.config.js @@ -15,6 +15,7 @@ module.exports = defineConfig({ requestTimeout: 15000, responseTimeout: 15000, fixturesFolder: 'testData', + video: true, reporter: '../../../node_modules/cypress-multi-reporters', reporterOptions: { configFile: 'reporter-config.json', diff --git a/frontend/packages/webterminal-plugin/integration-tests/features/web-terminal/web-teminal-basic.feature b/frontend/packages/webterminal-plugin/integration-tests/features/web-terminal/web-teminal-basic.feature index 885533ad648..936b2d6f7c1 100644 --- a/frontend/packages/webterminal-plugin/integration-tests/features/web-terminal/web-teminal-basic.feature +++ b/frontend/packages/webterminal-plugin/integration-tests/features/web-terminal/web-teminal-basic.feature @@ -3,9 +3,8 @@ Feature: Web Terminal As a basic user, I should be able to use web terminal Background: - Given user with basic rights has installed Web Terminal operator + Given user has logged in as basic user And user has installed webTerminal in namespace "aut-terminal-basic" - And user has logged in as basic user And user has created or selected namespace "aut-terminal-basic" @regression diff --git a/frontend/packages/webterminal-plugin/integration-tests/features/web-terminal/web-terminal-adminuser.feature b/frontend/packages/webterminal-plugin/integration-tests/features/web-terminal/web-terminal-adminuser.feature index 571607ed9be..937602d7d15 100644 --- a/frontend/packages/webterminal-plugin/integration-tests/features/web-terminal/web-terminal-adminuser.feature +++ b/frontend/packages/webterminal-plugin/integration-tests/features/web-terminal/web-terminal-adminuser.feature @@ -5,28 +5,43 @@ Feature: Web Terminal for Admin user Background: Given user has logged in as admin user - And user has installed Web Terminal operator + And user is at developer perspective + # And user has created or selected namespace "aut-terminal" - @smoke @odc-6745 - Scenario: Create new project and use Web Terminal: WT-02-TC01 - Given user can see terminal icon on masthead - When user clicks on the Web Terminal icon on the Masthead - And user clicks advanced option for Timeout - And user sets timeout to 1 Minute - And user clicks on Start button - Then user will see the terminal window - Then user will see the terminal instance for namespace "openshift-terminal" - And user ID obtained by API should match with user id in yaml editor for "openshift-terminal" namespace @regression @odc-6463 - Scenario Outline: User is able to open and close multiple terminals in the cloudshell: WT-02-TC02 + Scenario Outline: User is able to open and close multiple terminals in the cloudshell: WT-02-TC01 Given user can see terminal icon on masthead When user clicks on the Web Terminal icon on the Masthead And user opens additional web terminal tabs And user closed "" web terminal tab Then user is able see web terminal tabs + And user closed web terminal window Examples: | number_of_terminals | closed_terminal | open_terminals | | 3 | 2nd | 3 | + + @smoke @odc-6745 + Scenario: Create new project with timeout and use Web Terminal: WT-02-TC02 + Given user can see terminal icon on masthead + When user clicks on the Web Terminal icon on the Masthead + And user clicks advanced option for Timeout + And user sets timeout to "10" Minute + And user clicks on Start button + Then user will see the terminal instance for namespace "openshift-terminal" + And user ID obtained by API should match with user id in yaml editor for "openshift-terminal" namespace + And user has closed existing terminal workspace + + + @smoke @odc-6745 + Scenario: Create new project and use Web Terminal: WT-02-TC03 + Given user can see terminal icon on masthead + When user clicks on the Web Terminal icon on the Masthead + And user clicks on Start button + Then user will see the terminal window + And user will see the terminal instance for namespace "openshift-terminal" + And user ID obtained by API should match with user id in yaml editor for "openshift-terminal" namespace + And user has closed existing terminal workspace + diff --git a/frontend/packages/webterminal-plugin/integration-tests/support/commands/hooks.ts b/frontend/packages/webterminal-plugin/integration-tests/support/commands/hooks.ts new file mode 100644 index 00000000000..e7a1ba94367 --- /dev/null +++ b/frontend/packages/webterminal-plugin/integration-tests/support/commands/hooks.ts @@ -0,0 +1,27 @@ +import { checkErrors } from '@console/cypress-integration-tests/support'; +import { guidedTour } from '@console/cypress-integration-tests/views/guided-tour'; +import { installWebterminalOperatorUsingCLI } from '@console/dev-console/integration-tests/support/pages'; + +before(() => { + cy.login(); + cy.document().its('readyState').should('eq', 'complete'); + guidedTour.close(); + installWebterminalOperatorUsingCLI(); +}); + +after(() => { + const namespaces: string[] = Cypress.env('NAMESPACES') || []; + cy.log(`Deleting "${namespaces.join(' ')}" namespace`); + cy.exec(`oc delete namespace ${namespaces.join(' ')}`, { + failOnNonZeroExit: false, + timeout: 180000, + }); +}); + +beforeEach(() => { + cy.initDeveloper(); +}); + +afterEach(() => { + checkErrors(); +}); diff --git a/frontend/packages/webterminal-plugin/integration-tests/support/commands/index.ts b/frontend/packages/webterminal-plugin/integration-tests/support/commands/index.ts index 3bec6d32c79..58f43820ae0 100644 --- a/frontend/packages/webterminal-plugin/integration-tests/support/commands/index.ts +++ b/frontend/packages/webterminal-plugin/integration-tests/support/commands/index.ts @@ -5,4 +5,4 @@ import '@console/cypress-integration-tests/support/login'; import '@console/cypress-integration-tests/support/project'; import '@console/cypress-integration-tests/support'; import '@console/dev-console/integration-tests/support/commands/app'; -import '@console/dev-console/integration-tests/support/commands/hooks'; +import './hooks'; diff --git a/frontend/packages/webterminal-plugin/integration-tests/support/step-definitions/common/webTerminal.ts b/frontend/packages/webterminal-plugin/integration-tests/support/step-definitions/common/webTerminal.ts index 7345bb865be..d85b2a53d94 100644 --- a/frontend/packages/webterminal-plugin/integration-tests/support/step-definitions/common/webTerminal.ts +++ b/frontend/packages/webterminal-plugin/integration-tests/support/step-definitions/common/webTerminal.ts @@ -43,9 +43,11 @@ Given('user can see terminal icon on masthead', () => { When('user clicks on the Web Terminal icon on the Masthead', () => { webTerminalPage.clickOpenCloudShellBtn(); + cy.get('cos-status-box cos-status-box--loading').should('not.exist'); }); Then('user will see the terminal window', () => { + cy.wait(15000); webTerminalPage.verifyConnectionRediness(); }); diff --git a/frontend/packages/webterminal-plugin/integration-tests/support/step-definitions/pages/web-terminal/initTerminal-page.ts b/frontend/packages/webterminal-plugin/integration-tests/support/step-definitions/pages/web-terminal/initTerminal-page.ts index e2d82a95011..11e6e7b61ff 100644 --- a/frontend/packages/webterminal-plugin/integration-tests/support/step-definitions/pages/web-terminal/initTerminal-page.ts +++ b/frontend/packages/webterminal-plugin/integration-tests/support/step-definitions/pages/web-terminal/initTerminal-page.ts @@ -1,6 +1,14 @@ +import { guidedTour } from '@console/cypress-integration-tests/views/guided-tour'; +import { switchPerspective } from '@console/dev-console/integration-tests/support/constants'; import { formPO } from '@console/dev-console/integration-tests/support/pageObjects'; import { webTerminalPO } from '@console/dev-console/integration-tests/support/pageObjects/webterminal-po'; -import { app } from '@console/dev-console/integration-tests/support/pages/app'; +import { + app, + perspective, + projectNameSpace, +} from '@console/dev-console/integration-tests/support/pages/app'; +import { searchResource } from '@console/dev-console/integration-tests/support/pages/search-resources/search-page'; +import { webTerminalPage } from './webTerminal-page'; export const initTerminalPage = { clickOnProjectDropDown: () => { @@ -17,7 +25,27 @@ export const initTerminalPage = { }, clickStartButton: () => { - cy.get(formPO.create).should('be.enabled').click(); + cy.get(formPO.create).should('be.enabled').click({ force: true }); + cy.get('body').then(($body) => { + cy.wait(5000); + // Due to initialization issue if multiple operators present OCPBUGS-44891 + if ($body.find('[data-test="loading-box-body"]').length === 0) { + cy.log('loading did not go through'); + cy.wait(10000); + cy.get(webTerminalPO.terminalCloseWindowBtn).click(); + cy.reload(); + app.waitForDocumentLoad(); + perspective.switchTo(switchPerspective.Developer); + projectNameSpace.selectProject('openshift-terminal'); + guidedTour.close(); + webTerminalPage.clickOpenCloudShellBtn(); + searchResource.searchResourceByNameAsDev('DevWorkspace'); + searchResource.selectSearchedItem('terminal'); + // cy.get('[data-test="loading-indicator"]').should('not.exist', { timeout: 210000 }); + } else { + cy.wait(5000); + } + }); }, selectProject: (projectName: string) => { diff --git a/frontend/packages/webterminal-plugin/integration-tests/support/step-definitions/pages/web-terminal/webTerminal-page.ts b/frontend/packages/webterminal-plugin/integration-tests/support/step-definitions/pages/web-terminal/webTerminal-page.ts index 8596c1c6b21..6713cdf5d2b 100644 --- a/frontend/packages/webterminal-plugin/integration-tests/support/step-definitions/pages/web-terminal/webTerminal-page.ts +++ b/frontend/packages/webterminal-plugin/integration-tests/support/step-definitions/pages/web-terminal/webTerminal-page.ts @@ -43,4 +43,13 @@ export const webTerminalPage = { cy.alertTitleShouldContain('Close terminal?'); cy.byTestID('confirm-action').click(); }, + + deleteTerminalInstanceActionMenu: () => { + cy.byLegacyTestID('actions-menu-button').should('be.visible').click(); + cy.byLegacyTestID('action-items').should('be.visible'); + cy.byTestActionID('Delete DevWorkspace').should('be.visible').click(); + cy.get('[aria-label="Modal"]').should('be.visible'); + cy.byTestID('confirm-action').click(); + cy.byTestID('empty-box').should('be.visible'); + }, }; diff --git a/frontend/packages/webterminal-plugin/integration-tests/support/step-definitions/web-terminal/web-terminal-adminuser.ts b/frontend/packages/webterminal-plugin/integration-tests/support/step-definitions/web-terminal/web-terminal-adminuser.ts index e1db0a76381..b8c5d5e30fa 100644 --- a/frontend/packages/webterminal-plugin/integration-tests/support/step-definitions/web-terminal/web-terminal-adminuser.ts +++ b/frontend/packages/webterminal-plugin/integration-tests/support/step-definitions/web-terminal/web-terminal-adminuser.ts @@ -4,7 +4,7 @@ import { switchPerspective, devWorkspaceStatuses, } from '@console/dev-console/integration-tests/support/constants'; -import { webTerminalPO } from '@console/dev-console/integration-tests/support/pageObjects/web-terminal-po'; +import { webTerminalPO } from '@console/dev-console/integration-tests/support/pageObjects/webterminal-po'; import { perspective, projectNameSpace, @@ -17,12 +17,27 @@ import { import { checkTerminalIcon } from '@console/dev-console/integration-tests/support/pages/functions/checkTerminalIcon'; import { operatorsPage } from '@console/dev-console/integration-tests/support/pages/operators-page'; import { searchResource } from '@console/dev-console/integration-tests/support/pages/search-resources/search-page'; +import { webTerminalPage } from '../pages/web-terminal/webTerminal-page'; Given('user has logged in as admin user', () => { + cy.login(); perspective.switchTo(switchPerspective.Administrator); nav.sidenav.switcher.shouldHaveText(switchPerspective.Administrator); }); +Given('user has closed existing terminal workspace', () => { + searchResource.searchResourceByNameAsAdmin('DevWorkspace'); + cy.get('.loading-box').then(($body) => { + if ($body.find('[data-test="empty-box-body"]').length === 0) { + cy.log($body.find('[data-test="empty-box-body"]').length.toString()); + searchResource.selectSearchedItem('terminal'); + webTerminalPage.deleteTerminalInstanceActionMenu(); + } else { + cy.log('No DevWorkspaces found'); + } + }); +}); + Given('user can see terminal icon on masthead', () => { checkTerminalIcon(); cy.get(webTerminalPO.webTerminalIcon).should('be.visible'); @@ -30,14 +45,18 @@ Given('user can see terminal icon on masthead', () => { When('user clicks on the Web Terminal icon on the Masthead', () => { cy.get(webTerminalPO.webTerminalIcon).click(); + cy.get('cos-status-box cos-status-box--loading').should('not.exist'); }); When('user clicks advanced option for Timeout', () => { - cy.get('[role="tabpanel"] button').contains('Timeout').click(); + cy.get('[role="tabpanel"] button').contains('Timeout').should('be.visible').click(); }); -When('user sets timeout to 1 Minute', () => { +When('user sets timeout to {string} Minute', (time: string) => { cy.byLegacyTestID('Increment').click(); + cy.get('input[aria-label="Input"]').should('not.have.value', '0'); + cy.get('input[aria-label="Input"]').clear().invoke('val', time).trigger('change'); + cy.get('input[aria-label="Input"]').should('have.value', time); }); When('user opens {int} additional web terminal tabs', (n: number) => { @@ -48,6 +67,11 @@ When('user closed {string} web terminal tab', (n: string) => { closeTerminal(n); }); +When('user closed web terminal window', () => { + cy.byTestID('cloudshell-drawer-close-button').should('be.visible').click(); + cy.wait(2000); +}); + Then('user is able see {int} web terminal tabs', (n: number) => { cy.get(webTerminalPO.tabsList).then(($el) => { expect($el.prop('children').length).toEqual(n + 1); @@ -93,6 +117,7 @@ And( ); Then('user will see the terminal instance for namespace {string}', (nameSpace: string) => { + perspective.switchTo(switchPerspective.Administrator); operatorsPage.navigateToInstallOperatorsPage(); // verifyWebTerminalAvailability(); projectNameSpace.selectProject(nameSpace); diff --git a/frontend/packages/webterminal-plugin/integration-tests/testData/devworkspaceOperatorSubscription.yaml b/frontend/packages/webterminal-plugin/integration-tests/testData/devworkspaceOperatorSubscription.yaml new file mode 100644 index 00000000000..e46c4b9b068 --- /dev/null +++ b/frontend/packages/webterminal-plugin/integration-tests/testData/devworkspaceOperatorSubscription.yaml @@ -0,0 +1,26 @@ +apiVersion: operators.coreos.com/v1alpha1 +kind: CatalogSource +metadata: + name: devworkspace-operator-catalog + namespace: openshift-marketplace +spec: + displayName: DevWorkspace Operator Catalog + image: 'quay.io/devfile/devworkspace-operator-index:next' + publisher: Red Hat + sourceType: grpc + updateStrategy: + registryPoll: + interval: 10m +--- +apiVersion: operators.coreos.com/v1alpha1 +kind: Subscription +metadata: + name: devworkspace-operator + namespace: openshift-operators +spec: + channel: next + installPlanApproval: Automatic + name: devworkspace-operator + source: devworkspace-operator-catalog + sourceNamespace: openshift-marketplace + startingCSV: devworkspace-operator.v0.32.0-dev.5 From 268bd89f110287bb91a48e72c1f989240d50b060 Mon Sep 17 00:00:00 2001 From: Sanket Pathak Date: Fri, 3 Jan 2025 16:32:58 +0530 Subject: [PATCH 042/102] Improving web terminal test failures --- .../step-definitions/web-terminal/web-terminal-adminuser.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/frontend/packages/webterminal-plugin/integration-tests/support/step-definitions/web-terminal/web-terminal-adminuser.ts b/frontend/packages/webterminal-plugin/integration-tests/support/step-definitions/web-terminal/web-terminal-adminuser.ts index b8c5d5e30fa..fbb28ed2f07 100644 --- a/frontend/packages/webterminal-plugin/integration-tests/support/step-definitions/web-terminal/web-terminal-adminuser.ts +++ b/frontend/packages/webterminal-plugin/integration-tests/support/step-definitions/web-terminal/web-terminal-adminuser.ts @@ -123,5 +123,6 @@ Then('user will see the terminal instance for namespace {string}', (nameSpace: s projectNameSpace.selectProject(nameSpace); searchResource.searchResourceByNameAsAdmin('DevWorkspace'); searchResource.selectSearchedItem('terminal'); - devWorkspacePage.verifyDevWsResourceStatus(devWorkspaceStatuses.running); + // Disabling following line due to terminal loading issue from backend at the first load + // devWorkspacePage.verifyDevWsResourceStatus(devWorkspaceStatuses.running); }); From c4c06c9674f7d093f1a83317091422f140ed9547 Mon Sep 17 00:00:00 2001 From: Jon Jackson Date: Mon, 10 Feb 2025 12:12:27 -0500 Subject: [PATCH 043/102] OCPBUGS-48637: add support for "OpenShift Virtualization Engine" filter on OperatorHub --- .../src/components/operator-hub/index.ts | 1 + .../operator-hub/operator-hub-items.tsx | 1 + .../operator-hub/operator-hub-utils.spec.ts | 12 ++++- .../operator-hub/operator-hub-utils.ts | 50 +++++++++++++------ 4 files changed, 47 insertions(+), 17 deletions(-) diff --git a/frontend/packages/operator-lifecycle-manager/src/components/operator-hub/index.ts b/frontend/packages/operator-lifecycle-manager/src/components/operator-hub/index.ts index 4b3372f42e8..e1a59bff7f5 100644 --- a/frontend/packages/operator-lifecycle-manager/src/components/operator-hub/index.ts +++ b/frontend/packages/operator-lifecycle-manager/src/components/operator-hub/index.ts @@ -34,6 +34,7 @@ export enum InfrastructureFeature { export enum ValidSubscriptionValue { OpenShiftKubernetesEngine = 'OpenShift Kubernetes Engine', + OpenShiftVirtualizationEngine = 'OpenShift Virtualization Engine', OpenShiftContainerPlatform = 'OpenShift Container Platform', OpenShiftPlatformPlus = 'OpenShift Platform Plus', RequiresSeparateSubscription = 'Requires separate subscription', diff --git a/frontend/packages/operator-lifecycle-manager/src/components/operator-hub/operator-hub-items.tsx b/frontend/packages/operator-lifecycle-manager/src/components/operator-hub/operator-hub-items.tsx index 681b9800985..ad7b1e7f0f3 100644 --- a/frontend/packages/operator-lifecycle-manager/src/components/operator-hub/operator-hub-items.tsx +++ b/frontend/packages/operator-lifecycle-manager/src/components/operator-hub/operator-hub-items.tsx @@ -229,6 +229,7 @@ const infraFeaturesSort = (infrastructure) => { const validSubscriptionSort = (validSubscription) => { switch (validSubscription.value) { case ValidSubscriptionValue.OpenShiftKubernetesEngine: + case ValidSubscriptionValue.OpenShiftVirtualizationEngine: return 0; case ValidSubscriptionValue.OpenShiftContainerPlatform: return 1; diff --git a/frontend/packages/operator-lifecycle-manager/src/components/operator-hub/operator-hub-utils.spec.ts b/frontend/packages/operator-lifecycle-manager/src/components/operator-hub/operator-hub-utils.spec.ts index a1d4cc58575..036b630802a 100644 --- a/frontend/packages/operator-lifecycle-manager/src/components/operator-hub/operator-hub-utils.spec.ts +++ b/frontend/packages/operator-lifecycle-manager/src/components/operator-hub/operator-hub-utils.spec.ts @@ -390,8 +390,14 @@ describe('getValidSubscription', () => { const [subscriptions, filters] = getValidSubscription({ [OLMAnnotation.ValidSubscription]: `["${ValidSubscriptionValue.OpenShiftKubernetesEngine}"]`, }); - expect(subscriptions).toEqual([ValidSubscriptionValue.OpenShiftKubernetesEngine]); - expect(filters).toEqual([ValidSubscriptionValue.OpenShiftKubernetesEngine]); + expect(subscriptions).toEqual([ + ValidSubscriptionValue.OpenShiftKubernetesEngine, + ValidSubscriptionValue.OpenShiftVirtualizationEngine, + ]); + expect(filters).toEqual([ + ValidSubscriptionValue.OpenShiftKubernetesEngine, + ValidSubscriptionValue.OpenShiftVirtualizationEngine, + ]); }); it(`parses ${ValidSubscriptionValue.OpenShiftPlatformPlus}`, () => { const [subscriptions, filters] = getValidSubscription({ @@ -407,6 +413,7 @@ describe('getValidSubscription', () => { expect(subscriptions).toEqual([ ValidSubscriptionValue.OpenShiftContainerPlatform, ValidSubscriptionValue.OpenShiftKubernetesEngine, + ValidSubscriptionValue.OpenShiftVirtualizationEngine, ValidSubscriptionValue.OpenShiftPlatformPlus, 'foo', 'bar', @@ -414,6 +421,7 @@ describe('getValidSubscription', () => { expect(filters).toEqual([ ValidSubscriptionValue.OpenShiftContainerPlatform, ValidSubscriptionValue.OpenShiftKubernetesEngine, + ValidSubscriptionValue.OpenShiftVirtualizationEngine, ValidSubscriptionValue.OpenShiftPlatformPlus, ValidSubscriptionValue.RequiresSeparateSubscription, ]); diff --git a/frontend/packages/operator-lifecycle-manager/src/components/operator-hub/operator-hub-utils.ts b/frontend/packages/operator-lifecycle-manager/src/components/operator-hub/operator-hub-utils.ts index 445b2eb76a0..8ed35f4cd8b 100644 --- a/frontend/packages/operator-lifecycle-manager/src/components/operator-hub/operator-hub-utils.ts +++ b/frontend/packages/operator-lifecycle-manager/src/components/operator-hub/operator-hub-utils.ts @@ -144,27 +144,47 @@ const parseValidSubscriptionAnnotation: AnnotationParser = (annotation ...options, }) ?? []; -export const getValidSubscription: AnnotationParser<[string[], ValidSubscriptionValue[]]> = ( +export const getValidSubscription: AnnotationParser<[string[], string[]]> = ( annotations, options, ) => { - const validSubscription = parseValidSubscriptionAnnotation(annotations, options); - const validSubscriptionFilters = validSubscription.reduce( - (acc, value) => { - const filterValue = - { - [ValidSubscriptionValue.OpenShiftContainerPlatform]: - ValidSubscriptionValue.OpenShiftContainerPlatform, - [ValidSubscriptionValue.OpenShiftKubernetesEngine]: + const validSubscriptionMap = parseValidSubscriptionAnnotation(annotations, options).reduce<{ + [key: string]: string[]; + }>((acc, value) => { + switch (value) { + case ValidSubscriptionValue.OpenShiftContainerPlatform: + case ValidSubscriptionValue.OpenShiftPlatformPlus: + return { + ...acc, + [value]: [value], + }; + case ValidSubscriptionValue.OpenShiftKubernetesEngine: + case ValidSubscriptionValue.OpenShiftVirtualizationEngine: + return { + ...acc, + [ValidSubscriptionValue.OpenShiftKubernetesEngine]: [ ValidSubscriptionValue.OpenShiftKubernetesEngine, - [ValidSubscriptionValue.OpenShiftPlatformPlus]: - ValidSubscriptionValue.OpenShiftPlatformPlus, - }[value] ?? ValidSubscriptionValue.RequiresSeparateSubscription; - return acc.includes(filterValue) ? acc : [...acc, filterValue]; - }, + ], + [ValidSubscriptionValue.OpenShiftVirtualizationEngine]: [ + ValidSubscriptionValue.OpenShiftVirtualizationEngine, + ], + }; + default: + return { + ...acc, + [ValidSubscriptionValue.RequiresSeparateSubscription]: [ + ...(acc?.[ValidSubscriptionValue.RequiresSeparateSubscription] ?? []), + value, + ], + }; + } + }, {}); + + const validSubscriptions = Object.values(validSubscriptionMap).reduce( + (acc, subscriptions) => [...acc, ...subscriptions], [], ); - return [validSubscription, validSubscriptionFilters]; + return [validSubscriptions, Object.keys(validSubscriptionMap)]; }; const parseInfrastructureFeaturesAnnotation: AnnotationParser = (annotations, options) => From 6bb6dd02ab6816a84b8f68aa48135d28bc90118e Mon Sep 17 00:00:00 2001 From: Andreas Gerstmayr Date: Thu, 23 Jan 2025 15:03:28 +0100 Subject: [PATCH 044/102] Show Observe section without PROMETHEUS and MONITORING flags Currently, the Observe section is only shown to users which have the `PROMETHEUS`, `MONITORING` and `CAN_GET_NS` flags. Some dynamic plugins, for example distributed tracing and logging, add a new link to the Observe section, which should be visible to all users - even without the `PROMETHEUS`, `MONITORING` and `CAN_GET_NS` flags. Therefore this PR removes the requirement on this flags. I checked the links in the section, and the monitoring-related links (Alerting, Metrics, Dashboards, Targets) set the required permissions (`PROMETHEUS`, `MONITORING` and `CAN_GET_NS`) on the `console.navigation/href` already: https://github.com/openshift/monitoring-plugin/blob/6b92084514ea9007d7d797f7699eab19e0c2f2fc/web/console-extensions.json In case the Observe section is empty, it is hidden: https://github.com/openshift/console/blob/855f949121cefb3ea63b17ebf91e6bdcdc60d9c8/frontend/packages/console-app/src/components/nav/NavSection.tsx#L57-L60 Signed-off-by: Andreas Gerstmayr --- frontend/packages/console-app/console-extensions.json | 3 --- 1 file changed, 3 deletions(-) diff --git a/frontend/packages/console-app/console-extensions.json b/frontend/packages/console-app/console-extensions.json index a941276f970..aeb91821f66 100644 --- a/frontend/packages/console-app/console-extensions.json +++ b/frontend/packages/console-app/console-extensions.json @@ -736,9 +736,6 @@ "dataAttributes": { "data-quickstart-id": "qs-nav-monitoring" } - }, - "flags": { - "required": ["PROMETHEUS", "MONITORING", "CAN_GET_NS"] } }, { From ee976ed61ef375ec1f79bb16b6874e4a8d6828b1 Mon Sep 17 00:00:00 2001 From: rawagner Date: Fri, 14 Feb 2025 12:04:43 +0100 Subject: [PATCH 045/102] OCPBUGS-50546: Do not load CSRs if user does not have permissions --- .../src/components/nodes/NodesPage.tsx | 37 ++++++++++++++----- .../console-app/src/components/nodes/csr.ts | 2 +- 2 files changed, 29 insertions(+), 10 deletions(-) diff --git a/frontend/packages/console-app/src/components/nodes/NodesPage.tsx b/frontend/packages/console-app/src/components/nodes/NodesPage.tsx index 31d655fd597..662eb4e6704 100644 --- a/frontend/packages/console-app/src/components/nodes/NodesPage.tsx +++ b/frontend/packages/console-app/src/components/nodes/NodesPage.tsx @@ -7,7 +7,10 @@ import { useTranslation } from 'react-i18next'; // eslint-disable-next-line @typescript-eslint/ban-ts-comment // @ts-ignore import { useSelector, useDispatch } from 'react-redux'; -import { ListPageBody } from '@console/dynamic-plugin-sdk/src/api/dynamic-core-api'; +import { + ListPageBody, + useAccessReview, +} from '@console/dynamic-plugin-sdk/src/api/dynamic-core-api'; import { NodeCertificateSigningRequestKind, RowFilter, @@ -679,6 +682,29 @@ const getFilters = (t: TFunction): RowFilter[] => [ }, ]; +const useWatchCSRs = (): [CertificateSigningRequestKind[], boolean, unknown] => { + const [isAllowed, checkIsLoading] = useAccessReview({ + group: 'certificates.k8s.io', + resource: 'CertificateSigningRequest', + verb: 'list', + }); + + const [csrs, loaded, error] = useK8sWatchResource( + isAllowed + ? { + groupVersionKind: { + group: 'certificates.k8s.io', + kind: 'CertificateSigningRequest', + version: 'v1', + }, + isList: true, + } + : undefined, + ); + + return [csrs, !checkIsLoading && loaded, error]; +}; + const NodesPage: React.FC = ({ selector }) => { const dispatch = useDispatch(); @@ -698,14 +724,7 @@ const NodesPage: React.FC = ({ selector }) => { selector, }); - const [csrs, csrsLoaded, csrsLoadError] = useK8sWatchResource({ - groupVersionKind: { - group: 'certificates.k8s.io', - kind: 'CertificateSigningRequest', - version: 'v1', - }, - isList: true, - }); + const [csrs, csrsLoaded, csrsLoadError] = useWatchCSRs(); React.useEffect(() => { const updateMetrics = async () => { diff --git a/frontend/packages/console-app/src/components/nodes/csr.ts b/frontend/packages/console-app/src/components/nodes/csr.ts index e724e7d2723..29a9d450e05 100644 --- a/frontend/packages/console-app/src/components/nodes/csr.ts +++ b/frontend/packages/console-app/src/components/nodes/csr.ts @@ -18,7 +18,7 @@ const getNodeCSRs = ( username: string, client: boolean, ): CertificateSigningRequestKind[] => - csrs + (csrs || []) .filter( (csr) => csr.spec.username === username && From b7301fa31b1f1cab45d4bbc316e46acbe9854653 Mon Sep 17 00:00:00 2001 From: Samuel Padgett Date: Mon, 3 Feb 2025 11:24:58 -0500 Subject: [PATCH 046/102] OCPBUGS-49778: Linkify OLM operator uninstall message Make links and email addresses in custom operator uninstall messages clickable. --- .../src/components/modals/uninstall-operator-modal.tsx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/frontend/packages/operator-lifecycle-manager/src/components/modals/uninstall-operator-modal.tsx b/frontend/packages/operator-lifecycle-manager/src/components/modals/uninstall-operator-modal.tsx index 7dbb03a32dd..5cb6bd2c4df 100644 --- a/frontend/packages/operator-lifecycle-manager/src/components/modals/uninstall-operator-modal.tsx +++ b/frontend/packages/operator-lifecycle-manager/src/components/modals/uninstall-operator-modal.tsx @@ -16,6 +16,7 @@ import { } from '@console/internal/components/factory/modal'; import { history, + LinkifyExternal, ResourceLink, resourceListPathFromModel, StatusBox, @@ -391,7 +392,9 @@ export const UninstallOperatorModal: React.FC = ({ {uninstallMessage && ( <>

{t('olm~Message from Operator developer')}

-

{uninstallMessage}

+

+ {uninstallMessage} +

)} {!optedOut && <>{operandsSection}} From dda9a951ddb2dccd0983cd6428f7129f9e2c61f7 Mon Sep 17 00:00:00 2001 From: Eliska Romanova Date: Wed, 19 Feb 2025 10:50:51 +0100 Subject: [PATCH 047/102] Update the monitoring topic used by the console team --- frontend/public/components/utils/documentation.tsx | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/frontend/public/components/utils/documentation.tsx b/frontend/public/components/utils/documentation.tsx index b2745f13f24..ba5b00ebf3b 100644 --- a/frontend/public/components/utils/documentation.tsx +++ b/frontend/public/components/utils/documentation.tsx @@ -30,10 +30,9 @@ export const documentationURLs: documentationURLsType = { upstream: 'applications/application-health.html', }, configuringMonitoring: { - downstream: - 'html/monitoring/configuring-the-monitoring-stack#maintenance-and-support_configuring-the-monitoring-stack', + downstream: 'html/monitoring/getting-started#maintenance-and-support-for-monitoring', upstream: - 'observability/monitoring/configuring-the-monitoring-stack.html#maintenance-and-support_configuring-monitoring', + 'observability/monitoring/getting-started/maintenance-and-support-for-monitoring.html#maintenance-and-support-for-monitoring', }, networkPolicy: { downstream: 'html/networking/network-policy#about-network-policy', From 04ec4165e5639b34dafe122ea6bf856c0c71bf6a Mon Sep 17 00:00:00 2001 From: Mylanos Date: Mon, 3 Mar 2025 17:38:41 +0100 Subject: [PATCH 048/102] OCPBUGS-51355: VolumeSnapshotPage used default initializes for namespace prop which caused problem when retrieving All projects list page. Removing the initialized and only providing the fallback default value in the createLink fixed this problem. --- .../src/components/volume-snapshot/volume-snapshot.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/frontend/packages/console-app/src/components/volume-snapshot/volume-snapshot.tsx b/frontend/packages/console-app/src/components/volume-snapshot/volume-snapshot.tsx index 6b93a9410b6..2e70f777f0c 100644 --- a/frontend/packages/console-app/src/components/volume-snapshot/volume-snapshot.tsx +++ b/frontend/packages/console-app/src/components/volume-snapshot/volume-snapshot.tsx @@ -215,13 +215,13 @@ const VolumeSnapshotTable: React.FC = (props) => { const VolumeSnapshotPage: React.FC = ({ canCreate = true, showTitle = true, - namespace = 'default', + namespace, selector, }) => { const { t } = useTranslation(); const canListVSC = useFlag(FLAGS.CAN_LIST_VSC); - const createPath = `/k8s/ns/${namespace}/${VolumeSnapshotModel.plural}/~new/form`; + const createPath = `/k8s/ns/${namespace || 'default'}/${VolumeSnapshotModel.plural}/~new/form`; const [resources, loaded, loadError] = useK8sWatchResource({ groupVersionKind: { group: VolumeSnapshotModel.apiGroup, From 978cb00e1968e8d1aebe3b3b09e3eb11e97d289d Mon Sep 17 00:00:00 2001 From: Jon Jackson Date: Tue, 4 Mar 2025 08:57:41 -0500 Subject: [PATCH 049/102] OCPBUGS-50650: Retain original path when detecting perspective --- .../detect-perspective/PerspectiveDetector.tsx | 11 +++++++---- .../__tests__/PerspectiveDetector.spec.tsx | 15 +++++++++++---- .../useValuesForPerspectiveContext.ts | 2 -- 3 files changed, 18 insertions(+), 10 deletions(-) diff --git a/frontend/packages/console-app/src/components/detect-perspective/PerspectiveDetector.tsx b/frontend/packages/console-app/src/components/detect-perspective/PerspectiveDetector.tsx index 31a32a74a2d..99529756be5 100644 --- a/frontend/packages/console-app/src/components/detect-perspective/PerspectiveDetector.tsx +++ b/frontend/packages/console-app/src/components/detect-perspective/PerspectiveDetector.tsx @@ -1,9 +1,10 @@ import * as React from 'react'; +import { useLocation } from 'react-router'; import { Perspective, ResolvedExtension } from '@console/dynamic-plugin-sdk'; import { usePerspectives } from '@console/shared/src'; type DetectorProps = { - setActivePerspective: (perspective: string) => void; + setActivePerspective: (perspective: string, next: string) => void; perspectiveExtensions: Perspective[]; detectors: ( | undefined @@ -12,7 +13,7 @@ type DetectorProps = { }; type PerspectiveDetectorProps = { - setActivePerspective: (perspective: string) => void; + setActivePerspective: (perspective: string, next: string) => void; }; const Detector: React.FC = ({ @@ -20,6 +21,7 @@ const Detector: React.FC = ({ perspectiveExtensions, detectors, }) => { + const { pathname } = useLocation() ?? {}; let detectedPerspective: string; const defaultPerspective = perspectiveExtensions.find((p) => p.properties.default) || perspectiveExtensions[0]; @@ -38,16 +40,17 @@ const Detector: React.FC = ({ React.useEffect(() => { if (detectedPerspective) { - setActivePerspective(detectedPerspective); + setActivePerspective(detectedPerspective, pathname); } else if (defaultPerspective && (detectors.length < 1 || detectionComplete)) { // set default perspective if there are no detectors or none of the detections were successfull - setActivePerspective(defaultPerspective.properties.id); + setActivePerspective(defaultPerspective.properties.id, pathname); } }, [ defaultPerspective, detectedPerspective, detectionComplete, detectors.length, + pathname, setActivePerspective, ]); diff --git a/frontend/packages/console-app/src/components/detect-perspective/__tests__/PerspectiveDetector.spec.tsx b/frontend/packages/console-app/src/components/detect-perspective/__tests__/PerspectiveDetector.spec.tsx index 52ba8f55c2f..5e497f4203f 100644 --- a/frontend/packages/console-app/src/components/detect-perspective/__tests__/PerspectiveDetector.spec.tsx +++ b/frontend/packages/console-app/src/components/detect-perspective/__tests__/PerspectiveDetector.spec.tsx @@ -14,6 +14,13 @@ jest.mock('@console/shared/src', () => ({ usePerspectives: jest.fn(), })); +jest.mock('react-router', () => { + return { + ...require.requireActual('react-router'), + useLocation: jest.fn(() => ({ pathname: '' })), + }; +}); + const mockPerspectives = [ { type: 'console.perspective', @@ -41,7 +48,7 @@ describe('PerspectiveDetector', () => { const wrapper = mount(); expect(wrapper.isEmptyRender()).toBe(true); - expect(setActivePerspective).toHaveBeenCalledWith('admin'); + expect(setActivePerspective).toHaveBeenCalledWith('admin', ''); }); it('should set detected perspective if detection is successful', async () => { @@ -60,7 +67,7 @@ describe('PerspectiveDetector', () => { promiseResolver(() => [true, false]); }); expect(wrapper.isEmptyRender()).toBe(true); - expect(setActivePerspective).toHaveBeenCalledWith('dev'); + expect(setActivePerspective).toHaveBeenCalledWith('dev', ''); }); it('should set default perspective if detection fails', async () => { @@ -79,7 +86,7 @@ describe('PerspectiveDetector', () => { promiseResolver(() => [false, false]); }); expect(wrapper.isEmptyRender()).toBe(true); - expect(setActivePerspective).toHaveBeenCalledWith('admin'); + expect(setActivePerspective).toHaveBeenCalledWith('admin', ''); }); it('should set admin as default perspective if all perspectives are disabled', async () => { @@ -127,6 +134,6 @@ describe('PerspectiveDetector', () => { promiseResolver(() => [false, false]); }); expect(wrapper.isEmptyRender()).toBe(true); - expect(setActivePerspective).toHaveBeenCalledWith('admin'); + expect(setActivePerspective).toHaveBeenCalledWith('admin', ''); }); }); diff --git a/frontend/packages/console-app/src/components/detect-perspective/useValuesForPerspectiveContext.ts b/frontend/packages/console-app/src/components/detect-perspective/useValuesForPerspectiveContext.ts index b826c32db7d..585da6178d8 100644 --- a/frontend/packages/console-app/src/components/detect-perspective/useValuesForPerspectiveContext.ts +++ b/frontend/packages/console-app/src/components/detect-perspective/useValuesForPerspectiveContext.ts @@ -32,8 +32,6 @@ export const useValuesForPerspectiveContext = (): [ // Navigate to next or root and let the default page determine where to go to next navigate(next || '/'); fireTelemetryEvent('Perspective Changed', { perspective: newPerspective }); - // eslint-disable-next-line no-console - console.log('DEBUG: setting perspective', newPerspective, next); }; return [isValidPerspective ? perspective : undefined, setPerspective, loaded]; From 9eb0c1d45b2272767659ec103e961e9bf6f58a43 Mon Sep 17 00:00:00 2001 From: Sanket Pathak Date: Fri, 7 Feb 2025 16:01:38 +0530 Subject: [PATCH 050/102] Updating cypress config to have video enabled for the CI results --- .../packages/dev-console/integration-tests/cypress.config.js | 1 + .../packages/helm-plugin/integration-tests/cypress.config.js | 1 + .../packages/knative-plugin/integration-tests/cypress.config.js | 1 + .../pipelines-plugin/integration-tests/cypress.config.js | 1 + .../shipwright-plugin/integration-tests/cypress.config.js | 1 + 5 files changed, 5 insertions(+) diff --git a/frontend/packages/dev-console/integration-tests/cypress.config.js b/frontend/packages/dev-console/integration-tests/cypress.config.js index 39ddefdbb6a..1bf4a1634ad 100644 --- a/frontend/packages/dev-console/integration-tests/cypress.config.js +++ b/frontend/packages/dev-console/integration-tests/cypress.config.js @@ -15,6 +15,7 @@ module.exports = defineConfig({ requestTimeout: 15000, responseTimeout: 15000, fixturesFolder: 'testData', + video: true, reporter: '../../../node_modules/cypress-multi-reporters', reporterOptions: { configFile: 'reporter-config.json', diff --git a/frontend/packages/helm-plugin/integration-tests/cypress.config.js b/frontend/packages/helm-plugin/integration-tests/cypress.config.js index 10832f27f5f..03e5d063df1 100644 --- a/frontend/packages/helm-plugin/integration-tests/cypress.config.js +++ b/frontend/packages/helm-plugin/integration-tests/cypress.config.js @@ -15,6 +15,7 @@ module.exports = defineConfig({ requestTimeout: 15000, responseTimeout: 15000, fixturesFolder: 'testData', + video: true, reporter: '../../../node_modules/cypress-multi-reporters', reporterOptions: { configFile: 'reporter-config.json', diff --git a/frontend/packages/knative-plugin/integration-tests/cypress.config.js b/frontend/packages/knative-plugin/integration-tests/cypress.config.js index 569bdf1d2e3..43afe469cb1 100644 --- a/frontend/packages/knative-plugin/integration-tests/cypress.config.js +++ b/frontend/packages/knative-plugin/integration-tests/cypress.config.js @@ -15,6 +15,7 @@ module.exports = defineConfig({ requestTimeout: 15000, responseTimeout: 15000, fixturesFolder: 'testData', + video: true, reporter: '../../../node_modules/cypress-multi-reporters', reporterOptions: { configFile: 'reporter-config.json', diff --git a/frontend/packages/pipelines-plugin/integration-tests/cypress.config.js b/frontend/packages/pipelines-plugin/integration-tests/cypress.config.js index 38bed2f9f22..d3ba05863e5 100644 --- a/frontend/packages/pipelines-plugin/integration-tests/cypress.config.js +++ b/frontend/packages/pipelines-plugin/integration-tests/cypress.config.js @@ -15,6 +15,7 @@ module.exports = defineConfig({ requestTimeout: 15000, responseTimeout: 15000, fixturesFolder: 'testData', + video: true, reporter: '../../../node_modules/cypress-multi-reporters', reporterOptions: { configFile: 'reporter-config.json', diff --git a/frontend/packages/shipwright-plugin/integration-tests/cypress.config.js b/frontend/packages/shipwright-plugin/integration-tests/cypress.config.js index a060c0e57fb..b1a3a857562 100644 --- a/frontend/packages/shipwright-plugin/integration-tests/cypress.config.js +++ b/frontend/packages/shipwright-plugin/integration-tests/cypress.config.js @@ -14,6 +14,7 @@ module.exports = defineConfig({ requestTimeout: 15000, responseTimeout: 15000, fixturesFolder: 'testData', + video: true, reporter: '../../../node_modules/cypress-multi-reporters', reporterOptions: { configFile: 'reporter-config.json', From 965c2e92e35bb411a239fc7a760793e55dea6ece Mon Sep 17 00:00:00 2001 From: Robb Hamilton Date: Wed, 5 Mar 2025 10:09:23 -0500 Subject: [PATCH 051/102] OCPBUGS-52316: enable clicking outside NodeLogs Selects to close them --- .../console-app/src/components/nodes/NodeLogs.tsx | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/frontend/packages/console-app/src/components/nodes/NodeLogs.tsx b/frontend/packages/console-app/src/components/nodes/NodeLogs.tsx index 3882a0921c5..646a7036581 100644 --- a/frontend/packages/console-app/src/components/nodes/NodeLogs.tsx +++ b/frontend/packages/console-app/src/components/nodes/NodeLogs.tsx @@ -44,6 +44,7 @@ type LogControlsProps = { onChangePath: (event: React.ChangeEvent, newAPI: string) => void; path: string; isPathOpen: boolean; + setPathOpen: (value: boolean) => void; pathItems: string[]; isJournal: boolean; onChangeUnit: (value: string) => void; @@ -52,6 +53,7 @@ type LogControlsProps = { logFilenamesExist: boolean; onToggleFilename: () => void; onChangeFilename: (event: React.ChangeEvent, newFilename: string) => void; + setFilenameOpen: (value: boolean) => void; logFilename: string; isFilenameOpen: boolean; logFilenames: string[]; @@ -65,6 +67,7 @@ const LogControls: React.FC = ({ onChangePath, path, isPathOpen, + setPathOpen, pathItems, isJournal, onChangeUnit, @@ -75,6 +78,7 @@ const LogControls: React.FC = ({ onChangeFilename, logFilename, isFilenameOpen, + setFilenameOpen, logFilenames, isWrapLines, setWrapLines, @@ -113,6 +117,7 @@ const LogControls: React.FC = ({ {path} )} + onOpenChange={(open) => setPathOpen(open)} > {options(pathItems)} @@ -138,6 +143,7 @@ const LogControls: React.FC = ({ {logFilename || t('public~Select a log file')} )} + onOpenChange={(open) => setFilenameOpen(open)} > {options(logFilenames)} @@ -330,6 +336,7 @@ const NodeLogs: React.FC = ({ obj: node }) => { path={path} isPathOpen={isPathOpen} pathItems={pathItems} + setPathOpen={setPathOpen} isJournal={isJournal} onChangeUnit={onChangeUnit} unit={unit} @@ -339,6 +346,7 @@ const NodeLogs: React.FC = ({ obj: node }) => { onChangeFilename={onChangeFilename} logFilename={logFilename} isFilenameOpen={isFilenameOpen} + setFilenameOpen={setFilenameOpen} logFilenames={logFilenames} isWrapLines={isWrapLines} setWrapLines={setWrapLines} From a86144fc42be6a0d888ae9b654663370438aa9c3 Mon Sep 17 00:00:00 2001 From: Jakub Hadvig Date: Mon, 27 Jan 2025 19:08:50 +0100 Subject: [PATCH 052/102] OCPBUGS-37101: Remove logoutOpenShift method call --- frontend/public/components/masthead-toolbar.jsx | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/frontend/public/components/masthead-toolbar.jsx b/frontend/public/components/masthead-toolbar.jsx index 1d9c10f01f1..c64c664da5a 100644 --- a/frontend/public/components/masthead-toolbar.jsx +++ b/frontend/public/components/masthead-toolbar.jsx @@ -625,11 +625,7 @@ const MastheadToolbarContents = ({ consoleLinks, cv, isMastheadStacked }) => { setLastConsoleActivityTimestamp(); clearTimeout(userInactivityTimeout.current); userInactivityTimeout.current = setTimeout(() => { - if (openshiftFlag) { - authSvc.logoutOpenShift(isKubeAdmin); - } else { - authSvc.logout(); - } + authSvc.logout('', isKubeAdmin); }, window.SERVER_FLAGS.inactivityTimeout * 1000); }, [openshiftFlag, isKubeAdmin]); From e5e6ebb00a3d5d4acefeae5531d7f120e0ae9981 Mon Sep 17 00:00:00 2001 From: cyril-ui-developer Date: Thu, 13 Mar 2025 16:47:58 -0400 Subject: [PATCH 053/102] incorrect pod ready status --- frontend/public/module/k8s/pods.ts | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/frontend/public/module/k8s/pods.ts b/frontend/public/module/k8s/pods.ts index 183fa6ef2b6..bda4e819196 100644 --- a/frontend/public/module/k8s/pods.ts +++ b/frontend/public/module/k8s/pods.ts @@ -198,17 +198,21 @@ export const podRestarts = (pod: PodKind): number => { }; export const podReadiness = (pod: PodKind): { readyCount: number; totalContainers: number } => { - // Don't include init containers in readiness count. This is consistent with the CLI. + // Include init containers in readiness count if ready and started is true. This is consistent with the CLI. const containerStatuses = pod?.status?.containerStatuses || []; - return containerStatuses.reduce( - (acc, { ready }: ContainerStatus) => { - if (ready) { - acc.readyCount = acc.readyCount + 1; - } - return acc; - }, - { readyCount: 0, totalContainers: containerStatuses.length }, - ); + const initContainerStatuses = pod?.status?.initContainerStatuses || []; + + const totalContainers = + containerStatuses.length + initContainerStatuses.filter(({ started }) => started).length; + + const readyCount = + containerStatuses.reduce((acc, { ready }: ContainerStatus) => (ready ? acc + 1 : acc), 0) + + initContainerStatuses.reduce( + (acc, { started, ready }: ContainerStatus) => (started && ready ? acc + 1 : acc), + 0, + ); + + return { readyCount, totalContainers }; }; // This logic is replicated from k8s (at this writing, Kubernetes 1.17) From 56e860f98354f46c64f870c3848432b9d43b76f1 Mon Sep 17 00:00:00 2001 From: Robb Hamilton Date: Mon, 24 Mar 2025 14:12:23 -0400 Subject: [PATCH 054/102] OCPBUGS-53227: fix bug where /k8s/all-namespaces/volumesnapshots 404s --- frontend/public/components/app-contents.tsx | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/frontend/public/components/app-contents.tsx b/frontend/public/components/app-contents.tsx index 6b5df7e6c13..0c38b247170 100644 --- a/frontend/public/components/app-contents.tsx +++ b/frontend/public/components/app-contents.tsx @@ -12,6 +12,7 @@ import { useActivePerspective, Perspective } from '@console/dynamic-plugin-sdk'; import { useDynamicPluginInfo } from '@console/plugin-sdk/src/api/useDynamicPluginInfo'; import { FLAGS, useUserSettings, getPerspectiveVisitedKey, usePerspectives } from '@console/shared'; import { ErrorBoundaryPage } from '@console/shared/src/components/error'; +import { getReferenceForModel } from '@console/dynamic-plugin-sdk/src/utils/k8s'; import { connectToFlags } from '../reducers/connectToFlags'; import { flagPending, FlagsObject } from '../reducers/features'; import { GlobalNotifications } from './global-notifications'; @@ -555,14 +556,11 @@ const AppContents: React.FC<{}> = () => { } /> - import( - '@console/app/src/components/volume-snapshot/create-volume-snapshot/create-volume-snapshot' /* webpackChunkName: "create-volume-snapshot" */ - ).then((m) => m.VolumeSnapshot) - } + } /> From a389a126ee48e7710f94b18fcbeecd0deaecb2c2 Mon Sep 17 00:00:00 2001 From: Mylanos Date: Tue, 25 Mar 2025 16:47:28 +0100 Subject: [PATCH 055/102] CONSOLE-4404: Use attach instead of exec for accessing the terminal of the debug pod. kubectl/oc exec runs a command inside a new separate terminal outside of the main terminal process within the container. In contrast, attach connects directly to the standard output and error streams of an already running main process. This is crucial towards the fix of the logs not showing the executed commands within the debug pod, because both UI and CLI logs are retrieving history from the main terminal process. Attaching the debug terminal to the main process allows for continuous log updates and ensures that the logs reflect the active state. --- .../{pod-exec.jsx => pod-attach.jsx} | 32 +++---------------- frontend/public/components/pod.tsx | 2 +- 2 files changed, 6 insertions(+), 28 deletions(-) rename frontend/public/components/{pod-exec.jsx => pod-attach.jsx} (84%) diff --git a/frontend/public/components/pod-exec.jsx b/frontend/public/components/pod-attach.jsx similarity index 84% rename from frontend/public/components/pod-exec.jsx rename to frontend/public/components/pod-attach.jsx index 09a2a9d56e0..1797a1ab41b 100644 --- a/frontend/public/components/pod-exec.jsx +++ b/frontend/public/components/pod-attach.jsx @@ -14,19 +14,15 @@ import { Terminal } from './terminal'; import { WSFactory } from '../module/ws-factory'; import { resourceURL } from '../module/k8s'; import { PodModel } from '../models'; -import { isWindowsPod } from '../module/k8s/pods'; -// pod exec WS protocol is FD prefixed, base64 encoded data (sometimes json stringified) +// pod attach WS protocol is FD prefixed, base64 encoded data (sometimes json stringified) // Channel 0 is STDIN, 1 is STDOUT, 2 is STDERR (if TTY is not requested), and 3 is a special error channel - 4 is C&C // The server only reads from STDIN, writes to the other three. // see also: https://github.com/kubernetes/kubernetes/pull/13885 -const NO_SH = - 'starting container process caused "exec: \\"sh\\": executable file not found in $PATH"'; - -const PodExec_ = connectToFlags(FLAGS.OPENSHIFT)( - class PodExec extends React.PureComponent { +const PodAttach_ = connectToFlags(FLAGS.OPENSHIFT)( + class PodAttach extends React.PureComponent { constructor(props) { super(props); this.state = { @@ -47,19 +43,16 @@ const PodExec_ = connectToFlags(FLAGS.OPENSHIFT)( metadata: { name, namespace }, } = this.props.obj; const { activeContainer } = this.state; - const usedClient = this.props.flags[FLAGS.OPENSHIFT] ? 'oc' : 'kubectl'; - const command = isWindowsPod(this.props.obj) ? ['cmd'] : ['sh', '-i', '-c', 'TERM=xterm sh']; const params = { ns: namespace, name, - path: 'exec', + path: 'attach', queryParams: { stdout: 1, stdin: 1, stderr: 1, tty: 1, container: activeContainer, - command: command.map((c) => encodeURIComponent(c)).join('&command='), }, }; @@ -72,7 +65,6 @@ const PodExec_ = connectToFlags(FLAGS.OPENSHIFT)( const impersonate = getImpersonate(store.getState()) || {}; const subprotocols = (impersonate.subprotocols || []).concat('base64.channel.k8s.io'); - let previous; this.ws = new WSFactory(`${name}-terminal`, { host: 'auto', reconnect: true, @@ -82,26 +74,12 @@ const PodExec_ = connectToFlags(FLAGS.OPENSHIFT)( }) .onmessage((raw) => { const { current } = this.terminal; - // error channel - if (raw[0] === '3') { - if (previous.includes(NO_SH)) { - current.reset(); - current.onConnectionClosed( - `This container doesn't have a /bin/sh shell. Try specifying your command in a terminal with:\r\n\r\n ${usedClient} -n ${namespace} exec ${name} -ti `, - ); - this.ws.destroy(); - previous = ''; - return; - } - } const data = Base64.decode(raw.slice(1)); current && current.onDataReceived(data); - previous = data; }) .onopen(() => { const { current } = this.terminal; current && current.reset(); - previous = ''; this.setState({ open: true, error: null }); }) .onclose((evt) => { @@ -227,4 +205,4 @@ const PodExec_ = connectToFlags(FLAGS.OPENSHIFT)( }, ); -export const PodExec = withTranslation()(PodExec_); +export const PodAttach = withTranslation()(PodAttach_); diff --git a/frontend/public/components/pod.tsx b/frontend/public/components/pod.tsx index 9c51170248e..9850085d6b5 100644 --- a/frontend/public/components/pod.tsx +++ b/frontend/public/components/pod.tsx @@ -974,7 +974,7 @@ export const PodExecLoader: React.FC = ({
import('./pod-exec').then((c) => c.PodExec)} + loader={() => import('./pod-attach').then((c) => c.PodAttach)} obj={obj} message={message} infoMessage={infoMessage} From 83877ff51efa83b07ffc16e6d65a15e7b0fc65db Mon Sep 17 00:00:00 2001 From: Mylanos Date: Thu, 27 Mar 2025 22:39:20 +0100 Subject: [PATCH 056/102] OCPBUGS-53065: Change the configuration of debug pods to follow configuration in oc --- .../src/components/nodes/NodeTerminal.tsx | 79 +++++++++++++------ 1 file changed, 56 insertions(+), 23 deletions(-) diff --git a/frontend/packages/console-app/src/components/nodes/NodeTerminal.tsx b/frontend/packages/console-app/src/components/nodes/NodeTerminal.tsx index 6c532a89d27..37bd03b642d 100644 --- a/frontend/packages/console-app/src/components/nodes/NodeTerminal.tsx +++ b/frontend/packages/console-app/src/components/nodes/NodeTerminal.tsx @@ -33,9 +33,15 @@ const getDebugImage = async (): Promise => { } }; -const getDebugPod = async (name: string, namespace: string, nodeName: string): Promise => { +const getDebugPod = async ( + name: string, + namespace: string, + nodeName: string, + isWindows: boolean, +): Promise => { const image = await getDebugImage(); - return { + // configuration as specified in https://github.com/openshift/oc/blob/master/pkg/cli/debug/debug.go#L1024-L1114 + const template: PodKind = { kind: 'Pod', apiVersion: 'v1', metadata: { @@ -48,28 +54,24 @@ const getDebugPod = async (name: string, namespace: string, nodeName: string): P }, }, spec: { - activeDeadlineSeconds: 21600, - volumes: [ - { - name: 'host', - hostPath: { - path: '/', - type: 'Directory', - }, - }, - ], containers: [ { - name: 'container-00', - image, command: ['/bin/sh'], - resources: {}, - volumeMounts: [ + env: [ { - name: 'host', - mountPath: '/host', + // Set the Shell variable to auto-logout after 15m idle timeout + name: 'TMOUT', + value: '900', + }, + { + // this env requires to be set in order to collect more sos reports + name: 'HOST', + value: '/host', }, ], + image, + name: 'container-00', + resources: {}, securityContext: { privileged: true, runAsUser: 0, @@ -77,14 +79,43 @@ const getDebugPod = async (name: string, namespace: string, nodeName: string): P stdin: true, stdinOnce: true, tty: true, + volumeMounts: [ + { + name: 'host', + mountPath: '/host', + }, + ], }, ], - restartPolicy: 'Never', - nodeName, - hostNetwork: true, + hostIPC: true, hostPID: true, + hostNetwork: true, + nodeName, + restartPolicy: 'Never', + volumes: [ + { + name: 'host', + hostPath: { + path: '/', + type: 'Directory', + }, + }, + ], }, }; + + if (isWindows) { + template.spec.OS = 'windows'; + template.spec.hostPID = false; + template.spec.hostIPC = false; + const containerUser = 'ContainerUser'; + template.spec.containers[0].securityContext = { + windowsOptions: { + runAsUserName: containerUser, + }, + }; + } + return template; }; const NodeTerminalError: React.FC = ({ error }) => { @@ -128,6 +159,8 @@ const NodeTerminal: React.FC = ({ obj: node }) => { const [resources, setResources] = React.useState([]); const [errorMessage, setErrorMessage] = React.useState(''); const nodeName = node.metadata.name; + const isWindows = node.status?.nodeInfo?.operatingSystem === 'windows'; + React.useEffect(() => { let namespace; const name = `${nodeName?.replace(/\./g, '-')}-debug`; @@ -160,7 +193,7 @@ const NodeTerminal: React.FC = ({ obj: node }) => { }, }, }); - const podToCreate = await getDebugPod(name, namespace.metadata.name, nodeName); + const podToCreate = await getDebugPod(name, namespace.metadata.name, nodeName, isWindows); // wait for the namespace to be ready await new Promise((resolve) => setTimeout(resolve, 1000)); const debugPod = await k8sCreate(PodModel, podToCreate); @@ -188,7 +221,7 @@ const NodeTerminal: React.FC = ({ obj: node }) => { deleteNamespace(namespace.metadata.name); window.removeEventListener('beforeunload', closeTab); }; - }, [nodeName]); + }, [nodeName, isWindows]); return errorMessage ? ( From 525331a7f50bab98d10aaba20fb865b737b5e7ae Mon Sep 17 00:00:00 2001 From: Mylanos Date: Wed, 2 Apr 2025 10:54:04 +0200 Subject: [PATCH 057/102] OCPBUGS-53065: fix issue where attaching to standard pods via terminal caused terminals unresponsiveness Added a logic for passing a prop that specifies if the websocket will attach or exec to the given pod. Renamed the component to reflect the functional duality of the component. --- .../src/components/nodes/NodeTerminal.tsx | 9 ++--- frontend/public/components/debug-terminal.tsx | 4 +- .../{pod-attach.jsx => pod-connect.jsx} | 40 ++++++++++++++++--- frontend/public/components/pod.tsx | 11 +++-- 4 files changed, 47 insertions(+), 17 deletions(-) rename frontend/public/components/{pod-attach.jsx => pod-connect.jsx} (82%) diff --git a/frontend/packages/console-app/src/components/nodes/NodeTerminal.tsx b/frontend/packages/console-app/src/components/nodes/NodeTerminal.tsx index 37bd03b642d..52e4ed7accb 100644 --- a/frontend/packages/console-app/src/components/nodes/NodeTerminal.tsx +++ b/frontend/packages/console-app/src/components/nodes/NodeTerminal.tsx @@ -1,16 +1,15 @@ import * as React from 'react'; import { Alert } from '@patternfly/react-core'; import { useTranslation, Trans } from 'react-i18next'; +import { PodConnectLoader } from '@console/internal/components/pod'; import { Firehose, FirehoseResource, FirehoseResult, LoadingBox, } from '@console/internal/components/utils'; -import { NodeKind, PodKind } from '@console/internal/module/k8s'; -import { PodExecLoader } from '../../../../../public/components/pod'; -import { ImageStreamTagModel, NamespaceModel, PodModel } from '../../../../../public/models'; -import { k8sCreate, k8sGet, k8sKillByName } from '../../../../../public/module/k8s'; +import { ImageStreamTagModel, NamespaceModel, PodModel } from '@console/internal/models'; +import { NodeKind, PodKind, k8sCreate, k8sGet, k8sKillByName } from '@console/internal/module/k8s'; type NodeTerminalErrorProps = { error: React.ReactNode; @@ -149,7 +148,7 @@ const NodeTerminalInner: React.FC = ({ obj }) => { /> ); case 'Running': - return ; + return ; default: return ; } diff --git a/frontend/public/components/debug-terminal.tsx b/frontend/public/components/debug-terminal.tsx index 5dde03ac736..91bebca4ddf 100644 --- a/frontend/public/components/debug-terminal.tsx +++ b/frontend/public/components/debug-terminal.tsx @@ -6,7 +6,7 @@ import { Alert } from '@patternfly/react-core'; import { useTranslation } from 'react-i18next'; import { LoadingBox, PageHeading } from '@console/internal/components/utils'; import { ObjectMetadata, PodKind, k8sCreate, k8sKillByName } from '@console/internal/module/k8s'; -import { PodExecLoader } from '@console/internal/components/pod'; +import { PodConnectLoader } from '@console/internal/components/pod'; import { PodModel } from '@console/internal/models'; import { useK8sWatchResource } from '@console/internal/components/utils/k8s-watch-hook'; @@ -92,7 +92,7 @@ const DebugTerminalInner: React.FC = ({ debugPod, initi ); case 'Running': return ( - encodeURIComponent(c)).join('&command='), + }), }, }; @@ -65,6 +78,7 @@ const PodAttach_ = connectToFlags(FLAGS.OPENSHIFT)( const impersonate = getImpersonate(store.getState()) || {}; const subprotocols = (impersonate.subprotocols || []).concat('base64.channel.k8s.io'); + let previous; this.ws = new WSFactory(`${name}-terminal`, { host: 'auto', reconnect: true, @@ -74,12 +88,26 @@ const PodAttach_ = connectToFlags(FLAGS.OPENSHIFT)( }) .onmessage((raw) => { const { current } = this.terminal; + // error channel + if (raw[0] === '3') { + if (previous.includes(NO_SH)) { + current.reset(); + current.onConnectionClosed( + `This container doesn't have a /bin/sh shell. Try specifying your command in a terminal with:\r\n\r\n ${usedClient} -n ${namespace} exec ${name} -ti `, + ); + this.ws.destroy(); + previous = ''; + return; + } + } const data = Base64.decode(raw.slice(1)); current && current.onDataReceived(data); + previous = data; }) .onopen(() => { const { current } = this.terminal; current && current.reset(); + previous = ''; this.setState({ open: true, error: null }); }) .onclose((evt) => { @@ -205,4 +233,4 @@ const PodAttach_ = connectToFlags(FLAGS.OPENSHIFT)( }, ); -export const PodAttach = withTranslation()(PodAttach_); +export const PodConnect = withTranslation()(PodConnect_); diff --git a/frontend/public/components/pod.tsx b/frontend/public/components/pod.tsx index 9850085d6b5..f9489f2e9bd 100644 --- a/frontend/public/components/pod.tsx +++ b/frontend/public/components/pod.tsx @@ -963,22 +963,24 @@ const PodEnvironmentComponent = (props) => ( ); -export const PodExecLoader: React.FC = ({ +export const PodConnectLoader: React.FC = ({ obj, message, initialContainer, infoMessage, + attach = false, }) => (
import('./pod-attach').then((c) => c.PodAttach)} + loader={() => import('./pod-connect').then((c) => c.PodConnect)} obj={obj} message={message} infoMessage={infoMessage} initialContainer={initialContainer} + attach={attach} />
@@ -1012,7 +1014,7 @@ export const PodsDetailsPage: React.FC = (props) => { navFactory.envEditor(PodEnvironmentComponent), navFactory.logs(PodLogs), navFactory.events(ResourceEventStream), - navFactory.terminal(PodExecLoader), + navFactory.terminal(PodConnectLoader), ]} /> ); @@ -1244,11 +1246,12 @@ export type PodDetailsListProps = { pod: PodKind; }; -type PodExecLoaderProps = { +type PodConnectLoaderProps = { obj: PodKind; message?: React.ReactElement; infoMessage?: React.ReactElement; initialContainer?: string; + attach?: boolean; }; type PodDetailsProps = { From c410e999b133157ccdf4c595708b1cf072b556c4 Mon Sep 17 00:00:00 2001 From: Lokananda Prabhu Date: Wed, 19 Mar 2025 15:44:09 +0530 Subject: [PATCH 058/102] Resolved edit issue for private git repo using docker file --- .../edit-application/EditApplicationForm.tsx | 2 +- .../src/components/import/git/GitSection.tsx | 10 +++++++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/frontend/packages/dev-console/src/components/edit-application/EditApplicationForm.tsx b/frontend/packages/dev-console/src/components/edit-application/EditApplicationForm.tsx index b1dba7eedb1..39926860f67 100644 --- a/frontend/packages/dev-console/src/components/edit-application/EditApplicationForm.tsx +++ b/frontend/packages/dev-console/src/components/edit-application/EditApplicationForm.tsx @@ -49,7 +49,7 @@ const EditApplicationForm: React.FC< {flowType === ApplicationFlowType.Git && } {flowType === ApplicationFlowType.Dockerfile && ( - + )} {flowType === ApplicationFlowType.Git && ( = ({ @@ -90,6 +92,7 @@ const GitSection: React.FC = ({ importType, imageStreamName, autoFocus = true, + flowType, }) => { const { t } = useTranslation(); const inputRef = React.useRef(); @@ -311,7 +314,11 @@ const GitSection: React.FC = ({ recommendedStrategy: null, showEditImportStrategy: true, }); - setFieldValue('build.strategy', BuildStrategyType.Source); + if (flowType === ApplicationFlowType.Dockerfile) { + setFieldValue('build.strategy', BuildStrategyType.Docker); + } else { + setFieldValue('build.strategy', BuildStrategyType.Source); + } return; } @@ -417,6 +424,7 @@ const GitSection: React.FC = ({ handleBuilderImageRecommendation, builderImages, handleDevfileStrategyDetection, + flowType, ], ); From d0521710d689e8fe70df2a6010258da9e4b7fb04 Mon Sep 17 00:00:00 2001 From: Lokananda Prabhu Date: Tue, 1 Apr 2025 16:37:49 +0530 Subject: [PATCH 059/102] Fetching taskRuns in PLR details page using PLR UID also --- .../pipelineruns/detail-page-tabs/TaskRuns.tsx | 7 ++++++- .../src/components/pipelineruns/hooks/useTaskRuns.ts | 11 ++++++++++- .../src/components/pipelines/const.ts | 1 + .../taskruns/list-page/TaskRunsListPage.tsx | 9 ++++++++- 4 files changed, 25 insertions(+), 3 deletions(-) diff --git a/frontend/packages/pipelines-plugin/src/components/pipelineruns/detail-page-tabs/TaskRuns.tsx b/frontend/packages/pipelines-plugin/src/components/pipelineruns/detail-page-tabs/TaskRuns.tsx index 2a8827089eb..120373c440f 100644 --- a/frontend/packages/pipelines-plugin/src/components/pipelineruns/detail-page-tabs/TaskRuns.tsx +++ b/frontend/packages/pipelines-plugin/src/components/pipelineruns/detail-page-tabs/TaskRuns.tsx @@ -17,7 +17,12 @@ const TaskRuns: React.FC = ({ obj }) => { { const selector: Selector = React.useMemo(() => { + if (pipelineRunName && pipelineRunUid) { + return { + matchLabels: { + [TektonResourceLabel.pipelinerun]: pipelineRunName, + [TektonResourceLabel.pipelineRunUid]: pipelineRunUid, + }, + }; + } if (pipelineRunName) { return { matchLabels: { [TektonResourceLabel.pipelinerun]: pipelineRunName } }; } @@ -19,7 +28,7 @@ export const useTaskRuns = ( return { matchLabels: { [TektonResourceLabel.pipelineTask]: taskName } }; } return undefined; - }, [taskName, pipelineRunName]); + }, [taskName, pipelineRunName, pipelineRunUid]); const [taskRuns, loaded, error, getNextPage] = useTaskRuns2( namespace, selector && { diff --git a/frontend/packages/pipelines-plugin/src/components/pipelines/const.ts b/frontend/packages/pipelines-plugin/src/components/pipelines/const.ts index 6b50dff1cb2..b073e727c56 100644 --- a/frontend/packages/pipelines-plugin/src/components/pipelines/const.ts +++ b/frontend/packages/pipelines-plugin/src/components/pipelines/const.ts @@ -24,6 +24,7 @@ export enum TektonTaskLabel { export enum TektonResourceLabel { pipeline = 'tekton.dev/pipeline', pipelinerun = 'tekton.dev/pipelineRun', + pipelineRunUid = 'tekton.dev/pipelineRunUID', taskrun = 'tekton.dev/taskRun', pipelineTask = 'tekton.dev/pipelineTask', } diff --git a/frontend/packages/pipelines-plugin/src/components/taskruns/list-page/TaskRunsListPage.tsx b/frontend/packages/pipelines-plugin/src/components/taskruns/list-page/TaskRunsListPage.tsx index f31a17b05fe..4babc4b3dea 100644 --- a/frontend/packages/pipelines-plugin/src/components/taskruns/list-page/TaskRunsListPage.tsx +++ b/frontend/packages/pipelines-plugin/src/components/taskruns/list-page/TaskRunsListPage.tsx @@ -38,7 +38,14 @@ const TaskRunsListPage: React.FC< const ns = namespace || params?.ns; const badge = usePipelineTechPreviewBadge(ns); const trForPlr = props.selector && props.selector?.matchLabels?.['tekton.dev/pipelineRun']; - const [taskRuns, taskRunsLoaded, taskRunsLoadError, getNextPage] = useTaskRuns(ns, trForPlr); + const trForPlrUid = props.selector && props.selector?.matchLabels?.['tekton.dev/pipelineRunUID']; + const [taskRuns, taskRunsLoaded, taskRunsLoadError, getNextPage] = useTaskRuns( + ns, + trForPlr, + undefined, + undefined, + trForPlrUid, + ); const taskRunsResource = { [referenceForModel(TaskRunModel)]: { From 9a8d003dc8dc3716f74fd223b7d514aa1b6bcfd4 Mon Sep 17 00:00:00 2001 From: Jon Jackson Date: Wed, 5 Mar 2025 14:42:30 -0500 Subject: [PATCH 060/102] OCPBUGS-45371: Fix issue where TokenReview was not working as expected (#14681) * OCPBUGS-45371: Fix issue where TokenReview was not working as expected We expected the console service account bearer token to be present on the internal k8s REST configuration, but it was not. This caused all TokenReview requests to be skipped since no bearer token was available to make the requests. Also, we found that adding token review requests to all authenticated requests caused some performance issues, so we added token review only to endpoints affected by this bug. - Update OpenShift authenticator to use a k8s client-go Clientset to make TokenReview requests. This Clientset is configured using the same REST config that the main server uses to proxy console service account delegated requests, meaning whatever console service account bearer token is configured on the main server is the same one used for TokenReview requests. - Update main.go to accept an off-cluster bearer token, which is used to make console service account delegated requests in an off-cluster, auth-enabled environment. - Update the README instructions for auth-enabled dev environments to include setting up a console service account API token and consume it through the new bridge arg. - Update `examples/run-bridge.sh` to consume an off-cluster service acccount token file - Move token review to the parent Authenticator interface so that it can be used as a middleware funciton - Add a middleware function for token review - Add token review middleware to endpoints affected by this bug * Address PR review comments * nits --- README.md | 14 ++-- cmd/bridge/main.go | 5 ++ examples/.gitignore | 3 + examples/run-bridge.sh | 1 + examples/sa-secrets.yaml | 26 ------ examples/secret.yaml | 8 ++ pkg/auth/oauth2/auth.go | 55 +++++++++++- pkg/auth/oauth2/auth_openshift.go | 101 ++--------------------- pkg/auth/oauth2/auth_test.go | 5 ++ pkg/auth/sessions/server_session.go | 13 +++ pkg/auth/sessions/server_session_test.go | 37 +++++++++ pkg/auth/static/auth.go | 4 + pkg/auth/types.go | 1 + pkg/server/middleware.go | 14 ++++ pkg/server/server.go | 28 ++++--- 15 files changed, 171 insertions(+), 144 deletions(-) delete mode 100644 examples/sa-secrets.yaml create mode 100644 examples/secret.yaml diff --git a/README.md b/README.md index 5a1b24dfc9c..b8f02d97369 100644 --- a/README.md +++ b/README.md @@ -77,17 +77,13 @@ oc process -f examples/console-oauth-client.yaml | oc apply -f - oc get oauthclient console-oauth-client -o jsonpath='{.secret}' > examples/console-client-secret ``` -If the CA bundle of the OpenShift API server is unavailable, fetch the CA -certificates from a service account secret. Due to [upstream changes](https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/#manually-create-an-api-token-for-a-serviceaccount), -these service account secrets need to be created manually. -Otherwise copy the CA bundle to -`examples/ca.crt`: +Create a long-lived API token Secret for the console ServiceAccount and extract it to the +`examples` folder. This creates the `token` and `ca.crt` files, which are necessary for `bridge` to +proxy API server requests: ``` -oc apply -f examples/sa-secrets.yaml -oc get secrets -n default --field-selector type=kubernetes.io/service-account-token -o json | \ - jq '.items[0].data."ca.crt"' -r | python -m base64 -d > examples/ca.crt -# Note: use "openssl base64" because the "base64" tool is different between mac and linux +oc apply -f examples/secret.yaml +oc extract secret/off-cluster-token -n openshift-console --to ./examples --confirm ``` Finally run the console and visit [localhost:9000](http://localhost:9000): diff --git a/cmd/bridge/main.go b/cmd/bridge/main.go index 0ad656eb4cd..3cd5ccd3297 100644 --- a/cmd/bridge/main.go +++ b/cmd/bridge/main.go @@ -90,6 +90,7 @@ func main() { fK8sModeOffClusterThanos := fs.String("k8s-mode-off-cluster-thanos", "", "DEV ONLY. URL of the cluster's Thanos server.") fK8sModeOffClusterAlertmanager := fs.String("k8s-mode-off-cluster-alertmanager", "", "DEV ONLY. URL of the cluster's AlertManager server.") fK8sModeOffClusterCatalogd := fs.String("k8s-mode-off-cluster-catalogd", "", "DEV ONLY. URL of the cluster's catalogd server.") + fK8sModeOffClusterServiceAccountBearerTokenFile := fs.String("k8s-mode-off-cluster-service-account-bearer-token-file", "", "DEV ONLY. bearer token file for the service account used for internal K8s API server calls.") fK8sAuth := fs.String("k8s-auth", "", "this option is deprecated, setting it has no effect") @@ -439,6 +440,10 @@ func main() { Transport: &http.Transport{TLSClientConfig: serviceProxyTLSConfig}, } + if *fK8sModeOffClusterServiceAccountBearerTokenFile != "" { + srv.InternalProxiedK8SClientConfig.BearerTokenFile = *fK8sModeOffClusterServiceAccountBearerTokenFile + } + srv.K8sProxyConfig = &proxy.Config{ TLSClientConfig: serviceProxyTLSConfig, HeaderBlacklist: []string{"Cookie", "X-CSRFToken"}, diff --git a/examples/.gitignore b/examples/.gitignore index e00475a5e07..8ce7cd424ab 100644 --- a/examples/.gitignore +++ b/examples/.gitignore @@ -1,3 +1,6 @@ ca.crt console-client-secret config.local.yaml +service-ca.crt +namespace +token diff --git a/examples/run-bridge.sh b/examples/run-bridge.sh index c3769fd0f86..5b5fc1501b6 100755 --- a/examples/run-bridge.sh +++ b/examples/run-bridge.sh @@ -14,6 +14,7 @@ set -exuo pipefail --user-auth-oidc-client-id=console-oauth-client \ --user-auth-oidc-client-secret-file=examples/console-client-secret \ --user-auth-oidc-ca-file=examples/ca.crt \ + --k8s-mode-off-cluster-service-account-bearer-token-file=examples/token \ --k8s-mode-off-cluster-alertmanager="$(oc -n openshift-config-managed get configmap monitoring-shared-config -o jsonpath='{.data.alertmanagerPublicURL}')" \ --k8s-mode-off-cluster-thanos="$(oc -n openshift-config-managed get configmap monitoring-shared-config -o jsonpath='{.data.thanosPublicURL}')" \ $@ diff --git a/examples/sa-secrets.yaml b/examples/sa-secrets.yaml deleted file mode 100644 index 4538744c514..00000000000 --- a/examples/sa-secrets.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: v1 -kind: Secret -metadata: - name: builder-token - namespace: default - annotations: - kubernetes.io/service-account.name: builder -type: kubernetes.io/service-account-token ---- -apiVersion: v1 -kind: Secret -metadata: - name: default-token - namespace: default - annotations: - kubernetes.io/service-account.name: default -type: kubernetes.io/service-account-token ---- -apiVersion: v1 -kind: Secret -metadata: - name: deployer-token - namespace: default - annotations: - kubernetes.io/service-account.name: deployer -type: kubernetes.io/service-account-token diff --git a/examples/secret.yaml b/examples/secret.yaml new file mode 100644 index 00000000000..2b2a4ef99f1 --- /dev/null +++ b/examples/secret.yaml @@ -0,0 +1,8 @@ +apiVersion: v1 +kind: Secret +metadata: + name: off-cluster-token + namespace: openshift-console + annotations: + kubernetes.io/service-account.name: console +type: kubernetes.io/service-account-token diff --git a/pkg/auth/oauth2/auth.go b/pkg/auth/oauth2/auth.go index a297da9a547..999512e8e9e 100644 --- a/pkg/auth/oauth2/auth.go +++ b/pkg/auth/oauth2/auth.go @@ -6,6 +6,7 @@ import ( "crypto/tls" "crypto/x509" "encoding/hex" + "errors" "fmt" "io" "net/http" @@ -21,6 +22,9 @@ import ( "github.com/openshift/console/pkg/auth/sessions" oscrypto "github.com/openshift/library-go/pkg/crypto" + authv1 "k8s.io/api/authentication/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/client-go/kubernetes" "k8s.io/client-go/rest" "k8s.io/klog/v2" ) @@ -47,7 +51,8 @@ var ( ) type OAuth2Authenticator struct { - clientFunc func() *http.Client + clientFunc func() *http.Client + internalK8sClientset *kubernetes.Clientset clientID string clientSecret string @@ -133,7 +138,8 @@ type Config struct { type completedConfig struct { *Config - clientFunc func() *http.Client + clientFunc func() *http.Client + internalK8sClientset *kubernetes.Clientset } func newHTTPClient(issuerCA string, includeSystemRoots bool) (*http.Client, error) { @@ -259,7 +265,8 @@ func (a *OAuth2Authenticator) oauth2ConfigConstructor(endpointConfig oauth2.Endp func newUnstartedAuthenticator(c *completedConfig) *OAuth2Authenticator { return &OAuth2Authenticator{ - clientFunc: c.clientFunc, + clientFunc: c.clientFunc, + internalK8sClientset: c.internalK8sClientset, clientID: c.ClientID, clientSecret: c.ClientSecret, @@ -297,6 +304,42 @@ func (a *OAuth2Authenticator) LoginFunc(w http.ResponseWriter, r *http.Request) http.Redirect(w, r, a.oauth2Config().AuthCodeURL(state), http.StatusSeeOther) } +func (a *OAuth2Authenticator) ReviewToken(r *http.Request) error { + token, err := sessions.GetSessionTokenFromCookie(r) + if err != nil { + return err + } + + tokenReview := &authv1.TokenReview{ + TypeMeta: metav1.TypeMeta{ + APIVersion: "authentication.k8s.io/v1", + Kind: "TokenReview", + }, + Spec: authv1.TokenReviewSpec{ + Token: token, + }, + } + + completedTokenReview, err := a. + internalK8sClientset. + AuthenticationV1(). + TokenReviews(). + Create(r.Context(), tokenReview, metav1.CreateOptions{}) + + if err != nil { + return fmt.Errorf("failed to create TokenReview, %v", err) + } + + // Check if the token is authenticated + if !completedTokenReview.Status.Authenticated { + if completedTokenReview.Status.Error != "" { + return errors.New(completedTokenReview.Status.Error) + } + return errors.New("failed to authenticate the token, unknownd error") + } + return nil +} + // LogoutFunc cleans up session cookies. func (a *OAuth2Authenticator) LogoutFunc(w http.ResponseWriter, r *http.Request) { if a.metrics != nil { @@ -412,6 +455,12 @@ func (c *Config) Complete() (*completedConfig, error) { } completed.clientFunc = clientFunc + internalK8sClientset, err := kubernetes.NewForConfig(c.K8sConfig) + if err != nil { + return nil, fmt.Errorf("failed to create K8s Clientset: %v", err) + } + completed.internalK8sClientset = internalK8sClientset + errURL := "/" if c.ErrorURL != "" { errURL = c.ErrorURL diff --git a/pkg/auth/oauth2/auth_openshift.go b/pkg/auth/oauth2/auth_openshift.go index 88a64a920cc..23ab4d10f02 100644 --- a/pkg/auth/oauth2/auth_openshift.go +++ b/pkg/auth/oauth2/auth_openshift.go @@ -1,13 +1,11 @@ package oauth2 import ( - "bytes" "context" "crypto/sha256" "encoding/base64" "encoding/json" "fmt" - "io/ioutil" "net/http" "net/url" "strings" @@ -15,7 +13,6 @@ import ( "golang.org/x/oauth2" - authv1 "k8s.io/api/authentication/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/client-go/rest" "k8s.io/klog/v2" @@ -28,8 +25,6 @@ import ( "github.com/openshift/console/pkg/serverutils/asynccache" ) -const tokenReviewPath = "/apis/authentication.k8s.io/v1/tokenreviews" - // openShiftAuth implements OpenShift Authentication as defined in: // https://access.redhat.com/documentation/en-us/openshift_container_platform/4.9/html/authentication_and_authorization/understanding-authentication type openShiftAuth struct { @@ -65,8 +60,8 @@ func newOpenShiftAuth(ctx context.Context, k8sClient *http.Client, c *oidcConfig k8sClient: k8sClient, } - // TODO: repeat the discovery several times as in the auth.go logic var err error + // TODO: repeat the discovery several times as in the auth.go logic o.oauthEndpointCache, err = asynccache.NewAsyncCache[*oidcDiscovery](ctx, 5*time.Minute, o.getOIDCDiscoveryInternal) if err != nil { return nil, fmt.Errorf("failed to construct OAuth endpoint cache: %w", err) @@ -192,7 +187,7 @@ func (o *openShiftAuth) logout(w http.ResponseWriter, r *http.Request) { return } - cookie, err := r.Cookie(sessions.OpenshiftAccessTokenCookieName) + token, err := sessions.GetSessionTokenFromCookie(r) if err != nil { klog.V(4).Infof("the session cookie is not present: %v", err) w.WriteHeader(http.StatusNoContent) @@ -202,7 +197,7 @@ func (o *openShiftAuth) logout(w http.ResponseWriter, r *http.Request) { configWithBearerToken := &rest.Config{ Host: "https://" + k8sURL.Host, Transport: o.k8sClient.Transport, - BearerToken: cookie.Value, + BearerToken: token, Timeout: 30 * time.Second, } @@ -212,7 +207,7 @@ func (o *openShiftAuth) logout(w http.ResponseWriter, r *http.Request) { http.Error(w, "removing the session failed", http.StatusInternalServerError) return } - err = oauthClient.OAuthAccessTokens().Delete(ctx, tokenToObjectName(cookie.Value), metav1.DeleteOptions{}) + err = oauthClient.OAuthAccessTokens().Delete(ctx, tokenToObjectName(token), metav1.DeleteOptions{}) if err != nil { http.Error(w, "removing the session failed", http.StatusInternalServerError) return @@ -225,96 +220,14 @@ func (o *openShiftAuth) logout(w http.ResponseWriter, r *http.Request) { func (o *openShiftAuth) LogoutRedirectURL() string { return o.logoutRedirectOverride } - -func (o *openShiftAuth) reviewToken(token string) (*authv1.TokenReview, error) { - tokenReviewURL, err := url.Parse(o.issuerURL) - if err != nil { - return nil, err - } - tokenReviewURL.Path = tokenReviewPath - - tokenReview := &authv1.TokenReview{ - TypeMeta: metav1.TypeMeta{ - APIVersion: "authentication.k8s.io/v1", - Kind: "TokenReview", - }, - Spec: authv1.TokenReviewSpec{ - Token: token, - }, - } - - tokenReviewJSON, err := json.Marshal(tokenReview) - if err != nil { - return nil, err - } - - req, err := http.NewRequest(http.MethodPost, tokenReviewURL.String(), bytes.NewBuffer(tokenReviewJSON)) - if err != nil { - return nil, err - } - - req.Header.Set("Authorization", fmt.Sprintf("Bearer %s", o.internalK8sConfig.BearerToken)) - - res, err := o.k8sClient.Do(req) - if err != nil { - return nil, err - } - defer res.Body.Close() - - if res.StatusCode != http.StatusCreated { - return nil, fmt.Errorf("unable to validate user token: %v", res.Status) - } - - body, err := ioutil.ReadAll(res.Body) - if err != nil { - return nil, err - } - - // Unmarshal the response into a TokenReview object - var responseTokenReview authv1.TokenReview - err = json.Unmarshal(body, &responseTokenReview) - if err != nil { - return nil, err - } - - // Check if the token is authenticated - if !responseTokenReview.Status.Authenticated { - err := fmt.Errorf("invalid token: %v", token) - if responseTokenReview.Status.Error != "" { - err = fmt.Errorf("invalid token: %s", responseTokenReview.Status.Error) - } - return nil, err - } - - return tokenReview, nil -} - func (o *openShiftAuth) Authenticate(_ http.ResponseWriter, r *http.Request) (*auth.User, error) { - cookie, err := r.Cookie(sessions.OpenshiftAccessTokenCookieName) + token, err := sessions.GetSessionTokenFromCookie(r) if err != nil { - return nil, err - } - - if cookie.Value == "" { - return nil, fmt.Errorf("unauthenticated, no value for cookie %s", sessions.OpenshiftAccessTokenCookieName) - } - - if o.internalK8sConfig.BearerToken != "" { - tokenReviewResponse, err := o.reviewToken(cookie.Value) - if err != nil { - klog.Errorf("failed to authenticate user token: %v", err) - return nil, err - } - return &auth.User{ - Token: cookie.Value, - Username: tokenReviewResponse.Status.User.Username, - ID: tokenReviewResponse.Status.User.UID, - }, nil + return nil, fmt.Errorf("failed to get session token: %v", err) } - klog.V(4).Info("TokenReview skipped, no bearer token is set on internal K8s rest config") return &auth.User{ - Token: cookie.Value, + Token: token, }, nil } diff --git a/pkg/auth/oauth2/auth_test.go b/pkg/auth/oauth2/auth_test.go index e60f048623b..d88c3af7d6f 100644 --- a/pkg/auth/oauth2/auth_test.go +++ b/pkg/auth/oauth2/auth_test.go @@ -7,6 +7,8 @@ import ( "net/http/httptest" "net/url" "testing" + + "k8s.io/client-go/rest" ) // mockOpenShiftProvider is test OpenShift provider that only supports discovery @@ -50,6 +52,7 @@ func TestNewAuthenticator(t *testing.T) { SuccessURL: sucURL, CookiePath: "/", SecureCookies: true, + K8sConfig: &rest.Config{}, } ctx, cancel := context.WithCancel(context.Background()) @@ -97,6 +100,7 @@ func TestNewOpenShiftAuthenticator(t *testing.T) { SuccessURL: sucURL, CookiePath: "/", SecureCookies: true, + K8sConfig: &rest.Config{}, } ctx, cancel := context.WithCancel(context.Background()) @@ -137,6 +141,7 @@ func TestRedirectAuthError(t *testing.T) { SuccessURL: sucURL, CookiePath: "/", SecureCookies: true, + K8sConfig: &rest.Config{}, } ccfg, err := cfg.Complete() diff --git a/pkg/auth/sessions/server_session.go b/pkg/auth/sessions/server_session.go index 14ffce48f7f..1f80c6270f6 100644 --- a/pkg/auth/sessions/server_session.go +++ b/pkg/auth/sessions/server_session.go @@ -2,6 +2,7 @@ package sessions import ( "fmt" + "net/http" "slices" "sort" "sync" @@ -192,3 +193,15 @@ func spliceOut(slice []*LoginState, toRemove *LoginState) []*LoginState { } return slice } + +func GetSessionTokenFromCookie(r *http.Request) (string, error) { + cookie, err := r.Cookie(OpenshiftAccessTokenCookieName) + if err != nil { + return "", err + } + + if cookie.Value == "" { + return "", fmt.Errorf("unauthenticated, no value for cookie %s", OpenshiftAccessTokenCookieName) + } + return cookie.Value, nil +} diff --git a/pkg/auth/sessions/server_session_test.go b/pkg/auth/sessions/server_session_test.go index 0fd60a91033..d37d8cd9625 100644 --- a/pkg/auth/sessions/server_session_test.go +++ b/pkg/auth/sessions/server_session_test.go @@ -2,6 +2,7 @@ package sessions import ( "fmt" + "net/http" "reflect" "strconv" "sync" @@ -330,6 +331,42 @@ func TestSessionStore_pruneSessions(t *testing.T) { } } +func TestSessionStore_GetSessionTokenFromCookie(t *testing.T) { + // Returns the token when it exists + r, err := http.NewRequest("GET", "/", nil) + if err != nil { + t.Fatal(err) + } + cookie := &http.Cookie{ + Name: OpenshiftAccessTokenCookieName, + Value: "test", + } + r.AddCookie(cookie) + token, err := GetSessionTokenFromCookie(r) + require.Nil(t, err) + require.Equal(t, "test", token) + + // Returns an error when cookie value is empty + r, err = http.NewRequest("GET", "/", nil) + if err != nil { + t.Fatal(err) + } + cookie.Value = "" + r.AddCookie(cookie) + token, err = GetSessionTokenFromCookie(r) + require.NotNil(t, err) + require.Equal(t, "", token) + + // Returns an error when no cookie exists + r, err = http.NewRequest("GET", "/", nil) + if err != nil { + t.Fatal(err) + } + token, err = GetSessionTokenFromCookie(r) + require.NotNil(t, err) + require.Equal(t, "", token) +} + func withServerSessions(sessions ...*LoginState) func(ss *SessionStore) { return func(ss *SessionStore) { for _, s := range sessions { diff --git a/pkg/auth/static/auth.go b/pkg/auth/static/auth.go index 1a1da0516e4..a4e42b4ba36 100644 --- a/pkg/auth/static/auth.go +++ b/pkg/auth/static/auth.go @@ -22,6 +22,10 @@ func (s *StaticAuthenticator) Authenticate(w http.ResponseWriter, req *http.Requ return &userCopy, nil } +func (s *StaticAuthenticator) ReviewToken(r *http.Request) error { + return nil +} + func (s *StaticAuthenticator) LoginFunc(w http.ResponseWriter, req *http.Request) { w.WriteHeader(http.StatusNoContent) } diff --git a/pkg/auth/types.go b/pkg/auth/types.go index 422af105e01..532ba854538 100644 --- a/pkg/auth/types.go +++ b/pkg/auth/types.go @@ -8,6 +8,7 @@ import ( type Authenticator interface { Authenticate(w http.ResponseWriter, req *http.Request) (*User, error) + ReviewToken(r *http.Request) error LoginFunc(w http.ResponseWriter, req *http.Request) LogoutFunc(w http.ResponseWriter, req *http.Request) diff --git a/pkg/server/middleware.go b/pkg/server/middleware.go index 1de3e9bf692..98de933863f 100644 --- a/pkg/server/middleware.go +++ b/pkg/server/middleware.go @@ -43,6 +43,20 @@ func authMiddlewareWithUser(authenticator auth.Authenticator, csrfVerifier *csrf ) } +func withTokenReview(authenticator auth.Authenticator, h http.HandlerFunc) http.HandlerFunc { + return http.HandlerFunc( + func(w http.ResponseWriter, r *http.Request) { + err := authenticator.ReviewToken(r) + if err != nil { + klog.Errorf("TOKEN_REVIEW: '%s %s' unauthorized, invalid user token, %v", r.Method, r.URL.Path, err) + w.WriteHeader(http.StatusUnauthorized) + return + } + klog.V(4).Infof("TOKEN_REVIEW: '%s %s' user token successfully validated", r.Method, r.URL.Path) + h(w, r) + }) +} + func allowMethods(methods []string, h http.HandlerFunc) http.HandlerFunc { return func(w http.ResponseWriter, r *http.Request) { for _, method := range methods { diff --git a/pkg/server/server.go b/pkg/server/server.go index de0cf9c4b2a..1229888fbd9 100644 --- a/pkg/server/server.go +++ b/pkg/server/server.go @@ -288,10 +288,14 @@ func (s *Server) HTTPHandler() (http.Handler, error) { authHandlerWithUser := func(h HandlerWithUser) http.HandlerFunc { return authMiddlewareWithUser(authenticator, s.CSRFVerifier, h) } + + tokenReviewHandler := func(h http.HandlerFunc) http.HandlerFunc { + return authHandler(withTokenReview(authenticator, h)) + } handleFunc(authLoginEndpoint, s.Authenticator.LoginFunc) handleFunc(authLogoutEndpoint, allowMethod(http.MethodPost, s.handleLogout)) handleFunc(AuthLoginCallbackEndpoint, s.Authenticator.CallbackFunc(fn)) - handle(copyLoginEndpoint, authHandler(s.handleCopyLogin)) + handle(copyLoginEndpoint, tokenReviewHandler(s.handleCopyLogin)) handleFunc("/api/", notFoundHandler) @@ -461,7 +465,7 @@ func (s *Server) HTTPHandler() (http.Handler, error) { }), )) - handle("/api/console/monitoring-dashboard-config", authHandler(s.handleMonitoringDashboardConfigmaps)) + handle("/api/console/monitoring-dashboard-config", tokenReviewHandler(s.handleMonitoringDashboardConfigmaps)) // Knative trimURLPrefix := proxy.SingleJoiningSlash(s.BaseURL.Path, knativeProxyEndpoint) knativeHandler := knative.NewKnativeHandler( @@ -472,8 +476,8 @@ func (s *Server) HTTPHandler() (http.Handler, error) { handle(knativeProxyEndpoint, authHandlerWithUser(knativeHandler.Handle)) // TODO: move the knative-event-sources and knative-channels handler into the knative module. - handle("/api/console/knative-event-sources", authHandler(s.handleKnativeEventSourceCRDs)) - handle("/api/console/knative-channels", authHandler(s.handleKnativeChannelCRDs)) + handle("/api/console/knative-event-sources", tokenReviewHandler(s.handleKnativeEventSourceCRDs)) + handle("/api/console/knative-channels", tokenReviewHandler(s.handleKnativeChannelCRDs)) // Dev-Console Proxy handle(devConsoleEndpoint, http.StripPrefix( @@ -519,7 +523,7 @@ func (s *Server) HTTPHandler() (http.Handler, error) { handle(pluginAssetsEndpoint, http.StripPrefix( proxy.SingleJoiningSlash(s.BaseURL.Path, pluginAssetsEndpoint), - authHandler(func(w http.ResponseWriter, r *http.Request) { + tokenReviewHandler(func(w http.ResponseWriter, r *http.Request) { pluginsHandler.HandlePluginAssets(w, r) }), )) @@ -557,7 +561,7 @@ func (s *Server) HTTPHandler() (http.Handler, error) { } } - handle(updatesEndpoint, authHandler(func(w http.ResponseWriter, r *http.Request) { + handle(updatesEndpoint, tokenReviewHandler(func(w http.ResponseWriter, r *http.Request) { if r.Method != "GET" { w.Header().Set("Allow", "GET") serverutils.SendResponse(w, http.StatusMethodNotAllowed, serverutils.ApiError{Err: "Method unsupported, the only supported methods is GET"}) @@ -596,13 +600,13 @@ func (s *Server) HTTPHandler() (http.Handler, error) { prometheus.MustRegister(s.AuthMetrics.GetCollectors()...) handle("/metrics", metrics.AddHeaderAsCookieMiddleware( - authHandler(func(w http.ResponseWriter, r *http.Request) { + tokenReviewHandler(func(w http.ResponseWriter, r *http.Request) { promhttp.Handler().ServeHTTP(w, r) }), )) - handleFunc("/metrics/usage", func(w http.ResponseWriter, r *http.Request) { + handleFunc("/metrics/usage", tokenReviewHandler(func(w http.ResponseWriter, r *http.Request) { usage.Handle(usageMetrics, w, r) - }) + })) handle("/api/helm/template", authHandlerWithUser(helmHandlers.HandleHelmRenderManifests)) handle("/api/helm/releases", authHandlerWithUser(helmHandlers.HandleHelmList)) @@ -647,11 +651,11 @@ func (s *Server) HTTPHandler() (http.Handler, error) { gitopsProxy := proxy.NewProxy(s.GitOpsProxyConfig) handle(gitopsEndpoint, http.StripPrefix( proxy.SingleJoiningSlash(s.BaseURL.Path, gitopsEndpoint), - authHandler(gitopsProxy.ServeHTTP), - )) + tokenReviewHandler(gitopsProxy.ServeHTTP)), + ) } - handle("/api/console/version", authHandler(s.versionHandler)) + handle("/api/console/version", tokenReviewHandler(s.versionHandler)) mux.HandleFunc(s.BaseURL.Path, s.indexHandler) From ff479e8d164da33764e22b0be9574ef4fa894024 Mon Sep 17 00:00:00 2001 From: Robb Hamilton Date: Mon, 21 Apr 2025 14:36:40 -0400 Subject: [PATCH 061/102] OCPBUGS-54601: fix bug where operator appears twice when disableCopiedCSVs is true and the selected project matches the operator's default namespace --- .../src/components/clusterserviceversion.tsx | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/frontend/packages/operator-lifecycle-manager/src/components/clusterserviceversion.tsx b/frontend/packages/operator-lifecycle-manager/src/components/clusterserviceversion.tsx index c85b402a9be..1134022e46a 100644 --- a/frontend/packages/operator-lifecycle-manager/src/components/clusterserviceversion.tsx +++ b/frontend/packages/operator-lifecycle-manager/src/components/clusterserviceversion.tsx @@ -804,6 +804,15 @@ export const ClusterServiceVersionsPage: React.FC Date: Wed, 7 Aug 2024 19:56:11 +0530 Subject: [PATCH 062/102] Remove the devconsole backend common internet proxy and replace it with dedicated ones Signed-off-by: Lucifergene <47265560+Lucifergene@users.noreply.github.com> --- cmd/bridge/main.go | 37 ++-- .../console-shared/src/types/backend-api.ts | 5 + .../console-shared/src/types/index.ts | 1 + .../console-shared/src/utils/proxy.ts | 62 ------ .../src/services/bitbucket-service.ts | 67 +++--- .../git-service/src/services/gitea-service.ts | 38 +--- .../src/services/github-service.ts | 56 +++-- .../src/services/gitlab-service.ts | 48 +++-- .../components/catalog/apis/artifactHub.ts | 77 +++---- .../src/components/catalog/apis/utils.ts | 162 ++++++++++++++ .../providers/useArtifactHubTasksProvider.tsx | 3 +- .../pipelineruns/utils/tekton-results.ts | 158 ++++++++------ .../packages/pipelines-plugin/src/const.ts | 1 + pkg/devconsole/artifacthub/artifacthub.go | 94 ++++++++ pkg/devconsole/artifacthub/types.go | 34 +++ pkg/devconsole/common/types.go | 9 + pkg/devconsole/handler.go | 94 ++++++++ pkg/devconsole/proxy/proxy.go | 110 ---------- pkg/devconsole/proxy/proxy_test.go | 91 -------- pkg/devconsole/proxy/types.go | 22 -- pkg/devconsole/tekton-results/results.go | 202 ++++++++++++++++++ pkg/devconsole/tekton-results/types.go | 15 ++ pkg/devconsole/webhooks/types.go | 56 +++++ pkg/devconsole/webhooks/webhooks.go | 131 ++++++++++++ pkg/server/server.go | 7 +- 25 files changed, 1072 insertions(+), 508 deletions(-) create mode 100644 frontend/packages/console-shared/src/types/backend-api.ts delete mode 100644 frontend/packages/console-shared/src/utils/proxy.ts create mode 100644 frontend/packages/pipelines-plugin/src/components/catalog/apis/utils.ts create mode 100644 pkg/devconsole/artifacthub/artifacthub.go create mode 100644 pkg/devconsole/artifacthub/types.go create mode 100644 pkg/devconsole/common/types.go create mode 100644 pkg/devconsole/handler.go delete mode 100644 pkg/devconsole/proxy/proxy.go delete mode 100644 pkg/devconsole/proxy/proxy_test.go delete mode 100644 pkg/devconsole/proxy/types.go create mode 100644 pkg/devconsole/tekton-results/results.go create mode 100644 pkg/devconsole/tekton-results/types.go create mode 100644 pkg/devconsole/webhooks/types.go create mode 100644 pkg/devconsole/webhooks/webhooks.go diff --git a/cmd/bridge/main.go b/cmd/bridge/main.go index 07fb38fcdeb..0fa86889581 100644 --- a/cmd/bridge/main.go +++ b/cmd/bridge/main.go @@ -317,6 +317,9 @@ func main() { srv.GOOS = runtime.GOOS } + // Blacklisted headers + srv.ProxyHeaderDenyList = []string{"Cookie", "X-CSRFToken", "X-CSRF-Token"} + if *fLogLevel != "" { klog.Warningf("DEPRECATED: --log-level is now deprecated, use verbosity flag --v=Level instead") } @@ -353,7 +356,7 @@ func main() { srv.K8sProxyConfig = &proxy.Config{ TLSClientConfig: tlsConfig, - HeaderBlacklist: []string{"Cookie", "X-CSRFToken"}, + HeaderBlacklist: srv.ProxyHeaderDenyList, Endpoint: k8sEndpoint, } @@ -384,33 +387,33 @@ func main() { srv.ThanosProxyConfig = &proxy.Config{ TLSClientConfig: serviceProxyTLSConfig, - HeaderBlacklist: []string{"Cookie", "X-CSRFToken"}, + HeaderBlacklist: srv.ProxyHeaderDenyList, Endpoint: &url.URL{Scheme: "https", Host: openshiftThanosHost, Path: "/api"}, } srv.ThanosTenancyProxyConfig = &proxy.Config{ TLSClientConfig: serviceProxyTLSConfig, - HeaderBlacklist: []string{"Cookie", "X-CSRFToken"}, + HeaderBlacklist: srv.ProxyHeaderDenyList, Endpoint: &url.URL{Scheme: "https", Host: openshiftThanosTenancyHost, Path: "/api"}, } srv.ThanosTenancyProxyForRulesConfig = &proxy.Config{ TLSClientConfig: serviceProxyTLSConfig, - HeaderBlacklist: []string{"Cookie", "X-CSRFToken"}, + HeaderBlacklist: srv.ProxyHeaderDenyList, Endpoint: &url.URL{Scheme: "https", Host: openshiftThanosTenancyForRulesHost, Path: "/api"}, } srv.AlertManagerProxyConfig = &proxy.Config{ TLSClientConfig: serviceProxyTLSConfig, - HeaderBlacklist: []string{"Cookie", "X-CSRFToken"}, + HeaderBlacklist: srv.ProxyHeaderDenyList, Endpoint: &url.URL{Scheme: "https", Host: openshiftAlertManagerHost, Path: "/api"}, } srv.AlertManagerUserWorkloadProxyConfig = &proxy.Config{ TLSClientConfig: serviceProxyTLSConfig, - HeaderBlacklist: []string{"Cookie", "X-CSRFToken"}, + HeaderBlacklist: srv.ProxyHeaderDenyList, Endpoint: &url.URL{Scheme: "https", Host: *fAlertmanagerUserWorkloadHost, Path: "/api"}, } srv.AlertManagerTenancyProxyConfig = &proxy.Config{ TLSClientConfig: serviceProxyTLSConfig, - HeaderBlacklist: []string{"Cookie", "X-CSRFToken"}, + HeaderBlacklist: srv.ProxyHeaderDenyList, Endpoint: &url.URL{Scheme: "https", Host: *fAlertmanagerTenancyHost, Path: "/api"}, } srv.TerminalProxyTLSConfig = serviceProxyTLSConfig @@ -418,7 +421,7 @@ func main() { srv.GitOpsProxyConfig = &proxy.Config{ TLSClientConfig: serviceProxyTLSConfig, - HeaderBlacklist: []string{"Cookie", "X-CSRFToken"}, + HeaderBlacklist: srv.ProxyHeaderDenyList, Endpoint: &url.URL{Scheme: "https", Host: openshiftGitOpsHost}, } } @@ -448,7 +451,7 @@ func main() { srv.K8sProxyConfig = &proxy.Config{ TLSClientConfig: serviceProxyTLSConfig, - HeaderBlacklist: []string{"Cookie", "X-CSRFToken"}, + HeaderBlacklist: srv.ProxyHeaderDenyList, Endpoint: k8sEndpoint, UseProxyFromEnvironment: true, } @@ -469,17 +472,17 @@ func main() { offClusterThanosURL.Path += "/api" srv.ThanosTenancyProxyConfig = &proxy.Config{ TLSClientConfig: serviceProxyTLSConfig, - HeaderBlacklist: []string{"Cookie", "X-CSRFToken"}, + HeaderBlacklist: srv.ProxyHeaderDenyList, Endpoint: offClusterThanosURL, } srv.ThanosTenancyProxyForRulesConfig = &proxy.Config{ TLSClientConfig: serviceProxyTLSConfig, - HeaderBlacklist: []string{"Cookie", "X-CSRFToken"}, + HeaderBlacklist: srv.ProxyHeaderDenyList, Endpoint: offClusterThanosURL, } srv.ThanosProxyConfig = &proxy.Config{ TLSClientConfig: serviceProxyTLSConfig, - HeaderBlacklist: []string{"Cookie", "X-CSRFToken"}, + HeaderBlacklist: srv.ProxyHeaderDenyList, Endpoint: offClusterThanosURL, } } @@ -491,17 +494,17 @@ func main() { offClusterAlertManagerURL.Path += "/api" srv.AlertManagerProxyConfig = &proxy.Config{ TLSClientConfig: serviceProxyTLSConfig, - HeaderBlacklist: []string{"Cookie", "X-CSRFToken"}, + HeaderBlacklist: srv.ProxyHeaderDenyList, Endpoint: offClusterAlertManagerURL, } srv.AlertManagerTenancyProxyConfig = &proxy.Config{ TLSClientConfig: serviceProxyTLSConfig, - HeaderBlacklist: []string{"Cookie", "X-CSRFToken"}, + HeaderBlacklist: srv.ProxyHeaderDenyList, Endpoint: offClusterAlertManagerURL, } srv.AlertManagerUserWorkloadProxyConfig = &proxy.Config{ TLSClientConfig: serviceProxyTLSConfig, - HeaderBlacklist: []string{"Cookie", "X-CSRFToken"}, + HeaderBlacklist: srv.ProxyHeaderDenyList, Endpoint: offClusterAlertManagerURL, } } @@ -515,7 +518,7 @@ func main() { srv.GitOpsProxyConfig = &proxy.Config{ TLSClientConfig: serviceProxyTLSConfig, - HeaderBlacklist: []string{"Cookie", "X-CSRFToken"}, + HeaderBlacklist: srv.ProxyHeaderDenyList, Endpoint: offClusterGitOpsURL, } } @@ -535,7 +538,7 @@ func main() { } srv.ClusterManagementProxyConfig = &proxy.Config{ TLSClientConfig: oscrypto.SecureTLSConfig(&tls.Config{}), - HeaderBlacklist: []string{"Cookie", "X-CSRFToken"}, + HeaderBlacklist: srv.ProxyHeaderDenyList, Endpoint: clusterManagementURL, } diff --git a/frontend/packages/console-shared/src/types/backend-api.ts b/frontend/packages/console-shared/src/types/backend-api.ts new file mode 100644 index 00000000000..cc8e049ca9f --- /dev/null +++ b/frontend/packages/console-shared/src/types/backend-api.ts @@ -0,0 +1,5 @@ +export type DevConsoleEndpointResponse = { + statusCode: number; + headers: Record; + body: string; +}; diff --git a/frontend/packages/console-shared/src/types/index.ts b/frontend/packages/console-shared/src/types/index.ts index c9ac0a64357..b205e7b3291 100644 --- a/frontend/packages/console-shared/src/types/index.ts +++ b/frontend/packages/console-shared/src/types/index.ts @@ -2,3 +2,4 @@ export * from './pod'; export * from './resource'; export * from './route-params'; export * from './tableColumn'; +export * from './backend-api'; diff --git a/frontend/packages/console-shared/src/utils/proxy.ts b/frontend/packages/console-shared/src/utils/proxy.ts deleted file mode 100644 index 8cf8bd96e7f..00000000000 --- a/frontend/packages/console-shared/src/utils/proxy.ts +++ /dev/null @@ -1,62 +0,0 @@ -import { safeLoad } from 'js-yaml'; -import { consoleFetchJSON } from '@console/dynamic-plugin-sdk/src/lib-core'; -import { HttpError } from '@console/dynamic-plugin-sdk/src/utils/error/http-error'; - -export const API_PROXY_URL = '/api/dev-console/proxy/internet'; - -type ProxyRequest = { - allowInsecure?: boolean; - allowAuthHeader?: boolean; - method: string; - url: string; - headers?: Record; - queryparams?: Record; - body?: string; -}; - -export type ProxyResponse = { - statusCode: number; - headers: Record; - body: string; -}; - -const isJSONString = (str: string): boolean => { - try { - JSON.parse(str); - } catch (e) { - return false; - } - return true; -}; - -export const convertHeaders = (headers): Record => { - return Object.keys(headers).reduce((output, key) => { - output[key] = [headers[key]]; - return output; - }, {}); -}; - -/** - * Calls the proxy in our backend to bypass CORS headers. - */ -export const consoleProxyFetch = async (proxyRequest: ProxyRequest): Promise => { - const proxyResponse: ProxyResponse = await consoleFetchJSON.post(API_PROXY_URL, proxyRequest); - if (!proxyResponse.statusCode) { - throw new Error('Unexpected proxy response: Status code is missing!'); - } - if (proxyResponse.statusCode < 200 || proxyResponse.statusCode >= 300) { - throw new HttpError( - `Unexpected status code: ${proxyResponse.statusCode}`, - proxyResponse.statusCode, - null, - proxyResponse, - ); - } - return proxyResponse; -}; - -export const consoleProxyFetchJSON = (proxyRequest: ProxyRequest): Promise => { - return consoleProxyFetch(proxyRequest).then((response) => { - return isJSONString(response.body) ? JSON.parse(response.body) : safeLoad(response.body); - }); -}; diff --git a/frontend/packages/git-service/src/services/bitbucket-service.ts b/frontend/packages/git-service/src/services/bitbucket-service.ts index 34ee54dcf9c..2527c655374 100644 --- a/frontend/packages/git-service/src/services/bitbucket-service.ts +++ b/frontend/packages/git-service/src/services/bitbucket-service.ts @@ -2,12 +2,7 @@ import { Base64 } from 'js-base64'; import * as ParseBitbucketUrl from 'parse-bitbucket-url'; import 'whatwg-fetch'; import { consoleFetchJSON } from '@console/dynamic-plugin-sdk/src/lib-core'; -import { - API_PROXY_URL, - ProxyResponse, - consoleProxyFetchJSON, - convertHeaders, -} from '@console/shared/src/utils/proxy'; +import { DevConsoleEndpointResponse } from '@console/shared/src'; import { GitSource, SecretType, @@ -19,6 +14,24 @@ import { } from '../types'; import { BaseService } from './base-service'; +type BBWebhookBody = { + url: string; + events: string[]; + skip_cert_verification: boolean; + active: boolean; +}; + +type BitbucketWebhookRequest = { + headers: Headers; + isServer: boolean; + baseURL: string; + owner: string; + repoName: string; + body: BBWebhookBody; +}; + +export const BITBUCKET_WEBHOOK_BACKEND_URL = '/api/dev-console/webhooks/bitbucket'; + export class BitbucketService extends BaseService { private readonly metadata: RepoMetadata; @@ -61,15 +74,6 @@ export class BitbucketService extends BaseService { ...headers, }; - if (this.isServer) { - return consoleProxyFetchJSON({ - url, - method: requestMethod || 'GET', - headers: convertHeaders(requestHeaders), - ...(body && { body: JSON.stringify(body) }), - }); - } - const response = await fetch(url, { method: requestMethod || 'GET', headers: requestHeaders, @@ -183,28 +187,33 @@ export class BitbucketService extends BaseService { webhookURL: string, sslVerification: boolean, ): Promise => { - const headers = { - 'Content-Type': ['application/json'], - Authorization: [`Basic ${token}`], - }; - const body = { + const headers = new Headers({ + 'Content-Type': 'application/json', + Authorization: `Basic ${token}`, + }); + const body: BBWebhookBody = { url: webhookURL, events: ['repo:push', 'pullrequest:created', 'pullrequest:updated'], skip_cert_verification: !sslVerification, active: true, }; - const url = this.isServer - ? `${this.baseURL}/projects/${this.metadata.owner}/repos/${this.metadata.repoName}/hooks` - : `${this.baseURL}/repositories/${this.metadata.owner}/${this.metadata.repoName}/hooks`; - /* Using DevConsole Proxy to create webhook as Bitbucket is giving CORS error */ - const webhookResponse: ProxyResponse = await consoleFetchJSON.post(API_PROXY_URL, { - url, - method: 'POST', + const webhookRequestBody: BitbucketWebhookRequest = { headers, - body: JSON.stringify(body), - }); + isServer: this.isServer, + baseURL: this.baseURL, + owner: this.metadata.owner, + repoName: this.metadata.repoName, + body, + }; + const webhookResponse: DevConsoleEndpointResponse = await consoleFetchJSON.post( + BITBUCKET_WEBHOOK_BACKEND_URL, + webhookRequestBody, + ); + if (!webhookResponse.statusCode) { + throw new Error('Unexpected proxy response: Status code is missing!'); + } return webhookResponse.statusCode === 201; }; diff --git a/frontend/packages/git-service/src/services/gitea-service.ts b/frontend/packages/git-service/src/services/gitea-service.ts index df27df37b77..84b2f821574 100644 --- a/frontend/packages/git-service/src/services/gitea-service.ts +++ b/frontend/packages/git-service/src/services/gitea-service.ts @@ -3,12 +3,6 @@ import { Base64 } from 'js-base64'; import * as _ from 'lodash'; import 'whatwg-fetch'; import { consoleFetchJSON } from '@console/dynamic-plugin-sdk/src/lib-core'; -import { - API_PROXY_URL, - ProxyResponse, - consoleProxyFetchJSON, - convertHeaders, -} from '@console/shared/src/utils/proxy'; import { BranchList, GitSource, @@ -24,14 +18,9 @@ import { BaseService } from './base-service'; export class GiteaService extends BaseService { private readonly metadata: RepoMetadata; - private isServer = false; - constructor(gitsource: GitSource) { super(gitsource); this.metadata = this.getRepoMetadata(); - if (!this.metadata.host.includes('gitea.com')) { - this.isServer = true; - } } protected getAuthProvider = (): any => { @@ -58,15 +47,6 @@ export class GiteaService extends BaseService { ...authHeaders, ...headers, }; - if (this.isServer) { - return consoleProxyFetchJSON({ - allowInsecure: true, - url, - method: requestMethod || 'GET', - headers: convertHeaders(requestHeaders), - ...(body && { body: JSON.stringify(body) }), - }); - } const response = await fetch(url, { method: requestMethod || 'GET', @@ -149,10 +129,10 @@ export class GiteaService extends BaseService { /* TODO: Gitea PAC Support */ createRepoWebhook = async (token: string, webhookURL: string): Promise => { - const headers = { - 'Content-Type': ['application/json'], - Authorization: [`token ${token}`], - }; + const headers = new Headers({ + 'Content-Type': 'application/json', + Authorization: `token ${token}`, + }); const body = { active: true, authorization_header: '', @@ -166,15 +146,9 @@ export class GiteaService extends BaseService { }; const url = `${this.metadata.host}/api/v1/repos/${this.metadata.owner}/${this.metadata.repoName}/hooks`; - /* Using DevConsole Proxy to create webhook as Gitea is giving CORS error */ - const webhookResponse: ProxyResponse = await consoleFetchJSON.post(API_PROXY_URL, { - url, - method: 'POST', - headers, - body: JSON.stringify(body), - }); + const webhookResponse: Response = await consoleFetchJSON.post(url, body, { headers }); - return webhookResponse.statusCode === 201; + return webhookResponse.status === 201; }; isFilePresent = async (path: string): Promise => { diff --git a/frontend/packages/git-service/src/services/github-service.ts b/frontend/packages/git-service/src/services/github-service.ts index 14336579f44..d59deb61f91 100644 --- a/frontend/packages/git-service/src/services/github-service.ts +++ b/frontend/packages/git-service/src/services/github-service.ts @@ -2,7 +2,7 @@ import * as Octokit from '@octokit/rest'; import * as GitUrlParse from 'git-url-parse'; import { Base64 } from 'js-base64'; import { consoleFetchJSON } from '@console/dynamic-plugin-sdk/src/lib-core'; -import { API_PROXY_URL, ProxyResponse } from '@console/shared/src/utils/proxy'; +import { DevConsoleEndpointResponse } from '@console/shared/src'; import { GitSource, SecretType, @@ -14,6 +14,27 @@ import { } from '../types'; import { BaseService } from './base-service'; +type GHWebhookBody = { + name: string; + active: boolean; + config: { + url: string; + content_type: string; + insecure_ssl: string; + secret: string; + }; + events: string[]; +}; + +type GithubWebhookRequest = { + headers: Headers; + hostName: string; + owner: string; + repoName: string; + body: GHWebhookBody; +}; + +export const GITHUB_WEBHOOK_BACKEND_URL = '/api/dev-console/webhooks/github'; export class GithubService extends BaseService { private readonly client: Octokit; @@ -138,12 +159,12 @@ export class GithubService extends BaseService { sslVerification: boolean, webhookSecret: string, ): Promise => { - const headers = { - Accept: ['application/vnd.github+json'], - Authorization: [`Bearer ${token}`], - 'X-GitHub-Api-Version': ['2022-11-28'], - }; - const body = { + const headers = new Headers({ + Accept: 'application/vnd.github+json', + Authorization: `Bearer ${token}`, + 'X-GitHub-Api-Version': '2022-11-28', + }); + const body: GHWebhookBody = { name: 'web', active: true, config: { @@ -158,13 +179,22 @@ export class GithubService extends BaseService { this.metadata.host === 'github.com' ? `https://api.github.com` : `https://${this.metadata.host}/api/v3`; - /* Using DevConsole Proxy to create webhook as Octokit is giving CORS error */ - const webhookResponse: ProxyResponse = await consoleFetchJSON.post(API_PROXY_URL, { - url: `${AddWebhookBaseURL}/repos/${this.metadata.owner}/${this.metadata.repoName}/hooks`, - method: 'POST', + + const webhookRequestBody: GithubWebhookRequest = { headers, - body: JSON.stringify(body), - }); + hostName: AddWebhookBaseURL, + owner: this.metadata.owner, + repoName: this.metadata.repoName, + body, + }; + + const webhookResponse: DevConsoleEndpointResponse = await consoleFetchJSON.post( + GITHUB_WEBHOOK_BACKEND_URL, + webhookRequestBody, + ); + if (!webhookResponse.statusCode) { + throw new Error('Unexpected proxy response: Status code is missing!'); + } return webhookResponse.statusCode === 201; }; diff --git a/frontend/packages/git-service/src/services/gitlab-service.ts b/frontend/packages/git-service/src/services/gitlab-service.ts index 1654c903ccd..26acf44c63c 100644 --- a/frontend/packages/git-service/src/services/gitlab-service.ts +++ b/frontend/packages/git-service/src/services/gitlab-service.ts @@ -3,7 +3,7 @@ import { Gitlab } from 'gitlab'; import i18n from 'i18next'; import { Base64 } from 'js-base64'; import { consoleFetchJSON } from '@console/dynamic-plugin-sdk/src/lib-core'; -import { API_PROXY_URL, ProxyResponse } from '@console/shared/src/utils/proxy'; +import { DevConsoleEndpointResponse } from '@console/shared/src'; import { GitSource, SecretType, @@ -20,6 +20,23 @@ type GitlabRepo = { path_with_namespace: string; }; +type GLWebhookBody = { + url: string; + push_events: boolean; + merge_requests_events: boolean; + enable_ssl_verification: boolean; + token: string; +}; + +type GitlabWebhookRequest = { + headers: Headers; + hostName: string; + projectID: string; + body: GLWebhookBody; +}; + +export const GITLAB_WEBHOOK_BACKEND_URL = '/api/dev-console/webhooks/gitlab'; + const removeLeadingSlash = (str: string) => str?.replace(/^\//, '') || ''; export class GitlabService extends BaseService { @@ -171,25 +188,32 @@ export class GitlabService extends BaseService { webhookSecret: string, ): Promise => { const projectID = await this.getProjectId(); - const headers = { - 'Content-Type': ['application/json'], - 'PRIVATE-TOKEN': [token], - }; - const body = { + const headers = new Headers({ + 'Content-Type': 'application/json', + 'PRIVATE-TOKEN': token, + }); + const body: GLWebhookBody = { url: webhookURL, push_events: true, merge_requests_events: true, enable_ssl_verification: sslVerification, token: webhookSecret, }; - /* Using DevConsole Proxy to create webhook as Gitlab is giving CORS error */ - const webhookResponse: ProxyResponse = await consoleFetchJSON.post(API_PROXY_URL, { - url: `${this.metadata.host}/api/v4/projects/${projectID}/hooks`, - method: 'POST', + + const webhookRequestBody: GitlabWebhookRequest = { headers, - body: JSON.stringify(body), - }); + hostName: this.metadata.host, + projectID: projectID.toString(), + body, + }; + const webhookResponse: DevConsoleEndpointResponse = await consoleFetchJSON.post( + GITLAB_WEBHOOK_BACKEND_URL, + webhookRequestBody, + ); + if (!webhookResponse.statusCode) { + throw new Error('Unexpected proxy response: Status code is missing!'); + } return webhookResponse.statusCode === 201; }; diff --git a/frontend/packages/pipelines-plugin/src/components/catalog/apis/artifactHub.ts b/frontend/packages/pipelines-plugin/src/components/catalog/apis/artifactHub.ts index 5fbb723b31a..2b1b0971596 100644 --- a/frontend/packages/pipelines-plugin/src/components/catalog/apis/artifactHub.ts +++ b/frontend/packages/pipelines-plugin/src/components/catalog/apis/artifactHub.ts @@ -2,59 +2,23 @@ import * as React from 'react'; import * as _ from 'lodash'; import { CatalogItem } from '@console/dynamic-plugin-sdk'; import { K8sResourceKind, k8sCreate, k8sUpdate } from '@console/internal/module/k8s'; -import { consoleProxyFetchJSON } from '@console/shared/src/utils/proxy'; -import { ARTIFACTHUB_API_BASE_URL } from '../../../const'; +import { GITHUB_BASE_URL } from '../../../const'; import { TaskModel, TaskModelV1Beta1 } from '../../../models'; import { TektonTaskAnnotation } from '../../pipelines/const'; import { ARTIFACTHUB } from '../../quicksearch/const'; import { ApiResult } from '../hooks/useApiResponse'; - -export type ArtifactHubRepository = { - name: string; - kind: number; - url: string; - display_name: string; - repository_id: string; - organization_name: string; - organization_display_name: string; -}; - -export type ArtifactHubVersion = { - version: string; - contains_security_update: boolean; - prerelease: boolean; - ts: number; -}; - -export type ArtifactHubTask = { - package_id: string; - name: string; - description: string; - version: string; - display_name: string; - repository: ArtifactHubRepository; -}; - -export type ArtifactHubTaskDetails = { - package_id: string; - name: string; - description: string; - display_name: string; - keywords: string[]; - platforms: string[]; - version: ArtifactHubVersion[]; - available_versions: []; - content_url: string; - repository: ArtifactHubRepository; -}; - -const ARTIFACRHUB_TASKS_SEARCH_URL = `${ARTIFACTHUB_API_BASE_URL}/packages/search?offset=0&limit=60&facets=false&kind=7&deprecated=false&sort=relevance`; +import { + ArtifactHubTask, + ArtifactHubTaskDetails, + getTaskDetails, + getTaskYAMLFromGithub, + searchTasks, +} from './utils'; export const getArtifactHubTaskDetails = async ( item: CatalogItem, v?: string, ): Promise => { - const API_BASE_URL = `${ARTIFACTHUB_API_BASE_URL}/packages/tekton-task`; const { name, data } = item; const { task: { @@ -62,8 +26,8 @@ export const getArtifactHubTaskDetails = async ( repository: { name: repoName }, }, } = data; - const url = `${API_BASE_URL}/${repoName}/${name}/${v || version}`; - return consoleProxyFetchJSON({ url, method: 'GET' }); + + return getTaskDetails({ repoName, name, version: v || version }); }; export const useGetArtifactHubTasks = (hasPermission: boolean): ApiResult => { @@ -74,11 +38,8 @@ export const useGetArtifactHubTasks = (hasPermission: boolean): ApiResult { let mounted = true; if (hasPermission) { - consoleProxyFetchJSON<{ packages: ArtifactHubTask[] }>({ - url: ARTIFACRHUB_TASKS_SEARCH_URL, - method: 'GET', - }) - .then(({ packages }) => { + searchTasks() + .then((packages) => { if (mounted) { setLoaded(true); setResult(packages); @@ -101,7 +62,12 @@ export const useGetArtifactHubTasks = (hasPermission: boolean): ApiResult { - return consoleProxyFetchJSON({ url, method: 'GET' }) + const yamlPath = url.startsWith(GITHUB_BASE_URL) ? url.slice(GITHUB_BASE_URL.length) : null; + if (!yamlPath) { + throw new Error('Not a valid GitHub URL'); + } + + return getTaskYAMLFromGithub({ yamlPath }) .then((task: K8sResourceKind) => { task.metadata.namespace = namespace; task.metadata.annotations = { @@ -125,7 +91,12 @@ export const updateArtifactHubTask = async ( name: string, version: string, ) => { - return consoleProxyFetchJSON({ url, method: 'GET' }) + const yamlPath = url.startsWith(GITHUB_BASE_URL) ? url.slice(GITHUB_BASE_URL.length) : null; + if (!yamlPath) { + throw new Error('Not a valid GitHub raw URL'); + } + + return getTaskYAMLFromGithub({ yamlPath }) .then((task: K8sResourceKind) => { task.metadata.namespace = namespace; task.metadata.annotations = { diff --git a/frontend/packages/pipelines-plugin/src/components/catalog/apis/utils.ts b/frontend/packages/pipelines-plugin/src/components/catalog/apis/utils.ts new file mode 100644 index 00000000000..948a7552a2d --- /dev/null +++ b/frontend/packages/pipelines-plugin/src/components/catalog/apis/utils.ts @@ -0,0 +1,162 @@ +import { safeLoad } from 'js-yaml'; +import { consoleFetchJSON, K8sResourceKind } from '@console/dynamic-plugin-sdk/src/lib-core'; +import { HttpError } from '@console/dynamic-plugin-sdk/src/utils/error/http-error'; + +export const ARTIFACTHUB_SEARCH_URL = '/api/dev-console/artifacthub/search'; +export const ARTIFACTHUB_TASK_DETAILS_URL = '/api/dev-console/artifacthub/get'; +export const GITHUB_ARTIFACTHUB_TASK_YAML_URL = '/api/dev-console/artifacthub/yaml'; + +export type ArtifactHubRepository = { + name: string; + kind: number; + url: string; + display_name: string; + repository_id: string; + organization_name: string; + organization_display_name: string; +}; + +export type ArtifactHubVersion = { + version: string; + contains_security_update: boolean; + prerelease: boolean; + ts: number; +}; + +export type ArtifactHubTask = { + package_id: string; + name: string; + description: string; + version: string; + display_name: string; + repository: ArtifactHubRepository; +}; + +export type ArtifactHubTaskDetails = { + package_id: string; + name: string; + description: string; + display_name: string; + keywords: string[]; + platforms: string[]; + version: ArtifactHubVersion[]; + available_versions: []; + content_url: string; + repository: ArtifactHubRepository; +}; + +export type DevConsoleEndpointResponse = { + statusCode: number; + headers: Record; + body: string; +}; + +type TaskSearchRequest = { + searchQuery?: string; +}; + +type TaskDetailsRequest = { + repoName: string; + name: string; + version: string; +}; + +type TaskYAMLRequest = { + yamlPath: string; +}; + +/** + * Fetches the YAML content of a task from GitHub. + * @param taskYAMLRequest The request object containing the path to the task YAML file. + * @returns The parsed YAML content of the task. + */ +export const getTaskYAMLFromGithub = async ( + taskYAMLRequest: TaskYAMLRequest, +): Promise => { + const taskYAMLResponse: DevConsoleEndpointResponse = await consoleFetchJSON.post( + GITHUB_ARTIFACTHUB_TASK_YAML_URL, + taskYAMLRequest, + ); + + if (!taskYAMLResponse.statusCode) { + throw new Error('Unexpected proxy response: Status code is missing!'); + } + + if (taskYAMLResponse.statusCode < 200 || taskYAMLResponse.statusCode >= 300) { + throw new HttpError( + `Unexpected status code: ${taskYAMLResponse.statusCode}`, + taskYAMLResponse.statusCode, + null, + taskYAMLResponse, + ); + } + + try { + // Parse the YAML response body + return safeLoad(taskYAMLResponse.body); + } catch (e) { + throw new Error('Failed to parse task YAML response body as YAML'); + } +}; + +/** + * Fetches the details of a task from ArtifactHub. + * @param taskDetailsRequest The request object containing the task details. + * @returns The details of the task. + */ +export const getTaskDetails = async ( + taskDetailsRequest: TaskDetailsRequest, +): Promise => { + const taskDetailsResponse: DevConsoleEndpointResponse = await consoleFetchJSON.post( + ARTIFACTHUB_TASK_DETAILS_URL, + taskDetailsRequest, + ); + if (!taskDetailsResponse.statusCode) { + throw new Error('Unexpected proxy response: Status code is missing!'); + } + if (taskDetailsResponse.statusCode < 200 || taskDetailsResponse.statusCode >= 300) { + throw new HttpError( + `Unexpected status code: ${taskDetailsResponse.statusCode}`, + taskDetailsResponse.statusCode, + null, + taskDetailsResponse, + ); + } + + try { + return JSON.parse(taskDetailsResponse.body) as ArtifactHubTaskDetails; + } catch (e) { + throw new Error('Failed to parse task details response body as JSON'); + } +}; + +/** + * Fetches the tasks from ArtifactHub. + * @param (optional) searchrequest The search request object. + * @returns The array of tasks matching the search request. + */ +export const searchTasks = async ( + searchrequest?: TaskSearchRequest, +): Promise => { + const searchResponse: DevConsoleEndpointResponse = await consoleFetchJSON.post( + ARTIFACTHUB_SEARCH_URL, + searchrequest || {}, + ); + if (!searchResponse.statusCode) { + throw new Error('Unexpected proxy response: Status code is missing!'); + } + if (searchResponse.statusCode < 200 || searchResponse.statusCode >= 300) { + throw new HttpError( + `Unexpected status code: ${searchResponse.statusCode}`, + searchResponse.statusCode, + null, + searchResponse, + ); + } + + try { + return JSON.parse(searchResponse.body).packages as ArtifactHubTask[]; + } catch (e) { + throw new Error('Failed to parse search response body as JSON'); + } +}; diff --git a/frontend/packages/pipelines-plugin/src/components/catalog/providers/useArtifactHubTasksProvider.tsx b/frontend/packages/pipelines-plugin/src/components/catalog/providers/useArtifactHubTasksProvider.tsx index 2cc32f9bcf5..0b90a3b1726 100644 --- a/frontend/packages/pipelines-plugin/src/components/catalog/providers/useArtifactHubTasksProvider.tsx +++ b/frontend/packages/pipelines-plugin/src/components/catalog/providers/useArtifactHubTasksProvider.tsx @@ -6,8 +6,9 @@ import { referenceForModel } from '@console/internal/module/k8s'; import { TaskModel } from '../../../models/pipelines'; import { TaskProviders } from '../../pipelines/const'; import { ARTIFACTHUB } from '../../quicksearch/const'; -import { ArtifactHubTask, useGetArtifactHubTasks } from '../apis/artifactHub'; +import { useGetArtifactHubTasks } from '../apis/artifactHub'; import { TektonHubTask } from '../apis/tektonHub'; +import { ArtifactHubTask } from '../apis/utils'; import { useTektonHubIntegration } from '../catalog-utils'; const normalizeArtifactHubTasks = (artifactHubTasks: ArtifactHubTask[]): CatalogItem[] => { diff --git a/frontend/packages/pipelines-plugin/src/components/pipelineruns/utils/tekton-results.ts b/frontend/packages/pipelines-plugin/src/components/pipelineruns/utils/tekton-results.ts index 8d0a4040984..01794ebb8c4 100644 --- a/frontend/packages/pipelines-plugin/src/components/pipelineruns/utils/tekton-results.ts +++ b/frontend/packages/pipelines-plugin/src/components/pipelineruns/utils/tekton-results.ts @@ -5,15 +5,15 @@ import { MatchLabels, Selector, } from '@console/dynamic-plugin-sdk/src'; -import { k8sGet } from '@console/internal/module/k8s'; +import { consoleFetchJSON } from '@console/dynamic-plugin-sdk/src/lib-core'; +import { HttpError } from '@console/dynamic-plugin-sdk/src/utils/error/http-error'; import { ALL_NAMESPACES_KEY } from '@console/shared/src/constants'; -import { consoleProxyFetch, consoleProxyFetchJSON } from '@console/shared/src/utils/proxy'; import { DELETED_RESOURCE_IN_K8S_ANNOTATION, RESOURCE_LOADED_FROM_RESULTS_ANNOTATION, } from '../../../const'; -import { TektonResultModel } from '../../../models'; import { PipelineRunKind, TaskRunKind } from '../../../types'; +import { DevConsoleEndpointResponse } from '../../catalog/apis/utils'; // REST API spec // https://github.com/tektoncd/results/blob/main/docs/api/rest-api-spec.md @@ -43,13 +43,13 @@ export type Log = { }; }; -type ProxyRequest = { - allowInsecure?: boolean; - method: string; - url: string; - headers?: Record; - queryparams?: Record; - body?: string; +type TRRequest = { + searchNamespace: string; + searchParams: string; +}; + +type TaskRunLogRequest = { + taskRunPath: string; }; export type RecordsList = { @@ -205,49 +205,58 @@ export const clearCache = () => { }; const InFlightStore: { [key: string]: boolean } = {}; -export const getTRURLHost = async () => { - const tektonResult = await k8sGet(TektonResultModel, 'result'); - const targetNamespace = tektonResult?.spec?.targetNamespace; - const serverPort = tektonResult?.spec?.server_port ?? '8080'; - const tlsHostname = tektonResult?.spec?.tls_hostname_override; - let tektonResultsAPI; - if (tlsHostname) { - tektonResultsAPI = `${tlsHostname}:${serverPort}`; - } else if (targetNamespace && serverPort) { - tektonResultsAPI = `tekton-results-api-service.${targetNamespace}.svc.cluster.local:${serverPort}`; - } else { - tektonResultsAPI = `tekton-results-api-service.openshift-pipelines.svc.cluster.local:${serverPort}`; - } - return tektonResultsAPI; -}; - -export const createTektonResultsUrl = async ( +export const fetchTektonResultsURLConfig = async ( namespace: string, dataType?: DataType, filter?: string, options?: TektonResultsOptions, nextPageToken?: string, -): Promise => { - const tektonResultsAPI = await getTRURLHost(); - const namespaceToSearch = namespace && namespace !== ALL_NAMESPACES_KEY ? namespace : '-'; - const url = `https://${tektonResultsAPI}/apis/results.tekton.dev/v1alpha2/parents/${namespaceToSearch}/results/-/records?${new URLSearchParams( - { - // default sort should always be by `create_time desc` - // order_by: 'create_time desc', not supported yet - page_size: `${Math.max( - MINIMUM_PAGE_SIZE, - Math.min(MAXIMUM_PAGE_SIZE, options?.limit >= 0 ? options.limit : options?.pageSize ?? 50), - )}`, - ...(nextPageToken ? { page_token: nextPageToken } : {}), - filter: AND( - EQ('data_type', dataType.toString()), - filter, - selectorToFilter(options?.selector), - options?.filter, - ), - }, - ).toString()}`; - return url; +): Promise => { + const searchNamespace = namespace && namespace !== ALL_NAMESPACES_KEY ? namespace : '-'; + const searchParams = `${new URLSearchParams({ + // default sort should always be by `create_time desc` + // order_by: 'create_time desc', not supported yet + page_size: `${Math.max( + MINIMUM_PAGE_SIZE, + Math.min(MAXIMUM_PAGE_SIZE, options?.limit >= 0 ? options.limit : options?.pageSize ?? 50), + )}`, + ...(nextPageToken ? { page_token: nextPageToken } : {}), + filter: AND( + EQ('data_type', dataType.toString()), + filter, + selectorToFilter(options?.selector), + options?.filter, + ), + }).toString()}`; + return { searchNamespace, searchParams }; +}; + +/** + * Fetches the Tekton results from the Tekton Results API. + */ +const fetchTektonResults = async (tRRequest: TRRequest): Promise => { + const TEKTON_RESULTS_FETCH_URL = '/api/dev-console/tekton-results/get'; + const resultListResponse: DevConsoleEndpointResponse = await consoleFetchJSON.post( + TEKTON_RESULTS_FETCH_URL, + tRRequest, + ); + + if (!resultListResponse.statusCode) { + throw new Error('Unexpected proxy response: Status code is missing!'); + } + if (resultListResponse.statusCode < 200 || resultListResponse.statusCode >= 300) { + throw new HttpError( + `Unexpected status code: ${resultListResponse.statusCode}`, + resultListResponse.statusCode, + null, + resultListResponse, + ); + } + try { + return JSON.parse(resultListResponse.body) as RecordsList; + } catch (e) { + throw new Error('Failed to parse task details response body as JSON'); + } }; export const getFilteredRecord = async ( @@ -277,11 +286,17 @@ export const getFilteredRecord = async ( InFlightStore[cacheKey] = true; const value = await (async (): Promise<[R[], RecordsList]> => { try { - const url = await createTektonResultsUrl(namespace, dataType, filter, options, nextPageToken); - let list: RecordsList = await consoleProxyFetchJSON({ - url, - method: 'GET', - allowInsecure: true, + const { searchNamespace, searchParams } = await fetchTektonResultsURLConfig( + namespace, + dataType, + filter, + options, + nextPageToken, + ); + + let list: RecordsList = await fetchTektonResults({ + searchNamespace, + searchParams, }); if (options?.limit >= 0) { list = { @@ -391,20 +406,37 @@ const isJSONString = (str: string): boolean => { return true; }; -export const consoleProxyFetchLog = (proxyRequest: ProxyRequest): Promise => { - return consoleProxyFetch(proxyRequest).then((response) => { - return isJSONString(response.body) ? JSON.parse(response.body) : response.body; - }); +/** + * Fetches the task run logs from the Tekton Results API. + */ +const fetchTaskRunLogs = async (taskRunLogRequest: TaskRunLogRequest): Promise => { + const TEKTON_RESULTS_TASKRUN_LOGS_URL = '/api/dev-console/tekton-results/logs'; + const taskRunLogResponse: DevConsoleEndpointResponse = await consoleFetchJSON.post( + TEKTON_RESULTS_TASKRUN_LOGS_URL, + taskRunLogRequest, + ); + + if (!taskRunLogResponse.statusCode) { + throw new Error('Unexpected proxy response: Status code is missing!'); + } + if (taskRunLogResponse.statusCode < 200 || taskRunLogResponse.statusCode >= 300) { + throw new HttpError( + `Unexpected status code: ${taskRunLogResponse.statusCode}`, + taskRunLogResponse.statusCode, + null, + taskRunLogResponse, + ); + } + return isJSONString(taskRunLogResponse.body) + ? JSON.parse(taskRunLogResponse.body) + : taskRunLogResponse.body; }; export const getTaskRunLog = async (taskRunPath: string): Promise => { if (!taskRunPath) { throw404(); } - const tektonResultsAPI = await getTRURLHost(); - const url = `https://${tektonResultsAPI}/apis/results.tekton.dev/v1alpha2/parents/${taskRunPath.replace( - '/records/', - '/logs/', - )}`; - return consoleProxyFetchLog({ url, method: 'GET', allowInsecure: true }); + return fetchTaskRunLogs({ + taskRunPath: taskRunPath.replace('/records/', '/logs/'), + }); }; diff --git a/frontend/packages/pipelines-plugin/src/const.ts b/frontend/packages/pipelines-plugin/src/const.ts index 0ec7f37d390..e3eca66d9c4 100644 --- a/frontend/packages/pipelines-plugin/src/const.ts +++ b/frontend/packages/pipelines-plugin/src/const.ts @@ -8,5 +8,6 @@ export const PIPELINE_STRATEGY_LABEL = 'pipeline.openshift.io/strategy'; export const PREFERRED_DEV_PIPELINE_PAGE_TAB_USER_SETTING_KEY = 'pipeline.preferredPipelinePageTab'; export const FUNC_PIPELINE_RUNTIME_LABEL = 'function.knative.dev/runtime'; export const ARTIFACTHUB_API_BASE_URL = 'https://artifacthub.io/api/v1'; +export const GITHUB_BASE_URL = 'https://github.com'; export const DELETED_RESOURCE_IN_K8S_ANNOTATION = 'resource.deleted.in.k8s'; export const RESOURCE_LOADED_FROM_RESULTS_ANNOTATION = 'resource.loaded.from.tektonResults'; diff --git a/pkg/devconsole/artifacthub/artifacthub.go b/pkg/devconsole/artifacthub/artifacthub.go new file mode 100644 index 00000000000..aa79fb682b2 --- /dev/null +++ b/pkg/devconsole/artifacthub/artifacthub.go @@ -0,0 +1,94 @@ +package artifacthub + +import ( + "encoding/json" + "fmt" + "io" + "net/http" + "net/url" + + "github.com/openshift/console/pkg/auth" + "github.com/openshift/console/pkg/devconsole/common" +) + +const ( + ARTIFACTHUB_API_BASE_URL string = "https://artifacthub.io/api/v1" + GITHUB_BASE_URL string = "https://github.com" +) + +func makeHTTPRequest(url string) (common.DevConsoleCommonResponse, error) { + serviceRequest, err := http.NewRequest(http.MethodGet, url, nil) + if err != nil { + return common.DevConsoleCommonResponse{}, fmt.Errorf("failed to create request: %v", err) + } + + serviceTransport := &http.Transport{ + Proxy: http.ProxyFromEnvironment, + } + + serviceClient := &http.Client{ + Transport: serviceTransport, + } + + serviceResponse, err := serviceClient.Do(serviceRequest) + if err != nil { + return common.DevConsoleCommonResponse{}, fmt.Errorf("failed to send request: %v", err) + } + defer serviceResponse.Body.Close() + + serviceResponseBody, err := io.ReadAll(serviceResponse.Body) + if err != nil { + return common.DevConsoleCommonResponse{}, fmt.Errorf("failed to read response body: %v", err) + } + + return common.DevConsoleCommonResponse{ + StatusCode: serviceResponse.StatusCode, + Headers: serviceResponse.Header, + Body: string(serviceResponseBody), + }, nil +} + +func GetTaskYAMLFromGithub(r *http.Request, user *auth.User) (common.DevConsoleCommonResponse, error) { + var request TaskYAMLRequest + err := json.NewDecoder(r.Body).Decode(&request) + if err != nil { + return common.DevConsoleCommonResponse{}, fmt.Errorf("failed to parse request: %v", err) + } + + GITHUB_TASK_YAML_URL := fmt.Sprintf("%s/%s", + GITHUB_BASE_URL, + request.YamlPath, + ) + return makeHTTPRequest(GITHUB_TASK_YAML_URL) +} + +func GetTaskDetails(r *http.Request, user *auth.User) (common.DevConsoleCommonResponse, error) { + var request TaskDetailsRequest + err := json.NewDecoder(r.Body).Decode(&request) + if err != nil { + return common.DevConsoleCommonResponse{}, fmt.Errorf("failed to parse request: %v", err) + } + + ARTIFACTHUB_TASKS_DETAILS_URL := fmt.Sprintf("%s/packages/tekton-task/%s/%s/%s", + ARTIFACTHUB_API_BASE_URL, + url.PathEscape(request.RepoName), + url.PathEscape(request.Name), + url.PathEscape(request.Version), + ) + return makeHTTPRequest(ARTIFACTHUB_TASKS_DETAILS_URL) +} + +func SearchTasks(r *http.Request, user *auth.User) (common.DevConsoleCommonResponse, error) { + var request SearchRequest + err := json.NewDecoder(r.Body).Decode(&request) + if err != nil { + return common.DevConsoleCommonResponse{}, fmt.Errorf("failed to parse request: %v", err) + } + + ARTIFACTHUB_TASKS_SEARCH_URL := ARTIFACTHUB_API_BASE_URL + "/packages/search?offset=0&limit=60&facets=false&kind=7&deprecated=false&sort=relevance" + if request.SearchQuery != "" { + ARTIFACTHUB_TASKS_SEARCH_URL = fmt.Sprintf("%s&ts_query_web=%s", ARTIFACTHUB_TASKS_SEARCH_URL, url.PathEscape(request.SearchQuery)) + } + + return makeHTTPRequest(ARTIFACTHUB_TASKS_SEARCH_URL) +} diff --git a/pkg/devconsole/artifacthub/types.go b/pkg/devconsole/artifacthub/types.go new file mode 100644 index 00000000000..4a09d2025d6 --- /dev/null +++ b/pkg/devconsole/artifacthub/types.go @@ -0,0 +1,34 @@ +package artifacthub + +type ArtifactHubRepository struct { + Name string `json:"name"` + Kind int `json:"kind"` + URL string `json:"url"` + DisplayName string `json:"display_name"` + RepositoryID string `json:"repository_id"` + OrganizationName string `json:"organization_name"` + OrganizationDisplayName string `json:"organization_display_name"` +} + +type ArtifactHubTask struct { + PackageID string `json:"package_id"` + Name string `json:"name"` + Description string `json:"description"` + Version string `json:"version"` + DisplayName string `json:"display_name"` + Repository ArtifactHubRepository `json:"repository"` +} + +type SearchRequest struct { + SearchQuery string `json:"searchQuery"` +} + +type TaskYAMLRequest struct { + YamlPath string `json:"yamlPath"` +} + +type TaskDetailsRequest struct { + RepoName string `json:"repoName"` + Name string `json:"name"` + Version string `json:"version"` +} diff --git a/pkg/devconsole/common/types.go b/pkg/devconsole/common/types.go new file mode 100644 index 00000000000..337da44b69e --- /dev/null +++ b/pkg/devconsole/common/types.go @@ -0,0 +1,9 @@ +package common + +import "net/http" + +type DevConsoleCommonResponse struct { + StatusCode int `json:"statusCode"` + Headers http.Header `json:"headers"` + Body string `json:"body"` +} diff --git a/pkg/devconsole/handler.go b/pkg/devconsole/handler.go new file mode 100644 index 00000000000..18f5528bc8b --- /dev/null +++ b/pkg/devconsole/handler.go @@ -0,0 +1,94 @@ +package devconsole + +import ( + "net/http" + "strings" + + "github.com/openshift/console/pkg/auth" + "github.com/openshift/console/pkg/devconsole/artifacthub" + tektonresults "github.com/openshift/console/pkg/devconsole/tekton-results" + "github.com/openshift/console/pkg/devconsole/webhooks" + "github.com/openshift/console/pkg/serverutils" + "k8s.io/client-go/dynamic" +) + +type handlerFunc func(r *http.Request, user *auth.User, dynamicClient *dynamic.DynamicClient, k8sMode string, proxyHeaderDenyList []string) (interface{}, error) + +func handleRequest(w http.ResponseWriter, r *http.Request, user *auth.User, dynamicClient *dynamic.DynamicClient, k8sMode string, proxyHeaderDenyList []string, handler handlerFunc) { + response, err := handler(r, user, dynamicClient, k8sMode, proxyHeaderDenyList) + if err != nil { + serverutils.SendResponse(w, http.StatusInternalServerError, serverutils.ApiError{Err: err.Error()}) + return + } + serverutils.SendResponse(w, http.StatusOK, response) +} + +func Handler(user *auth.User, w http.ResponseWriter, r *http.Request, dynamicClient *dynamic.DynamicClient, k8sMode string, proxyHeaderDenyList []string) { + path := strings.Split(strings.Trim(r.URL.Path, "/"), "/") + if len(path) != 2 { + serverutils.SendResponse(w, http.StatusNotFound, serverutils.ApiError{Err: "Invalid URL"}) + return + } + + // Define routes + routes := map[string]map[string]handlerFunc{ + "artifacthub": { + // POST /api/dev-console/artifacthub/search + "search": func(r *http.Request, user *auth.User, _ *dynamic.DynamicClient, _ string, _ []string) (interface{}, error) { + return artifacthub.SearchTasks(r, user) + }, + // POST /api/dev-console/artifacthub/get + "get": func(r *http.Request, user *auth.User, _ *dynamic.DynamicClient, _ string, _ []string) (interface{}, error) { + return artifacthub.GetTaskDetails(r, user) + }, + // POST /api/dev-console/artifacthub/yaml + "yaml": func(r *http.Request, user *auth.User, _ *dynamic.DynamicClient, _ string, _ []string) (interface{}, error) { + return artifacthub.GetTaskYAMLFromGithub(r, user) + }, + }, + "tekton-results": { + // POST /api/dev-console/tekton-results/get + "get": func(r *http.Request, user *auth.User, dynamicClient *dynamic.DynamicClient, k8sMode string, _ []string) (interface{}, error) { + return tektonresults.GetTektonResults(r, user, dynamicClient, k8sMode) + }, + // POST /api/dev-console/tekton-results/logs + "logs": func(r *http.Request, user *auth.User, dynamicClient *dynamic.DynamicClient, k8sMode string, _ []string) (interface{}, error) { + return tektonresults.GetTaskRunLog(r, user, dynamicClient, k8sMode) + }, + // POST /api/dev-console/tekton-results/summary + "summary": func(r *http.Request, user *auth.User, dynamicClient *dynamic.DynamicClient, k8sMode string, _ []string) (interface{}, error) { + return tektonresults.GetResultsSummary(r, user, dynamicClient, k8sMode) + }, + }, + "webhooks": { + // POST /api/dev-console/webhooks/github + "github": func(r *http.Request, user *auth.User, _ *dynamic.DynamicClient, _ string, + proxyHeaderDenyList []string) (interface{}, error) { + + return webhooks.CreateGithubWebhook(r, user, proxyHeaderDenyList) + }, + // POST /api/dev-console/webhooks/gitlab + "gitlab": func(r *http.Request, user *auth.User, _ *dynamic.DynamicClient, _ string, proxyHeaderDenyList []string) (interface{}, error) { + return webhooks.CreateGitlabWebhook(r, user, proxyHeaderDenyList) + }, + // POST /api/dev-console/webhooks/bitbucket + "bitbucket": func(r *http.Request, user *auth.User, _ *dynamic.DynamicClient, _ string, proxyHeaderDenyList []string) (interface{}, error) { + return webhooks.CreateBitbucketWebhook(r, user, proxyHeaderDenyList) + }, + }, + } + + // Check for valid route and method + if methodHandlers, ok := routes[path[0]]; ok { + if handler, ok := methodHandlers[path[1]]; ok { + if r.Method != http.MethodPost { + serverutils.SendResponse(w, http.StatusMethodNotAllowed, serverutils.ApiError{Err: "Invalid method: only POST is allowed"}) + return + } + handleRequest(w, r, user, dynamicClient, k8sMode, proxyHeaderDenyList, handler) + return + } + } + + serverutils.SendResponse(w, http.StatusNotFound, serverutils.ApiError{Err: "Invalid URL"}) +} diff --git a/pkg/devconsole/proxy/proxy.go b/pkg/devconsole/proxy/proxy.go deleted file mode 100644 index e0b574568d1..00000000000 --- a/pkg/devconsole/proxy/proxy.go +++ /dev/null @@ -1,110 +0,0 @@ -package proxy - -import ( - "crypto/tls" - "encoding/json" - "fmt" - "io" - "net/http" - "strings" - - "github.com/openshift/console/pkg/auth" - "github.com/openshift/console/pkg/serverutils" -) - -func Handler(user *auth.User, w http.ResponseWriter, r *http.Request) { - path := strings.Split(strings.Trim(r.URL.Path, "/"), "/") - - if len(path) == 2 && path[0] == "proxy" && path[1] == "internet" { - // POST /api/dev-console/proxy/internet - if r.Method == http.MethodPost { - response, err := serve(r, user) - if err != nil { - serverutils.SendResponse(w, http.StatusInternalServerError, serverutils.ApiError{Err: err.Error()}) - return - } - serverutils.SendResponse(w, http.StatusOK, response) - return - } else { - serverutils.SendResponse(w, http.StatusMethodNotAllowed, serverutils.ApiError{Err: "Invalid method: only POST is allowed"}) - return - } - } else { - serverutils.SendResponse(w, http.StatusNotFound, serverutils.ApiError{Err: "Invalid URL"}) - return - } -} - -func serve(r *http.Request, user *auth.User) (ProxyResponse, error) { - var request ProxyRequest - err := json.NewDecoder(r.Body).Decode(&request) - if err != nil { - return ProxyResponse{}, fmt.Errorf("failed to parse request: %v", err) - } - - if request.Method == "" { - request.Method = http.MethodGet - } - - var serviceRequest *http.Request - if request.Body == "" { - serviceRequest, err = http.NewRequest(request.Method, request.Url, nil) - } else { - serviceRequest, err = http.NewRequest(request.Method, request.Url, strings.NewReader(request.Body)) - } - - if err != nil { - return ProxyResponse{}, fmt.Errorf("failed to create request: %v", err) - } - - for key, values := range request.Headers { - for _, value := range values { - serviceRequest.Header.Add(key, value) - } - } - - if request.AllowAuthHeader { - serviceRequest.Header.Set("Authorization", fmt.Sprintf("Bearer %s", user.Token)) - } - - query := serviceRequest.URL.Query() - for key, values := range request.Queryparams { - for _, value := range values { - query.Add(key, value) - } - } - serviceRequest.URL.RawQuery = query.Encode() - - var serviceTransport *http.Transport - if request.AllowInsecure { - serviceTransport = &http.Transport{ - Proxy: http.ProxyFromEnvironment, - TLSClientConfig: &tls.Config{ - InsecureSkipVerify: true, - }, - } - } else { - serviceTransport = &http.Transport{ - Proxy: http.ProxyFromEnvironment, - } - } - serviceClient := &http.Client{ - Transport: serviceTransport, - } - - serviceResponse, err := serviceClient.Do(serviceRequest) - if err != nil { - return ProxyResponse{}, fmt.Errorf("Failed to send request: %v", err) - } - defer serviceResponse.Body.Close() - serviceResponseBody, err := io.ReadAll(serviceResponse.Body) - if err != nil { - return ProxyResponse{}, fmt.Errorf("Failed to read response body: %v", err) - } - - return ProxyResponse{ - StatusCode: serviceResponse.StatusCode, - Headers: serviceResponse.Header, - Body: string(serviceResponseBody), - }, nil -} diff --git a/pkg/devconsole/proxy/proxy_test.go b/pkg/devconsole/proxy/proxy_test.go deleted file mode 100644 index a035f212b6c..00000000000 --- a/pkg/devconsole/proxy/proxy_test.go +++ /dev/null @@ -1,91 +0,0 @@ -package proxy - -import ( - "bytes" - "encoding/json" - "net/http" - "net/http/httptest" - "reflect" - "testing" - - "github.com/openshift/console/pkg/auth" -) - -var user = &auth.User{ - ID: "test-id", - Username: "test-user", - Token: "test-token", -} - -func TestProxyEndpoint(t *testing.T) { - tests := []struct { - testName string - request ProxyRequest - expectedResponse ProxyResponse - }{ - { - testName: "valid GET", - request: ProxyRequest{ - Url: "testserver", - Method: http.MethodGet, - }, - expectedResponse: ProxyResponse{ - StatusCode: http.StatusOK, - Headers: http.Header{ - "Content-Type": {"application/json"}, - "Content-Length": {"15"}, - "Authorization": {user.Token}, - }, - Body: "Mocked response", - }, - }, - { - testName: "valid GET without method", - request: ProxyRequest{ - Url: "testserver", - }, - expectedResponse: ProxyResponse{ - StatusCode: http.StatusOK, - Headers: http.Header{ - "Content-Type": {"application/json"}, - "Content-Length": {"15"}, - "Authorization": {user.Token}, - }, - Body: "Mocked response", - }, - }, - } - - for _, tt := range tests { - t.Run(tt.testName, func(t *testing.T) { - - server := httptest.NewServer(http.HandlerFunc(func(rw http.ResponseWriter, req *http.Request) { - rw.Header().Add("Content-Type", "application/json") - rw.Header().Add("Authorization", user.Token) - rw.WriteHeader(http.StatusOK) - rw.Write([]byte("Mocked response")) - })) - defer server.Close() - - tt.request.Url = server.URL - body, err := json.Marshal(tt.request) - if err != nil { - t.Errorf("Unexpected error: %v", err) - } - - req, err := http.NewRequest(http.MethodPost, "/proxy", bytes.NewBuffer(body)) - if err != nil { - t.Errorf("Unexpected error: %v", err) - } - - actual, err := serve(req, user) - if err != nil { - t.Errorf("Unexpected error: %v", err) - } - actual.Headers.Del("Date") - if !reflect.DeepEqual(tt.expectedResponse, actual) { - t.Errorf("Response does not match expectation:\n%v\nbut got\n%v", tt.expectedResponse, actual) - } - }) - } -} diff --git a/pkg/devconsole/proxy/types.go b/pkg/devconsole/proxy/types.go deleted file mode 100644 index 8c03859db17..00000000000 --- a/pkg/devconsole/proxy/types.go +++ /dev/null @@ -1,22 +0,0 @@ -package proxy - -import ( - "net/http" - "net/url" -) - -type ProxyRequest struct { - AllowInsecure bool `json:"allowInsecure,omitempty"` - AllowAuthHeader bool `json:"allowAuthHeader,omitempty"` - Method string `json:"method"` - Url string `json:"url"` - Headers http.Header `json:"headers"` - Queryparams url.Values `json:"queryparams"` - Body string `json:"body"` -} - -type ProxyResponse struct { - StatusCode int `json:"statusCode"` - Headers http.Header `json:"headers"` - Body string `json:"body"` -} diff --git a/pkg/devconsole/tekton-results/results.go b/pkg/devconsole/tekton-results/results.go new file mode 100644 index 00000000000..172ffbb0b79 --- /dev/null +++ b/pkg/devconsole/tekton-results/results.go @@ -0,0 +1,202 @@ +package tektonresults + +import ( + "context" + "crypto/tls" + "crypto/x509" + "encoding/json" + "fmt" + "io" + "net/http" + "net/url" + "os" + + "github.com/openshift/console/pkg/auth" + "github.com/openshift/console/pkg/devconsole/common" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" + "k8s.io/apimachinery/pkg/runtime/schema" + "k8s.io/client-go/dynamic" + "k8s.io/klog/v2" +) + +var ( + TektonResultsResource = &schema.GroupVersionResource{ + Group: "operator.tekton.dev", + Version: "v1alpha1", + Resource: "tektonresults", + } + TektonResultsAPIRoute = &schema.GroupVersionResource{ + Group: "route.openshift.io", + Version: "v1", + Resource: "routes", + } + cachedTektonResultsHost string = "" + tlsCertPath string = "/var/serving-cert/tls.crt" +) + +func getTRHost(dynamicClient *dynamic.DynamicClient, k8sMode string) (string, error) { + if k8sMode == "off-cluster" { + route, err := dynamicClient.Resource(*TektonResultsAPIRoute).Namespace("openshift-pipelines").Get(context.TODO(), "tekton-results-api-service", metav1.GetOptions{}) + if err != nil { + return "", err + } + cachedTektonResultsHost, isHostPresent, err := unstructured.NestedString(route.Object, "spec", "host") + if err != nil || !isHostPresent { + return "", err + } + return cachedTektonResultsHost, nil + } + + if cachedTektonResultsHost != "" { + return cachedTektonResultsHost, nil + } + + host, err := dynamicClient.Resource(*TektonResultsResource).Get(context.TODO(), "result", metav1.GetOptions{}) + if err != nil { + return "", err + } + targetNamespace, isTargetNsPresent, err := unstructured.NestedString(host.Object, "spec", "targetNamespace") + if err != nil || !isTargetNsPresent { + klog.Errorf("spec.targetNamespace not found in TektonResults resource") + targetNamespace = "" + } + serverPort, isPortPresent, err := unstructured.NestedString(host.Object, "spec", "server_port") + if err != nil || !isPortPresent { + klog.Errorf("spec.server_port not found in TektonResults resource. Using default port 8080") + serverPort = "8080" + } + tlsHostname, isTLSHostnamePresent, err := unstructured.NestedString(host.Object, "spec", "tls_hostname_override") + if err != nil || !isTLSHostnamePresent { + klog.Errorf("spec.tls_hostname_override not found in TektonResults resource") + tlsHostname = "" + } + + if tlsHostname != "" { + cachedTektonResultsHost = fmt.Sprintf("%s:%s", tlsHostname, serverPort) + } else if targetNamespace != "" && serverPort != "" { + cachedTektonResultsHost = fmt.Sprintf("tekton-results-api-service.%s.svc.cluster.local:%s", targetNamespace, serverPort) + } else { + cachedTektonResultsHost = fmt.Sprintf("tekton-results-api-service.openshift-pipelines.svc.cluster.local:%s", serverPort) + } + return cachedTektonResultsHost, nil +} + +func makeHTTPRequest(url, userToken string) (common.DevConsoleCommonResponse, error) { + serviceRequest, err := http.NewRequest(http.MethodGet, url, nil) + + if err != nil { + return common.DevConsoleCommonResponse{}, fmt.Errorf("failed to create request: %v", err) + } + + // Needed for TektonResults API + serviceRequest.Header.Set("Authorization", fmt.Sprintf("Bearer %s", userToken)) + + // Load the CA certificate + caCert, err := os.ReadFile(tlsCertPath) + if err != nil { + return common.DevConsoleCommonResponse{}, fmt.Errorf("failed to read CA certificate: %v", err) + } + + // Create a CertPool and add the CA certificate + caCertPool := x509.NewCertPool() + if !caCertPool.AppendCertsFromPEM(caCert) { + return common.DevConsoleCommonResponse{}, fmt.Errorf("failed to append CA certificate") + } + + serviceTransport := &http.Transport{ + Proxy: http.ProxyFromEnvironment, + TLSClientConfig: &tls.Config{ + RootCAs: caCertPool, + }, + } + + serviceClient := &http.Client{ + Transport: serviceTransport, + } + + serviceResponse, err := serviceClient.Do(serviceRequest) + if err != nil { + return common.DevConsoleCommonResponse{}, fmt.Errorf("failed to send request: %v", err) + } + defer serviceResponse.Body.Close() + serviceResponseBody, err := io.ReadAll(serviceResponse.Body) + if err != nil { + return common.DevConsoleCommonResponse{}, fmt.Errorf("failed to read response body: %v", err) + } + + return common.DevConsoleCommonResponse{ + StatusCode: serviceResponse.StatusCode, + Headers: serviceResponse.Header, + Body: string(serviceResponseBody), + }, nil +} + +func GetTektonResults(r *http.Request, user *auth.User, dynamicClient *dynamic.DynamicClient, k8sMode string) (common.DevConsoleCommonResponse, error) { + var request TektonResultsRequest + err := json.NewDecoder(r.Body).Decode(&request) + if err != nil { + return common.DevConsoleCommonResponse{}, fmt.Errorf("failed to parse request: %v", err) + } + TEKTON_RESULTS_HOST, err := getTRHost(dynamicClient, k8sMode) + if err != nil { + return common.DevConsoleCommonResponse{}, fmt.Errorf("failed to get TektonResults host: %v", err) + } + + parsedParams, err := url.ParseQuery(request.SearchParams) + if err != nil { + return common.DevConsoleCommonResponse{}, fmt.Errorf("error parsing search params: %v", err) + } + + TEKTON_RESULTS_URL := fmt.Sprintf("https://%s/apis/results.tekton.dev/v1alpha2/parents/%s/results/-/records?%s", + TEKTON_RESULTS_HOST, + url.PathEscape(request.SearchNamespace), + parsedParams.Encode(), + ) + + return makeHTTPRequest(TEKTON_RESULTS_URL, user.Token) +} + +func GetResultsSummary(r *http.Request, user *auth.User, dynamicClient *dynamic.DynamicClient, k8sMode string) (common.DevConsoleCommonResponse, error) { + var request SummaryRequest + err := json.NewDecoder(r.Body).Decode(&request) + if err != nil { + return common.DevConsoleCommonResponse{}, fmt.Errorf("failed to parse request: %v", err) + } + TEKTON_RESULTS_HOST, err := getTRHost(dynamicClient, k8sMode) + if err != nil { + return common.DevConsoleCommonResponse{}, fmt.Errorf("failed to get TektonResults host: %v", err) + } + + parsedParams, err := url.ParseQuery(request.SearchParams) + if err != nil { + return common.DevConsoleCommonResponse{}, fmt.Errorf("error parsing search params: %v", err) + } + + SUMMARY_URL := fmt.Sprintf("https://%s/apis/results.tekton.dev/v1alpha2/parents/%s/results/-/records/summary?%s", + TEKTON_RESULTS_HOST, + url.PathEscape(request.SearchNamespace), + parsedParams.Encode(), + ) + + return makeHTTPRequest(SUMMARY_URL, user.Token) +} + +func GetTaskRunLog(r *http.Request, user *auth.User, dynamicClient *dynamic.DynamicClient, k8sMode string) (common.DevConsoleCommonResponse, error) { + var request TaskRunLogRequest + err := json.NewDecoder(r.Body).Decode(&request) + if err != nil { + return common.DevConsoleCommonResponse{}, fmt.Errorf("failed to parse request: %v", err) + } + TEKTON_RESULTS_HOST, err := getTRHost(dynamicClient, k8sMode) + if err != nil { + return common.DevConsoleCommonResponse{}, fmt.Errorf("failed to get TektonResults host: %v", err) + } + + TASKRUN_LOG_URL := fmt.Sprintf("https://%s/apis/results.tekton.dev/v1alpha2/parents/%s", + TEKTON_RESULTS_HOST, + request.TaskRunPath, + ) + + return makeHTTPRequest(TASKRUN_LOG_URL, user.Token) +} diff --git a/pkg/devconsole/tekton-results/types.go b/pkg/devconsole/tekton-results/types.go new file mode 100644 index 00000000000..9c11473e847 --- /dev/null +++ b/pkg/devconsole/tekton-results/types.go @@ -0,0 +1,15 @@ +package tektonresults + +type TektonResultsRequest struct { + SearchNamespace string `json:"searchNamespace"` + SearchParams string `json:"searchParams"` +} + +type SummaryRequest struct { + SearchNamespace string `json:"searchNamespace"` + SearchParams string `json:"searchParams"` +} + +type TaskRunLogRequest struct { + TaskRunPath string `json:"taskRunPath"` +} diff --git a/pkg/devconsole/webhooks/types.go b/pkg/devconsole/webhooks/types.go new file mode 100644 index 00000000000..2aa712e2d9b --- /dev/null +++ b/pkg/devconsole/webhooks/types.go @@ -0,0 +1,56 @@ +package webhooks + +import ( + "net/http" +) + +type GHWebhookBody struct { + Name string `json:"name"` + Active bool `json:"active"` + Config struct { + URL string `json:"url"` + ContentType string `json:"content_type"` + InsecureSSL string `json:"insecure_ssl"` + Secret string `json:"secret"` + } `json:"config"` + Events []string `json:"events"` +} + +type GithubWebhookRequest struct { + Headers http.Header `json:"headers"` + HostName string `json:"hostName"` + Owner string `json:"owner"` + RepoName string `json:"repoName"` + Body GHWebhookBody `json:"body"` +} + +type GLWebhookBody struct { + URL string `json:"url"` + PushEvents bool `json:"push_events"` + MergeRequestsEvents bool `json:"merge_requests_events"` + EnableSSLVerification bool `json:"enable_ssl_verification"` + Token string `json:"token"` +} + +type GitlabWebhookRequest struct { + Headers http.Header `json:"headers"` + HostName string `json:"hostName"` + ProjectID string `json:"projectID"` + Body GLWebhookBody `json:"body"` +} + +type BBWebhookBody struct { + URL string `json:"url"` + Events []string `json:"events"` + SkipCertVerification bool `json:"skip_cert_verification"` + Active bool `json:"active"` +} + +type BitbucketWebhookRequest struct { + Headers http.Header `json:"headers"` + IsServer bool `json:"isServer"` + BaseURL string `json:"baseURL"` + Owner string `json:"owner"` + RepoName string `json:"repoName"` + Body BBWebhookBody `json:"body"` +} diff --git a/pkg/devconsole/webhooks/webhooks.go b/pkg/devconsole/webhooks/webhooks.go new file mode 100644 index 00000000000..ab2e94c2af6 --- /dev/null +++ b/pkg/devconsole/webhooks/webhooks.go @@ -0,0 +1,131 @@ +package webhooks + +import ( + "bytes" + "encoding/json" + "fmt" + "io" + "net/http" + "net/url" + "slices" + + "github.com/openshift/console/pkg/auth" + "github.com/openshift/console/pkg/devconsole/common" +) + +func makeHTTPRequest(url string, headers http.Header, body []byte, proxyHeaderDenyList []string) (common.DevConsoleCommonResponse, error) { + serviceRequest, err := http.NewRequest(http.MethodPost, url, bytes.NewReader(body)) + if err != nil { + return common.DevConsoleCommonResponse{}, fmt.Errorf("failed to create request: %v", err) + } + + for key, values := range headers { + if slices.Contains(proxyHeaderDenyList, key) { + continue + } + for _, value := range values { + serviceRequest.Header.Add(key, value) + } + } + + serviceTransport := &http.Transport{ + Proxy: http.ProxyFromEnvironment, + } + + serviceClient := &http.Client{ + Transport: serviceTransport, + } + + serviceResponse, err := serviceClient.Do(serviceRequest) + if err != nil { + return common.DevConsoleCommonResponse{}, fmt.Errorf("failed to send request: %v", err) + } + defer serviceResponse.Body.Close() + serviceResponseBody, err := io.ReadAll(serviceResponse.Body) + if err != nil { + return common.DevConsoleCommonResponse{}, fmt.Errorf("failed to read response body: %v", err) + } + + return common.DevConsoleCommonResponse{ + StatusCode: serviceResponse.StatusCode, + Headers: serviceResponse.Header, + Body: string(serviceResponseBody), + }, nil +} + +func CreateGithubWebhook(r *http.Request, user *auth.User, proxyHeaderDenyList []string) (common.DevConsoleCommonResponse, error) { + // POST /api/dev-console/webhooks/github + var request GithubWebhookRequest + err := json.NewDecoder(r.Body).Decode(&request) + if err != nil { + return common.DevConsoleCommonResponse{}, fmt.Errorf("failed to parse request: %v", err) + } + + bodyBytes, err := json.Marshal(request.Body) + if err != nil { + return common.DevConsoleCommonResponse{}, fmt.Errorf("failed to marshal request body: %v", err) + } + + GH_WEBHOOK_URL := fmt.Sprintf("%s/repos/%s/%s/hooks", + request.HostName, + url.PathEscape(request.Owner), + url.PathEscape(request.RepoName), + ) + + return makeHTTPRequest(GH_WEBHOOK_URL, request.Headers, bodyBytes, proxyHeaderDenyList) + +} + +func CreateGitlabWebhook(r *http.Request, user *auth.User, proxyHeaderDenyList []string) (common.DevConsoleCommonResponse, error) { + // POST /api/dev-console/webhooks/gitlab + + var request GitlabWebhookRequest + err := json.NewDecoder(r.Body).Decode(&request) + if err != nil { + return common.DevConsoleCommonResponse{}, fmt.Errorf("failed to parse request: %v", err) + } + + bodyBytes, err := json.Marshal(request.Body) + if err != nil { + return common.DevConsoleCommonResponse{}, fmt.Errorf("failed to marshal request body: %v", err) + } + + GL_WEBHOOK_URL := fmt.Sprintf("%s/api/v4/projects/%s/hooks", + request.HostName, + url.PathEscape(request.ProjectID), + ) + + return makeHTTPRequest(GL_WEBHOOK_URL, request.Headers, bodyBytes, proxyHeaderDenyList) +} + +func CreateBitbucketWebhook(r *http.Request, user *auth.User, proxyHeaderDenyList []string) (common.DevConsoleCommonResponse, error) { + // POST /api/dev-console/webhooks/bitbucket + + var request BitbucketWebhookRequest + err := json.NewDecoder(r.Body).Decode(&request) + if err != nil { + return common.DevConsoleCommonResponse{}, fmt.Errorf("failed to parse request: %v", err) + } + + bodyBytes, err := json.Marshal(request.Body) + if err != nil { + return common.DevConsoleCommonResponse{}, fmt.Errorf("failed to marshal request body: %v", err) + } + + var BB_WEBHOOK_URL string + if request.IsServer { + BB_WEBHOOK_URL = fmt.Sprintf("%s/projects/%s/repos/%s/hooks", + request.BaseURL, + url.PathEscape(request.Owner), + url.PathEscape(request.RepoName), + ) + } else { + BB_WEBHOOK_URL = fmt.Sprintf("%s/repositories/%s/%s/hooks", + request.BaseURL, + url.PathEscape(request.Owner), + url.PathEscape(request.RepoName), + ) + } + + return makeHTTPRequest(BB_WEBHOOK_URL, request.Headers, bodyBytes, proxyHeaderDenyList) +} diff --git a/pkg/server/server.go b/pkg/server/server.go index 468221b045a..90c0cc9e555 100644 --- a/pkg/server/server.go +++ b/pkg/server/server.go @@ -25,7 +25,7 @@ import ( "github.com/openshift/console/pkg/auth" "github.com/openshift/console/pkg/auth/csrfverifier" "github.com/openshift/console/pkg/auth/sessions" - devconsoleProxy "github.com/openshift/console/pkg/devconsole/proxy" + devconsole "github.com/openshift/console/pkg/devconsole" "github.com/openshift/console/pkg/devfile" gql "github.com/openshift/console/pkg/graphql" "github.com/openshift/console/pkg/graphql/resolver" @@ -172,6 +172,7 @@ type Server struct { AnonymousInternalProxiedK8SRT http.RoundTripper K8sMode string K8sProxyConfig *proxy.Config + ProxyHeaderDenyList []string KnativeChannelCRDLister ResourceLister KnativeEventSourceCRDLister ResourceLister KubeAPIServerURL string // JS global only. Not used for proxying. @@ -480,11 +481,11 @@ func (s *Server) HTTPHandler() (http.Handler, error) { handle("/api/console/knative-event-sources", tokenReviewHandler(s.handleKnativeEventSourceCRDs)) handle("/api/console/knative-channels", tokenReviewHandler(s.handleKnativeChannelCRDs)) - // Dev-Console Proxy + // Dev-Console Endpoints handle(devConsoleEndpoint, http.StripPrefix( proxy.SingleJoiningSlash(s.BaseURL.Path, devConsoleEndpoint), authHandlerWithUser(func(user *auth.User, w http.ResponseWriter, r *http.Request) { - devconsoleProxy.Handler(user, w, r) + devconsole.Handler(user, w, r, internalProxiedDynamic, s.K8sMode, s.ProxyHeaderDenyList) })), ) From 25138c339e28d181d46f44fafbf42bac43b8c6a8 Mon Sep 17 00:00:00 2001 From: Vikram Raj Date: Tue, 29 Apr 2025 21:27:01 +0530 Subject: [PATCH 063/102] Add DEVCONSOLE_PROXY_AVAILABLE flag --- frontend/__tests__/reducers/features.spec.tsx | 1 + frontend/packages/console-shared/src/constants/common.ts | 1 + frontend/public/reducers/features.ts | 2 ++ 3 files changed, 4 insertions(+) diff --git a/frontend/__tests__/reducers/features.spec.tsx b/frontend/__tests__/reducers/features.spec.tsx index 9ba79dec5d6..890ddbf8166 100644 --- a/frontend/__tests__/reducers/features.spec.tsx +++ b/frontend/__tests__/reducers/features.spec.tsx @@ -53,6 +53,7 @@ describe('featureReducer', () => { CONSOLE_CAPABILITY_LIGHTSPEEDBUTTON_IS_ENABLED: undefined, CONSOLE_CAPABILITY_GETTINGSTARTEDBANNER_IS_ENABLED: undefined, LIGHTSPEED_IS_AVAILABLE_TO_INSTALL: undefined, + DEVCONSOLE_PROXY: true, }), ); }); diff --git a/frontend/packages/console-shared/src/constants/common.ts b/frontend/packages/console-shared/src/constants/common.ts index dc256687a19..1910ec1513a 100644 --- a/frontend/packages/console-shared/src/constants/common.ts +++ b/frontend/packages/console-shared/src/constants/common.ts @@ -92,6 +92,7 @@ export enum FLAGS { CONSOLE_CAPABILITY_LIGHTSPEEDBUTTON_IS_ENABLED = 'CONSOLE_CAPABILITY_LIGHTSPEEDBUTTON_IS_ENABLED', CONSOLE_CAPABILITY_GETTINGSTARTEDBANNER_IS_ENABLED = 'CONSOLE_CAPABILITY_GETTINGSTARTEDBANNER_IS_ENABLED', LIGHTSPEED_IS_AVAILABLE_TO_INSTALL = 'LIGHTSPEED_IS_AVAILABLE_TO_INSTALL', + DEVCONSOLE_PROXY = 'DEVCONSOLE_PROXY', } export const CONFIG_STORAGE_CONSOLE = 'console'; diff --git a/frontend/public/reducers/features.ts b/frontend/public/reducers/features.ts index fe0781ce9f3..18696edf20a 100644 --- a/frontend/public/reducers/features.ts +++ b/frontend/public/reducers/features.ts @@ -42,6 +42,8 @@ export const defaults = _.mapValues(FLAGS, (flag) => { return ( !!window.SERVER_FLAGS.prometheusBaseURL && !!window.SERVER_FLAGS.prometheusTenancyBaseURL ); + case FLAGS.DEVCONSOLE_PROXY: + return true; default: return undefined; } From 451059a359d26d40edb3bbc9e14a2fdfa96c039b Mon Sep 17 00:00:00 2001 From: Andrew Thorp Date: Mon, 28 Apr 2025 12:15:28 -0400 Subject: [PATCH 064/102] fix: resolve http Context and Client handling --- pkg/devconsole/artifacthub/artifacthub.go | 27 ++++----- pkg/devconsole/tekton-results/results.go | 74 +++++++++++++---------- pkg/devconsole/webhooks/webhooks.go | 27 ++++----- 3 files changed, 69 insertions(+), 59 deletions(-) diff --git a/pkg/devconsole/artifacthub/artifacthub.go b/pkg/devconsole/artifacthub/artifacthub.go index aa79fb682b2..5c66f53cb70 100644 --- a/pkg/devconsole/artifacthub/artifacthub.go +++ b/pkg/devconsole/artifacthub/artifacthub.go @@ -1,6 +1,7 @@ package artifacthub import ( + "context" "encoding/json" "fmt" "io" @@ -16,21 +17,19 @@ const ( GITHUB_BASE_URL string = "https://github.com" ) -func makeHTTPRequest(url string) (common.DevConsoleCommonResponse, error) { - serviceRequest, err := http.NewRequest(http.MethodGet, url, nil) - if err != nil { - return common.DevConsoleCommonResponse{}, fmt.Errorf("failed to create request: %v", err) - } - - serviceTransport := &http.Transport{ +var client *http.Client = &http.Client{ + Transport: &http.Transport{ Proxy: http.ProxyFromEnvironment, - } + }, +} - serviceClient := &http.Client{ - Transport: serviceTransport, +func makeHTTPRequest(ctx context.Context, url string) (common.DevConsoleCommonResponse, error) { + serviceRequest, err := http.NewRequestWithContext(ctx, http.MethodGet, url, nil) + if err != nil { + return common.DevConsoleCommonResponse{}, fmt.Errorf("failed to create request: %v", err) } - serviceResponse, err := serviceClient.Do(serviceRequest) + serviceResponse, err := client.Do(serviceRequest) if err != nil { return common.DevConsoleCommonResponse{}, fmt.Errorf("failed to send request: %v", err) } @@ -59,7 +58,7 @@ func GetTaskYAMLFromGithub(r *http.Request, user *auth.User) (common.DevConsoleC GITHUB_BASE_URL, request.YamlPath, ) - return makeHTTPRequest(GITHUB_TASK_YAML_URL) + return makeHTTPRequest(r.Context(), GITHUB_TASK_YAML_URL) } func GetTaskDetails(r *http.Request, user *auth.User) (common.DevConsoleCommonResponse, error) { @@ -75,7 +74,7 @@ func GetTaskDetails(r *http.Request, user *auth.User) (common.DevConsoleCommonRe url.PathEscape(request.Name), url.PathEscape(request.Version), ) - return makeHTTPRequest(ARTIFACTHUB_TASKS_DETAILS_URL) + return makeHTTPRequest(r.Context(), ARTIFACTHUB_TASKS_DETAILS_URL) } func SearchTasks(r *http.Request, user *auth.User) (common.DevConsoleCommonResponse, error) { @@ -90,5 +89,5 @@ func SearchTasks(r *http.Request, user *auth.User) (common.DevConsoleCommonRespo ARTIFACTHUB_TASKS_SEARCH_URL = fmt.Sprintf("%s&ts_query_web=%s", ARTIFACTHUB_TASKS_SEARCH_URL, url.PathEscape(request.SearchQuery)) } - return makeHTTPRequest(ARTIFACTHUB_TASKS_SEARCH_URL) + return makeHTTPRequest(r.Context(), ARTIFACTHUB_TASKS_SEARCH_URL) } diff --git a/pkg/devconsole/tekton-results/results.go b/pkg/devconsole/tekton-results/results.go index 172ffbb0b79..3bc4f3bb35c 100644 --- a/pkg/devconsole/tekton-results/results.go +++ b/pkg/devconsole/tekton-results/results.go @@ -35,9 +35,39 @@ var ( tlsCertPath string = "/var/serving-cert/tls.crt" ) -func getTRHost(dynamicClient *dynamic.DynamicClient, k8sMode string) (string, error) { +var client *http.Client + +func Client() (*http.Client, error) { + if client == nil { + // Load the CA certificate + caCert, err := os.ReadFile(tlsCertPath) + if err != nil { + return nil, fmt.Errorf("failed to read CA certificate: %v", err) + } + + // Create a CertPool and add the CA certificate + caCertPool := x509.NewCertPool() + if !caCertPool.AppendCertsFromPEM(caCert) { + return nil, fmt.Errorf("failed to append CA certificate") + } + + serviceTransport := &http.Transport{ + Proxy: http.ProxyFromEnvironment, + TLSClientConfig: &tls.Config{ + RootCAs: caCertPool, + }, + } + + client = &http.Client{ + Transport: serviceTransport, + } + } + return client, nil +} + +func getTRHost(ctx context.Context, dynamicClient *dynamic.DynamicClient, k8sMode string) (string, error) { if k8sMode == "off-cluster" { - route, err := dynamicClient.Resource(*TektonResultsAPIRoute).Namespace("openshift-pipelines").Get(context.TODO(), "tekton-results-api-service", metav1.GetOptions{}) + route, err := dynamicClient.Resource(*TektonResultsAPIRoute).Namespace("openshift-pipelines").Get(ctx, "tekton-results-api-service", metav1.GetOptions{}) if err != nil { return "", err } @@ -52,7 +82,7 @@ func getTRHost(dynamicClient *dynamic.DynamicClient, k8sMode string) (string, er return cachedTektonResultsHost, nil } - host, err := dynamicClient.Resource(*TektonResultsResource).Get(context.TODO(), "result", metav1.GetOptions{}) + host, err := dynamicClient.Resource(*TektonResultsResource).Get(ctx, "result", metav1.GetOptions{}) if err != nil { return "", err } @@ -82,8 +112,8 @@ func getTRHost(dynamicClient *dynamic.DynamicClient, k8sMode string) (string, er return cachedTektonResultsHost, nil } -func makeHTTPRequest(url, userToken string) (common.DevConsoleCommonResponse, error) { - serviceRequest, err := http.NewRequest(http.MethodGet, url, nil) +func makeHTTPRequest(ctx context.Context, url, userToken string) (common.DevConsoleCommonResponse, error) { + serviceRequest, err := http.NewRequestWithContext(ctx, http.MethodGet, url, nil) if err != nil { return common.DevConsoleCommonResponse{}, fmt.Errorf("failed to create request: %v", err) @@ -92,27 +122,9 @@ func makeHTTPRequest(url, userToken string) (common.DevConsoleCommonResponse, er // Needed for TektonResults API serviceRequest.Header.Set("Authorization", fmt.Sprintf("Bearer %s", userToken)) - // Load the CA certificate - caCert, err := os.ReadFile(tlsCertPath) + serviceClient, err := Client() if err != nil { - return common.DevConsoleCommonResponse{}, fmt.Errorf("failed to read CA certificate: %v", err) - } - - // Create a CertPool and add the CA certificate - caCertPool := x509.NewCertPool() - if !caCertPool.AppendCertsFromPEM(caCert) { - return common.DevConsoleCommonResponse{}, fmt.Errorf("failed to append CA certificate") - } - - serviceTransport := &http.Transport{ - Proxy: http.ProxyFromEnvironment, - TLSClientConfig: &tls.Config{ - RootCAs: caCertPool, - }, - } - - serviceClient := &http.Client{ - Transport: serviceTransport, + return common.DevConsoleCommonResponse{}, err } serviceResponse, err := serviceClient.Do(serviceRequest) @@ -138,7 +150,7 @@ func GetTektonResults(r *http.Request, user *auth.User, dynamicClient *dynamic.D if err != nil { return common.DevConsoleCommonResponse{}, fmt.Errorf("failed to parse request: %v", err) } - TEKTON_RESULTS_HOST, err := getTRHost(dynamicClient, k8sMode) + TEKTON_RESULTS_HOST, err := getTRHost(r.Context(), dynamicClient, k8sMode) if err != nil { return common.DevConsoleCommonResponse{}, fmt.Errorf("failed to get TektonResults host: %v", err) } @@ -154,7 +166,7 @@ func GetTektonResults(r *http.Request, user *auth.User, dynamicClient *dynamic.D parsedParams.Encode(), ) - return makeHTTPRequest(TEKTON_RESULTS_URL, user.Token) + return makeHTTPRequest(r.Context(), TEKTON_RESULTS_URL, user.Token) } func GetResultsSummary(r *http.Request, user *auth.User, dynamicClient *dynamic.DynamicClient, k8sMode string) (common.DevConsoleCommonResponse, error) { @@ -163,7 +175,7 @@ func GetResultsSummary(r *http.Request, user *auth.User, dynamicClient *dynamic. if err != nil { return common.DevConsoleCommonResponse{}, fmt.Errorf("failed to parse request: %v", err) } - TEKTON_RESULTS_HOST, err := getTRHost(dynamicClient, k8sMode) + TEKTON_RESULTS_HOST, err := getTRHost(r.Context(), dynamicClient, k8sMode) if err != nil { return common.DevConsoleCommonResponse{}, fmt.Errorf("failed to get TektonResults host: %v", err) } @@ -179,7 +191,7 @@ func GetResultsSummary(r *http.Request, user *auth.User, dynamicClient *dynamic. parsedParams.Encode(), ) - return makeHTTPRequest(SUMMARY_URL, user.Token) + return makeHTTPRequest(r.Context(), SUMMARY_URL, user.Token) } func GetTaskRunLog(r *http.Request, user *auth.User, dynamicClient *dynamic.DynamicClient, k8sMode string) (common.DevConsoleCommonResponse, error) { @@ -188,7 +200,7 @@ func GetTaskRunLog(r *http.Request, user *auth.User, dynamicClient *dynamic.Dyna if err != nil { return common.DevConsoleCommonResponse{}, fmt.Errorf("failed to parse request: %v", err) } - TEKTON_RESULTS_HOST, err := getTRHost(dynamicClient, k8sMode) + TEKTON_RESULTS_HOST, err := getTRHost(r.Context(), dynamicClient, k8sMode) if err != nil { return common.DevConsoleCommonResponse{}, fmt.Errorf("failed to get TektonResults host: %v", err) } @@ -198,5 +210,5 @@ func GetTaskRunLog(r *http.Request, user *auth.User, dynamicClient *dynamic.Dyna request.TaskRunPath, ) - return makeHTTPRequest(TASKRUN_LOG_URL, user.Token) + return makeHTTPRequest(r.Context(), TASKRUN_LOG_URL, user.Token) } diff --git a/pkg/devconsole/webhooks/webhooks.go b/pkg/devconsole/webhooks/webhooks.go index ab2e94c2af6..daee0f54b55 100644 --- a/pkg/devconsole/webhooks/webhooks.go +++ b/pkg/devconsole/webhooks/webhooks.go @@ -2,6 +2,7 @@ package webhooks import ( "bytes" + "context" "encoding/json" "fmt" "io" @@ -13,8 +14,14 @@ import ( "github.com/openshift/console/pkg/devconsole/common" ) -func makeHTTPRequest(url string, headers http.Header, body []byte, proxyHeaderDenyList []string) (common.DevConsoleCommonResponse, error) { - serviceRequest, err := http.NewRequest(http.MethodPost, url, bytes.NewReader(body)) +var client *http.Client = &http.Client{ + Transport: &http.Transport{ + Proxy: http.ProxyFromEnvironment, + }, +} + +func makeHTTPRequest(ctx context.Context, url string, headers http.Header, body []byte, proxyHeaderDenyList []string) (common.DevConsoleCommonResponse, error) { + serviceRequest, err := http.NewRequestWithContext(ctx, http.MethodPost, url, bytes.NewReader(body)) if err != nil { return common.DevConsoleCommonResponse{}, fmt.Errorf("failed to create request: %v", err) } @@ -28,15 +35,7 @@ func makeHTTPRequest(url string, headers http.Header, body []byte, proxyHeaderDe } } - serviceTransport := &http.Transport{ - Proxy: http.ProxyFromEnvironment, - } - - serviceClient := &http.Client{ - Transport: serviceTransport, - } - - serviceResponse, err := serviceClient.Do(serviceRequest) + serviceResponse, err := client.Do(serviceRequest) if err != nil { return common.DevConsoleCommonResponse{}, fmt.Errorf("failed to send request: %v", err) } @@ -72,7 +71,7 @@ func CreateGithubWebhook(r *http.Request, user *auth.User, proxyHeaderDenyList [ url.PathEscape(request.RepoName), ) - return makeHTTPRequest(GH_WEBHOOK_URL, request.Headers, bodyBytes, proxyHeaderDenyList) + return makeHTTPRequest(r.Context(), GH_WEBHOOK_URL, request.Headers, bodyBytes, proxyHeaderDenyList) } @@ -95,7 +94,7 @@ func CreateGitlabWebhook(r *http.Request, user *auth.User, proxyHeaderDenyList [ url.PathEscape(request.ProjectID), ) - return makeHTTPRequest(GL_WEBHOOK_URL, request.Headers, bodyBytes, proxyHeaderDenyList) + return makeHTTPRequest(r.Context(), GL_WEBHOOK_URL, request.Headers, bodyBytes, proxyHeaderDenyList) } func CreateBitbucketWebhook(r *http.Request, user *auth.User, proxyHeaderDenyList []string) (common.DevConsoleCommonResponse, error) { @@ -127,5 +126,5 @@ func CreateBitbucketWebhook(r *http.Request, user *auth.User, proxyHeaderDenyLis ) } - return makeHTTPRequest(BB_WEBHOOK_URL, request.Headers, bodyBytes, proxyHeaderDenyList) + return makeHTTPRequest(r.Context(), BB_WEBHOOK_URL, request.Headers, bodyBytes, proxyHeaderDenyList) } From fee143b41d645e850b53441497a93c302ebe2dc1 Mon Sep 17 00:00:00 2001 From: Robb Hamilton Date: Thu, 15 May 2025 08:12:56 -0400 Subject: [PATCH 065/102] OCPBUGS-56255: remove 60 day alert from cluster update modal --- .../modals/cluster-update-modal.tsx | 39 ++++--------------- .../public/components/utils/documentation.tsx | 5 --- frontend/public/locales/en/public.json | 5 +-- 3 files changed, 9 insertions(+), 40 deletions(-) diff --git a/frontend/public/components/modals/cluster-update-modal.tsx b/frontend/public/components/modals/cluster-update-modal.tsx index ab998d7504b..348ae68e56f 100644 --- a/frontend/public/components/modals/cluster-update-modal.tsx +++ b/frontend/public/components/modals/cluster-update-modal.tsx @@ -3,21 +3,10 @@ import * as React from 'react'; import { useTranslation } from 'react-i18next'; import { Alert, Radio, Text, TextContent, TextVariants } from '@patternfly/react-core'; import { useK8sWatchResource } from '@console/internal/components/utils/k8s-watch-hook'; -import { - documentationURLs, - ExternalLink, - getDocumentationURL, -} from '@console/internal/components/utils'; import { DropdownWithSwitch } from '@console/shared/src/components/dropdown'; import { ClusterVersionModel, MachineConfigPoolModel, NodeModel } from '../../models'; -import { - FieldLevelHelp, - HandlePromiseProps, - LinkifyExternal, - isManaged, - withHandlePromise, -} from '../utils'; +import { FieldLevelHelp, HandlePromiseProps, LinkifyExternal, withHandlePromise } from '../utils'; import { ClusterVersionKind, getConditionUpgradeableFalse, @@ -189,7 +178,6 @@ const ClusterUpdateModal = withHandlePromise((props: ClusterUpdateModalProps) => label: t('public~Have known issues'), }); } - const helpURL = getDocumentationURL(documentationURLs.updateUsingCustomMachineConfigPools); return ( @@ -255,7 +243,7 @@ const ClusterUpdateModal = withHandlePromise((props: ClusterUpdateModalProps) => {t('public~Update options')} {t( - "public~Full cluster update allows you to update all your Nodes, but takes longer. Control plane only update allows you to pause worker and custom pool Nodes to accommodate your maintenance schedule, but you'll need to resume the non-control plane Node updates within 60 days to avoid failure.", + 'public~Full cluster update allows you to update all your Nodes, but takes longer. Control plane only update allows you to pause worker and custom pool Nodes to accommodate your maintenance schedule.', )} @@ -307,24 +295,11 @@ const ClusterUpdateModal = withHandlePromise((props: ClusterUpdateModalProps) => className="pf-v5-u-mb-md" body={ upgradeType === upgradeTypes.Partial && ( - <> - - - {!isManaged() && ( - {t('public~Learn more')} - )} - - + ) } data-test="update-cluster-modal-partial-update-radio" diff --git a/frontend/public/components/utils/documentation.tsx b/frontend/public/components/utils/documentation.tsx index ba5b00ebf3b..80208062ce8 100644 --- a/frontend/public/components/utils/documentation.tsx +++ b/frontend/public/components/utils/documentation.tsx @@ -61,11 +61,6 @@ export const documentationURLs: documentationURLsType = { 'html/updating_clusters/performing-a-cluster-update#updating-a-cluster-in-a-disconnected-environment', upstream: '', // intentionally blank as there is no upstream equivalent }, - updateUsingCustomMachineConfigPools: { - downstream: - 'html/updating_clusters/performing-a-cluster-update#update-using-custom-machine-config-pools', - upstream: 'updating/updating_a_cluster/update-using-custom-machine-config-pools.html', - }, usingInsights: { downstream: 'html/support/remote-health-monitoring-with-connected-clusters#using-insights-to-identify-issues-with-your-cluster', diff --git a/frontend/public/locales/en/public.json b/frontend/public/locales/en/public.json index 98002b196ee..2eefb9114c4 100644 --- a/frontend/public/locales/en/public.json +++ b/frontend/public/locales/en/public.json @@ -831,14 +831,12 @@ "These versions are supported, but include known issues. Review the known issues before updating.": "These versions are supported, but include known issues. Review the known issues before updating.", "Updating this cluster to {{desiredVersion}} is supported, but includes known issues. Review the known issues before updating.": "Updating this cluster to {{desiredVersion}} is supported, but includes known issues. Review the known issues before updating.", "Update options": "Update options", - "Full cluster update allows you to update all your Nodes, but takes longer. Control plane only update allows you to pause worker and custom pool Nodes to accommodate your maintenance schedule, but you'll need to resume the non-control plane Node updates within 60 days to avoid failure.": "Full cluster update allows you to update all your Nodes, but takes longer. Control plane only update allows you to pause worker and custom pool Nodes to accommodate your maintenance schedule, but you'll need to resume the non-control plane Node updates within 60 days to avoid failure.", + "Full cluster update allows you to update all your Nodes, but takes longer. Control plane only update allows you to pause worker and custom pool Nodes to accommodate your maintenance schedule.": "Full cluster update allows you to update all your Nodes, but takes longer. Control plane only update allows you to pause worker and custom pool Nodes to accommodate your maintenance schedule.", "Full cluster update": "Full cluster update", "{{master}}, {{worker}}, and custom pool {{resource}} are updated concurrently. This might take longer, so make sure to allocate enough time for maintenance.": "{{master}}, {{worker}}, and custom pool {{resource}} are updated concurrently. This might take longer, so make sure to allocate enough time for maintenance.", "Paused {{worker}} or custom pool {{resource}} updates will be resumed. If you want to update only the control plane, select \"Control plane only update\" below.": "Paused {{worker}} or custom pool {{resource}} updates will be resumed. If you want to update only the control plane, select \"Control plane only update\" below.", "Control plane only update": "Control plane only update", "Pause {{worker}} or custom pool {{resource}} updates to accommodate your maintenance schedule.": "Pause {{worker}} or custom pool {{resource}} updates to accommodate your maintenance schedule.", - "You must resume updates within 60 days to avoid failures.": "You must resume updates within 60 days to avoid failures.", - "Learn more": "Learn more", "Update": "Update", "Selected columns will appear in the table.": "Selected columns will appear in the table.", "You can select up to {{MAX_VIEW_COLS}} columns": "You can select up to {{MAX_VIEW_COLS}} columns", @@ -1921,6 +1919,7 @@ "TCP socket (port)": "TCP socket (port)", "Admission Webhook Warning": "Admission Webhook Warning", "{{kind}} {{name}} violates policy {{warning}}": "{{kind}} {{name}} violates policy {{warning}}", + "Learn more": "Learn more", "Are you sure you want to remove <1>{{label}} from navigation?": "Are you sure you want to remove <1>{{label}} from navigation?", "Refer to your cluster administrator to know which network provider is used.": "Refer to your cluster administrator to know which network provider is used.", "Input error: selectors must start and end by a letter or number, and can only contain -, _, / or . Offending value: {{offendingSelector}}": "Input error: selectors must start and end by a letter or number, and can only contain -, _, / or . Offending value: {{offendingSelector}}", From 6a13af93fdad43be8d09c260b6cc3d7b81afa161 Mon Sep 17 00:00:00 2001 From: cyril-ui-developer Date: Fri, 25 Apr 2025 10:46:59 -0400 Subject: [PATCH 066/102] HPA require CPU resource limit even though HPAs use requests for scaling --- .../dev-console/locales/en/devconsole.json | 7 +-- .../src/components/hpa/HPADetailsForm.tsx | 4 +- .../src/components/hpa/HPAFormikForm.tsx | 7 --- .../hpa/__tests__/hpa-utils.spec.ts | 50 +++---------------- .../src/components/hpa/hpa-utils.ts | 42 ++-------------- .../src/components/hpa/validation-utils.ts | 18 ------- 6 files changed, 11 insertions(+), 117 deletions(-) diff --git a/frontend/packages/dev-console/locales/en/devconsole.json b/frontend/packages/dev-console/locales/en/devconsole.json index ef17c0fe9df..abdb74e1d6c 100644 --- a/frontend/packages/dev-console/locales/en/devconsole.json +++ b/frontend/packages/dev-console/locales/en/devconsole.json @@ -342,13 +342,9 @@ "Path": "Path", "argument": "argument", "The command to run inside the Container.": "The command to run inside the Container.", - "CPU and memory resource limits must be set if you want to use CPU and memory utilization. The HorizontalPodAutoscaler will not have CPU or memory metrics until resource limits are set.": "CPU and memory resource limits must be set if you want to use CPU and memory utilization. The HorizontalPodAutoscaler will not have CPU or memory metrics until resource limits are set.", + "CPU and memory resource requests must be set if you want to use CPU and memory utilization. The HorizontalPodAutoscaler will not have CPU or memory metrics until resource requests are set.": "CPU and memory resource requests must be set if you want to use CPU and memory utilization. The HorizontalPodAutoscaler will not have CPU or memory metrics until resource requests are set.", "CPU resource limits must be set if you want to use CPU utilization. The HorizontalPodAutoscaler will not have CPU metrics until resource limits are set.": "CPU resource limits must be set if you want to use CPU utilization. The HorizontalPodAutoscaler will not have CPU metrics until resource limits are set.", "Memory resource limits must be set if you want to use memory utilization. The HorizontalPodAutoscaler will not have memory metrics until resource limits are set.": "Memory resource limits must be set if you want to use memory utilization. The HorizontalPodAutoscaler will not have memory metrics until resource limits are set.", - "Cannot create a HorizontalPodAutoscaler with no valid metrics.": "Cannot create a HorizontalPodAutoscaler with no valid metrics.", - "CPU and memory utilization cannot be used currently.": "CPU and memory utilization cannot be used currently.", - "CPU utilization cannot be used currently.": "CPU utilization cannot be used currently.", - "Memory utilization cannot be used currently.": "Memory utilization cannot be used currently.", "Note: Some fields may not be represented in this form view. Please select \"YAML view\" for full control.": "Note: Some fields may not be represented in this form view. Please select \"YAML view\" for full control.", "Minimum Pods": "Minimum Pods", "Maximum Pods": "Maximum Pods", @@ -368,7 +364,6 @@ "Maximum Pods must be an integer.": "Maximum Pods must be an integer.", "Maximum Pods should be greater than or equal to Minimum Pods.": "Maximum Pods should be greater than or equal to Minimum Pods.", "Max Pods must be defined.": "Max Pods must be defined.", - "Average utilization must be a positive number.": "Average utilization must be a positive number.", "Health checks": "Health checks", "Resource limits": "Resource limits", "Labels": "Labels", diff --git a/frontend/packages/dev-console/src/components/hpa/HPADetailsForm.tsx b/frontend/packages/dev-console/src/components/hpa/HPADetailsForm.tsx index 291ad0527d2..6cdfb472cdf 100644 --- a/frontend/packages/dev-console/src/components/hpa/HPADetailsForm.tsx +++ b/frontend/packages/dev-console/src/components/hpa/HPADetailsForm.tsx @@ -15,7 +15,7 @@ const HPADetailsForm: React.FC = () => { const { setFieldValue, values: { - disabledFields: { name: nameDisabled, cpuUtilization, memoryUtilization }, + disabledFields: { name: nameDisabled }, showCanUseYAMLMessage, }, } = useFormikContext(); @@ -84,14 +84,12 @@ const HPADetailsForm: React.FC = () => { setOutputAsIntegerFlag /> = ({ existingHPA, targetResour values.editorType === EditorType.YAML ? safeYAMLToJS(values.yamlData) : values.formData, ); - const invalidUsageError = getInvalidUsageError(hpa, values); - if (invalidUsageError) { - helpers.setStatus({ submitError: invalidUsageError }); - return Promise.resolve(); - } - const method: ( kind: K8sKind, data: HorizontalPodAutoscalerKind, diff --git a/frontend/packages/dev-console/src/components/hpa/__tests__/hpa-utils.spec.ts b/frontend/packages/dev-console/src/components/hpa/__tests__/hpa-utils.spec.ts index 61fbee1a36b..46d6ea89e5c 100644 --- a/frontend/packages/dev-console/src/components/hpa/__tests__/hpa-utils.spec.ts +++ b/frontend/packages/dev-console/src/components/hpa/__tests__/hpa-utils.spec.ts @@ -2,7 +2,6 @@ import { cloneDeep } from 'lodash'; import { DeploymentKind, HorizontalPodAutoscalerKind } from '@console/internal/module/k8s'; import { getFormData, - getInvalidUsageError, getLimitWarning, getMetricByType, getYAMLData, @@ -12,7 +11,6 @@ import { sanitizeHPAToForm, sanityForSubmit, } from '../hpa-utils'; -import { HPAFormValues } from '../types'; import { deploymentConfigExamples, deploymentExamples, hpaExamples } from './hpa-utils-data'; describe('isCpuUtilizationPossible provides accurate checks', () => { @@ -144,30 +142,28 @@ describe('getYAMLData gets back an hpa structured editor string', () => { describe('getMetricByType returns an appropriate metric and the index it is at', () => { it('expect no metrics to return a default metric as a new metric on the end', () => { - const { metric, index } = getMetricByType(hpaExamples.noMetrics, 'memory'); + const { metric } = getMetricByType(hpaExamples.noMetrics, 'memory'); expect(metric).toBeTruthy(); expect(metric.resource.name).toBe('memory'); - expect(metric.resource.target.averageUtilization).toBe(0); - expect(index).toBe(0); + expect(metric.resource.target.averageUtilization).toBe(50); }); it('expect to get back a default memory metric when only cpu metric is available', () => { const { metric, index } = getMetricByType(hpaExamples.cpuScaled, 'memory'); expect(metric).toBeTruthy(); expect(metric.resource.name).toBe('memory'); - expect(metric.resource.target.averageUtilization).toBe(0); + expect(metric.resource.target.averageUtilization).toBe(50); expect(index).toBe(1); }); it('expect to get back the cpu metric when it is available', () => { const hpaResource: HorizontalPodAutoscalerKind = hpaExamples.cpuScaled; - const { metric, index } = getMetricByType(hpaResource, 'cpu'); + const { metric } = getMetricByType(hpaResource, 'cpu'); expect(metric).toBeTruthy(); expect(metric.resource.name).toBe('cpu'); expect(metric.resource.target.averageUtilization).toBe( hpaResource.spec.metrics[0].resource.target.averageUtilization, ); - expect(index).toBe(0); }); }); @@ -234,8 +230,8 @@ describe('sanityForSubmit covers some basic field locking and trimming', () => { it('expect not to have empty cpu or memory metrics', () => { const overriddenResource: HorizontalPodAutoscalerKind = cloneDeep(hpaResource); - overriddenResource.spec.metrics[0].resource.target.averageUtilization = 0; - expect(sanityForSubmit(deploymentResource, overriddenResource).spec.metrics.length).toBe(0); + overriddenResource.spec.metrics[0].resource.target.averageUtilization = 50; + expect(sanityForSubmit(deploymentResource, overriddenResource).spec.metrics.length).toBe(1); }); it('expect not to trim custom resource metrics', () => { @@ -246,40 +242,6 @@ describe('sanityForSubmit covers some basic field locking and trimming', () => { }); }); -describe('getInvalidUsageError returns an error string when limits are not set', () => { - const formValues: HPAFormValues = { - showCanUseYAMLMessage: false, - disabledFields: { - name: false, - cpuUtilization: true, - memoryUtilization: true, - }, - editorType: null, - formData: null, - yamlData: null, - }; - const hpaResource: HorizontalPodAutoscalerKind = hpaExamples.cpuScaled; - - it('expect no metrics to be an error', () => { - const noMetricsHPA: HorizontalPodAutoscalerKind = hpaExamples.noMetrics; - expect(typeof getInvalidUsageError(noMetricsHPA, formValues)).toBe('string'); - - const emptyMetricsHPA: HorizontalPodAutoscalerKind = cloneDeep(noMetricsHPA); - emptyMetricsHPA.spec.metrics = []; - expect(typeof getInvalidUsageError(emptyMetricsHPA, formValues)).toBe('string'); - }); - - it('expect cpu metric not to be allowed while disabled', () => { - expect(typeof getInvalidUsageError(hpaResource, formValues)).toBe('string'); - }); - - it('expect memory metric to not be allowed while disabled', () => { - const memoryHPA = cloneDeep(hpaResource); - memoryHPA.spec.metrics[0].resource.name = 'memory'; - expect(typeof getInvalidUsageError(memoryHPA, formValues)).toBe('string'); - }); -}); - describe('hasCustomMetrics accurately determines if an hpa contains non-default metrics', () => { it('expect no metrics to mean no custom metrics', () => { expect(hasCustomMetrics(null)).toBe(false); diff --git a/frontend/packages/dev-console/src/components/hpa/hpa-utils.ts b/frontend/packages/dev-console/src/components/hpa/hpa-utils.ts index df0e99dda70..9fac465c60d 100644 --- a/frontend/packages/dev-console/src/components/hpa/hpa-utils.ts +++ b/frontend/packages/dev-console/src/components/hpa/hpa-utils.ts @@ -10,7 +10,7 @@ import { } from '@console/internal/module/k8s'; import { LimitsData } from '@console/shared/src'; import { safeJSToYAML, safeYAMLToJS } from '@console/shared/src/utils/yaml'; -import { HPAFormValues, SupportedMetricTypes } from './types'; +import { SupportedMetricTypes } from './types'; export const VALID_HPA_TARGET_KINDS = ['Deployment', 'DeploymentConfig']; @@ -31,7 +31,7 @@ export const getLimitWarning = (resource: K8sResourceKind): string => { if (!limits) { return i18next.t( - 'devconsole~CPU and memory resource limits must be set if you want to use CPU and memory utilization. The HorizontalPodAutoscaler will not have CPU or memory metrics until resource limits are set.', + 'devconsole~CPU and memory resource requests must be set if you want to use CPU and memory utilization. The HorizontalPodAutoscaler will not have CPU or memory metrics until resource requests are set.', ); } @@ -58,7 +58,7 @@ const getDefaultMetric = (type: SupportedMetricTypes): HPAMetric => ({ resource: { name: type, target: { - averageUtilization: 0, + averageUtilization: 50, type: 'Utilization', }, }, @@ -128,45 +128,9 @@ export const sanityForSubmit = ( { spec: { scaleTargetRef: createScaleTargetRef(targetResource) } }, ); - // Remove empty metrics - validHPA.spec.metrics = validHPA.spec.metrics?.filter( - (metric: HPAMetric) => - !['cpu', 'memory'].includes(metric?.resource?.name?.toLowerCase()) || - (metric.resource.target.type === 'Utilization' && - metric.resource.target.averageUtilization > 0), - ); - return validHPA; }; -export const getInvalidUsageError = ( - hpa: HorizontalPodAutoscalerKind, - formValues: HPAFormValues, -): string => { - const lackCPULimits = formValues.disabledFields.cpuUtilization; - const lackMemoryLimits = formValues.disabledFields.memoryUtilization; - const metricNames = (hpa.spec.metrics || []).map((metric) => - metric.resource?.name?.toLowerCase(), - ); - const invalidCPU = lackCPULimits && metricNames.includes('cpu'); - const invalidMemory = lackMemoryLimits && metricNames.includes('memory'); - - if (metricNames.length === 0) { - return i18next.t('devconsole~Cannot create a HorizontalPodAutoscaler with no valid metrics.'); - } - if (invalidCPU && invalidMemory) { - return i18next.t('devconsole~CPU and memory utilization cannot be used currently.'); - } - if (invalidCPU) { - return i18next.t('devconsole~CPU utilization cannot be used currently.'); - } - if (invalidMemory) { - return i18next.t('devconsole~Memory utilization cannot be used currently.'); - } - - return null; -}; - export const hasCustomMetrics = (hpa?: HorizontalPodAutoscalerKind): boolean => { const metrics = hpa?.spec?.metrics; if (!metrics) { diff --git a/frontend/packages/dev-console/src/components/hpa/validation-utils.ts b/frontend/packages/dev-console/src/components/hpa/validation-utils.ts index bc1654d2bea..ff286966b5e 100644 --- a/frontend/packages/dev-console/src/components/hpa/validation-utils.ts +++ b/frontend/packages/dev-console/src/components/hpa/validation-utils.ts @@ -51,24 +51,6 @@ export const hpaValidationSchema = (t: TFunction) => }, ) .required(t('devconsole~Max Pods must be defined.')), - metrics: yup.array( - yup.object({ - resource: yup.object({ - target: yup.object({ - averageUtilization: yup - .mixed() - .test( - 'test-for-valid-utilization', - t('devconsole~Average utilization must be a positive number.'), - function (avgUtilization) { - if (!avgUtilization) return true; - return /^\d+$/.test(String(avgUtilization)); - }, - ), - }), - }), - }), - ), }), }), }), From 0fda4488cf2c1eb55f9e20f5ddf43bc90789eb19 Mon Sep 17 00:00:00 2001 From: Lokananda Prabhu Date: Mon, 5 May 2025 16:12:04 +0530 Subject: [PATCH 067/102] Resolved no access error for users in event source page --- .../src/app/components/utils/rbac.tsx | 20 ++++++++++++++++++- .../src/hooks/useEventSourceStatus.ts | 19 ++++++++++-------- 2 files changed, 30 insertions(+), 9 deletions(-) diff --git a/frontend/packages/console-dynamic-plugin-sdk/src/app/components/utils/rbac.tsx b/frontend/packages/console-dynamic-plugin-sdk/src/app/components/utils/rbac.tsx index 4c753b3be7e..47529207b55 100644 --- a/frontend/packages/console-dynamic-plugin-sdk/src/app/components/utils/rbac.tsx +++ b/frontend/packages/console-dynamic-plugin-sdk/src/app/components/utils/rbac.tsx @@ -107,6 +107,7 @@ export const checkAccess = ( export const useAccessReview = ( resourceAttributes: AccessReviewResourceAttributes, impersonate?: ImpersonateKind, + noCheckForEmptyGroupAndResource?: boolean, ): [boolean, boolean] => { const [loading, setLoading] = useSafetyFirst(true); const [isAllowed, setAllowed] = useSafetyFirst(false); @@ -121,7 +122,13 @@ export const useAccessReview = ( namespace = '', } = resourceAttributes; const impersonateKey = getImpersonateKey(impersonate); + const skipCheck = noCheckForEmptyGroupAndResource && !group && !resource; React.useEffect(() => { + if (skipCheck) { + setAllowed(false); + setLoading(false); + return; + } checkAccessInternal(group, resource, subresource, verb, name, namespace, impersonateKey) .then((result: SelfSubjectAccessReviewKind) => { setAllowed(result.status.allowed); @@ -136,7 +143,18 @@ export const useAccessReview = ( setAllowed(true); setLoading(false); }); - }, [setLoading, setAllowed, group, resource, subresource, verb, name, namespace, impersonateKey]); + }, [ + setLoading, + setAllowed, + group, + resource, + subresource, + verb, + name, + namespace, + impersonateKey, + skipCheck, + ]); return [isAllowed, loading]; }; diff --git a/frontend/packages/knative-plugin/src/hooks/useEventSourceStatus.ts b/frontend/packages/knative-plugin/src/hooks/useEventSourceStatus.ts index c4d31704824..47e71e40c0d 100644 --- a/frontend/packages/knative-plugin/src/hooks/useEventSourceStatus.ts +++ b/frontend/packages/knative-plugin/src/hooks/useEventSourceStatus.ts @@ -1,6 +1,6 @@ import * as React from 'react'; import { useTranslation } from 'react-i18next'; -import { useAccessReview2 } from '@console/internal/components/utils'; +import { useAccessReview } from '@console/dynamic-plugin-sdk/src'; import { useK8sGet } from '@console/internal/components/utils/k8s-get-hook'; import { K8sKind, K8sResourceKind } from '@console/internal/module/k8s'; import { KnEventCatalogMetaData } from '../components/add/import-types'; @@ -50,13 +50,16 @@ export const useEventSourceStatus = ( !isKameletSource && eventSourceModels?.find((model: K8sKind) => model.kind === sourceKindProp); const sourceModel = isKameletSource ? CamelKameletBindingModel : eventSourceModel; - - const [createSourceAccess, createSourceAccessLoading] = useAccessReview2({ - group: sourceModel?.apiGroup, - resource: sourceModel?.plural, - verb: 'create', - namespace, - }); + const [createSourceAccess, createSourceAccessLoading] = useAccessReview( + { + group: sourceModel?.apiGroup, + resource: sourceModel?.plural, + verb: 'create', + namespace, + }, + undefined, + true, + ); const sourceStatus = React.useMemo(() => { if (!isSourceKindPresent) { From 846a4a7d05ff154022781773fb68dcef20df282b Mon Sep 17 00:00:00 2001 From: Samuel Padgett Date: Wed, 23 Apr 2025 12:02:20 -0400 Subject: [PATCH 068/102] OCPBUGS-54157: Sample segment sessions --- .../src/listeners/segment.ts | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/frontend/packages/console-telemetry-plugin/src/listeners/segment.ts b/frontend/packages/console-telemetry-plugin/src/listeners/segment.ts index e60a86839df..c9f1d23173e 100644 --- a/frontend/packages/console-telemetry-plugin/src/listeners/segment.ts +++ b/frontend/packages/console-telemetry-plugin/src/listeners/segment.ts @@ -1,6 +1,9 @@ import { TelemetryEventListener } from '@console/dynamic-plugin-sdk/src'; import { TELEMETRY_DISABLED, TELEMETRY_DEBUG } from './const'; +// Sample 20% of sessions +const SAMPLE_SESSION = Math.random() < 0.2; + /** Segmnet API Key that looks like a hash */ const apiKey = window.SERVER_FLAGS?.telemetry?.DEVSANDBOX_SEGMENT_API_KEY || @@ -97,7 +100,7 @@ const initSegment = () => { analytics.load(apiKey, options); }; -if (!TELEMETRY_DISABLED && apiKey) { +if (!TELEMETRY_DISABLED && apiKey && SAMPLE_SESSION) { initSegment(); } @@ -122,6 +125,17 @@ export const eventListener: TelemetryEventListener = async ( } return; } + if (!SAMPLE_SESSION) { + if (TELEMETRY_DEBUG) { + // eslint-disable-next-line no-console + console.debug( + 'console-telemetry-plugin: session is not being sampled - ignoring telemetry event', + eventType, + properties, + ); + } + return; + } switch (eventType) { case 'identify': { From 6709e95723cae249343cfa7cfb542df3f2b8125c Mon Sep 17 00:00:00 2001 From: logonoff Date: Wed, 4 Jun 2025 17:18:03 -0400 Subject: [PATCH 069/102] OCPBUGS-57093: Add all files to `vendor` regardless of gitignore --- .gitignore | 1 + test-backend.sh | 11 +++++++++++ vendor/github.com/subosito/gotenv/.env | 1 + 3 files changed, 13 insertions(+) create mode 100644 vendor/github.com/subosito/gotenv/.env diff --git a/.gitignore b/.gitignore index 9d762be62ad..e294ea49399 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,7 @@ .env .idea .vscode +!/vendor/** !.vscode/settings.json .DS_Store cypress-a11y-report.json diff --git a/test-backend.sh b/test-backend.sh index 59df18ad984..4725aa89611 100755 --- a/test-backend.sh +++ b/test-backend.sh @@ -28,6 +28,17 @@ OPENSHIFT_CI=${OPENSHIFT_CI:=false} TESTABLE="./..." FORMATTABLE=(cmd pkg) +# ensure console can be built with konflux +echo "Verifying go deps..." +go mod tidy +go mod vendor +CHANGES=$(git status --porcelain --ignored) +if [ -n "$CHANGES" ] ; then + echo "ERROR: detected vendor inconsistency after 'go mod tidy; go mod vendor':" + echo "$CHANGES" + exit 1 +fi + # user has not provided PKG override if [ -z "${PKG}" ]; then TEST=${TESTABLE} diff --git a/vendor/github.com/subosito/gotenv/.env b/vendor/github.com/subosito/gotenv/.env new file mode 100644 index 00000000000..6405eca71f7 --- /dev/null +++ b/vendor/github.com/subosito/gotenv/.env @@ -0,0 +1 @@ +HELLO=world From 5b370a41eb4a8adb1c954e746544bf3c7a0baea8 Mon Sep 17 00:00:00 2001 From: Jon Jackson Date: Wed, 4 Jun 2025 13:12:26 -0400 Subject: [PATCH 070/102] OCPBUGS-56148: Fix '/metrics' endpoint token review to handle internal prometheus scrape requests --- pkg/auth/oauth2/auth.go | 9 ++------- pkg/auth/static/auth.go | 3 ++- pkg/auth/types.go | 3 ++- pkg/metrics/handler.go | 16 --------------- pkg/server/middleware.go | 42 +++++++++++++++++++++++++++++++++++++++- pkg/server/server.go | 17 +++++++++------- 6 files changed, 57 insertions(+), 33 deletions(-) delete mode 100644 pkg/metrics/handler.go diff --git a/pkg/auth/oauth2/auth.go b/pkg/auth/oauth2/auth.go index 999512e8e9e..fe789b5956b 100644 --- a/pkg/auth/oauth2/auth.go +++ b/pkg/auth/oauth2/auth.go @@ -304,12 +304,7 @@ func (a *OAuth2Authenticator) LoginFunc(w http.ResponseWriter, r *http.Request) http.Redirect(w, r, a.oauth2Config().AuthCodeURL(state), http.StatusSeeOther) } -func (a *OAuth2Authenticator) ReviewToken(r *http.Request) error { - token, err := sessions.GetSessionTokenFromCookie(r) - if err != nil { - return err - } - +func (a *OAuth2Authenticator) ReviewToken(ctx context.Context, token string) error { tokenReview := &authv1.TokenReview{ TypeMeta: metav1.TypeMeta{ APIVersion: "authentication.k8s.io/v1", @@ -324,7 +319,7 @@ func (a *OAuth2Authenticator) ReviewToken(r *http.Request) error { internalK8sClientset. AuthenticationV1(). TokenReviews(). - Create(r.Context(), tokenReview, metav1.CreateOptions{}) + Create(ctx, tokenReview, metav1.CreateOptions{}) if err != nil { return fmt.Errorf("failed to create TokenReview, %v", err) diff --git a/pkg/auth/static/auth.go b/pkg/auth/static/auth.go index a4e42b4ba36..1b9f743725b 100644 --- a/pkg/auth/static/auth.go +++ b/pkg/auth/static/auth.go @@ -1,6 +1,7 @@ package static import ( + "context" "net/http" "github.com/openshift/console/pkg/auth" @@ -22,7 +23,7 @@ func (s *StaticAuthenticator) Authenticate(w http.ResponseWriter, req *http.Requ return &userCopy, nil } -func (s *StaticAuthenticator) ReviewToken(r *http.Request) error { +func (s *StaticAuthenticator) ReviewToken(ctx context.Context, token string) error { return nil } diff --git a/pkg/auth/types.go b/pkg/auth/types.go index 532ba854538..4effd05033b 100644 --- a/pkg/auth/types.go +++ b/pkg/auth/types.go @@ -1,6 +1,7 @@ package auth import ( + "context" "net/http" "github.com/openshift/console/pkg/auth/sessions" @@ -8,7 +9,7 @@ import ( type Authenticator interface { Authenticate(w http.ResponseWriter, req *http.Request) (*User, error) - ReviewToken(r *http.Request) error + ReviewToken(context context.Context, token string) error LoginFunc(w http.ResponseWriter, req *http.Request) LogoutFunc(w http.ResponseWriter, req *http.Request) diff --git a/pkg/metrics/handler.go b/pkg/metrics/handler.go deleted file mode 100644 index d274ac5886b..00000000000 --- a/pkg/metrics/handler.go +++ /dev/null @@ -1,16 +0,0 @@ -package metrics - -import "net/http" - -func AddHeaderAsCookieMiddleware(next http.Handler) http.Handler { - return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { - // Requests from prometheus-k8s have the access token in headers instead of cookies. - // This allows metric requests with proper tokens in either headers or cookies. - if r.URL.Path == "/metrics" { - openshiftSessionCookieName := "openshift-session-token" - openshiftSessionCookieValue := r.Header.Get("Authorization") // FIXME: in OIDC setup, this actually ends up checking the token "Bearer " to the underlying auth layer - instead of ``. - r.AddCookie(&http.Cookie{Name: openshiftSessionCookieName, Value: openshiftSessionCookieValue}) - } - next.ServeHTTP(w, r) - }) -} diff --git a/pkg/server/middleware.go b/pkg/server/middleware.go index 98de933863f..0f474571590 100644 --- a/pkg/server/middleware.go +++ b/pkg/server/middleware.go @@ -44,9 +44,49 @@ func authMiddlewareWithUser(authenticator auth.Authenticator, csrfVerifier *csrf } func withTokenReview(authenticator auth.Authenticator, h http.HandlerFunc) http.HandlerFunc { + return func(w http.ResponseWriter, r *http.Request) { + user, err := authenticator.Authenticate(w, r) + if err != nil { + klog.Errorf("TOKEN_REVIEW: '%s %s' unauthorized, unable to authenticate, %v", r.Method, r.URL.Path, err) + w.WriteHeader(http.StatusUnauthorized) + return + } + + err = authenticator.ReviewToken(r.Context(), user.Token) + if err != nil { + klog.Errorf("TOKEN_REVIEW: '%s %s' unauthorized, invalid user token, %v", r.Method, r.URL.Path, err) + w.WriteHeader(http.StatusUnauthorized) + return + } + klog.V(4).Infof("TOKEN_REVIEW: '%s %s' user token successfully validated", r.Method, r.URL.Path) + h(w, r) + } +} + +func withBearerTokenReview(authenticator auth.Authenticator, h http.HandlerFunc) http.HandlerFunc { return http.HandlerFunc( func(w http.ResponseWriter, r *http.Request) { - err := authenticator.ReviewToken(r) + authorizationHeader := r.Header.Get("Authorization") + if authorizationHeader == "" { + klog.Errorf("TOKEN_REVIEW: '%s %s' unauthorized, missing Authorization header", r.Method, r.URL.Path) + w.WriteHeader(http.StatusUnauthorized) + return + } + + if !strings.HasPrefix(authorizationHeader, "Bearer") { + klog.Errorf("TOKEN_REVIEW: '%s %s' unauthorized, 'Bearer' type Authorization header required", r.Method, r.URL.Path) + w.WriteHeader(http.StatusUnauthorized) + return + } + + bearerToken := strings.TrimPrefix(authorizationHeader, "Bearer ") + if bearerToken == "" { + klog.Errorf("TOKEN_REVIEW: '%s %s' unauthorized, empty or missing Bearer token", r.Method, r.URL.Path) + w.WriteHeader(http.StatusUnauthorized) + return + } + + err := authenticator.ReviewToken(r.Context(), bearerToken) if err != nil { klog.Errorf("TOKEN_REVIEW: '%s %s' unauthorized, invalid user token, %v", r.Method, r.URL.Path, err) w.WriteHeader(http.StatusUnauthorized) diff --git a/pkg/server/server.go b/pkg/server/server.go index 90c0cc9e555..10f7590208b 100644 --- a/pkg/server/server.go +++ b/pkg/server/server.go @@ -31,7 +31,6 @@ import ( "github.com/openshift/console/pkg/graphql/resolver" helmhandlerspkg "github.com/openshift/console/pkg/helm/handlers" "github.com/openshift/console/pkg/knative" - "github.com/openshift/console/pkg/metrics" "github.com/openshift/console/pkg/olm" "github.com/openshift/console/pkg/plugins" "github.com/openshift/console/pkg/proxy" @@ -292,8 +291,13 @@ func (s *Server) HTTPHandler() (http.Handler, error) { } tokenReviewHandler := func(h http.HandlerFunc) http.HandlerFunc { - return authHandler(withTokenReview(authenticator, h)) + return s.CSRFVerifier.WithCSRFVerification(withTokenReview(authenticator, h)) } + + bearerTokenReviewHandler := func(h http.HandlerFunc) http.HandlerFunc { + return withBearerTokenReview(authenticator, h) + } + handleFunc(authLoginEndpoint, s.Authenticator.LoginFunc) handleFunc(authLogoutEndpoint, allowMethod(http.MethodPost, s.handleLogout)) handleFunc(AuthLoginCallbackEndpoint, s.Authenticator.CallbackFunc(fn)) @@ -603,11 +607,10 @@ func (s *Server) HTTPHandler() (http.Handler, error) { prometheus.MustRegister(usageMetrics.GetCollectors()...) prometheus.MustRegister(s.AuthMetrics.GetCollectors()...) - handle("/metrics", metrics.AddHeaderAsCookieMiddleware( - tokenReviewHandler(func(w http.ResponseWriter, r *http.Request) { - promhttp.Handler().ServeHTTP(w, r) - }), - )) + handle("/metrics", bearerTokenReviewHandler(func(w http.ResponseWriter, r *http.Request) { + promhttp.Handler().ServeHTTP(w, r) + })) + handleFunc("/metrics/usage", tokenReviewHandler(func(w http.ResponseWriter, r *http.Request) { usage.Handle(usageMetrics, w, r) })) From a6e4914e7bdb1df620be5cd75c576f0dd45982c3 Mon Sep 17 00:00:00 2001 From: Jon Jackson Date: Wed, 4 Jun 2025 15:38:54 -0400 Subject: [PATCH 071/102] address feedback --- pkg/server/middleware.go | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/pkg/server/middleware.go b/pkg/server/middleware.go index 0f474571590..47a5b6701c9 100644 --- a/pkg/server/middleware.go +++ b/pkg/server/middleware.go @@ -47,14 +47,14 @@ func withTokenReview(authenticator auth.Authenticator, h http.HandlerFunc) http. return func(w http.ResponseWriter, r *http.Request) { user, err := authenticator.Authenticate(w, r) if err != nil { - klog.Errorf("TOKEN_REVIEW: '%s %s' unauthorized, unable to authenticate, %v", r.Method, r.URL.Path, err) + klog.V(4).Infof("TOKEN_REVIEW: '%s %s' unauthorized, unable to authenticate, %v", r.Method, r.URL.Path, err) w.WriteHeader(http.StatusUnauthorized) return } err = authenticator.ReviewToken(r.Context(), user.Token) if err != nil { - klog.Errorf("TOKEN_REVIEW: '%s %s' unauthorized, invalid user token, %v", r.Method, r.URL.Path, err) + klog.V(4).Infof("TOKEN_REVIEW: '%s %s' unauthorized, invalid user token, %v", r.Method, r.URL.Path, err) w.WriteHeader(http.StatusUnauthorized) return } @@ -68,27 +68,27 @@ func withBearerTokenReview(authenticator auth.Authenticator, h http.HandlerFunc) func(w http.ResponseWriter, r *http.Request) { authorizationHeader := r.Header.Get("Authorization") if authorizationHeader == "" { - klog.Errorf("TOKEN_REVIEW: '%s %s' unauthorized, missing Authorization header", r.Method, r.URL.Path) + klog.V(4).Infof("TOKEN_REVIEW: '%s %s' unauthorized, missing Authorization header", r.Method, r.URL.Path) w.WriteHeader(http.StatusUnauthorized) return } - if !strings.HasPrefix(authorizationHeader, "Bearer") { - klog.Errorf("TOKEN_REVIEW: '%s %s' unauthorized, 'Bearer' type Authorization header required", r.Method, r.URL.Path) + if !strings.HasPrefix(authorizationHeader, "Bearer ") { + klog.V(4).Infof("TOKEN_REVIEW: '%s %s' unauthorized, 'Bearer' type Authorization header required", r.Method, r.URL.Path) w.WriteHeader(http.StatusUnauthorized) return } bearerToken := strings.TrimPrefix(authorizationHeader, "Bearer ") if bearerToken == "" { - klog.Errorf("TOKEN_REVIEW: '%s %s' unauthorized, empty or missing Bearer token", r.Method, r.URL.Path) + klog.V(4).Infof("TOKEN_REVIEW: '%s %s' unauthorized, empty or missing Bearer token", r.Method, r.URL.Path) w.WriteHeader(http.StatusUnauthorized) return } err := authenticator.ReviewToken(r.Context(), bearerToken) if err != nil { - klog.Errorf("TOKEN_REVIEW: '%s %s' unauthorized, invalid user token, %v", r.Method, r.URL.Path, err) + klog.V(4).Infof("TOKEN_REVIEW: '%s %s' unauthorized, invalid user token, %v", r.Method, r.URL.Path, err) w.WriteHeader(http.StatusUnauthorized) return } From 47b04c3c00d921c706c4a4485bd7eac22a89a19e Mon Sep 17 00:00:00 2001 From: Lokananda Prabhu Date: Thu, 24 Apr 2025 15:10:37 +0530 Subject: [PATCH 072/102] Added flags to disable the pipelines extensions if enabled in console plugin --- .../pipelines-plugin/console-extensions.json | 111 +++++++++++++++--- 1 file changed, 95 insertions(+), 16 deletions(-) diff --git a/frontend/packages/pipelines-plugin/console-extensions.json b/frontend/packages/pipelines-plugin/console-extensions.json index 8cf2416af73..a115869a40c 100644 --- a/frontend/packages/pipelines-plugin/console-extensions.json +++ b/frontend/packages/pipelines-plugin/console-extensions.json @@ -288,6 +288,9 @@ "kind": "Condition" }, "flag": "OPENSHIFT_PIPELINE_CONDITION" + }, + "flags": { + "disallowed": ["HIDE_STATIC_PIPELINE_PLUGIN_CONSOLE_FLAG_MODEL_EXTENSION"] } }, { @@ -299,6 +302,9 @@ "kind": "Repository" }, "flag": "OPENSHIFT_PIPELINE_AS_CODE" + }, + "flags": { + "disallowed": ["HIDE_STATIC_PIPELINE_PLUGIN_CONSOLE_FLAG_MODEL_EXTENSION"] } }, { @@ -310,6 +316,9 @@ "kind": "Pipeline" }, "flag": "OPENSHIFT_PIPELINE_V1BETA1" + }, + "flags": { + "disallowed": ["HIDE_STATIC_PIPELINE_PLUGIN_CONSOLE_FLAG_MODEL_EXTENSION"] } }, { @@ -321,6 +330,9 @@ "kind": "Pipeline" }, "flag": "OPENSHIFT_PIPELINE" + }, + "flags": { + "disallowed": ["HIDE_STATIC_PIPELINE_PLUGIN_CONSOLE_FLAG_MODEL_EXTENSION"] } }, { @@ -717,6 +729,9 @@ "component": { "$codeRef": "pipelineComponent.NamespaceRedirect" } + }, + "flags": { + "disallowed": ["HIDE_STATIC_PIPELINE_PLUGIN_CONSOLE_PAGE_ROUTE_EXTENSION"] } }, { @@ -729,7 +744,10 @@ } }, "flags": { - "disallowed": ["HIDE_STATIC_PIPELINE_PLUGIN_PIPELINE_NAV_OPTION"] + "disallowed": [ + "HIDE_STATIC_PIPELINE_PLUGIN_PIPELINE_NAV_OPTION", + "HIDE_STATIC_PIPELINE_PLUGIN_CONSOLE_PAGE_ROUTE_EXTENSION" + ] } }, { @@ -742,7 +760,10 @@ } }, "flags": { - "disallowed": ["HIDE_STATIC_PIPELINE_PLUGIN_TASKS_NAV_OPTION"] + "disallowed": [ + "HIDE_STATIC_PIPELINE_PLUGIN_TASKS_NAV_OPTION", + "HIDE_STATIC_PIPELINE_PLUGIN_CONSOLE_PAGE_ROUTE_EXTENSION" + ] } }, { @@ -755,7 +776,10 @@ } }, "flags": { - "disallowed": ["HIDE_STATIC_PIPELINE_PLUGIN_TRIGGERS_NAV_OPTION"] + "disallowed": [ + "HIDE_STATIC_PIPELINE_PLUGIN_TRIGGERS_NAV_OPTION", + "HIDE_STATIC_PIPELINE_PLUGIN_CONSOLE_PAGE_ROUTE_EXTENSION" + ] } }, { @@ -766,6 +790,9 @@ "component": { "$codeRef": "pacComponent.PacPage" } + }, + "flags": { + "disallowed": ["HIDE_STATIC_PIPELINE_PLUGIN_PAC_FORM"] } }, { @@ -782,7 +809,10 @@ } }, "flags": { - "disallowed": ["HIDE_STATIC_PIPELINE_PLUGIN_PIPELINES_LIST"] + "disallowed": [ + "HIDE_STATIC_PIPELINE_PLUGIN_PIPELINES_LIST", + "HIDE_STATIC_PIPELINE_PLUGIN_CONSOLE_PAGE_ROUTE_EXTENSION" + ] } }, { @@ -795,7 +825,10 @@ } }, "flags": { - "disallowed": ["HIDE_STATIC_PIPELINE_PLUGIN_PIPELINE_BUILDER"] + "disallowed": [ + "HIDE_STATIC_PIPELINE_PLUGIN_PIPELINE_BUILDER", + "HIDE_STATIC_PIPELINE_PLUGIN_CONSOLE_PAGE_ROUTE_EXTENSION" + ] } }, { @@ -807,6 +840,9 @@ "/k8s/ns/:ns/tekton.dev~v1beta1~PipelineRun/:plrName/logs/:taskName" ], "component": { "$codeRef": "pipelinesComponent.LogURLRedirect" } + }, + "flags": { + "disallowed": ["HIDE_STATIC_PIPELINE_PLUGIN_CONSOLE_PAGE_ROUTE_EXTENSION"] } }, { @@ -819,7 +855,10 @@ } }, "flags": { - "disallowed": ["HIDE_STATIC_PIPELINE_PLUGIN_PIPELINE_BUILDER"] + "disallowed": [ + "HIDE_STATIC_PIPELINE_PLUGIN_PIPELINE_BUILDER", + "HIDE_STATIC_PIPELINE_PLUGIN_CONSOLE_PAGE_ROUTE_EXTENSION" + ] } }, { @@ -832,7 +871,10 @@ } }, "flags": { - "disallowed": ["HIDE_STATIC_PIPELINE_PLUGIN_PIPELINE_BUILDER"] + "disallowed": [ + "HIDE_STATIC_PIPELINE_PLUGIN_PIPELINE_BUILDER", + "HIDE_STATIC_PIPELINE_PLUGIN_CONSOLE_PAGE_ROUTE_EXTENSION" + ] } }, { @@ -845,7 +887,10 @@ } }, "flags": { - "disallowed": ["HIDE_STATIC_PIPELINE_PLUGIN_PIPELINE_BUILDER"] + "disallowed": [ + "HIDE_STATIC_PIPELINE_PLUGIN_PIPELINE_BUILDER", + "HIDE_STATIC_PIPELINE_PLUGIN_CONSOLE_PAGE_ROUTE_EXTENSION" + ] } }, { @@ -856,6 +901,12 @@ "component": { "$codeRef": "pipelinesComponent.RepositoryFormPage" } + }, + "flags": { + "disallowed": [ + "HIDE_STATIC_PIPELINE_PLUGIN_REPOSITORY_FORM", + "HIDE_STATIC_PIPELINE_PLUGIN_CONSOLE_PAGE_ROUTE_EXTENSION" + ] } }, { @@ -872,7 +923,10 @@ } }, "flags": { - "disallowed": ["HIDE_STATIC_PIPELINE_PLUGIN_PIPELINERUNS_LIST"] + "disallowed": [ + "HIDE_STATIC_PIPELINE_PLUGIN_PIPELINERUNS_LIST", + "HIDE_STATIC_PIPELINE_PLUGIN_CONSOLE_PAGE_ROUTE_EXTENSION" + ] } }, { @@ -884,7 +938,8 @@ "decorator": { "$codeRef": "topology.getPipelineRunDecorator" } }, "flags": { - "required": ["OPENSHIFT_PIPELINE"] + "required": ["OPENSHIFT_PIPELINE"], + "disallowed": ["HIDE_STATIC_PIPELINE_PLUGIN_TOPOLOGY_DECORATOR_PROVIDER_EXTENSION"] } }, { @@ -905,7 +960,8 @@ "getDataModelReconciler": { "$codeRef": "topology.getPipelinesDataModelReconciler" } }, "flags": { - "required": ["OPENSHIFT_PIPELINE"] + "required": ["OPENSHIFT_PIPELINE"], + "disallowed": ["HIDE_STATIC_PIPELINE_PLUGIN_TOPOLOGY_DATA_FACTORY_EXTENSION"] } }, { @@ -933,7 +989,11 @@ "type": "dev-console.add/action", "flags": { "required": ["OPENSHIFT_PIPELINE_V1BETA1"], - "disallowed": ["FLAG_TEKTON_V1_ENABLED", "HIDE_STATIC_PIPELINE_PLUGIN_PIPELINE_BUILDER"] + "disallowed": [ + "FLAG_TEKTON_V1_ENABLED", + "HIDE_STATIC_PIPELINE_PLUGIN_PIPELINE_BUILDER", + "HIDE_STATIC_PIPELINE_PLUGIN_DEVCONSOLE_ADD_ACTION_EXTENSION" + ] }, "properties": { "id": "pipeline", @@ -955,7 +1015,10 @@ "type": "dev-console.add/action", "flags": { "required": ["OPENSHIFT_PIPELINE", "FLAG_TEKTON_V1_ENABLED"], - "disallowed": ["HIDE_STATIC_PIPELINE_PLUGIN_PIPELINE_BUILDER"] + "disallowed": [ + "HIDE_STATIC_PIPELINE_PLUGIN_PIPELINE_BUILDER", + "HIDE_STATIC_PIPELINE_PLUGIN_DEVCONSOLE_ADD_ACTION_EXTENSION" + ] }, "properties": { "id": "pipeline", @@ -1131,6 +1194,9 @@ "version": "v1beta1" }, "template": { "$codeRef": "yamlTemplates.newTaskTemplate" } + }, + "flags": { + "disallowed": ["HIDE_STATIC_PIPELINE_PLUGIN_CONSOLE_YAML_TEMPLATE_EXTENSION"] } }, { @@ -1143,6 +1209,9 @@ "version": "v1beta1" }, "template": { "$codeRef": "yamlTemplates.newTaskRunTemplate" } + }, + "flags": { + "disallowed": ["HIDE_STATIC_PIPELINE_PLUGIN_CONSOLE_YAML_TEMPLATE_EXTENSION"] } }, { @@ -1155,6 +1224,9 @@ "version": "v1alpha1" }, "template": { "$codeRef": "yamlTemplates.newPipelineResourceTemplate" } + }, + "flags": { + "disallowed": ["HIDE_STATIC_PIPELINE_PLUGIN_CONSOLE_YAML_TEMPLATE_EXTENSION"] } }, { @@ -1169,7 +1241,10 @@ "template": { "$codeRef": "yamlTemplates.newClusterTaskTemplate" } }, "flags": { - "disallowed": ["PIPELINES_OPERATOR_VERSION_1_17_OR_NEWER"] + "disallowed": [ + "PIPELINES_OPERATOR_VERSION_1_17_OR_NEWER", + "HIDE_STATIC_PIPELINE_PLUGIN_CONSOLE_YAML_TEMPLATE_EXTENSION" + ] } }, { @@ -1249,7 +1324,8 @@ } }, "flags": { - "required": ["OPENSHIFT_PIPELINE"] + "required": ["OPENSHIFT_PIPELINE"], + "disallowed": ["HIDE_STATIC_PIPELINE_PLUGIN_TOPOLOGY_DETAILS_TABSECTION_EXTENSION"] } }, { @@ -1263,7 +1339,10 @@ }, "flags": { "required": ["OPENSHIFT_PIPELINE"], - "disallowed": ["HIDE_STATIC_PIPELINE_PLUGIN_PIPELINE_NAV_OPTION"] + "disallowed": [ + "HIDE_STATIC_PIPELINE_PLUGIN_PIPELINE_NAV_OPTION", + "HIDE_STATIC_PIPELINE_PLUGIN_CONSOLE_PAGE_ROUTE_EXTENSION" + ] } }, { From bf7b3c30d2beef75ce34773fe180d73ca5f2847c Mon Sep 17 00:00:00 2001 From: Robb Hamilton Date: Mon, 2 Jun 2025 09:12:00 -0400 Subject: [PATCH 073/102] OCPBUGS-56044: fix VirtualizedTable runtime error if sortColumn is not present --- .../public/components/factory/Table/VirtualizedTable.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/frontend/public/components/factory/Table/VirtualizedTable.tsx b/frontend/public/components/factory/Table/VirtualizedTable.tsx index efaab7009cf..d91a7ad3aa7 100644 --- a/frontend/public/components/factory/Table/VirtualizedTable.tsx +++ b/frontend/public/components/factory/Table/VirtualizedTable.tsx @@ -119,14 +119,14 @@ const VirtualizedTable: VirtualizedTableFC = ({ data = React.useMemo(() => { const sortColumn = columns[sortBy.index - columnShift]; - if (!sortColumn.sort) { + if (!sortColumn?.sort) { return data; } else if (typeof sortColumn.sort === 'string') { return data.sort( - sortResourceByValue(sortBy.direction, (obj) => _.get(obj, sortColumn.sort as string, '')), + sortResourceByValue(sortBy.direction, (obj) => _.get(obj, sortColumn?.sort as string, '')), ); } - return sortColumn.sort(data, sortBy.direction); + return sortColumn?.sort(data, sortBy.direction); }, [columnShift, columns, data, sortBy.direction, sortBy.index]); React.useEffect(() => { From c34bc817f15bfbd98757c276d77d85138c92e02d Mon Sep 17 00:00:00 2001 From: Mylanos Date: Fri, 13 Jun 2025 14:20:53 +0200 Subject: [PATCH 074/102] OCPBUGS-36173: use Base64 encoded data for all data stored within key/value form, do not encode binary data further more, as the secret binary data created through oc API is already Base64 encoded. In addition when uploading binary data through UI, the underlying FileInput component handles the Base64 encoding, so the non-binary data is the only case where its needed to be Base64 encoded within GenericSecretForm/GenericEntrySecretForm. --- .../create-secret/GenericSecretForm.tsx | 39 +++++++++---------- .../create-secret/KeyValueEntryForm.tsx | 11 +++--- .../create-secret/SecretFormWrapper.tsx | 14 +++++-- .../components/secrets/create-secret/types.ts | 7 ++-- 4 files changed, 39 insertions(+), 32 deletions(-) diff --git a/frontend/public/components/secrets/create-secret/GenericSecretForm.tsx b/frontend/public/components/secrets/create-secret/GenericSecretForm.tsx index bb2122ca550..3315dc07baa 100644 --- a/frontend/public/components/secrets/create-secret/GenericSecretForm.tsx +++ b/frontend/public/components/secrets/create-secret/GenericSecretForm.tsx @@ -2,12 +2,11 @@ import * as _ from 'lodash-es'; import * as React from 'react'; import { withTranslation } from 'react-i18next'; import { WithT } from 'i18next'; -import { Base64 } from 'js-base64'; import { Button } from '@patternfly/react-core'; import { MinusCircleIcon } from '@patternfly/react-icons/dist/esm/icons/minus-circle-icon'; import { PlusCircleIcon } from '@patternfly/react-icons/dist/esm/icons/plus-circle-icon'; -import * as ITOB from 'istextorbinary/edition-es2017'; -import { KeyValueEntryFormState, SecretStringData } from './types'; +import { isBinary } from 'istextorbinary/edition-es2017'; +import { KeyValueEntryFormState, SecretStringData, Base64StringData } from './types'; import { KeyValueEntryForm } from './KeyValueEntryForm'; class GenericSecretFormWithTranslation extends React.Component< @@ -17,7 +16,7 @@ class GenericSecretFormWithTranslation extends React.Component< constructor(props) { super(props); this.state = { - secretEntriesArray: this.genericSecretObjectToArray(this.props.stringData), + secretEntriesArray: this.genericSecretObjectToArray(this.props.base64StringData), }; this.onDataChanged = this.onDataChanged.bind(this); } @@ -30,30 +29,29 @@ class GenericSecretFormWithTranslation extends React.Component< uid: _.uniqueId(), }; } - genericSecretObjectToArray(genericSecretObject) { - if (_.isEmpty(genericSecretObject)) { + genericSecretObjectToArray(base64StringData) { + if (_.isEmpty(base64StringData)) { return [this.newGenericSecretEntry()]; } - return _.map(genericSecretObject, (value, key) => { - const isBinary = ITOB.isBinary(null, value); - return { - uid: _.uniqueId(), - entry: { - key, - value: isBinary ? Base64.encode(value) : value, - isBase64: isBinary, - isBinary, - }, - }; - }); + if (base64StringData) { + return _.map(base64StringData, (value, key) => { + return { + uid: _.uniqueId(), + entry: { + key, + value, + isBinary_: isBinary(null, Buffer.from(value || '', 'base64')), + }, + }; + }); + } } genericSecretArrayToObject(genericSecretArray) { return _.reduce( genericSecretArray, (acc, k) => _.assign(acc, { - [k.entry.key]: - k.entry?.isBase64 || k.entry?.isBinary ? k.entry.value : Base64.encode(k.entry.value), + [k.entry.key]: k.entry.value, }), {}, ); @@ -144,6 +142,7 @@ export const GenericSecretForm = withTranslation()(GenericSecretFormWithTranslat type GenericSecretFormProps = { onChange: Function; stringData: SecretStringData; + base64StringData: Base64StringData; isCreate: boolean; }; diff --git a/frontend/public/components/secrets/create-secret/KeyValueEntryForm.tsx b/frontend/public/components/secrets/create-secret/KeyValueEntryForm.tsx index f40ed6a087f..83db5350e35 100644 --- a/frontend/public/components/secrets/create-secret/KeyValueEntryForm.tsx +++ b/frontend/public/components/secrets/create-secret/KeyValueEntryForm.tsx @@ -1,6 +1,7 @@ import * as React from 'react'; import { withTranslation } from 'react-i18next'; import { WithT } from 'i18next'; +import { Base64 } from 'js-base64'; import { DroppableFileInput } from './DropableFileInput'; import { KeyValueEntryFormState, KeyValueEntryFormProps } from './types'; @@ -13,7 +14,7 @@ export class KeyValueEntryFormWithTranslation extends React.Component< this.state = { key: props.entry.key, value: props.entry.value, - isBinary: props.entry.isBinary, + isBinary_: props.entry.isBinary_, }; this.onValueChange = this.onValueChange.bind(this); this.onKeyChange = this.onKeyChange.bind(this); @@ -21,8 +22,8 @@ export class KeyValueEntryFormWithTranslation extends React.Component< onValueChange(fileData, isBinary) { this.setState( { - value: fileData, - isBase64: isBinary, + value: isBinary ? fileData : Base64.encode(fileData), + isBinary_: isBinary, }, () => this.props.onChange(this.state, this.props.id), ); @@ -60,13 +61,13 @@ export class KeyValueEntryFormWithTranslation extends React.Component<
diff --git a/frontend/public/components/secrets/create-secret/SecretFormWrapper.tsx b/frontend/public/components/secrets/create-secret/SecretFormWrapper.tsx index 46f5a94b146..eeb31d1e1de 100644 --- a/frontend/public/components/secrets/create-secret/SecretFormWrapper.tsx +++ b/frontend/public/components/secrets/create-secret/SecretFormWrapper.tsx @@ -1,6 +1,7 @@ import * as _ from 'lodash-es'; import * as React from 'react'; import { Helmet } from 'react-helmet'; +import { isBinary } from 'istextorbinary/edition-es2017/index'; import { useTranslation } from 'react-i18next'; import { Base64 } from 'js-base64'; import { ActionGroup, Button } from '@patternfly/react-core'; @@ -41,11 +42,15 @@ export const SecretFormWrapper: React.FC = (props) => { const [inProgress, setInProgress] = React.useState(false); const [error, setError] = React.useState(); const [stringData, setStringData] = React.useState( - _.mapValues(_.get(props.obj, 'data'), (value) => { - return value ? Base64.decode(value) : ''; - }), + Object.entries(props.obj?.data ?? {}).reduce>((acc, [key, value]) => { + if (isBinary(null, Buffer.from(value, 'base64'))) { + return {}; + } + acc[key] = value ? Base64.decode(value) ?? '' : ''; + return acc; + }, {}), ); - const [base64StringData, setBase64StringData] = React.useState({}); + const [base64StringData, setBase64StringData] = React.useState(props?.obj?.data ?? {}); const [disableForm, setDisableForm] = React.useState(false); const title = useSecretTitle(isCreate, secretTypeAbstraction); const helptext = useSecretDescription(secretTypeAbstraction); @@ -141,6 +146,7 @@ export const SecretFormWrapper: React.FC = (props) => { onError={onError} onFormDisable={(disable) => setDisableForm(disable)} stringData={stringData} + base64StringData={base64StringData} secretType={secret.type} isCreate={isCreate} /> diff --git a/frontend/public/components/secrets/create-secret/types.ts b/frontend/public/components/secrets/create-secret/types.ts index b0fe892a252..c596a37ad71 100644 --- a/frontend/public/components/secrets/create-secret/types.ts +++ b/frontend/public/components/secrets/create-secret/types.ts @@ -1,6 +1,7 @@ import { SecretType } from '.'; -export type SecretStringData = { [key: string]: string }; +export type SecretStringData = Record; +export type Base64StringData = Record; type SecretChangeData = { stringData: SecretStringData; @@ -8,8 +9,7 @@ type SecretChangeData = { }; export type KeyValueEntryFormState = { - isBase64?: boolean; - isBinary?: boolean; + isBinary_?: boolean; key: string; value: string; }; @@ -25,6 +25,7 @@ export type SecretSubFormProps = { onError: (error: any) => void; onFormDisable: (disable: boolean) => void; stringData: SecretStringData; + base64StringData: Base64StringData; secretType: SecretType; isCreate: boolean; }; From 69f202eb7506051a7cf828a89f507bf968ad6560 Mon Sep 17 00:00:00 2001 From: Vikram Raj Date: Tue, 27 May 2025 20:21:02 +0530 Subject: [PATCH 075/102] Fix TypeError Cannot read properties of null (reading 'metadata') --- .../packages/console-shared/src/hooks/useServicesWatcher.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/packages/console-shared/src/hooks/useServicesWatcher.ts b/frontend/packages/console-shared/src/hooks/useServicesWatcher.ts index 761d7d3272d..5d7bc54fd3a 100644 --- a/frontend/packages/console-shared/src/hooks/useServicesWatcher.ts +++ b/frontend/packages/console-shared/src/hooks/useServicesWatcher.ts @@ -6,7 +6,7 @@ import { getServicesForResource } from '../utils'; export const useServicesWatcher = ( resource: K8sResourceKind, ): { loaded: boolean; loadError: string; services: K8sResourceKind[] } => { - const { namespace } = resource.metadata; + const namespace = resource?.metadata?.namespace || ''; const [allServices, loaded, loadError] = useK8sWatchResource({ isList: true, kind: 'Service', From 154c371b7190d331f073fe4975437b67ac1bcfe4 Mon Sep 17 00:00:00 2001 From: rawagner Date: Thu, 15 May 2025 16:10:24 +0200 Subject: [PATCH 076/102] OCPBUGS-54434: Update vSphere configuration form to support CM YAML format --- .../__snapshots__/utils.spec.ts.snap | 55 -- .../vsphere-plugin/__tests__/utils.spec.ts | 28 - .../locales/en/vsphere-plugin.json | 14 +- frontend/packages/vsphere-plugin/package.json | 1 - .../ClusterOverview/VSphereStatus.tsx | 2 +- .../src/components/VSphereConnectionModal.tsx | 19 +- .../vsphere-plugin/src/components/persist.ts | 503 ++++++++++++------ .../vsphere-plugin/src/components/types.ts | 47 +- .../vsphere-plugin/src/components/utils.ts | 54 -- .../src/hooks/use-connection-form.ts | 166 ++---- .../src/resources/infrastructure.ts | 1 + frontend/yarn.lock | 5 - 12 files changed, 446 insertions(+), 449 deletions(-) delete mode 100644 frontend/packages/vsphere-plugin/__tests__/__snapshots__/utils.spec.ts.snap delete mode 100644 frontend/packages/vsphere-plugin/__tests__/utils.spec.ts diff --git a/frontend/packages/vsphere-plugin/__tests__/__snapshots__/utils.spec.ts.snap b/frontend/packages/vsphere-plugin/__tests__/__snapshots__/utils.spec.ts.snap deleted file mode 100644 index 688fb14a8c6..00000000000 --- a/frontend/packages/vsphere-plugin/__tests__/__snapshots__/utils.spec.ts.snap +++ /dev/null @@ -1,55 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`[Global] -secret-name=vsphere-creds -secret-namespace=kube-system -insecure-flag=1 - -[Workspace] -foo=bar -foofoo=barbar -server=https://1.2.3.4/something -datacenter=my-datacenter -default-datastore=my-default-ds -folder="/CLUSTER/vm/SomeGeo/Infra\\ \\(Dev\\ Env\\)/OpenShift" -resourcepool-path=/my-datacenter/host/foo-cluster/Resources - -[VirtualCenter "https://1.2.3.4/something"] -datacenters=my-datacenter - 1`] = ` -"[Global] -secret-name=vsphere-creds -secret-namespace=kube-system -insecure-flag=1 - -[Workspace] -foo=bar -foofoo=barbar -server=https://1.2.3.4/something -datacenter=my-datacenter -default-datastore=my-default-ds -folder=\\"/CLUSTER/vm/SomeGeo/Infra\\\\ \\\\(Dev\\\\ Env\\\\)/OpenShift\\" -resourcepool-path=/my-datacenter/host/foo-cluster/Resources - -[VirtualCenter \\"https://1.2.3.4/something\\"] -datacenters=my-datacenter -" -`; - -exports[`mergeCloudProviderConfig handles empty input 1`] = ` -"[Global] -secret-name=vsphere-creds -secret-namespace=kube-system -insecure-flag=1 - -[Workspace] -server=https://1.2.3.4/something -datacenter=my-datacenter -default-datastore=my-default-ds -folder=\\"/CLUSTER/vm/SomeGeo/Infra\\\\ \\\\(Dev\\\\ Env\\\\)/OpenShift\\" -resourcepool-path=/my-datacenter/host/foo-cluster/Resources - -[VirtualCenter \\"https://1.2.3.4/something\\"] -datacenters=my-datacenter -" -`; diff --git a/frontend/packages/vsphere-plugin/__tests__/utils.spec.ts b/frontend/packages/vsphere-plugin/__tests__/utils.spec.ts deleted file mode 100644 index 1c10a3b0e58..00000000000 --- a/frontend/packages/vsphere-plugin/__tests__/utils.spec.ts +++ /dev/null @@ -1,28 +0,0 @@ -/* eslint-disable @typescript-eslint/no-var-requires */ -import { ConnectionFormFormikValues } from '../src/components/types'; -import { mergeCloudProviderConfig } from '../src/components/utils'; - -const config: ConnectionFormFormikValues = { - username: 'my-username', - password: 'my-password', - vcenter: 'https://1.2.3.4/something', - datacenter: 'my-datacenter', - defaultDatastore: 'my-default-ds', - folder: '/CLUSTER/vm/SomeGeo/Infra\\ \\(Dev\\ Env\\)/OpenShift', - vCenterCluster: 'foo-cluster', -}; - -describe('mergeCloudProviderConfig', () => { - it('handles empty input', () => { - const result = mergeCloudProviderConfig('', config); - expect(result).toMatchSnapshot(); - }); - - it('deletes old Virtual Center', () => { - const result = mergeCloudProviderConfig( - '[Global]\n[Workspace]\nfoo=bar\nfoofoo=barbar\n[VirtualCenter "https://will/be/replaced"]', - config, - ); - expect(result).toMatchSnapshot(result); - }); -}); diff --git a/frontend/packages/vsphere-plugin/locales/en/vsphere-plugin.json b/frontend/packages/vsphere-plugin/locales/en/vsphere-plugin.json index 61593a77b16..780b7fbec1e 100644 --- a/frontend/packages/vsphere-plugin/locales/en/vsphere-plugin.json +++ b/frontend/packages/vsphere-plugin/locales/en/vsphere-plugin.json @@ -3,20 +3,19 @@ "vSphere configurations": "vSphere configurations", "Loading vSphere connection status": "Loading vSphere connection status", "The vSphere Connection check is failing.": "The vSphere Connection check is failing.", - "No errors are reported. Click the link for details.": "No errors are reported. Click the link for details.", + "No errors reported": "No errors reported", "Missing the vSphere config map.": "Missing the vSphere config map.", "Not configured yet": "Not configured yet", "Prometheus query failed.": "Prometheus query failed.", "Invalid credentials": "Invalid credentials", "Failing {{reason}}": "Failing {{reason}}", - "Failed to patch {{secret}}": "Failed to patch {{secret}}", - "Failed to create {{secret}} secret": "Failed to create {{secret}} secret", "Failed to load kubecontrollermanager": "Failed to load kubecontrollermanager", - "Not found.": "Not found.", + "Failed to parse cloud provider config {{cm}}": "Failed to parse cloud provider config {{cm}}", + "Unknown format": "Unknown format", + "Failed to persist {{secret}}": "Failed to persist {{secret}}", "Failed to patch kubecontrollermanager": "Failed to patch kubecontrollermanager", - "Failed to patch {{cm}}": "Failed to patch {{cm}}", - "Failed to create {{cm}} ConfigMap": "Failed to create {{cm}} ConfigMap", - "Failed to add taint to node {{node}}": "Failed to add taint to node {{node}}", + "Failed to patch cloud provider config": "Failed to patch cloud provider config", + "Failed to add taint to nodes": "Failed to add taint to nodes", "Failed to patch infrastructure spec": "Failed to patch infrastructure spec", "Unexpected error": "Unexpected error", "vCenter": "vCenter", @@ -56,7 +55,6 @@ "Kube API Server": "Kube API Server", "Kube Controller Manager": "Kube Controller Manager", "Storage": "Storage", - "Failed to fetch infrastructure resource": "Failed to fetch infrastructure resource", "An error occured": "An error occured", "Help": "Help" } \ No newline at end of file diff --git a/frontend/packages/vsphere-plugin/package.json b/frontend/packages/vsphere-plugin/package.json index 71d7c366ce6..814f729366b 100644 --- a/frontend/packages/vsphere-plugin/package.json +++ b/frontend/packages/vsphere-plugin/package.json @@ -9,7 +9,6 @@ "dependencies": { "@console/dynamic-plugin-sdk": "0.0.0-fixed", "formik": "^2.4.5", - "ini": "4.1.1", "yup": "^0.27.0" }, "consolePlugin": { diff --git a/frontend/packages/vsphere-plugin/src/components/ClusterOverview/VSphereStatus.tsx b/frontend/packages/vsphere-plugin/src/components/ClusterOverview/VSphereStatus.tsx index 98e0bcb4ac2..097eb8466e7 100644 --- a/frontend/packages/vsphere-plugin/src/components/ClusterOverview/VSphereStatus.tsx +++ b/frontend/packages/vsphere-plugin/src/components/ClusterOverview/VSphereStatus.tsx @@ -63,7 +63,7 @@ export const healthHandler: PrometheusHealthHandler = (responses, t, additionalR message = health.message; break; case HealthState.OK: - message = t('vsphere-plugin~No errors are reported. Click the link for details.'); + message = t('vsphere-plugin~No errors reported'); break; default: break; diff --git a/frontend/packages/vsphere-plugin/src/components/VSphereConnectionModal.tsx b/frontend/packages/vsphere-plugin/src/components/VSphereConnectionModal.tsx index d4e55c67603..d66790914a3 100644 --- a/frontend/packages/vsphere-plugin/src/components/VSphereConnectionModal.tsx +++ b/frontend/packages/vsphere-plugin/src/components/VSphereConnectionModal.tsx @@ -13,6 +13,7 @@ import { SplitItem, } from '@patternfly/react-core'; import { Formik, useFormikContext } from 'formik'; +import { isEqual } from 'lodash'; import { useTranslation } from 'react-i18next'; import * as Yup from 'yup'; import { HealthState, SubsystemHealth } from '@console/dynamic-plugin-sdk'; @@ -28,21 +29,17 @@ import './VSphereConnectionModal.css'; type VSphereConnectionModalFooterProps = { onClose: VoidFunction; - mustPatch: boolean; }; -const VSphereConnectionModalFooter: React.FC = ({ - onClose, - mustPatch, -}) => { +const VSphereConnectionModalFooter: React.FC = ({ onClose }) => { const { t } = useTranslation('vsphere-plugin'); - const { isSubmitting, isValid, dirty, submitForm } = useFormikContext(); + const { isSubmitting, isValid, submitForm, initialValues, values } = useFormikContext(); return ( +
+); + +const TEST_ID_2 = 'TEST_ID_2'; +const TestComponentWithID2 = ({ closeModal, ...rest }) => ( +
+

+ Test Modal with ID "{TEST_ID_2}" and testProp "{rest.testProp}" +

+ +
+); + const LoadingComponent: React.FC = () => { const { t } = useTranslation(); @@ -72,6 +99,16 @@ export const TestModalPage: React.FC<{ closeComponent: any }> = () => { const onClick = React.useCallback(() => launchModal(TestComponent, {}), [launchModal]); const onAsyncClick = React.useCallback(() => launchModal(AsyncTestComponent, {}), [launchModal]); + const onClickWithID1 = React.useCallback( + () => launchModal(TestComponentWithID1, {}, TEST_ID_1), + [launchModal], + ); + + const onClickWithID2 = React.useCallback( + () => launchModal(TestComponentWithID2, { testProp: 'abc' }, TEST_ID_2), + [launchModal], + ); + return ( = () => { + + ); }; diff --git a/frontend/packages/console-dynamic-plugin-sdk/docs/api.md b/frontend/packages/console-dynamic-plugin-sdk/docs/api.md index 57ba1c3a218..82d7cdae4c8 100644 --- a/frontend/packages/console-dynamic-plugin-sdk/docs/api.md +++ b/frontend/packages/console-dynamic-plugin-sdk/docs/api.md @@ -2052,7 +2052,7 @@ A component to render timestamp.
The timestamps are synchronized between ind ### Summary -A hook to launch Modals. +A hook to launch Modals.

Additional props can be passed to `useModal` and they will be passed through to the modal component.
An optional ID can also be passed to `useModal`. If provided, this distinguishes the modal from
other modals to allow multiple modals to be displayed at the same time. @@ -2062,9 +2062,13 @@ A hook to launch Modals. ```tsx const AppPage: React.FC = () => { const launchModal = useModal(); - const onClick = () => launchModal(ModalComponent); + const onClick1 = () => launchModal(ModalComponent); + const onClick2 = () => launchModal(ModalComponent, { title: 'Test modal' }, 'TEST_MODAL_ID'); return ( - + <> + + + ) } ``` diff --git a/frontend/packages/console-dynamic-plugin-sdk/src/app/modal-support/ModalProvider.tsx b/frontend/packages/console-dynamic-plugin-sdk/src/app/modal-support/ModalProvider.tsx index a49d10ee330..4e3938aa9db 100644 --- a/frontend/packages/console-dynamic-plugin-sdk/src/app/modal-support/ModalProvider.tsx +++ b/frontend/packages/console-dynamic-plugin-sdk/src/app/modal-support/ModalProvider.tsx @@ -1,11 +1,17 @@ import * as React from 'react'; +import * as _ from 'lodash'; type CloseModal = () => void; +type CloseModalContextValue = (id?: string) => void; type UnknownProps = { [key: string]: unknown }; export type ModalComponent

= React.FC

; -export type LaunchModal =

(component: ModalComponent

, extraProps: P) => void; +export type LaunchModal =

( + component: ModalComponent

, + extraProps: P, + id?: string, +) => void; type ModalContextValue = { launchModal: LaunchModal; @@ -17,24 +23,53 @@ export const ModalContext = React.createContext({ closeModal: () => {}, }); +type ComponentMap = { + [key: string]: { + Component: ModalComponent; + props: { [key: string]: any }; + }; +}; + export const ModalProvider: React.FC = ({ children }) => { const [isOpen, setOpen] = React.useState(false); const [Component, setComponent] = React.useState(); const [componentProps, setComponentProps] = React.useState({}); + const [componentsMap, setComponentsMap] = React.useState({}); const launchModal = React.useCallback( - (component, compProps) => { - setComponent(() => component); + (component, compProps, id = null) => { + if (id) { + setComponentsMap((components) => ({ + ...components, + [id]: { Component: component, props: compProps }, + })); + } else { + setComponent(() => component); + } setComponentProps(compProps); setOpen(true); }, [setOpen, setComponent, setComponentProps], ); - const closeModal = React.useCallback(() => setOpen(false), [setOpen]); + + const closeModal = React.useCallback( + (id = null) => { + if (id) { + setComponentsMap((components) => _.omit(components, id)); + } else { + setOpen(false); + setComponent(undefined); + } + }, + [setOpen], + ); return ( - {isOpen && !!Component && } + {isOpen && !!Component && closeModal()} />} + {_.map(componentsMap, (c, id) => ( + closeModal(id)} /> + ))} {children} ); diff --git a/frontend/packages/console-dynamic-plugin-sdk/src/app/modal-support/useModal.ts b/frontend/packages/console-dynamic-plugin-sdk/src/app/modal-support/useModal.ts index 63dbcc3d639..5e144263063 100644 --- a/frontend/packages/console-dynamic-plugin-sdk/src/app/modal-support/useModal.ts +++ b/frontend/packages/console-dynamic-plugin-sdk/src/app/modal-support/useModal.ts @@ -5,13 +5,21 @@ type UseModalLauncher = () => LaunchModal; /** * A hook to launch Modals. + * + * Additional props can be passed to `useModal` and they will be passed through to the modal component. + * An optional ID can also be passed to `useModal`. If provided, this distinguishes the modal from + * other modals to allow multiple modals to be displayed at the same time. * @example *```tsx * const AppPage: React.FC = () => { * const launchModal = useModal(); - * const onClick = () => launchModal(ModalComponent); + * const onClick1 = () => launchModal(ModalComponent); + * const onClick2 = () => launchModal(ModalComponent, { title: 'Test modal' }, 'TEST_MODAL_ID'); * return ( - * + * <> + * + * + * * ) * } * ``` From c85203aab6ccab70a4f9599c469ed1d173b6aff2 Mon Sep 17 00:00:00 2001 From: Mylanos Date: Wed, 11 Jun 2025 10:43:30 +0200 Subject: [PATCH 078/102] OCPBUGS-56050: Remove unnecessary optional unwrap on getNodeClientCSRs result in NodesPage as this function results in worst scenario to empty array. Add optional unwrap to getDegradedStates within NodeStatus, which is the actual reason for the reading from undefined errors. --- .../packages/console-app/src/components/nodes/NodeStatus.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/packages/console-app/src/components/nodes/NodeStatus.tsx b/frontend/packages/console-app/src/components/nodes/NodeStatus.tsx index 515c566121d..d1c9e66f912 100644 --- a/frontend/packages/console-app/src/components/nodes/NodeStatus.tsx +++ b/frontend/packages/console-app/src/components/nodes/NodeStatus.tsx @@ -28,7 +28,7 @@ const isMonitoredCondition = (condition: Condition): boolean => [Condition.DISK_PRESSURE, Condition.MEM_PRESSURE, Condition.PID_PRESSURE].includes(condition); const getDegradedStates = (node: NodeKind): Condition[] => { - return node.status.conditions + return (node.status?.conditions ?? []) .filter(({ status, type }) => status === 'True' && isMonitoredCondition(type as Condition)) .map(({ type }) => type as Condition); }; From 28da9e545d507d946df6ec04d9ccaf71f710f025 Mon Sep 17 00:00:00 2001 From: Mylanos Date: Fri, 6 Jun 2025 14:58:09 +0200 Subject: [PATCH 079/102] AlertmanagerConfig receiver not having values for _configs attribute causes the page to crash. Conditionally unwrapping these attributes fixes this problem. --- .../components/monitoring/alertmanager/alertmanager-config.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/public/components/monitoring/alertmanager/alertmanager-config.tsx b/frontend/public/components/monitoring/alertmanager/alertmanager-config.tsx index 510cb12d349..000586a3fc2 100644 --- a/frontend/public/components/monitoring/alertmanager/alertmanager-config.tsx +++ b/frontend/public/components/monitoring/alertmanager/alertmanager-config.tsx @@ -176,7 +176,7 @@ const hasSimpleReceiver = ( return true; } else if (receiverIntegrationTypes.length === 1) { const receiverConfig = receiverIntegrationTypes[0]; // ex: 'pagerduty_configs' - const numConfigs = _.get(receiver, receiverConfig).length; // 'pagerduty_configs' is array and may have multiple sets of properties + const numConfigs = _.get(receiver, receiverConfig)?.length; // 'pagerduty_configs' is array and may have multiple sets of properties return _.hasIn(receiverTypes, receiverConfig) && numConfigs <= 1; // known receiver type and a single set of props } return false; From 13bd0c1c68bf972400491fb9eeb47ca77327794f Mon Sep 17 00:00:00 2001 From: cyril-ui-developer Date: Mon, 9 Jun 2025 11:19:24 -0400 Subject: [PATCH 080/102] OpenShift console PVC clone cannot use B as the unit --- frontend/public/components/storage/shared.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/frontend/public/components/storage/shared.ts b/frontend/public/components/storage/shared.ts index 5fb723ff56c..839ae00d47a 100644 --- a/frontend/public/components/storage/shared.ts +++ b/frontend/public/components/storage/shared.ts @@ -153,8 +153,9 @@ export const getVolumeModeRadios = () => [ }, ]; +// Link to the Kubernetes documentation for supported units in PVC resource request storage: +// https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/#meaning-of-memory export const dropdownUnits = { - i: 'B', Ki: 'KiB', Mi: 'MiB', Gi: 'GiB', From 8e38f4adf982a647c31af13285d51827318ba205 Mon Sep 17 00:00:00 2001 From: "openshift-merge-bot[bot]" <148852131+openshift-merge-bot[bot]@users.noreply.github.com> Date: Thu, 3 Jul 2025 00:33:06 +0000 Subject: [PATCH 081/102] Merge pull request #15037 from TheRealJon/CONSOLE-4502 CONSOLE-4502, OCPBUGS-52835, OCPBUGS-55514: Implement sessions in openshift authenticator --- cmd/bridge/main.go | 6 + dynamic-demo-plugin/console-extensions.json | 5 +- .../src/listeners/usage.ts | 3 +- .../tests/app/demo-dynamic-plugin.cy.ts | 6 +- .../tests/app/poll-console-updates.cy.ts | 3 +- .../tests/dashboards/cluster-dashboard.cy.ts | 17 ++- pkg/auth/oauth2/auth.go | 53 +------ pkg/auth/oauth2/auth_oidc.go | 6 +- pkg/auth/oauth2/auth_openshift.go | 137 ++++++++++++------ pkg/auth/sessions/loginstate.go | 18 +++ pkg/auth/sessions/server_session.go | 13 -- pkg/auth/sessions/server_session_test.go | 37 ----- pkg/auth/static/auth.go | 5 - pkg/auth/tokenreviewer.go | 57 ++++++++ pkg/auth/types.go | 2 - pkg/server/middleware.go | 24 +-- pkg/server/server.go | 27 ++-- 17 files changed, 217 insertions(+), 202 deletions(-) create mode 100644 pkg/auth/tokenreviewer.go diff --git a/cmd/bridge/main.go b/cmd/bridge/main.go index 0fa86889581..7bd738418f9 100644 --- a/cmd/bridge/main.go +++ b/cmd/bridge/main.go @@ -601,6 +601,12 @@ func main() { caCertFilePath = k8sInClusterCA } + tokenReviewer, err := auth.NewTokenReviewer(srv.InternalProxiedK8SClientConfig) + if err != nil { + klog.Fatalf("failed to create token reviewer: %v", err) + } + srv.TokenReviewer = tokenReviewer + if err := completedAuthnOptions.ApplyTo(srv, k8sEndpoint, caCertFilePath, completedSessionOptions); err != nil { klog.Fatalf("failed to apply configuration to server: %v", err) os.Exit(1) diff --git a/dynamic-demo-plugin/console-extensions.json b/dynamic-demo-plugin/console-extensions.json index 554c7d89e1c..cb7e73be629 100644 --- a/dynamic-demo-plugin/console-extensions.json +++ b/dynamic-demo-plugin/console-extensions.json @@ -47,7 +47,10 @@ "properties": { "id": "admin-demo-section", "perspective": "admin", - "name": "%plugin__console-demo-plugin~Demo Plugin%" + "name": "%plugin__console-demo-plugin~Demo Plugin%", + "dataAttributes": { + "data-test": "admin-demo-section" + } } }, { diff --git a/frontend/packages/console-telemetry-plugin/src/listeners/usage.ts b/frontend/packages/console-telemetry-plugin/src/listeners/usage.ts index ef9fddf8334..650d793ae24 100644 --- a/frontend/packages/console-telemetry-plugin/src/listeners/usage.ts +++ b/frontend/packages/console-telemetry-plugin/src/listeners/usage.ts @@ -1,11 +1,12 @@ import { TelemetryEventListener } from '@console/dynamic-plugin-sdk/src'; +import { consoleFetch } from '@console/dynamic-plugin-sdk/src/lib-core'; /** * Fire and forget implementation to send usage data to the backend. * See pkg/usage/ for more information. */ const trackUsage = (data: { event: string; perspective: string }) => { - return fetch('/metrics/usage', { + return consoleFetch('/metrics/usage', { method: 'POST', body: JSON.stringify(data), }) diff --git a/frontend/packages/integration-tests-cypress/tests/app/demo-dynamic-plugin.cy.ts b/frontend/packages/integration-tests-cypress/tests/app/demo-dynamic-plugin.cy.ts index 9c9bfdaa753..44f9c9cebba 100644 --- a/frontend/packages/integration-tests-cypress/tests/app/demo-dynamic-plugin.cy.ts +++ b/frontend/packages/integration-tests-cypress/tests/app/demo-dynamic-plugin.cy.ts @@ -2,7 +2,6 @@ import { safeLoadAll } from 'js-yaml'; import { checkErrors } from '../../support'; import { isLocalDevEnvironment } from '../../views/common'; import { detailsPage } from '../../views/details-page'; -import { refreshWebConsoleLink } from '../../views/form'; import { listPage } from '../../views/list-page'; import { modal } from '../../views/modal'; import { nav } from '../../views/nav'; @@ -53,10 +52,9 @@ const enableDemoPlugin = (enable: boolean) => { cy.byTestID('edit-console-plugin').contains(enable ? 'Enabled' : 'Disabled'); }); cy.log(`Running plugin test on ci using PLUGIN_PULL_SPEC: ${PLUGIN_PULL_SPEC}`); - cy.byTestID(refreshWebConsoleLink, { timeout: CHECK_UPDATE_WAIT }) - .should('exist') + cy.byTestID('admin-demo-section', { timeout: CHECK_UPDATE_WAIT }) + .should(enable ? 'exist' : 'not.exist') .then(() => { - cy.reload(); if (!enable) { cy.byLegacyTestID(PLUGIN_NAME).click(); detailsPage.titleShouldContain(PLUGIN_NAME); diff --git a/frontend/packages/integration-tests-cypress/tests/app/poll-console-updates.cy.ts b/frontend/packages/integration-tests-cypress/tests/app/poll-console-updates.cy.ts index 479ab0c68d3..d796b4600fc 100644 --- a/frontend/packages/integration-tests-cypress/tests/app/poll-console-updates.cy.ts +++ b/frontend/packages/integration-tests-cypress/tests/app/poll-console-updates.cy.ts @@ -52,7 +52,8 @@ const checkConsoleUpdateToast = () => { cy.byTestID('loading-indicator').should('not.exist'); }; -describe('PollConsoleUpdates Test', () => { +// TODO Fix once we figure out how to handle the case where console reloads after rollout +xdescribe('PollConsoleUpdates Test', () => { before(() => { cy.login(); }); diff --git a/frontend/packages/integration-tests-cypress/tests/dashboards/cluster-dashboard.cy.ts b/frontend/packages/integration-tests-cypress/tests/dashboards/cluster-dashboard.cy.ts index 3a181cc7356..ab8b2f2ca47 100644 --- a/frontend/packages/integration-tests-cypress/tests/dashboards/cluster-dashboard.cy.ts +++ b/frontend/packages/integration-tests-cypress/tests/dashboards/cluster-dashboard.cy.ts @@ -11,14 +11,17 @@ describe('Cluster dashboard', () => { cy.visit(`/dashboards`); }); - describe('Disabled Getting started resources banner', () => { + // TODO Fix once we figure out how to handle the case where console reloads after rollout + xdescribe('Disabled Getting started resources banner', () => { it('it disables the GettingStartedBanner capability on console-operator config', () => { cy.exec( `oc patch console.operator.openshift.io cluster --patch '{ "spec": { "customization": { "capabilities": [{"name": "LightspeedButton","visibility": {"state":"Enabled"}}, {"name": "GettingStartedBanner","visibility": {"state":"Disabled"}}] } } }' --type=merge`, ) .its('stdout') .then(() => { - cy.byTestID(refreshWebConsoleLink, { timeout: 300000 }) + cy.byTestID(refreshWebConsoleLink, { + timeout: 300000, + }) .should('exist') .then(() => { cy.reload(); @@ -90,8 +93,14 @@ describe('Cluster dashboard', () => { const inventoryItems = [ { title: 'Node', link: '/k8s/cluster/nodes' }, { title: 'Pod', link: '/k8s/all-namespaces/pods' }, - { title: 'StorageClass', link: '/k8s/cluster/storageclasses' }, - { title: 'PersistentVolumeClaim', link: '/k8s/all-namespaces/persistentvolumeclaims' }, + { + title: 'StorageClass', + link: '/k8s/cluster/storageclasses', + }, + { + title: 'PersistentVolumeClaim', + link: '/k8s/all-namespaces/persistentvolumeclaims', + }, ]; inventoryItems.forEach((item, i) => { cy.byTestID('resource-inventory-item').eq(i).invoke('text').should('include', item.title); diff --git a/pkg/auth/oauth2/auth.go b/pkg/auth/oauth2/auth.go index fe789b5956b..c644952c36e 100644 --- a/pkg/auth/oauth2/auth.go +++ b/pkg/auth/oauth2/auth.go @@ -6,7 +6,6 @@ import ( "crypto/tls" "crypto/x509" "encoding/hex" - "errors" "fmt" "io" "net/http" @@ -22,9 +21,6 @@ import ( "github.com/openshift/console/pkg/auth/sessions" oscrypto "github.com/openshift/library-go/pkg/crypto" - authv1 "k8s.io/api/authentication/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/client-go/kubernetes" "k8s.io/client-go/rest" "k8s.io/klog/v2" ) @@ -51,8 +47,7 @@ var ( ) type OAuth2Authenticator struct { - clientFunc func() *http.Client - internalK8sClientset *kubernetes.Clientset + clientFunc func() *http.Client clientID string clientSecret string @@ -82,7 +77,7 @@ type loginMethod interface { // cookie with the user. login(http.ResponseWriter, *http.Request, *oauth2.Token) (*sessions.LoginState, error) // Removes user token cookie, but does not write a response. - DeleteCookie(http.ResponseWriter, *http.Request) + DeleteSession(http.ResponseWriter, *http.Request) // logout deletes any cookies associated with the user, and writes a no-content response. logout(http.ResponseWriter, *http.Request) // LogoutRedirectURL returns the URL to redirect to after a logout. @@ -138,8 +133,7 @@ type Config struct { type completedConfig struct { *Config - clientFunc func() *http.Client - internalK8sClientset *kubernetes.Clientset + clientFunc func() *http.Client } func newHTTPClient(issuerCA string, includeSystemRoots bool) (*http.Client, error) { @@ -209,7 +203,6 @@ func NewOAuth2Authenticator(ctx context.Context, config *Config) (*OAuth2Authent cookiePath: c.CookiePath, secureCookies: c.SecureCookies, constructOAuth2Config: a.oauth2ConfigConstructor, - internalK8sConfig: c.K8sConfig, } var tokenHandler loginMethod @@ -265,8 +258,7 @@ func (a *OAuth2Authenticator) oauth2ConfigConstructor(endpointConfig oauth2.Endp func newUnstartedAuthenticator(c *completedConfig) *OAuth2Authenticator { return &OAuth2Authenticator{ - clientFunc: c.clientFunc, - internalK8sClientset: c.internalK8sClientset, + clientFunc: c.clientFunc, clientID: c.ClientID, clientSecret: c.ClientSecret, @@ -304,37 +296,6 @@ func (a *OAuth2Authenticator) LoginFunc(w http.ResponseWriter, r *http.Request) http.Redirect(w, r, a.oauth2Config().AuthCodeURL(state), http.StatusSeeOther) } -func (a *OAuth2Authenticator) ReviewToken(ctx context.Context, token string) error { - tokenReview := &authv1.TokenReview{ - TypeMeta: metav1.TypeMeta{ - APIVersion: "authentication.k8s.io/v1", - Kind: "TokenReview", - }, - Spec: authv1.TokenReviewSpec{ - Token: token, - }, - } - - completedTokenReview, err := a. - internalK8sClientset. - AuthenticationV1(). - TokenReviews(). - Create(ctx, tokenReview, metav1.CreateOptions{}) - - if err != nil { - return fmt.Errorf("failed to create TokenReview, %v", err) - } - - // Check if the token is authenticated - if !completedTokenReview.Status.Authenticated { - if completedTokenReview.Status.Error != "" { - return errors.New(completedTokenReview.Status.Error) - } - return errors.New("failed to authenticate the token, unknownd error") - } - return nil -} - // LogoutFunc cleans up session cookies. func (a *OAuth2Authenticator) LogoutFunc(w http.ResponseWriter, r *http.Request) { if a.metrics != nil { @@ -450,12 +411,6 @@ func (c *Config) Complete() (*completedConfig, error) { } completed.clientFunc = clientFunc - internalK8sClientset, err := kubernetes.NewForConfig(c.K8sConfig) - if err != nil { - return nil, fmt.Errorf("failed to create K8s Clientset: %v", err) - } - completed.internalK8sClientset = internalK8sClientset - errURL := "/" if c.ErrorURL != "" { errURL = c.ErrorURL diff --git a/pkg/auth/oauth2/auth_oidc.go b/pkg/auth/oauth2/auth_oidc.go index 73b47294cca..a580caf8bd2 100644 --- a/pkg/auth/oauth2/auth_oidc.go +++ b/pkg/auth/oauth2/auth_oidc.go @@ -9,7 +9,6 @@ import ( oidc "github.com/coreos/go-oidc" "golang.org/x/oauth2" - "k8s.io/client-go/rest" "github.com/openshift/console/pkg/auth" "github.com/openshift/console/pkg/auth/sessions" @@ -39,7 +38,6 @@ type oidcConfig struct { cookiePath string secureCookies bool constructOAuth2Config oauth2ConfigConstructor - internalK8sConfig *rest.Config } func newOIDCAuth(ctx context.Context, sessionStore *sessions.CombinedSessionStore, c *oidcConfig, metrics *auth.Metrics) (*oidcAuth, error) { @@ -120,12 +118,12 @@ func (o *oidcAuth) verify(ctx context.Context, rawIDToken string) (*oidc.IDToken return provider.Verifier(&oidc.Config{ClientID: o.clientID}).Verify(ctx, rawIDToken) } -func (o *oidcAuth) DeleteCookie(w http.ResponseWriter, r *http.Request) { +func (o *oidcAuth) DeleteSession(w http.ResponseWriter, r *http.Request) { o.sessions.DeleteSession(w, r) } func (o *oidcAuth) logout(w http.ResponseWriter, r *http.Request) { - o.DeleteCookie(w, r) + o.DeleteSession(w, r) w.WriteHeader(http.StatusNoContent) } diff --git a/pkg/auth/oauth2/auth_openshift.go b/pkg/auth/oauth2/auth_openshift.go index 23ab4d10f02..f081c563407 100644 --- a/pkg/auth/oauth2/auth_openshift.go +++ b/pkg/auth/oauth2/auth_openshift.go @@ -9,6 +9,7 @@ import ( "net/http" "net/url" "strings" + "sync" "time" "golang.org/x/oauth2" @@ -23,6 +24,7 @@ import ( "github.com/openshift/console/pkg/auth/sessions" "github.com/openshift/console/pkg/proxy" "github.com/openshift/console/pkg/serverutils/asynccache" + "github.com/openshift/console/pkg/utils" ) // openShiftAuth implements OpenShift Authentication as defined in: @@ -33,6 +35,8 @@ type openShiftAuth struct { k8sClient *http.Client oauthEndpointCache *asynccache.AsyncCache[*oidcDiscovery] + sessions *sessions.CombinedSessionStore + refreshLock sync.Map } type oidcDiscovery struct { @@ -68,6 +72,23 @@ func newOpenShiftAuth(ctx context.Context, k8sClient *http.Client, c *oidcConfig } o.oauthEndpointCache.Run(ctx) + authnKey, err := utils.RandomString(64) + if err != nil { + return nil, err + } + + encryptionKey, err := utils.RandomString(32) + if err != nil { + return nil, err + } + + o.sessions = sessions.NewSessionStore( + []byte(authnKey), + []byte(encryptionKey), + c.secureCookies, + c.cookiePath, + ) + return o, nil } @@ -130,51 +151,21 @@ func (o *openShiftAuth) getOIDCDiscoveryInternal(ctx context.Context) (*oidcDisc return metadata, nil } -func (o *openShiftAuth) login(w http.ResponseWriter, _ *http.Request, token *oauth2.Token) (*sessions.LoginState, error) { +func (o *openShiftAuth) login(w http.ResponseWriter, r *http.Request, token *oauth2.Token) (*sessions.LoginState, error) { if token.AccessToken == "" { return nil, fmt.Errorf("token response did not contain an access token %#v", token) } - ls := sessions.NewRawLoginState(token.AccessToken) - - expiresIn := (time.Hour * 24).Seconds() - if !token.Expiry.IsZero() { - expiresIn = token.Expiry.Sub(time.Now()).Seconds() - } - // NOTE: In Tectonic, we previously had issues with tokens being bigger than - // cookies can handle. Since OpenShift doesn't store groups in the token, the - // token can't grow arbitrarily big, so we assume it will always fit in a cookie - // value. - // - // NOTE: in the future we'll have to avoid the use of cookies. This should likely switch to frontend - // only logic using the OAuth2 implicit flow. - // https://tools.ietf.org/html/rfc6749#section-4.2 - cookie := http.Cookie{ - Name: sessions.OpenshiftAccessTokenCookieName, - Value: ls.AccessToken(), - MaxAge: int(expiresIn), - HttpOnly: true, - Path: o.cookiePath, - Secure: o.secureCookies, - SameSite: http.SameSiteStrictMode, + ls, err := o.sessions.AddSession(w, r, nil, token) + if err != nil { + return nil, fmt.Errorf("failed to create session: %w", err) } - http.SetCookie(w, &cookie) return ls, nil } -// NOTE: cookies are going away, this should be removed in the future -func (o *openShiftAuth) DeleteCookie(w http.ResponseWriter, r *http.Request) { - // Delete session cookie - cookie := http.Cookie{ - Name: sessions.OpenshiftAccessTokenCookieName, - Value: "", - MaxAge: -1, - HttpOnly: true, - Path: o.cookiePath, - Secure: o.secureCookies, - } - http.SetCookie(w, &cookie) +func (o *openShiftAuth) DeleteSession(w http.ResponseWriter, r *http.Request) { + o.sessions.DeleteSession(w, r) } func (o *openShiftAuth) logout(w http.ResponseWriter, r *http.Request) { @@ -187,13 +178,15 @@ func (o *openShiftAuth) logout(w http.ResponseWriter, r *http.Request) { return } - token, err := sessions.GetSessionTokenFromCookie(r) + ls, err := o.getLoginState(w, r) if err != nil { - klog.V(4).Infof("the session cookie is not present: %v", err) - w.WriteHeader(http.StatusNoContent) + klog.Errorf("error logging out: %v", err) + w.WriteHeader(http.StatusInternalServerError) return } + token := ls.AccessToken() + configWithBearerToken := &rest.Config{ Host: "https://" + k8sURL.Host, Transport: o.k8sClient.Transport, @@ -213,21 +206,77 @@ func (o *openShiftAuth) logout(w http.ResponseWriter, r *http.Request) { return } - o.DeleteCookie(w, r) + // Delete the session + o.sessions.DeleteSession(w, r) w.WriteHeader(http.StatusNoContent) } +func (o *openShiftAuth) refreshSession(ctx context.Context, w http.ResponseWriter, r *http.Request, oauthConfig *oauth2.Config, cookieRefreshToken string) (*sessions.LoginState, error) { + actual, _ := o.refreshLock.LoadOrStore(cookieRefreshToken, &sync.Mutex{}) + actual.(*sync.Mutex).Lock() + defer actual.(*sync.Mutex).Unlock() + + session, err := o.sessions.GetSession(w, r) + if err != nil { + return nil, err + } + + // if the refresh token got changed by someone else in the meantime (guarded by the refreshLock), + // use the most current session instead of doing the full token refresh + if session != nil && session.RefreshToken() != cookieRefreshToken { + o.sessions.UpdateCookieRefreshToken(w, r, session.RefreshToken()) // we must update our own client session, too! + return session, nil + } + + newTokens, err := oauthConfig.TokenSource( + context.WithValue(ctx, oauth2.HTTPClient, o.getClient()), // supply our client with custom trust + &oauth2.Token{RefreshToken: cookieRefreshToken}, + ).Token() + + if err != nil { + return nil, fmt.Errorf("failed to refresh a token %s: %w", cookieRefreshToken, err) + } + + ls, err := o.sessions.UpdateTokens(w, r, nil, newTokens) + if err != nil { + return nil, fmt.Errorf("failed to update session tokens: %w", err) + } + + return ls, nil +} + +func (o *openShiftAuth) getLoginState(w http.ResponseWriter, r *http.Request) (*sessions.LoginState, error) { + ls, err := o.sessions.GetSession(w, r) + if err != nil { + return nil, fmt.Errorf("failed to retrieve login state: %v", err) + } + + if ls == nil || ls.ShouldRotate() { + if refreshToken := o.sessions.GetCookieRefreshToken(r); refreshToken != "" { + return o.refreshSession(r.Context(), w, r, o.oauth2Config(), refreshToken) + } + + return nil, fmt.Errorf("a session was not found on server or is expired") + } + return ls, nil +} + func (o *openShiftAuth) LogoutRedirectURL() string { return o.logoutRedirectOverride } -func (o *openShiftAuth) Authenticate(_ http.ResponseWriter, r *http.Request) (*auth.User, error) { - token, err := sessions.GetSessionTokenFromCookie(r) + +func (o *openShiftAuth) Authenticate(w http.ResponseWriter, r *http.Request) (*auth.User, error) { + ls, err := o.getLoginState(w, r) if err != nil { - return nil, fmt.Errorf("failed to get session token: %v", err) + return nil, fmt.Errorf("authentication error: %w", err) + } + + if ls == nil { + return nil, fmt.Errorf("user not authenticated") } return &auth.User{ - Token: token, + Token: ls.AccessToken(), }, nil } diff --git a/pkg/auth/sessions/loginstate.go b/pkg/auth/sessions/loginstate.go index cf50bcce0f0..b17ed47d106 100644 --- a/pkg/auth/sessions/loginstate.go +++ b/pkg/auth/sessions/loginstate.go @@ -60,6 +60,17 @@ func newLoginState(tokenVerifier IDTokenVerifier, token *oauth2.Token) (*LoginSt return nil, fmt.Errorf("no token response was supplied") } + if tokenVerifier == nil { + ls := &LoginState{ + now: time.Now, + rawToken: token.AccessToken, + sessionToken: RandomString(256), + refreshToken: token.RefreshToken, + } + ls.updateExpiry(jsonTime(token.Expiry)) + return ls, nil + } + rawIDToken, ok := token.Extra("id_token").(string) if !ok { return nil, errors.New("token response did not have an id_token field") @@ -93,6 +104,13 @@ func (ls *LoginState) Username() string { } func (ls *LoginState) UpdateTokens(verifier IDTokenVerifier, tokenResponse *oauth2.Token) error { + if verifier == nil { + ls.rawToken = tokenResponse.AccessToken + ls.refreshToken = tokenResponse.RefreshToken + ls.updateExpiry(jsonTime(tokenResponse.Expiry)) + return nil + } + rawIDToken, ok := tokenResponse.Extra("id_token").(string) if !ok { return errors.New("token response did not have an id_token field") diff --git a/pkg/auth/sessions/server_session.go b/pkg/auth/sessions/server_session.go index 1f80c6270f6..14ffce48f7f 100644 --- a/pkg/auth/sessions/server_session.go +++ b/pkg/auth/sessions/server_session.go @@ -2,7 +2,6 @@ package sessions import ( "fmt" - "net/http" "slices" "sort" "sync" @@ -193,15 +192,3 @@ func spliceOut(slice []*LoginState, toRemove *LoginState) []*LoginState { } return slice } - -func GetSessionTokenFromCookie(r *http.Request) (string, error) { - cookie, err := r.Cookie(OpenshiftAccessTokenCookieName) - if err != nil { - return "", err - } - - if cookie.Value == "" { - return "", fmt.Errorf("unauthenticated, no value for cookie %s", OpenshiftAccessTokenCookieName) - } - return cookie.Value, nil -} diff --git a/pkg/auth/sessions/server_session_test.go b/pkg/auth/sessions/server_session_test.go index d37d8cd9625..0fd60a91033 100644 --- a/pkg/auth/sessions/server_session_test.go +++ b/pkg/auth/sessions/server_session_test.go @@ -2,7 +2,6 @@ package sessions import ( "fmt" - "net/http" "reflect" "strconv" "sync" @@ -331,42 +330,6 @@ func TestSessionStore_pruneSessions(t *testing.T) { } } -func TestSessionStore_GetSessionTokenFromCookie(t *testing.T) { - // Returns the token when it exists - r, err := http.NewRequest("GET", "/", nil) - if err != nil { - t.Fatal(err) - } - cookie := &http.Cookie{ - Name: OpenshiftAccessTokenCookieName, - Value: "test", - } - r.AddCookie(cookie) - token, err := GetSessionTokenFromCookie(r) - require.Nil(t, err) - require.Equal(t, "test", token) - - // Returns an error when cookie value is empty - r, err = http.NewRequest("GET", "/", nil) - if err != nil { - t.Fatal(err) - } - cookie.Value = "" - r.AddCookie(cookie) - token, err = GetSessionTokenFromCookie(r) - require.NotNil(t, err) - require.Equal(t, "", token) - - // Returns an error when no cookie exists - r, err = http.NewRequest("GET", "/", nil) - if err != nil { - t.Fatal(err) - } - token, err = GetSessionTokenFromCookie(r) - require.NotNil(t, err) - require.Equal(t, "", token) -} - func withServerSessions(sessions ...*LoginState) func(ss *SessionStore) { return func(ss *SessionStore) { for _, s := range sessions { diff --git a/pkg/auth/static/auth.go b/pkg/auth/static/auth.go index 1b9f743725b..1a1da0516e4 100644 --- a/pkg/auth/static/auth.go +++ b/pkg/auth/static/auth.go @@ -1,7 +1,6 @@ package static import ( - "context" "net/http" "github.com/openshift/console/pkg/auth" @@ -23,10 +22,6 @@ func (s *StaticAuthenticator) Authenticate(w http.ResponseWriter, req *http.Requ return &userCopy, nil } -func (s *StaticAuthenticator) ReviewToken(ctx context.Context, token string) error { - return nil -} - func (s *StaticAuthenticator) LoginFunc(w http.ResponseWriter, req *http.Request) { w.WriteHeader(http.StatusNoContent) } diff --git a/pkg/auth/tokenreviewer.go b/pkg/auth/tokenreviewer.go new file mode 100644 index 00000000000..567c7bb8f85 --- /dev/null +++ b/pkg/auth/tokenreviewer.go @@ -0,0 +1,57 @@ +package auth + +import ( + "context" + "errors" + "fmt" + + authv1 "k8s.io/api/authentication/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/client-go/kubernetes" + "k8s.io/client-go/rest" +) + +type TokenReviewer struct { + clientSet *kubernetes.Clientset +} + +func NewTokenReviewer(k8sRestConfig *rest.Config) (*TokenReviewer, error) { + clientSet, err := kubernetes.NewForConfig(k8sRestConfig) + if err != nil { + return nil, fmt.Errorf("failed to create K8s Clientset for TokenReviewer: %v", err) + } + return &TokenReviewer{ + clientSet: clientSet, + }, nil +} + +func (t *TokenReviewer) ReviewToken(ctx context.Context, token string) error { + tokenReview := &authv1.TokenReview{ + TypeMeta: metav1.TypeMeta{ + APIVersion: "authentication.k8s.io/v1", + Kind: "TokenReview", + }, + Spec: authv1.TokenReviewSpec{ + Token: token, + }, + } + + completedTokenReview, err := t. + clientSet. + AuthenticationV1(). + TokenReviews(). + Create(ctx, tokenReview, metav1.CreateOptions{}) + + if err != nil { + return fmt.Errorf("failed to create TokenReview, %v", err) + } + + // Check if the token is authenticated + if !completedTokenReview.Status.Authenticated { + if completedTokenReview.Status.Error != "" { + return errors.New(completedTokenReview.Status.Error) + } + return errors.New("failed to authenticate the token, unknownd error") + } + return nil +} diff --git a/pkg/auth/types.go b/pkg/auth/types.go index 4effd05033b..422af105e01 100644 --- a/pkg/auth/types.go +++ b/pkg/auth/types.go @@ -1,7 +1,6 @@ package auth import ( - "context" "net/http" "github.com/openshift/console/pkg/auth/sessions" @@ -9,7 +8,6 @@ import ( type Authenticator interface { Authenticate(w http.ResponseWriter, req *http.Request) (*User, error) - ReviewToken(context context.Context, token string) error LoginFunc(w http.ResponseWriter, req *http.Request) LogoutFunc(w http.ResponseWriter, req *http.Request) diff --git a/pkg/server/middleware.go b/pkg/server/middleware.go index 47a5b6701c9..5fe39555501 100644 --- a/pkg/server/middleware.go +++ b/pkg/server/middleware.go @@ -43,27 +43,7 @@ func authMiddlewareWithUser(authenticator auth.Authenticator, csrfVerifier *csrf ) } -func withTokenReview(authenticator auth.Authenticator, h http.HandlerFunc) http.HandlerFunc { - return func(w http.ResponseWriter, r *http.Request) { - user, err := authenticator.Authenticate(w, r) - if err != nil { - klog.V(4).Infof("TOKEN_REVIEW: '%s %s' unauthorized, unable to authenticate, %v", r.Method, r.URL.Path, err) - w.WriteHeader(http.StatusUnauthorized) - return - } - - err = authenticator.ReviewToken(r.Context(), user.Token) - if err != nil { - klog.V(4).Infof("TOKEN_REVIEW: '%s %s' unauthorized, invalid user token, %v", r.Method, r.URL.Path, err) - w.WriteHeader(http.StatusUnauthorized) - return - } - klog.V(4).Infof("TOKEN_REVIEW: '%s %s' user token successfully validated", r.Method, r.URL.Path) - h(w, r) - } -} - -func withBearerTokenReview(authenticator auth.Authenticator, h http.HandlerFunc) http.HandlerFunc { +func withBearerTokenReview(tokenReviewer *auth.TokenReviewer, h http.HandlerFunc) http.HandlerFunc { return http.HandlerFunc( func(w http.ResponseWriter, r *http.Request) { authorizationHeader := r.Header.Get("Authorization") @@ -86,7 +66,7 @@ func withBearerTokenReview(authenticator auth.Authenticator, h http.HandlerFunc) return } - err := authenticator.ReviewToken(r.Context(), bearerToken) + err := tokenReviewer.ReviewToken(r.Context(), bearerToken) if err != nil { klog.V(4).Infof("TOKEN_REVIEW: '%s %s' unauthorized, invalid user token, %v", r.Method, r.URL.Path, err) w.WriteHeader(http.StatusUnauthorized) diff --git a/pkg/server/server.go b/pkg/server/server.go index 10f7590208b..d80cc8a674b 100644 --- a/pkg/server/server.go +++ b/pkg/server/server.go @@ -198,6 +198,7 @@ type Server struct { ThanosPublicURL *url.URL ThanosTenancyProxyConfig *proxy.Config ThanosTenancyProxyForRulesConfig *proxy.Config + TokenReviewer *auth.TokenReviewer UserSettingsLocation string AuthMetrics *auth.Metrics } @@ -290,18 +291,15 @@ func (s *Server) HTTPHandler() (http.Handler, error) { return authMiddlewareWithUser(authenticator, s.CSRFVerifier, h) } - tokenReviewHandler := func(h http.HandlerFunc) http.HandlerFunc { - return s.CSRFVerifier.WithCSRFVerification(withTokenReview(authenticator, h)) - } - + // For requests where Authorization header with valid Bearer token is expected bearerTokenReviewHandler := func(h http.HandlerFunc) http.HandlerFunc { - return withBearerTokenReview(authenticator, h) + return withBearerTokenReview(s.TokenReviewer, h) } handleFunc(authLoginEndpoint, s.Authenticator.LoginFunc) handleFunc(authLogoutEndpoint, allowMethod(http.MethodPost, s.handleLogout)) handleFunc(AuthLoginCallbackEndpoint, s.Authenticator.CallbackFunc(fn)) - handle(copyLoginEndpoint, tokenReviewHandler(s.handleCopyLogin)) + handle(copyLoginEndpoint, authHandler(s.handleCopyLogin)) handleFunc("/api/", notFoundHandler) @@ -471,7 +469,7 @@ func (s *Server) HTTPHandler() (http.Handler, error) { }), )) - handle("/api/console/monitoring-dashboard-config", tokenReviewHandler(s.handleMonitoringDashboardConfigmaps)) + handle("/api/console/monitoring-dashboard-config", authHandler(s.handleMonitoringDashboardConfigmaps)) // Knative trimURLPrefix := proxy.SingleJoiningSlash(s.BaseURL.Path, knativeProxyEndpoint) knativeHandler := knative.NewKnativeHandler( @@ -482,8 +480,8 @@ func (s *Server) HTTPHandler() (http.Handler, error) { handle(knativeProxyEndpoint, authHandlerWithUser(knativeHandler.Handle)) // TODO: move the knative-event-sources and knative-channels handler into the knative module. - handle("/api/console/knative-event-sources", tokenReviewHandler(s.handleKnativeEventSourceCRDs)) - handle("/api/console/knative-channels", tokenReviewHandler(s.handleKnativeChannelCRDs)) + handle("/api/console/knative-event-sources", authHandler(s.handleKnativeEventSourceCRDs)) + handle("/api/console/knative-channels", authHandler(s.handleKnativeChannelCRDs)) // Dev-Console Endpoints handle(devConsoleEndpoint, http.StripPrefix( @@ -529,7 +527,7 @@ func (s *Server) HTTPHandler() (http.Handler, error) { handle(pluginAssetsEndpoint, http.StripPrefix( proxy.SingleJoiningSlash(s.BaseURL.Path, pluginAssetsEndpoint), - tokenReviewHandler(func(w http.ResponseWriter, r *http.Request) { + authHandler(func(w http.ResponseWriter, r *http.Request) { pluginsHandler.HandlePluginAssets(w, r) }), )) @@ -567,7 +565,7 @@ func (s *Server) HTTPHandler() (http.Handler, error) { } } - handle(updatesEndpoint, tokenReviewHandler(func(w http.ResponseWriter, r *http.Request) { + handle(updatesEndpoint, authHandler(func(w http.ResponseWriter, r *http.Request) { if r.Method != "GET" { w.Header().Set("Allow", "GET") serverutils.SendResponse(w, http.StatusMethodNotAllowed, serverutils.ApiError{Err: "Method unsupported, the only supported methods is GET"}) @@ -610,8 +608,7 @@ func (s *Server) HTTPHandler() (http.Handler, error) { handle("/metrics", bearerTokenReviewHandler(func(w http.ResponseWriter, r *http.Request) { promhttp.Handler().ServeHTTP(w, r) })) - - handleFunc("/metrics/usage", tokenReviewHandler(func(w http.ResponseWriter, r *http.Request) { + handleFunc("/metrics/usage", authHandler(func(w http.ResponseWriter, r *http.Request) { usage.Handle(usageMetrics, w, r) })) @@ -658,11 +655,11 @@ func (s *Server) HTTPHandler() (http.Handler, error) { gitopsProxy := proxy.NewProxy(s.GitOpsProxyConfig) handle(gitopsEndpoint, http.StripPrefix( proxy.SingleJoiningSlash(s.BaseURL.Path, gitopsEndpoint), - tokenReviewHandler(gitopsProxy.ServeHTTP)), + authHandler(gitopsProxy.ServeHTTP)), ) } - handle("/api/console/version", tokenReviewHandler(s.versionHandler)) + handle("/api/console/version", authHandler(s.versionHandler)) mux.HandleFunc(s.BaseURL.Path, s.indexHandler) From 745ba1511ca488ed0589d2a81f87fde91e571afb Mon Sep 17 00:00:00 2001 From: Krish Agarwal Date: Thu, 3 Jul 2025 09:15:41 -0400 Subject: [PATCH 082/102] Fixed typo (#14791) (#15224) Co-authored-by: Martin Salinas --- frontend/packages/console-app/locales/en/console-app.json | 2 +- frontend/packages/console-app/locales/es/console-app.json | 2 +- frontend/packages/console-app/locales/fr/console-app.json | 2 +- frontend/packages/console-app/locales/ja/console-app.json | 2 +- frontend/packages/console-app/locales/ko/console-app.json | 2 +- frontend/packages/console-app/locales/zh/console-app.json | 2 +- frontend/packages/console-app/src/components/pdb/PDBPage.tsx | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/frontend/packages/console-app/locales/en/console-app.json b/frontend/packages/console-app/locales/en/console-app.json index bd31452aca4..f7704e22f5e 100644 --- a/frontend/packages/console-app/locales/en/console-app.json +++ b/frontend/packages/console-app/locales/en/console-app.json @@ -529,7 +529,7 @@ "Create {{label}}": "Create {{label}}", "Edit {{label}}": "Edit {{label}}", "{helpText}": "{helpText}", - "Create PodDiscruptionBudget": "Create PodDiscruptionBudget", + "Create PodDisruptionBudget": "Create PodDisruptionBudget", "Disruption not allowed": "Disruption not allowed", "PodDisruptionBudget": "PodDisruptionBudget", "No PodDisruptionBudget": "No PodDisruptionBudget", diff --git a/frontend/packages/console-app/locales/es/console-app.json b/frontend/packages/console-app/locales/es/console-app.json index 0e4bbf4f7e6..eed0978295e 100644 --- a/frontend/packages/console-app/locales/es/console-app.json +++ b/frontend/packages/console-app/locales/es/console-app.json @@ -529,7 +529,7 @@ "Create {{label}}": "Crear {{label}}", "Edit {{label}}": "Editar {{label}}", "{helpText}": "{helpText}", - "Create PodDiscruptionBudget": "Crear PodDiscruptionBudget", + "Create PodDisruptionBudget": "Crear PodDisruptionBudget", "Disruption not allowed": "No se permiten interrupciones", "PodDisruptionBudget": "PodDisruptionBudget", "No PodDisruptionBudget": "Sin PodDisruptionBudget", diff --git a/frontend/packages/console-app/locales/fr/console-app.json b/frontend/packages/console-app/locales/fr/console-app.json index be7ee00a0f1..418103d75c1 100644 --- a/frontend/packages/console-app/locales/fr/console-app.json +++ b/frontend/packages/console-app/locales/fr/console-app.json @@ -529,7 +529,7 @@ "Create {{label}}": "Créer {{label}}", "Edit {{label}}": "Modifier {{label}}", "{helpText}": "{helpText}", - "Create PodDiscruptionBudget": "Créer un objet PodDiscruptionBudget", + "Create PodDisruptionBudget": "Créer un objet PodDisruptionBudget", "Disruption not allowed": "Disruption non autorisée", "PodDisruptionBudget": "PodDisruptionBudget", "No PodDisruptionBudget": "Aucun objet PodDisruptionBudget", diff --git a/frontend/packages/console-app/locales/ja/console-app.json b/frontend/packages/console-app/locales/ja/console-app.json index 2a6159a6975..8d1e363b71b 100644 --- a/frontend/packages/console-app/locales/ja/console-app.json +++ b/frontend/packages/console-app/locales/ja/console-app.json @@ -529,7 +529,7 @@ "Create {{label}}": "{{label}} の作成", "Edit {{label}}": "{{label}} の編集", "{helpText}": "{helpText}", - "Create PodDiscruptionBudget": "PodDiscruptionBudget の作成", + "Create PodDisruptionBudget": "PodDisruptionBudget の作成", "Disruption not allowed": "中断できません", "PodDisruptionBudget": "PodDisruptionBudget", "No PodDisruptionBudget": "PodDisruptionBudget がありません", diff --git a/frontend/packages/console-app/locales/ko/console-app.json b/frontend/packages/console-app/locales/ko/console-app.json index 0682c4fc903..5422f299cad 100644 --- a/frontend/packages/console-app/locales/ko/console-app.json +++ b/frontend/packages/console-app/locales/ko/console-app.json @@ -529,7 +529,7 @@ "Create {{label}}": "{{label}} 만들기", "Edit {{label}}": "{{label}} 편집", "{helpText}": "{helpText}", - "Create PodDiscruptionBudget": "PodDiscruptionBudget 만들기", + "Create PodDisruptionBudget": "PodDisruptionBudget 만들기", "Disruption not allowed": "중단이 허용되지 않음", "PodDisruptionBudget": "PodDisruptionBudget", "No PodDisruptionBudget": "PodDisruptionBudget 없음", diff --git a/frontend/packages/console-app/locales/zh/console-app.json b/frontend/packages/console-app/locales/zh/console-app.json index 493bb6e9ef9..8ddfe81031e 100644 --- a/frontend/packages/console-app/locales/zh/console-app.json +++ b/frontend/packages/console-app/locales/zh/console-app.json @@ -529,7 +529,7 @@ "Create {{label}}": "创建{{label}}", "Edit {{label}}": "编辑 {{label}}", "{helpText}": "{helpText}", - "Create PodDiscruptionBudget": "创建 PodDiscruptionBudget", + "Create PodDisruptionBudget": "创建 PodDisruptionBudget", "Disruption not allowed": "不允许中断", "PodDisruptionBudget": "PodDisruptionBudget", "No PodDisruptionBudget": "没有 PodDisruptionBudget", diff --git a/frontend/packages/console-app/src/components/pdb/PDBPage.tsx b/frontend/packages/console-app/src/components/pdb/PDBPage.tsx index 4bb0d2353fd..e98540d063a 100644 --- a/frontend/packages/console-app/src/components/pdb/PDBPage.tsx +++ b/frontend/packages/console-app/src/components/pdb/PDBPage.tsx @@ -37,7 +37,7 @@ export const PodDisruptionBudgetsPage: React.FC = <> - {t('console-app~Create PodDiscruptionBudget')} + {t('console-app~Create PodDisruptionBudget')} From 50409fb77e983ff1af39230a282a7e4410dc3d0c Mon Sep 17 00:00:00 2001 From: Robb Hamilton Date: Wed, 2 Jul 2025 10:18:47 -0400 Subject: [PATCH 083/102] OCPBUGS-58258: fix bug where / in console.tab/horizontalNav href breaks navigation --- .../console-dynamic-plugin-sdk/docs/console-extensions.md | 2 +- .../src/extensions/horizontal-nav-tabs.ts | 4 +++- frontend/public/components/utils/horizontal-nav.tsx | 8 +++----- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/frontend/packages/console-dynamic-plugin-sdk/docs/console-extensions.md b/frontend/packages/console-dynamic-plugin-sdk/docs/console-extensions.md index b1c73b998c1..cf769fd5d97 100644 --- a/frontend/packages/console-dynamic-plugin-sdk/docs/console-extensions.md +++ b/frontend/packages/console-dynamic-plugin-sdk/docs/console-extensions.md @@ -1038,7 +1038,7 @@ This extension can be used to add a tab on the resource details page. | Name | Value Type | Optional | Description | | ---- | ---------- | -------- | ----------- | | `model` | `ExtensionK8sKindVersionModel` | no | The model for which this provider show tab. | -| `page` | `{ name: string; href: string; }` | no | The page to be show in horizontal tab. It takes tab name as name and href of the tab | +| `page` | `{ name: string; href: string; }` | no | The page to be show in horizontal tab. It takes tab name as name and href of the tab.
Note: any special characters in href are encoded, and href is treated as a single
path element. | | `component` | `CodeRef>>` | no | The component to be rendered when the route matches. | --- diff --git a/frontend/packages/console-dynamic-plugin-sdk/src/extensions/horizontal-nav-tabs.ts b/frontend/packages/console-dynamic-plugin-sdk/src/extensions/horizontal-nav-tabs.ts index dee3785696c..b9721282be0 100644 --- a/frontend/packages/console-dynamic-plugin-sdk/src/extensions/horizontal-nav-tabs.ts +++ b/frontend/packages/console-dynamic-plugin-sdk/src/extensions/horizontal-nav-tabs.ts @@ -19,7 +19,9 @@ export type HorizontalNavTab = ExtensionDeclaration< { /** The model for which this provider show tab. */ model: ExtensionK8sKindVersionModel; - /** The page to be show in horizontal tab. It takes tab name as name and href of the tab */ + /** The page to be show in horizontal tab. It takes tab name as name and href of the tab. + * Note: any special characters in href are encoded, and href is treated as a single + * path element. */ page: { name: string; href: string; diff --git a/frontend/public/components/utils/horizontal-nav.tsx b/frontend/public/components/utils/horizontal-nav.tsx index 78d35c9da2f..b0091a7286b 100644 --- a/frontend/public/components/utils/horizontal-nav.tsx +++ b/frontend/public/components/utils/horizontal-nav.tsx @@ -27,8 +27,6 @@ import { } from '@console/dynamic-plugin-sdk/src/extensions/console-types'; import { useExtensions, HorizontalNavTab, isHorizontalNavTab } from '@console/plugin-sdk/src'; -const removeLeadingSlash = (str: string | undefined) => str?.replace(/^\//, '') || ''; - export const editYamlComponent = (props) => ( import('../edit-yaml').then((c) => c.EditYAML)} obj={props.obj} /> ); @@ -176,7 +174,7 @@ export const NavBar: React.FC = ({ pages }) => { const location = useLocation(); const sliced = location.pathname.split('/'); - const lastElement = sliced.pop(); + const lastElement = decodeURIComponent(sliced.pop()); const defaultPage = pages.filter((p) => { return p.href === lastElement; @@ -194,7 +192,7 @@ export const NavBar: React.FC = ({ pages }) => { return (

  • {nameKey ? t(nameKey) : name} @@ -336,7 +334,7 @@ export const HorizontalNav = React.memo((props: HorizontalNavProps) => { const routes = pages.map((p) => { return ( From 719543ede9d050a9bf6a37ed81162b36a3d71bac Mon Sep 17 00:00:00 2001 From: Jon Jackson Date: Mon, 7 Jul 2025 16:35:01 -0400 Subject: [PATCH 084/102] change '/metrics/usage' endpoint to '/api/metrics/usage' --- .../packages/console-telemetry-plugin/src/listeners/usage.ts | 2 +- pkg/server/server.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/frontend/packages/console-telemetry-plugin/src/listeners/usage.ts b/frontend/packages/console-telemetry-plugin/src/listeners/usage.ts index 650d793ae24..78340e616a4 100644 --- a/frontend/packages/console-telemetry-plugin/src/listeners/usage.ts +++ b/frontend/packages/console-telemetry-plugin/src/listeners/usage.ts @@ -6,7 +6,7 @@ import { consoleFetch } from '@console/dynamic-plugin-sdk/src/lib-core'; * See pkg/usage/ for more information. */ const trackUsage = (data: { event: string; perspective: string }) => { - return consoleFetch('/metrics/usage', { + return consoleFetch('/api/metrics/usage', { method: 'POST', body: JSON.stringify(data), }) diff --git a/pkg/server/server.go b/pkg/server/server.go index d80cc8a674b..1ca535479bb 100644 --- a/pkg/server/server.go +++ b/pkg/server/server.go @@ -608,7 +608,7 @@ func (s *Server) HTTPHandler() (http.Handler, error) { handle("/metrics", bearerTokenReviewHandler(func(w http.ResponseWriter, r *http.Request) { promhttp.Handler().ServeHTTP(w, r) })) - handleFunc("/metrics/usage", authHandler(func(w http.ResponseWriter, r *http.Request) { + handleFunc("/api/metrics/usage", authHandler(func(w http.ResponseWriter, r *http.Request) { usage.Handle(usageMetrics, w, r) })) From 192e44547010882b9809417ae63ac3d414529951 Mon Sep 17 00:00:00 2001 From: Mylanos Date: Mon, 7 Jul 2025 13:54:41 +0200 Subject: [PATCH 085/102] OCPBUGS-55340: the tvk-console-plugin of Trilio for Kubernetes operator had a conflicting scope console.redux-reducer extension. Changing the scope name for webterminal plugin fixed this issue, which suggests that there were some internal redux conflicts between webterminal and tvk-console-plugin. --- .../packages/webterminal-plugin/console-extensions.json | 2 +- .../redux/actions/__tests__/cloud-shell-actions.spec.ts | 8 ++++---- .../reducers/__tests__/cloud-shell-selectors.spec.ts | 4 ++-- .../src/redux/reducers/cloud-shell-selectors.ts | 6 +++--- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/frontend/packages/webterminal-plugin/console-extensions.json b/frontend/packages/webterminal-plugin/console-extensions.json index 6f9d89fa6ba..4c3b322c33c 100644 --- a/frontend/packages/webterminal-plugin/console-extensions.json +++ b/frontend/packages/webterminal-plugin/console-extensions.json @@ -2,7 +2,7 @@ { "type": "console.redux-reducer", "properties": { - "scope": "console", + "scope": "webterminal", "reducer": { "$codeRef": "reduxReducer" } } }, diff --git a/frontend/packages/webterminal-plugin/src/redux/actions/__tests__/cloud-shell-actions.spec.ts b/frontend/packages/webterminal-plugin/src/redux/actions/__tests__/cloud-shell-actions.spec.ts index 721b1f99843..075ed6e1e89 100644 --- a/frontend/packages/webterminal-plugin/src/redux/actions/__tests__/cloud-shell-actions.spec.ts +++ b/frontend/packages/webterminal-plugin/src/redux/actions/__tests__/cloud-shell-actions.spec.ts @@ -62,7 +62,7 @@ describe('Cloud shell actions', () => { it('should thunk dispatch toggle expand true action', () => { const dispatch = jest.fn(); // initial isExpanded state is false - const state = { plugins: { console: { cloudShell: { isExpanded: false } } } } as any; + const state = { plugins: { webterminal: { cloudShell: { isExpanded: false } } } } as any; toggleCloudShellExpanded()(dispatch, () => state); expect(dispatch).toHaveBeenCalledWith( expect.objectContaining({ @@ -78,7 +78,7 @@ describe('Cloud shell actions', () => { const dispatch = jest.fn(); // initial isExpanded state is true but isActive is false const state = { - plugins: { console: { cloudShell: { isExpanded: true, isActive: false } } }, + plugins: { webterminal: { cloudShell: { isExpanded: true, isActive: false } } }, } as any; toggleCloudShellExpanded()(dispatch, () => state); expect(dispatch).toHaveBeenCalledWith( @@ -97,7 +97,7 @@ describe('Cloud shell actions', () => { const dispatch = jest.fn(); // initial isExpanded state is true and isActive is true const state = { - plugins: { console: { cloudShell: { isExpanded: true, isActive: true } } }, + plugins: { webterminal: { cloudShell: { isExpanded: true, isActive: true } } }, } as any; await toggleCloudShellExpanded()(dispatch, () => state); expect(dispatch).toHaveBeenCalledWith( @@ -115,7 +115,7 @@ describe('Cloud shell actions', () => { it('should thunk dispatch toggle expand true action', () => { const dispatch = jest.fn(); // initial isExpanded state is false - const state = { plugins: { console: { cloudShell: { isExpanded: false } } } } as any; + const state = { plugins: { webterminal: { cloudShell: { isExpanded: false } } } } as any; toggleCloudShellExpanded()(dispatch, () => state); expect(dispatch).toHaveBeenCalledWith( expect.objectContaining({ diff --git a/frontend/packages/webterminal-plugin/src/redux/reducers/__tests__/cloud-shell-selectors.spec.ts b/frontend/packages/webterminal-plugin/src/redux/reducers/__tests__/cloud-shell-selectors.spec.ts index ed937b3e1b4..b5b051471fb 100644 --- a/frontend/packages/webterminal-plugin/src/redux/reducers/__tests__/cloud-shell-selectors.spec.ts +++ b/frontend/packages/webterminal-plugin/src/redux/reducers/__tests__/cloud-shell-selectors.spec.ts @@ -9,7 +9,7 @@ describe('Cloud shell selectors', () => { expect(isCloudShellExpanded({} as any)).toBe(false); expect( isCloudShellExpanded({ - plugins: { console: { [cloudShellReducerName]: { isExpanded: true } } }, + plugins: { webterminal: { [cloudShellReducerName]: { isExpanded: true } } }, } as any), ).toBe(true); }); @@ -18,7 +18,7 @@ describe('Cloud shell selectors', () => { expect(isCloudShellActive({} as any)).toBe(false); expect( isCloudShellActive({ - plugins: { console: { [cloudShellReducerName]: { isActive: true } } }, + plugins: { webterminal: { [cloudShellReducerName]: { isActive: true } } }, } as any), ).toBe(true); }); diff --git a/frontend/packages/webterminal-plugin/src/redux/reducers/cloud-shell-selectors.ts b/frontend/packages/webterminal-plugin/src/redux/reducers/cloud-shell-selectors.ts index 12c2473ce4e..700b070d939 100644 --- a/frontend/packages/webterminal-plugin/src/redux/reducers/cloud-shell-selectors.ts +++ b/frontend/packages/webterminal-plugin/src/redux/reducers/cloud-shell-selectors.ts @@ -3,10 +3,10 @@ import { RootState } from '@console/internal/redux'; export const cloudShellReducerName = 'cloudShell'; export const isCloudShellExpanded = (state: RootState): boolean => - !!state.plugins?.console?.[cloudShellReducerName]?.isExpanded; + !!state.plugins?.webterminal?.[cloudShellReducerName]?.isExpanded; export const isCloudShellActive = (state: RootState): boolean => - !!state.plugins?.console?.[cloudShellReducerName]?.isActive; + !!state.plugins?.webterminal?.[cloudShellReducerName]?.isActive; export const getCloudShellCommand = (state: RootState): string | null => - state.plugins?.console?.[cloudShellReducerName]?.command ?? null; + state.plugins?.webterminal?.[cloudShellReducerName]?.command ?? null; From fdd84cef89a68e33ee56ee812053d1dc115c784b Mon Sep 17 00:00:00 2001 From: Mylanos Date: Tue, 3 Jun 2025 11:35:30 +0200 Subject: [PATCH 086/102] OCPBUGS-56999: Reading from undefined labels caused errors when visiting NodeLogs, adding conditional unwrap fixes this problem. --- frontend/packages/console-app/src/components/nodes/NodeLogs.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/packages/console-app/src/components/nodes/NodeLogs.tsx b/frontend/packages/console-app/src/components/nodes/NodeLogs.tsx index 646a7036581..7c430882084 100644 --- a/frontend/packages/console-app/src/components/nodes/NodeLogs.tsx +++ b/frontend/packages/console-app/src/components/nodes/NodeLogs.tsx @@ -183,7 +183,7 @@ const NodeLogs: React.FC = ({ obj: node }) => { const pathItems = ['journal']; isWindows ? pathItems.push('containers', 'hybrid-overlay', 'kube-proxy', 'kubelet', 'containerd', 'wicd') - : labels['node-role.kubernetes.io/master'] === '' && + : labels?.['node-role.kubernetes.io/master'] === '' && pathItems.push('openshift-apiserver', 'kube-apiserver', 'oauth-apiserver'); const pathQueryArgument = 'path'; const unitQueryArgument = 'unit'; From d5225b95d6b090cf4314c668e4912b29714940c1 Mon Sep 17 00:00:00 2001 From: Samuel Padgett Date: Wed, 2 Jul 2025 11:49:03 -0400 Subject: [PATCH 087/102] OCPBUGS-58273: Add the Origin header to the HeaderBlacklist in the console plugin proxy --- cmd/bridge/main.go | 2 +- pkg/plugins/handlers.go | 12 +++++++++--- pkg/proxy/proxy.go | 13 +------------ 3 files changed, 11 insertions(+), 16 deletions(-) diff --git a/cmd/bridge/main.go b/cmd/bridge/main.go index 7bd738418f9..af882ae891f 100644 --- a/cmd/bridge/main.go +++ b/cmd/bridge/main.go @@ -318,7 +318,7 @@ func main() { } // Blacklisted headers - srv.ProxyHeaderDenyList = []string{"Cookie", "X-CSRFToken", "X-CSRF-Token"} + srv.ProxyHeaderDenyList = []string{"Cookie", "X-CSRFToken"} if *fLogLevel != "" { klog.Warningf("DEPRECATED: --log-level is now deprecated, use verbosity flag --v=Level instead") diff --git a/pkg/plugins/handlers.go b/pkg/plugins/handlers.go index 9528b2041d7..88ba9d43708 100644 --- a/pkg/plugins/handlers.go +++ b/pkg/plugins/handlers.go @@ -36,7 +36,10 @@ func NewPluginsProxyServiceHandler(consoleEndpoint string, serviceEndpoint *url. ConsoleEndpoint: consoleEndpoint, ProxyConfig: &proxy.Config{ TLSClientConfig: tlsClientConfig, - HeaderBlacklist: proxy.HeaderBlacklist, + // The Origin header can trigger CORS checks automatically for some HTTP servers, + // causing requests to fail. We already perform CSRF token checks in the console middleware + // before forwarding requests to the plugin, so there is no CSRF exposure. + HeaderBlacklist: []string{"Cookie", "X-CSRFToken", "Origin"}, Endpoint: serviceEndpoint, }, Authorize: authorize, @@ -147,7 +150,7 @@ func (p *PluginsHandler) HandlePluginAssets(w http.ResponseWriter, r *http.Reque p.proxyPluginRequest(pluginServiceRequestURL, pluginName, w, r) } -func (p *PluginsHandler) proxyPluginRequest(requestURL *url.URL, pluginName string, w http.ResponseWriter, orignalRequest *http.Request) { +func (p *PluginsHandler) proxyPluginRequest(requestURL *url.URL, pluginName string, w http.ResponseWriter, originalRequest *http.Request) { newRequest, err := http.NewRequest("GET", requestURL.String(), nil) if err != nil { errMsg := fmt.Sprintf("failed to create GET request for %q plugin: %v", pluginName, err) @@ -156,7 +159,10 @@ func (p *PluginsHandler) proxyPluginRequest(requestURL *url.URL, pluginName stri return } - proxy.CopyRequestHeaders(orignalRequest, newRequest) + newRequest.Header = originalRequest.Header.Clone() + for _, h := range []string{"Cookie", "X-CSRFToken"} { + newRequest.Header.Del(h) + } resp, err := p.Client.Do(newRequest) if err != nil { diff --git a/pkg/proxy/proxy.go b/pkg/proxy/proxy.go index 5a3f52335d7..2dd1e09c224 100644 --- a/pkg/proxy/proxy.go +++ b/pkg/proxy/proxy.go @@ -99,17 +99,6 @@ func decodeSubprotocol(encodedProtocol string) (string, error) { return string(decodedProtocol), err } -var HeaderBlacklist = []string{"Cookie", "X-CSRFToken"} - -// pass through headers that are needed for browser caching and content negotiation, -// except "Cookie" and "X-CSRFToken" headers. -func CopyRequestHeaders(originalRequest, newRequest *http.Request) { - newRequest.Header = originalRequest.Header.Clone() - for _, h := range HeaderBlacklist { - newRequest.Header.Del(h) - } -} - func (p *Proxy) ServeHTTP(w http.ResponseWriter, r *http.Request) { if klog.V(4).Enabled() { klog.Infof("PROXY: %#q\n", SingleJoiningSlash(p.config.Endpoint.String(), r.URL.Path)) @@ -130,7 +119,7 @@ func (p *Proxy) ServeHTTP(w http.ResponseWriter, r *http.Request) { } } - for _, h := range HeaderBlacklist { + for _, h := range p.config.HeaderBlacklist { r.Header.Del(h) } From dc649ac6faf7583ca38c3ca56252d60356807e7e Mon Sep 17 00:00:00 2001 From: Robb Hamilton Date: Fri, 18 Jul 2025 11:26:28 -0400 Subject: [PATCH 088/102] OCPBUGS-59541: add data-test attrs to console plugins table --- .../ConsoleOperatorConfig.tsx | 22 +++++++++++++------ 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/frontend/packages/console-app/src/components/console-operator/ConsoleOperatorConfig.tsx b/frontend/packages/console-app/src/components/console-operator/ConsoleOperatorConfig.tsx index 2b6bead53a1..d077fd4f84f 100644 --- a/frontend/packages/console-app/src/components/console-operator/ConsoleOperatorConfig.tsx +++ b/frontend/packages/console-app/src/components/console-operator/ConsoleOperatorConfig.tsx @@ -249,7 +249,11 @@ const ConsolePluginsTable: React.FC = ({ obj, rows, lo
  • {rows.length ? ( - +
    {columns.map(({ id, name, sortable }, columnIndex) => ( @@ -263,22 +267,26 @@ const ConsolePluginsTable: React.FC = ({ obj, rows, lo {sortedRows.map( ({ name, version, description, status, enabled, errorMessage, hasCSPViolations }) => ( - - - - + + - - From f9cb490a53cbb6990690be6ced8214d89935d6b2 Mon Sep 17 00:00:00 2001 From: Leo6Leo <36619969+Leo6Leo@users.noreply.github.com> Date: Thu, 24 Jul 2025 15:14:27 -0400 Subject: [PATCH 089/102] fix: update go crypto to 0.31 --- go.mod | 10 +- go.sum | 20 +- vendor/golang.org/x/crypto/LICENSE | 4 +- .../golang.org/x/crypto/argon2/blamka_amd64.s | 2972 ++++++++- vendor/golang.org/x/crypto/bcrypt/bcrypt.go | 2 +- .../x/crypto/blake2b/blake2bAVX2_amd64.s | 5167 +++++++++++++-- .../x/crypto/blake2b/blake2b_amd64.s | 1681 ++++- vendor/golang.org/x/crypto/blowfish/cipher.go | 2 +- vendor/golang.org/x/crypto/cast5/cast5.go | 2 +- .../x/crypto/chacha20/chacha_noasm.go | 2 +- .../{chacha_ppc64le.go => chacha_ppc64x.go} | 2 +- .../{chacha_ppc64le.s => chacha_ppc64x.s} | 114 +- .../x/crypto/curve25519/curve25519.go | 39 +- .../x/crypto/curve25519/curve25519_compat.go | 105 - .../x/crypto/curve25519/curve25519_go120.go | 46 - .../x/crypto/curve25519/internal/field/README | 7 - .../x/crypto/curve25519/internal/field/fe.go | 416 -- .../curve25519/internal/field/fe_amd64.go | 15 - .../curve25519/internal/field/fe_amd64.s | 378 -- .../internal/field/fe_amd64_noasm.go | 11 - .../curve25519/internal/field/fe_arm64.go | 15 - .../curve25519/internal/field/fe_arm64.s | 42 - .../internal/field/fe_arm64_noasm.go | 11 - .../curve25519/internal/field/fe_generic.go | 264 - .../curve25519/internal/field/sync.checkpoint | 1 - .../crypto/curve25519/internal/field/sync.sh | 19 - vendor/golang.org/x/crypto/ed25519/ed25519.go | 4 +- vendor/golang.org/x/crypto/hkdf/hkdf.go | 2 +- .../x/crypto/internal/poly1305/mac_noasm.go | 2 +- .../x/crypto/internal/poly1305/sum_amd64.s | 133 +- .../{sum_ppc64le.go => sum_ppc64x.go} | 2 +- .../poly1305/{sum_ppc64le.s => sum_ppc64x.s} | 30 +- .../x/crypto/openpgp/armor/armor.go | 5 +- .../x/crypto/openpgp/clearsign/clearsign.go | 2 +- .../x/crypto/openpgp/elgamal/elgamal.go | 2 +- .../x/crypto/openpgp/errors/errors.go | 2 +- .../x/crypto/openpgp/packet/packet.go | 2 +- vendor/golang.org/x/crypto/openpgp/read.go | 2 +- vendor/golang.org/x/crypto/openpgp/s2k/s2k.go | 2 +- vendor/golang.org/x/crypto/pbkdf2/pbkdf2.go | 2 +- vendor/golang.org/x/crypto/scrypt/scrypt.go | 2 +- vendor/golang.org/x/crypto/sha3/doc.go | 6 +- vendor/golang.org/x/crypto/sha3/hashes.go | 39 +- .../golang.org/x/crypto/sha3/keccakf_amd64.s | 5787 +++++++++++++++-- vendor/golang.org/x/crypto/sha3/register.go | 18 - vendor/golang.org/x/crypto/sha3/sha3.go | 187 +- vendor/golang.org/x/crypto/sha3/shake.go | 89 +- vendor/golang.org/x/crypto/sha3/xor.go | 40 - .../golang.org/x/crypto/ssh/agent/client.go | 2 +- .../golang.org/x/crypto/ssh/agent/keyring.go | 9 + vendor/golang.org/x/crypto/ssh/client_auth.go | 9 + vendor/golang.org/x/crypto/ssh/doc.go | 2 +- vendor/golang.org/x/crypto/ssh/keys.go | 44 +- vendor/golang.org/x/crypto/ssh/server.go | 19 +- vendor/golang.org/x/sync/LICENSE | 4 +- vendor/golang.org/x/sys/LICENSE | 4 +- .../golang.org/x/sys/cpu/asm_darwin_x86_gc.s | 17 + vendor/golang.org/x/sys/cpu/cpu.go | 21 + vendor/golang.org/x/sys/cpu/cpu_arm64.go | 12 + vendor/golang.org/x/sys/cpu/cpu_darwin_x86.go | 61 + vendor/golang.org/x/sys/cpu/cpu_gc_x86.go | 4 +- .../x/sys/cpu/{cpu_x86.s => cpu_gc_x86.s} | 2 +- vendor/golang.org/x/sys/cpu/cpu_gccgo_x86.go | 6 - .../golang.org/x/sys/cpu/cpu_linux_arm64.go | 4 + .../golang.org/x/sys/cpu/cpu_linux_noinit.go | 2 +- .../golang.org/x/sys/cpu/cpu_linux_riscv64.go | 137 + vendor/golang.org/x/sys/cpu/cpu_other_x86.go | 11 + vendor/golang.org/x/sys/cpu/cpu_riscv64.go | 11 +- vendor/golang.org/x/sys/cpu/cpu_x86.go | 6 +- .../x/sys/cpu/syscall_darwin_x86_gc.go | 98 + vendor/golang.org/x/sys/unix/README.md | 2 +- vendor/golang.org/x/sys/unix/ioctl_linux.go | 96 + vendor/golang.org/x/sys/unix/mkerrors.sh | 18 +- vendor/golang.org/x/sys/unix/mremap.go | 5 + vendor/golang.org/x/sys/unix/syscall_aix.go | 2 +- .../golang.org/x/sys/unix/syscall_darwin.go | 61 + vendor/golang.org/x/sys/unix/syscall_hurd.go | 1 + vendor/golang.org/x/sys/unix/syscall_linux.go | 65 +- .../x/sys/unix/syscall_linux_arm64.go | 2 + .../x/sys/unix/syscall_linux_loong64.go | 2 + .../x/sys/unix/syscall_linux_riscv64.go | 2 + .../golang.org/x/sys/unix/syscall_openbsd.go | 1 + vendor/golang.org/x/sys/unix/syscall_unix.go | 9 + .../x/sys/unix/syscall_zos_s390x.go | 104 +- .../golang.org/x/sys/unix/vgetrandom_linux.go | 13 + .../x/sys/unix/vgetrandom_unsupported.go | 11 + .../x/sys/unix/zerrors_darwin_amd64.go | 12 + .../x/sys/unix/zerrors_darwin_arm64.go | 12 + vendor/golang.org/x/sys/unix/zerrors_linux.go | 82 +- .../x/sys/unix/zerrors_linux_386.go | 27 + .../x/sys/unix/zerrors_linux_amd64.go | 27 + .../x/sys/unix/zerrors_linux_arm.go | 27 + .../x/sys/unix/zerrors_linux_arm64.go | 28 + .../x/sys/unix/zerrors_linux_loong64.go | 27 + .../x/sys/unix/zerrors_linux_mips.go | 27 + .../x/sys/unix/zerrors_linux_mips64.go | 27 + .../x/sys/unix/zerrors_linux_mips64le.go | 27 + .../x/sys/unix/zerrors_linux_mipsle.go | 27 + .../x/sys/unix/zerrors_linux_ppc.go | 27 + .../x/sys/unix/zerrors_linux_ppc64.go | 27 + .../x/sys/unix/zerrors_linux_ppc64le.go | 27 + .../x/sys/unix/zerrors_linux_riscv64.go | 27 + .../x/sys/unix/zerrors_linux_s390x.go | 27 + .../x/sys/unix/zerrors_linux_sparc64.go | 27 + .../x/sys/unix/zerrors_zos_s390x.go | 2 + .../x/sys/unix/zsyscall_darwin_amd64.go | 101 + .../x/sys/unix/zsyscall_darwin_amd64.s | 25 + .../x/sys/unix/zsyscall_darwin_arm64.go | 101 + .../x/sys/unix/zsyscall_darwin_arm64.s | 25 + .../golang.org/x/sys/unix/zsyscall_linux.go | 43 +- .../x/sys/unix/zsyscall_openbsd_386.go | 24 + .../x/sys/unix/zsyscall_openbsd_386.s | 5 + .../x/sys/unix/zsyscall_openbsd_amd64.go | 24 + .../x/sys/unix/zsyscall_openbsd_amd64.s | 5 + .../x/sys/unix/zsyscall_openbsd_arm.go | 24 + .../x/sys/unix/zsyscall_openbsd_arm.s | 5 + .../x/sys/unix/zsyscall_openbsd_arm64.go | 24 + .../x/sys/unix/zsyscall_openbsd_arm64.s | 5 + .../x/sys/unix/zsyscall_openbsd_mips64.go | 24 + .../x/sys/unix/zsyscall_openbsd_mips64.s | 5 + .../x/sys/unix/zsyscall_openbsd_ppc64.go | 24 + .../x/sys/unix/zsyscall_openbsd_ppc64.s | 6 + .../x/sys/unix/zsyscall_openbsd_riscv64.go | 24 + .../x/sys/unix/zsyscall_openbsd_riscv64.s | 5 + .../x/sys/unix/zsysnum_linux_386.go | 1 + .../x/sys/unix/zsysnum_linux_amd64.go | 2 + .../x/sys/unix/zsysnum_linux_arm.go | 1 + .../x/sys/unix/zsysnum_linux_arm64.go | 3 +- .../x/sys/unix/zsysnum_linux_loong64.go | 3 + .../x/sys/unix/zsysnum_linux_mips.go | 1 + .../x/sys/unix/zsysnum_linux_mips64.go | 1 + .../x/sys/unix/zsysnum_linux_mips64le.go | 1 + .../x/sys/unix/zsysnum_linux_mipsle.go | 1 + .../x/sys/unix/zsysnum_linux_ppc.go | 1 + .../x/sys/unix/zsysnum_linux_ppc64.go | 1 + .../x/sys/unix/zsysnum_linux_ppc64le.go | 1 + .../x/sys/unix/zsysnum_linux_riscv64.go | 3 +- .../x/sys/unix/zsysnum_linux_s390x.go | 1 + .../x/sys/unix/zsysnum_linux_sparc64.go | 1 + .../x/sys/unix/ztypes_darwin_amd64.go | 73 + .../x/sys/unix/ztypes_darwin_arm64.go | 73 + .../x/sys/unix/ztypes_freebsd_386.go | 1 + .../x/sys/unix/ztypes_freebsd_amd64.go | 1 + .../x/sys/unix/ztypes_freebsd_arm.go | 1 + .../x/sys/unix/ztypes_freebsd_arm64.go | 1 + .../x/sys/unix/ztypes_freebsd_riscv64.go | 1 + vendor/golang.org/x/sys/unix/ztypes_linux.go | 230 +- .../x/sys/unix/ztypes_linux_riscv64.go | 33 + .../golang.org/x/sys/unix/ztypes_zos_s390x.go | 6 + .../golang.org/x/sys/windows/dll_windows.go | 2 +- .../x/sys/windows/security_windows.go | 24 +- .../x/sys/windows/syscall_windows.go | 52 +- .../golang.org/x/sys/windows/types_windows.go | 199 +- .../x/sys/windows/zsyscall_windows.go | 151 + vendor/golang.org/x/term/LICENSE | 4 +- vendor/golang.org/x/term/README.md | 11 +- vendor/golang.org/x/term/term_windows.go | 1 + vendor/golang.org/x/text/LICENSE | 4 +- vendor/modules.txt | 13 +- 159 files changed, 17182 insertions(+), 3320 deletions(-) rename vendor/golang.org/x/crypto/chacha20/{chacha_ppc64le.go => chacha_ppc64x.go} (89%) rename vendor/golang.org/x/crypto/chacha20/{chacha_ppc64le.s => chacha_ppc64x.s} (76%) delete mode 100644 vendor/golang.org/x/crypto/curve25519/curve25519_compat.go delete mode 100644 vendor/golang.org/x/crypto/curve25519/curve25519_go120.go delete mode 100644 vendor/golang.org/x/crypto/curve25519/internal/field/README delete mode 100644 vendor/golang.org/x/crypto/curve25519/internal/field/fe.go delete mode 100644 vendor/golang.org/x/crypto/curve25519/internal/field/fe_amd64.go delete mode 100644 vendor/golang.org/x/crypto/curve25519/internal/field/fe_amd64.s delete mode 100644 vendor/golang.org/x/crypto/curve25519/internal/field/fe_amd64_noasm.go delete mode 100644 vendor/golang.org/x/crypto/curve25519/internal/field/fe_arm64.go delete mode 100644 vendor/golang.org/x/crypto/curve25519/internal/field/fe_arm64.s delete mode 100644 vendor/golang.org/x/crypto/curve25519/internal/field/fe_arm64_noasm.go delete mode 100644 vendor/golang.org/x/crypto/curve25519/internal/field/fe_generic.go delete mode 100644 vendor/golang.org/x/crypto/curve25519/internal/field/sync.checkpoint delete mode 100644 vendor/golang.org/x/crypto/curve25519/internal/field/sync.sh rename vendor/golang.org/x/crypto/internal/poly1305/{sum_ppc64le.go => sum_ppc64x.go} (95%) rename vendor/golang.org/x/crypto/internal/poly1305/{sum_ppc64le.s => sum_ppc64x.s} (89%) delete mode 100644 vendor/golang.org/x/crypto/sha3/register.go delete mode 100644 vendor/golang.org/x/crypto/sha3/xor.go create mode 100644 vendor/golang.org/x/sys/cpu/asm_darwin_x86_gc.s create mode 100644 vendor/golang.org/x/sys/cpu/cpu_darwin_x86.go rename vendor/golang.org/x/sys/cpu/{cpu_x86.s => cpu_gc_x86.s} (94%) create mode 100644 vendor/golang.org/x/sys/cpu/cpu_linux_riscv64.go create mode 100644 vendor/golang.org/x/sys/cpu/cpu_other_x86.go create mode 100644 vendor/golang.org/x/sys/cpu/syscall_darwin_x86_gc.go create mode 100644 vendor/golang.org/x/sys/unix/vgetrandom_linux.go create mode 100644 vendor/golang.org/x/sys/unix/vgetrandom_unsupported.go diff --git a/go.mod b/go.mod index 3b7a690c08b..b1dfd6d4ed3 100644 --- a/go.mod +++ b/go.mod @@ -196,13 +196,13 @@ require ( go.starlark.net v0.0.0-20230525235612-a134d8f9ddca // indirect go.uber.org/multierr v1.11.0 // indirect go.uber.org/zap v1.27.0 // indirect - golang.org/x/crypto v0.24.0 // indirect + golang.org/x/crypto v0.31.0 // indirect golang.org/x/exp v0.0.0-20240222234643-814bf88cf225 // indirect golang.org/x/mod v0.17.0 // indirect - golang.org/x/sync v0.7.0 // indirect - golang.org/x/sys v0.21.0 // indirect - golang.org/x/term v0.21.0 // indirect - golang.org/x/text v0.16.0 // indirect + golang.org/x/sync v0.10.0 // indirect + golang.org/x/sys v0.28.0 // indirect + golang.org/x/term v0.27.0 // indirect + golang.org/x/text v0.21.0 // indirect golang.org/x/time v0.5.0 // indirect golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d // indirect google.golang.org/genproto/googleapis/api v0.0.0-20240528184218-531527333157 // indirect diff --git a/go.sum b/go.sum index ecf21281760..c7532793a6d 100644 --- a/go.sum +++ b/go.sum @@ -610,8 +610,8 @@ golang.org/x/crypto v0.0.0-20220622213112-05595931fe9d/go.mod h1:IxCIyHEi3zRg3s0 golang.org/x/crypto v0.3.0/go.mod h1:hebNnKkNXi2UzZN1eVRvBB7co0a+JxK6XbPiWVs/3J4= golang.org/x/crypto v0.3.1-0.20221117191849-2c476679df9a/go.mod h1:hebNnKkNXi2UzZN1eVRvBB7co0a+JxK6XbPiWVs/3J4= golang.org/x/crypto v0.7.0/go.mod h1:pYwdfH91IfpZVANVyUOhSIPZaFoJGxTFbZhFTx+dXZU= -golang.org/x/crypto v0.24.0 h1:mnl8DM0o513X8fdIkmyFE/5hTYxbwYOjDS/+rK6qpRI= -golang.org/x/crypto v0.24.0/go.mod h1:Z1PMYSOR5nyMcyAVAIQSKCDwalqy85Aqn1x3Ws4L5DM= +golang.org/x/crypto v0.31.0 h1:ihbySMvVjLAeSH1IbfcRTkD/iNscyz8rGzjF/E5hV6U= +golang.org/x/crypto v0.31.0/go.mod h1:kDsLvtWBEx7MV9tJOj9bnXsPbxwJQ6csT/x4KIN4Ssk= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20240222234643-814bf88cf225 h1:LfspQV/FYTatPTr/3HzIcmiUFH7PGP+OQ6mgDYo3yuQ= golang.org/x/exp v0.0.0-20240222234643-814bf88cf225/go.mod h1:CxmFvTBINI24O/j8iY7H1xHzx2i4OsyguNBmN/uPtqc= @@ -656,8 +656,8 @@ golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.7.0 h1:YsImfSBoP9QPYL0xyKJPq0gcaJdG3rInoqxTWbfQu9M= -golang.org/x/sync v0.7.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= +golang.org/x/sync v0.10.0 h1:3NQrjDixjgGwUOCaF8w2+VYHv0Ve/vGYSbdkTa98gmQ= +golang.org/x/sync v0.10.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -681,16 +681,16 @@ golang.org/x/sys v0.2.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.3.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.21.0 h1:rF+pYz3DAGSQAxAu1CbC7catZg4ebC4UIeIhKxBZvws= -golang.org/x/sys v0.21.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.28.0 h1:Fksou7UEQUWlKvIdsqzJmUmCX3cZuD2+P3XyyzwMhlA= +golang.org/x/sys v0.28.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.0.0-20220526004731-065cf7ba2467/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.2.0/go.mod h1:TVmDHMZPmdnySmBfhjOoOdhjzdE1h4u1VwSiw2l1Nuc= golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= golang.org/x/term v0.6.0/go.mod h1:m6U89DPEgQRMq3DNkDClhWw02AUbt2daBVO4cn4Hv9U= -golang.org/x/term v0.21.0 h1:WVXCp+/EBEHOj53Rvu+7KiT/iElMrO8ACK16SMZ3jaA= -golang.org/x/term v0.21.0/go.mod h1:ooXLefLobQVslOqselCNF4SxFAaoS6KujMbsGzSDmX0= +golang.org/x/term v0.27.0 h1:WP60Sv1nlK1T6SupCHbXzSaN0b9wUmsPoRS9b61A23Q= +golang.org/x/term v0.27.0/go.mod h1:iMsnZpn0cago0GOrHO2+Y7u7JPn5AylBrcoWkElMTSM= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= @@ -698,8 +698,8 @@ golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= golang.org/x/text v0.4.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/text v0.8.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= -golang.org/x/text v0.16.0 h1:a94ExnEXNtEwYLGJSIUxnWoxoRz/ZcCsV63ROupILh4= -golang.org/x/text v0.16.0/go.mod h1:GhwF1Be+LQoKShO3cGOHzqOgRrGaYc9AvblQOmPVHnI= +golang.org/x/text v0.21.0 h1:zyQAAkrwaneQ066sspRyJaG9VNi/YJ1NfzcGB3hZ/qo= +golang.org/x/text v0.21.0/go.mod h1:4IBbMaMmOPCJ8SecivzSH54+73PCFmPWxNTLm+vZkEQ= golang.org/x/time v0.5.0 h1:o7cqy6amK/52YcAKIPlM3a+Fpj35zvRj2TP+e1xFSfk= golang.org/x/time v0.5.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= diff --git a/vendor/golang.org/x/crypto/LICENSE b/vendor/golang.org/x/crypto/LICENSE index 6a66aea5eaf..2a7cf70da6e 100644 --- a/vendor/golang.org/x/crypto/LICENSE +++ b/vendor/golang.org/x/crypto/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2009 The Go Authors. All rights reserved. +Copyright 2009 The Go Authors. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are @@ -10,7 +10,7 @@ notice, this list of conditions and the following disclaimer. copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. - * Neither the name of Google Inc. nor the names of its + * Neither the name of Google LLC nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. diff --git a/vendor/golang.org/x/crypto/argon2/blamka_amd64.s b/vendor/golang.org/x/crypto/argon2/blamka_amd64.s index 6713accac09..c3895478ed0 100644 --- a/vendor/golang.org/x/crypto/argon2/blamka_amd64.s +++ b/vendor/golang.org/x/crypto/argon2/blamka_amd64.s @@ -1,243 +1,2791 @@ -// Copyright 2017 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. +// Code generated by command: go run blamka_amd64.go -out ../blamka_amd64.s -pkg argon2. DO NOT EDIT. //go:build amd64 && gc && !purego #include "textflag.h" -DATA ·c40<>+0x00(SB)/8, $0x0201000706050403 -DATA ·c40<>+0x08(SB)/8, $0x0a09080f0e0d0c0b -GLOBL ·c40<>(SB), (NOPTR+RODATA), $16 - -DATA ·c48<>+0x00(SB)/8, $0x0100070605040302 -DATA ·c48<>+0x08(SB)/8, $0x09080f0e0d0c0b0a -GLOBL ·c48<>(SB), (NOPTR+RODATA), $16 - -#define SHUFFLE(v2, v3, v4, v5, v6, v7, t1, t2) \ - MOVO v4, t1; \ - MOVO v5, v4; \ - MOVO t1, v5; \ - MOVO v6, t1; \ - PUNPCKLQDQ v6, t2; \ - PUNPCKHQDQ v7, v6; \ - PUNPCKHQDQ t2, v6; \ - PUNPCKLQDQ v7, t2; \ - MOVO t1, v7; \ - MOVO v2, t1; \ - PUNPCKHQDQ t2, v7; \ - PUNPCKLQDQ v3, t2; \ - PUNPCKHQDQ t2, v2; \ - PUNPCKLQDQ t1, t2; \ - PUNPCKHQDQ t2, v3 - -#define SHUFFLE_INV(v2, v3, v4, v5, v6, v7, t1, t2) \ - MOVO v4, t1; \ - MOVO v5, v4; \ - MOVO t1, v5; \ - MOVO v2, t1; \ - PUNPCKLQDQ v2, t2; \ - PUNPCKHQDQ v3, v2; \ - PUNPCKHQDQ t2, v2; \ - PUNPCKLQDQ v3, t2; \ - MOVO t1, v3; \ - MOVO v6, t1; \ - PUNPCKHQDQ t2, v3; \ - PUNPCKLQDQ v7, t2; \ - PUNPCKHQDQ t2, v6; \ - PUNPCKLQDQ t1, t2; \ - PUNPCKHQDQ t2, v7 - -#define HALF_ROUND(v0, v1, v2, v3, v4, v5, v6, v7, t0, c40, c48) \ - MOVO v0, t0; \ - PMULULQ v2, t0; \ - PADDQ v2, v0; \ - PADDQ t0, v0; \ - PADDQ t0, v0; \ - PXOR v0, v6; \ - PSHUFD $0xB1, v6, v6; \ - MOVO v4, t0; \ - PMULULQ v6, t0; \ - PADDQ v6, v4; \ - PADDQ t0, v4; \ - PADDQ t0, v4; \ - PXOR v4, v2; \ - PSHUFB c40, v2; \ - MOVO v0, t0; \ - PMULULQ v2, t0; \ - PADDQ v2, v0; \ - PADDQ t0, v0; \ - PADDQ t0, v0; \ - PXOR v0, v6; \ - PSHUFB c48, v6; \ - MOVO v4, t0; \ - PMULULQ v6, t0; \ - PADDQ v6, v4; \ - PADDQ t0, v4; \ - PADDQ t0, v4; \ - PXOR v4, v2; \ - MOVO v2, t0; \ - PADDQ v2, t0; \ - PSRLQ $63, v2; \ - PXOR t0, v2; \ - MOVO v1, t0; \ - PMULULQ v3, t0; \ - PADDQ v3, v1; \ - PADDQ t0, v1; \ - PADDQ t0, v1; \ - PXOR v1, v7; \ - PSHUFD $0xB1, v7, v7; \ - MOVO v5, t0; \ - PMULULQ v7, t0; \ - PADDQ v7, v5; \ - PADDQ t0, v5; \ - PADDQ t0, v5; \ - PXOR v5, v3; \ - PSHUFB c40, v3; \ - MOVO v1, t0; \ - PMULULQ v3, t0; \ - PADDQ v3, v1; \ - PADDQ t0, v1; \ - PADDQ t0, v1; \ - PXOR v1, v7; \ - PSHUFB c48, v7; \ - MOVO v5, t0; \ - PMULULQ v7, t0; \ - PADDQ v7, v5; \ - PADDQ t0, v5; \ - PADDQ t0, v5; \ - PXOR v5, v3; \ - MOVO v3, t0; \ - PADDQ v3, t0; \ - PSRLQ $63, v3; \ - PXOR t0, v3 - -#define LOAD_MSG_0(block, off) \ - MOVOU 8*(off+0)(block), X0; \ - MOVOU 8*(off+2)(block), X1; \ - MOVOU 8*(off+4)(block), X2; \ - MOVOU 8*(off+6)(block), X3; \ - MOVOU 8*(off+8)(block), X4; \ - MOVOU 8*(off+10)(block), X5; \ - MOVOU 8*(off+12)(block), X6; \ - MOVOU 8*(off+14)(block), X7 - -#define STORE_MSG_0(block, off) \ - MOVOU X0, 8*(off+0)(block); \ - MOVOU X1, 8*(off+2)(block); \ - MOVOU X2, 8*(off+4)(block); \ - MOVOU X3, 8*(off+6)(block); \ - MOVOU X4, 8*(off+8)(block); \ - MOVOU X5, 8*(off+10)(block); \ - MOVOU X6, 8*(off+12)(block); \ - MOVOU X7, 8*(off+14)(block) - -#define LOAD_MSG_1(block, off) \ - MOVOU 8*off+0*8(block), X0; \ - MOVOU 8*off+16*8(block), X1; \ - MOVOU 8*off+32*8(block), X2; \ - MOVOU 8*off+48*8(block), X3; \ - MOVOU 8*off+64*8(block), X4; \ - MOVOU 8*off+80*8(block), X5; \ - MOVOU 8*off+96*8(block), X6; \ - MOVOU 8*off+112*8(block), X7 - -#define STORE_MSG_1(block, off) \ - MOVOU X0, 8*off+0*8(block); \ - MOVOU X1, 8*off+16*8(block); \ - MOVOU X2, 8*off+32*8(block); \ - MOVOU X3, 8*off+48*8(block); \ - MOVOU X4, 8*off+64*8(block); \ - MOVOU X5, 8*off+80*8(block); \ - MOVOU X6, 8*off+96*8(block); \ - MOVOU X7, 8*off+112*8(block) - -#define BLAMKA_ROUND_0(block, off, t0, t1, c40, c48) \ - LOAD_MSG_0(block, off); \ - HALF_ROUND(X0, X1, X2, X3, X4, X5, X6, X7, t0, c40, c48); \ - SHUFFLE(X2, X3, X4, X5, X6, X7, t0, t1); \ - HALF_ROUND(X0, X1, X2, X3, X4, X5, X6, X7, t0, c40, c48); \ - SHUFFLE_INV(X2, X3, X4, X5, X6, X7, t0, t1); \ - STORE_MSG_0(block, off) - -#define BLAMKA_ROUND_1(block, off, t0, t1, c40, c48) \ - LOAD_MSG_1(block, off); \ - HALF_ROUND(X0, X1, X2, X3, X4, X5, X6, X7, t0, c40, c48); \ - SHUFFLE(X2, X3, X4, X5, X6, X7, t0, t1); \ - HALF_ROUND(X0, X1, X2, X3, X4, X5, X6, X7, t0, c40, c48); \ - SHUFFLE_INV(X2, X3, X4, X5, X6, X7, t0, t1); \ - STORE_MSG_1(block, off) - // func blamkaSSE4(b *block) -TEXT ·blamkaSSE4(SB), 4, $0-8 - MOVQ b+0(FP), AX - - MOVOU ·c40<>(SB), X10 - MOVOU ·c48<>(SB), X11 +// Requires: SSE2, SSSE3 +TEXT ·blamkaSSE4(SB), NOSPLIT, $0-8 + MOVQ b+0(FP), AX + MOVOU ·c40<>+0(SB), X10 + MOVOU ·c48<>+0(SB), X11 + MOVOU (AX), X0 + MOVOU 16(AX), X1 + MOVOU 32(AX), X2 + MOVOU 48(AX), X3 + MOVOU 64(AX), X4 + MOVOU 80(AX), X5 + MOVOU 96(AX), X6 + MOVOU 112(AX), X7 + MOVO X0, X8 + PMULULQ X2, X8 + PADDQ X2, X0 + PADDQ X8, X0 + PADDQ X8, X0 + PXOR X0, X6 + PSHUFD $0xb1, X6, X6 + MOVO X4, X8 + PMULULQ X6, X8 + PADDQ X6, X4 + PADDQ X8, X4 + PADDQ X8, X4 + PXOR X4, X2 + PSHUFB X10, X2 + MOVO X0, X8 + PMULULQ X2, X8 + PADDQ X2, X0 + PADDQ X8, X0 + PADDQ X8, X0 + PXOR X0, X6 + PSHUFB X11, X6 + MOVO X4, X8 + PMULULQ X6, X8 + PADDQ X6, X4 + PADDQ X8, X4 + PADDQ X8, X4 + PXOR X4, X2 + MOVO X2, X8 + PADDQ X2, X8 + PSRLQ $0x3f, X2 + PXOR X8, X2 + MOVO X1, X8 + PMULULQ X3, X8 + PADDQ X3, X1 + PADDQ X8, X1 + PADDQ X8, X1 + PXOR X1, X7 + PSHUFD $0xb1, X7, X7 + MOVO X5, X8 + PMULULQ X7, X8 + PADDQ X7, X5 + PADDQ X8, X5 + PADDQ X8, X5 + PXOR X5, X3 + PSHUFB X10, X3 + MOVO X1, X8 + PMULULQ X3, X8 + PADDQ X3, X1 + PADDQ X8, X1 + PADDQ X8, X1 + PXOR X1, X7 + PSHUFB X11, X7 + MOVO X5, X8 + PMULULQ X7, X8 + PADDQ X7, X5 + PADDQ X8, X5 + PADDQ X8, X5 + PXOR X5, X3 + MOVO X3, X8 + PADDQ X3, X8 + PSRLQ $0x3f, X3 + PXOR X8, X3 + MOVO X4, X8 + MOVO X5, X4 + MOVO X8, X5 + MOVO X6, X8 + PUNPCKLQDQ X6, X9 + PUNPCKHQDQ X7, X6 + PUNPCKHQDQ X9, X6 + PUNPCKLQDQ X7, X9 + MOVO X8, X7 + MOVO X2, X8 + PUNPCKHQDQ X9, X7 + PUNPCKLQDQ X3, X9 + PUNPCKHQDQ X9, X2 + PUNPCKLQDQ X8, X9 + PUNPCKHQDQ X9, X3 + MOVO X0, X8 + PMULULQ X2, X8 + PADDQ X2, X0 + PADDQ X8, X0 + PADDQ X8, X0 + PXOR X0, X6 + PSHUFD $0xb1, X6, X6 + MOVO X4, X8 + PMULULQ X6, X8 + PADDQ X6, X4 + PADDQ X8, X4 + PADDQ X8, X4 + PXOR X4, X2 + PSHUFB X10, X2 + MOVO X0, X8 + PMULULQ X2, X8 + PADDQ X2, X0 + PADDQ X8, X0 + PADDQ X8, X0 + PXOR X0, X6 + PSHUFB X11, X6 + MOVO X4, X8 + PMULULQ X6, X8 + PADDQ X6, X4 + PADDQ X8, X4 + PADDQ X8, X4 + PXOR X4, X2 + MOVO X2, X8 + PADDQ X2, X8 + PSRLQ $0x3f, X2 + PXOR X8, X2 + MOVO X1, X8 + PMULULQ X3, X8 + PADDQ X3, X1 + PADDQ X8, X1 + PADDQ X8, X1 + PXOR X1, X7 + PSHUFD $0xb1, X7, X7 + MOVO X5, X8 + PMULULQ X7, X8 + PADDQ X7, X5 + PADDQ X8, X5 + PADDQ X8, X5 + PXOR X5, X3 + PSHUFB X10, X3 + MOVO X1, X8 + PMULULQ X3, X8 + PADDQ X3, X1 + PADDQ X8, X1 + PADDQ X8, X1 + PXOR X1, X7 + PSHUFB X11, X7 + MOVO X5, X8 + PMULULQ X7, X8 + PADDQ X7, X5 + PADDQ X8, X5 + PADDQ X8, X5 + PXOR X5, X3 + MOVO X3, X8 + PADDQ X3, X8 + PSRLQ $0x3f, X3 + PXOR X8, X3 + MOVO X4, X8 + MOVO X5, X4 + MOVO X8, X5 + MOVO X2, X8 + PUNPCKLQDQ X2, X9 + PUNPCKHQDQ X3, X2 + PUNPCKHQDQ X9, X2 + PUNPCKLQDQ X3, X9 + MOVO X8, X3 + MOVO X6, X8 + PUNPCKHQDQ X9, X3 + PUNPCKLQDQ X7, X9 + PUNPCKHQDQ X9, X6 + PUNPCKLQDQ X8, X9 + PUNPCKHQDQ X9, X7 + MOVOU X0, (AX) + MOVOU X1, 16(AX) + MOVOU X2, 32(AX) + MOVOU X3, 48(AX) + MOVOU X4, 64(AX) + MOVOU X5, 80(AX) + MOVOU X6, 96(AX) + MOVOU X7, 112(AX) + MOVOU 128(AX), X0 + MOVOU 144(AX), X1 + MOVOU 160(AX), X2 + MOVOU 176(AX), X3 + MOVOU 192(AX), X4 + MOVOU 208(AX), X5 + MOVOU 224(AX), X6 + MOVOU 240(AX), X7 + MOVO X0, X8 + PMULULQ X2, X8 + PADDQ X2, X0 + PADDQ X8, X0 + PADDQ X8, X0 + PXOR X0, X6 + PSHUFD $0xb1, X6, X6 + MOVO X4, X8 + PMULULQ X6, X8 + PADDQ X6, X4 + PADDQ X8, X4 + PADDQ X8, X4 + PXOR X4, X2 + PSHUFB X10, X2 + MOVO X0, X8 + PMULULQ X2, X8 + PADDQ X2, X0 + PADDQ X8, X0 + PADDQ X8, X0 + PXOR X0, X6 + PSHUFB X11, X6 + MOVO X4, X8 + PMULULQ X6, X8 + PADDQ X6, X4 + PADDQ X8, X4 + PADDQ X8, X4 + PXOR X4, X2 + MOVO X2, X8 + PADDQ X2, X8 + PSRLQ $0x3f, X2 + PXOR X8, X2 + MOVO X1, X8 + PMULULQ X3, X8 + PADDQ X3, X1 + PADDQ X8, X1 + PADDQ X8, X1 + PXOR X1, X7 + PSHUFD $0xb1, X7, X7 + MOVO X5, X8 + PMULULQ X7, X8 + PADDQ X7, X5 + PADDQ X8, X5 + PADDQ X8, X5 + PXOR X5, X3 + PSHUFB X10, X3 + MOVO X1, X8 + PMULULQ X3, X8 + PADDQ X3, X1 + PADDQ X8, X1 + PADDQ X8, X1 + PXOR X1, X7 + PSHUFB X11, X7 + MOVO X5, X8 + PMULULQ X7, X8 + PADDQ X7, X5 + PADDQ X8, X5 + PADDQ X8, X5 + PXOR X5, X3 + MOVO X3, X8 + PADDQ X3, X8 + PSRLQ $0x3f, X3 + PXOR X8, X3 + MOVO X4, X8 + MOVO X5, X4 + MOVO X8, X5 + MOVO X6, X8 + PUNPCKLQDQ X6, X9 + PUNPCKHQDQ X7, X6 + PUNPCKHQDQ X9, X6 + PUNPCKLQDQ X7, X9 + MOVO X8, X7 + MOVO X2, X8 + PUNPCKHQDQ X9, X7 + PUNPCKLQDQ X3, X9 + PUNPCKHQDQ X9, X2 + PUNPCKLQDQ X8, X9 + PUNPCKHQDQ X9, X3 + MOVO X0, X8 + PMULULQ X2, X8 + PADDQ X2, X0 + PADDQ X8, X0 + PADDQ X8, X0 + PXOR X0, X6 + PSHUFD $0xb1, X6, X6 + MOVO X4, X8 + PMULULQ X6, X8 + PADDQ X6, X4 + PADDQ X8, X4 + PADDQ X8, X4 + PXOR X4, X2 + PSHUFB X10, X2 + MOVO X0, X8 + PMULULQ X2, X8 + PADDQ X2, X0 + PADDQ X8, X0 + PADDQ X8, X0 + PXOR X0, X6 + PSHUFB X11, X6 + MOVO X4, X8 + PMULULQ X6, X8 + PADDQ X6, X4 + PADDQ X8, X4 + PADDQ X8, X4 + PXOR X4, X2 + MOVO X2, X8 + PADDQ X2, X8 + PSRLQ $0x3f, X2 + PXOR X8, X2 + MOVO X1, X8 + PMULULQ X3, X8 + PADDQ X3, X1 + PADDQ X8, X1 + PADDQ X8, X1 + PXOR X1, X7 + PSHUFD $0xb1, X7, X7 + MOVO X5, X8 + PMULULQ X7, X8 + PADDQ X7, X5 + PADDQ X8, X5 + PADDQ X8, X5 + PXOR X5, X3 + PSHUFB X10, X3 + MOVO X1, X8 + PMULULQ X3, X8 + PADDQ X3, X1 + PADDQ X8, X1 + PADDQ X8, X1 + PXOR X1, X7 + PSHUFB X11, X7 + MOVO X5, X8 + PMULULQ X7, X8 + PADDQ X7, X5 + PADDQ X8, X5 + PADDQ X8, X5 + PXOR X5, X3 + MOVO X3, X8 + PADDQ X3, X8 + PSRLQ $0x3f, X3 + PXOR X8, X3 + MOVO X4, X8 + MOVO X5, X4 + MOVO X8, X5 + MOVO X2, X8 + PUNPCKLQDQ X2, X9 + PUNPCKHQDQ X3, X2 + PUNPCKHQDQ X9, X2 + PUNPCKLQDQ X3, X9 + MOVO X8, X3 + MOVO X6, X8 + PUNPCKHQDQ X9, X3 + PUNPCKLQDQ X7, X9 + PUNPCKHQDQ X9, X6 + PUNPCKLQDQ X8, X9 + PUNPCKHQDQ X9, X7 + MOVOU X0, 128(AX) + MOVOU X1, 144(AX) + MOVOU X2, 160(AX) + MOVOU X3, 176(AX) + MOVOU X4, 192(AX) + MOVOU X5, 208(AX) + MOVOU X6, 224(AX) + MOVOU X7, 240(AX) + MOVOU 256(AX), X0 + MOVOU 272(AX), X1 + MOVOU 288(AX), X2 + MOVOU 304(AX), X3 + MOVOU 320(AX), X4 + MOVOU 336(AX), X5 + MOVOU 352(AX), X6 + MOVOU 368(AX), X7 + MOVO X0, X8 + PMULULQ X2, X8 + PADDQ X2, X0 + PADDQ X8, X0 + PADDQ X8, X0 + PXOR X0, X6 + PSHUFD $0xb1, X6, X6 + MOVO X4, X8 + PMULULQ X6, X8 + PADDQ X6, X4 + PADDQ X8, X4 + PADDQ X8, X4 + PXOR X4, X2 + PSHUFB X10, X2 + MOVO X0, X8 + PMULULQ X2, X8 + PADDQ X2, X0 + PADDQ X8, X0 + PADDQ X8, X0 + PXOR X0, X6 + PSHUFB X11, X6 + MOVO X4, X8 + PMULULQ X6, X8 + PADDQ X6, X4 + PADDQ X8, X4 + PADDQ X8, X4 + PXOR X4, X2 + MOVO X2, X8 + PADDQ X2, X8 + PSRLQ $0x3f, X2 + PXOR X8, X2 + MOVO X1, X8 + PMULULQ X3, X8 + PADDQ X3, X1 + PADDQ X8, X1 + PADDQ X8, X1 + PXOR X1, X7 + PSHUFD $0xb1, X7, X7 + MOVO X5, X8 + PMULULQ X7, X8 + PADDQ X7, X5 + PADDQ X8, X5 + PADDQ X8, X5 + PXOR X5, X3 + PSHUFB X10, X3 + MOVO X1, X8 + PMULULQ X3, X8 + PADDQ X3, X1 + PADDQ X8, X1 + PADDQ X8, X1 + PXOR X1, X7 + PSHUFB X11, X7 + MOVO X5, X8 + PMULULQ X7, X8 + PADDQ X7, X5 + PADDQ X8, X5 + PADDQ X8, X5 + PXOR X5, X3 + MOVO X3, X8 + PADDQ X3, X8 + PSRLQ $0x3f, X3 + PXOR X8, X3 + MOVO X4, X8 + MOVO X5, X4 + MOVO X8, X5 + MOVO X6, X8 + PUNPCKLQDQ X6, X9 + PUNPCKHQDQ X7, X6 + PUNPCKHQDQ X9, X6 + PUNPCKLQDQ X7, X9 + MOVO X8, X7 + MOVO X2, X8 + PUNPCKHQDQ X9, X7 + PUNPCKLQDQ X3, X9 + PUNPCKHQDQ X9, X2 + PUNPCKLQDQ X8, X9 + PUNPCKHQDQ X9, X3 + MOVO X0, X8 + PMULULQ X2, X8 + PADDQ X2, X0 + PADDQ X8, X0 + PADDQ X8, X0 + PXOR X0, X6 + PSHUFD $0xb1, X6, X6 + MOVO X4, X8 + PMULULQ X6, X8 + PADDQ X6, X4 + PADDQ X8, X4 + PADDQ X8, X4 + PXOR X4, X2 + PSHUFB X10, X2 + MOVO X0, X8 + PMULULQ X2, X8 + PADDQ X2, X0 + PADDQ X8, X0 + PADDQ X8, X0 + PXOR X0, X6 + PSHUFB X11, X6 + MOVO X4, X8 + PMULULQ X6, X8 + PADDQ X6, X4 + PADDQ X8, X4 + PADDQ X8, X4 + PXOR X4, X2 + MOVO X2, X8 + PADDQ X2, X8 + PSRLQ $0x3f, X2 + PXOR X8, X2 + MOVO X1, X8 + PMULULQ X3, X8 + PADDQ X3, X1 + PADDQ X8, X1 + PADDQ X8, X1 + PXOR X1, X7 + PSHUFD $0xb1, X7, X7 + MOVO X5, X8 + PMULULQ X7, X8 + PADDQ X7, X5 + PADDQ X8, X5 + PADDQ X8, X5 + PXOR X5, X3 + PSHUFB X10, X3 + MOVO X1, X8 + PMULULQ X3, X8 + PADDQ X3, X1 + PADDQ X8, X1 + PADDQ X8, X1 + PXOR X1, X7 + PSHUFB X11, X7 + MOVO X5, X8 + PMULULQ X7, X8 + PADDQ X7, X5 + PADDQ X8, X5 + PADDQ X8, X5 + PXOR X5, X3 + MOVO X3, X8 + PADDQ X3, X8 + PSRLQ $0x3f, X3 + PXOR X8, X3 + MOVO X4, X8 + MOVO X5, X4 + MOVO X8, X5 + MOVO X2, X8 + PUNPCKLQDQ X2, X9 + PUNPCKHQDQ X3, X2 + PUNPCKHQDQ X9, X2 + PUNPCKLQDQ X3, X9 + MOVO X8, X3 + MOVO X6, X8 + PUNPCKHQDQ X9, X3 + PUNPCKLQDQ X7, X9 + PUNPCKHQDQ X9, X6 + PUNPCKLQDQ X8, X9 + PUNPCKHQDQ X9, X7 + MOVOU X0, 256(AX) + MOVOU X1, 272(AX) + MOVOU X2, 288(AX) + MOVOU X3, 304(AX) + MOVOU X4, 320(AX) + MOVOU X5, 336(AX) + MOVOU X6, 352(AX) + MOVOU X7, 368(AX) + MOVOU 384(AX), X0 + MOVOU 400(AX), X1 + MOVOU 416(AX), X2 + MOVOU 432(AX), X3 + MOVOU 448(AX), X4 + MOVOU 464(AX), X5 + MOVOU 480(AX), X6 + MOVOU 496(AX), X7 + MOVO X0, X8 + PMULULQ X2, X8 + PADDQ X2, X0 + PADDQ X8, X0 + PADDQ X8, X0 + PXOR X0, X6 + PSHUFD $0xb1, X6, X6 + MOVO X4, X8 + PMULULQ X6, X8 + PADDQ X6, X4 + PADDQ X8, X4 + PADDQ X8, X4 + PXOR X4, X2 + PSHUFB X10, X2 + MOVO X0, X8 + PMULULQ X2, X8 + PADDQ X2, X0 + PADDQ X8, X0 + PADDQ X8, X0 + PXOR X0, X6 + PSHUFB X11, X6 + MOVO X4, X8 + PMULULQ X6, X8 + PADDQ X6, X4 + PADDQ X8, X4 + PADDQ X8, X4 + PXOR X4, X2 + MOVO X2, X8 + PADDQ X2, X8 + PSRLQ $0x3f, X2 + PXOR X8, X2 + MOVO X1, X8 + PMULULQ X3, X8 + PADDQ X3, X1 + PADDQ X8, X1 + PADDQ X8, X1 + PXOR X1, X7 + PSHUFD $0xb1, X7, X7 + MOVO X5, X8 + PMULULQ X7, X8 + PADDQ X7, X5 + PADDQ X8, X5 + PADDQ X8, X5 + PXOR X5, X3 + PSHUFB X10, X3 + MOVO X1, X8 + PMULULQ X3, X8 + PADDQ X3, X1 + PADDQ X8, X1 + PADDQ X8, X1 + PXOR X1, X7 + PSHUFB X11, X7 + MOVO X5, X8 + PMULULQ X7, X8 + PADDQ X7, X5 + PADDQ X8, X5 + PADDQ X8, X5 + PXOR X5, X3 + MOVO X3, X8 + PADDQ X3, X8 + PSRLQ $0x3f, X3 + PXOR X8, X3 + MOVO X4, X8 + MOVO X5, X4 + MOVO X8, X5 + MOVO X6, X8 + PUNPCKLQDQ X6, X9 + PUNPCKHQDQ X7, X6 + PUNPCKHQDQ X9, X6 + PUNPCKLQDQ X7, X9 + MOVO X8, X7 + MOVO X2, X8 + PUNPCKHQDQ X9, X7 + PUNPCKLQDQ X3, X9 + PUNPCKHQDQ X9, X2 + PUNPCKLQDQ X8, X9 + PUNPCKHQDQ X9, X3 + MOVO X0, X8 + PMULULQ X2, X8 + PADDQ X2, X0 + PADDQ X8, X0 + PADDQ X8, X0 + PXOR X0, X6 + PSHUFD $0xb1, X6, X6 + MOVO X4, X8 + PMULULQ X6, X8 + PADDQ X6, X4 + PADDQ X8, X4 + PADDQ X8, X4 + PXOR X4, X2 + PSHUFB X10, X2 + MOVO X0, X8 + PMULULQ X2, X8 + PADDQ X2, X0 + PADDQ X8, X0 + PADDQ X8, X0 + PXOR X0, X6 + PSHUFB X11, X6 + MOVO X4, X8 + PMULULQ X6, X8 + PADDQ X6, X4 + PADDQ X8, X4 + PADDQ X8, X4 + PXOR X4, X2 + MOVO X2, X8 + PADDQ X2, X8 + PSRLQ $0x3f, X2 + PXOR X8, X2 + MOVO X1, X8 + PMULULQ X3, X8 + PADDQ X3, X1 + PADDQ X8, X1 + PADDQ X8, X1 + PXOR X1, X7 + PSHUFD $0xb1, X7, X7 + MOVO X5, X8 + PMULULQ X7, X8 + PADDQ X7, X5 + PADDQ X8, X5 + PADDQ X8, X5 + PXOR X5, X3 + PSHUFB X10, X3 + MOVO X1, X8 + PMULULQ X3, X8 + PADDQ X3, X1 + PADDQ X8, X1 + PADDQ X8, X1 + PXOR X1, X7 + PSHUFB X11, X7 + MOVO X5, X8 + PMULULQ X7, X8 + PADDQ X7, X5 + PADDQ X8, X5 + PADDQ X8, X5 + PXOR X5, X3 + MOVO X3, X8 + PADDQ X3, X8 + PSRLQ $0x3f, X3 + PXOR X8, X3 + MOVO X4, X8 + MOVO X5, X4 + MOVO X8, X5 + MOVO X2, X8 + PUNPCKLQDQ X2, X9 + PUNPCKHQDQ X3, X2 + PUNPCKHQDQ X9, X2 + PUNPCKLQDQ X3, X9 + MOVO X8, X3 + MOVO X6, X8 + PUNPCKHQDQ X9, X3 + PUNPCKLQDQ X7, X9 + PUNPCKHQDQ X9, X6 + PUNPCKLQDQ X8, X9 + PUNPCKHQDQ X9, X7 + MOVOU X0, 384(AX) + MOVOU X1, 400(AX) + MOVOU X2, 416(AX) + MOVOU X3, 432(AX) + MOVOU X4, 448(AX) + MOVOU X5, 464(AX) + MOVOU X6, 480(AX) + MOVOU X7, 496(AX) + MOVOU 512(AX), X0 + MOVOU 528(AX), X1 + MOVOU 544(AX), X2 + MOVOU 560(AX), X3 + MOVOU 576(AX), X4 + MOVOU 592(AX), X5 + MOVOU 608(AX), X6 + MOVOU 624(AX), X7 + MOVO X0, X8 + PMULULQ X2, X8 + PADDQ X2, X0 + PADDQ X8, X0 + PADDQ X8, X0 + PXOR X0, X6 + PSHUFD $0xb1, X6, X6 + MOVO X4, X8 + PMULULQ X6, X8 + PADDQ X6, X4 + PADDQ X8, X4 + PADDQ X8, X4 + PXOR X4, X2 + PSHUFB X10, X2 + MOVO X0, X8 + PMULULQ X2, X8 + PADDQ X2, X0 + PADDQ X8, X0 + PADDQ X8, X0 + PXOR X0, X6 + PSHUFB X11, X6 + MOVO X4, X8 + PMULULQ X6, X8 + PADDQ X6, X4 + PADDQ X8, X4 + PADDQ X8, X4 + PXOR X4, X2 + MOVO X2, X8 + PADDQ X2, X8 + PSRLQ $0x3f, X2 + PXOR X8, X2 + MOVO X1, X8 + PMULULQ X3, X8 + PADDQ X3, X1 + PADDQ X8, X1 + PADDQ X8, X1 + PXOR X1, X7 + PSHUFD $0xb1, X7, X7 + MOVO X5, X8 + PMULULQ X7, X8 + PADDQ X7, X5 + PADDQ X8, X5 + PADDQ X8, X5 + PXOR X5, X3 + PSHUFB X10, X3 + MOVO X1, X8 + PMULULQ X3, X8 + PADDQ X3, X1 + PADDQ X8, X1 + PADDQ X8, X1 + PXOR X1, X7 + PSHUFB X11, X7 + MOVO X5, X8 + PMULULQ X7, X8 + PADDQ X7, X5 + PADDQ X8, X5 + PADDQ X8, X5 + PXOR X5, X3 + MOVO X3, X8 + PADDQ X3, X8 + PSRLQ $0x3f, X3 + PXOR X8, X3 + MOVO X4, X8 + MOVO X5, X4 + MOVO X8, X5 + MOVO X6, X8 + PUNPCKLQDQ X6, X9 + PUNPCKHQDQ X7, X6 + PUNPCKHQDQ X9, X6 + PUNPCKLQDQ X7, X9 + MOVO X8, X7 + MOVO X2, X8 + PUNPCKHQDQ X9, X7 + PUNPCKLQDQ X3, X9 + PUNPCKHQDQ X9, X2 + PUNPCKLQDQ X8, X9 + PUNPCKHQDQ X9, X3 + MOVO X0, X8 + PMULULQ X2, X8 + PADDQ X2, X0 + PADDQ X8, X0 + PADDQ X8, X0 + PXOR X0, X6 + PSHUFD $0xb1, X6, X6 + MOVO X4, X8 + PMULULQ X6, X8 + PADDQ X6, X4 + PADDQ X8, X4 + PADDQ X8, X4 + PXOR X4, X2 + PSHUFB X10, X2 + MOVO X0, X8 + PMULULQ X2, X8 + PADDQ X2, X0 + PADDQ X8, X0 + PADDQ X8, X0 + PXOR X0, X6 + PSHUFB X11, X6 + MOVO X4, X8 + PMULULQ X6, X8 + PADDQ X6, X4 + PADDQ X8, X4 + PADDQ X8, X4 + PXOR X4, X2 + MOVO X2, X8 + PADDQ X2, X8 + PSRLQ $0x3f, X2 + PXOR X8, X2 + MOVO X1, X8 + PMULULQ X3, X8 + PADDQ X3, X1 + PADDQ X8, X1 + PADDQ X8, X1 + PXOR X1, X7 + PSHUFD $0xb1, X7, X7 + MOVO X5, X8 + PMULULQ X7, X8 + PADDQ X7, X5 + PADDQ X8, X5 + PADDQ X8, X5 + PXOR X5, X3 + PSHUFB X10, X3 + MOVO X1, X8 + PMULULQ X3, X8 + PADDQ X3, X1 + PADDQ X8, X1 + PADDQ X8, X1 + PXOR X1, X7 + PSHUFB X11, X7 + MOVO X5, X8 + PMULULQ X7, X8 + PADDQ X7, X5 + PADDQ X8, X5 + PADDQ X8, X5 + PXOR X5, X3 + MOVO X3, X8 + PADDQ X3, X8 + PSRLQ $0x3f, X3 + PXOR X8, X3 + MOVO X4, X8 + MOVO X5, X4 + MOVO X8, X5 + MOVO X2, X8 + PUNPCKLQDQ X2, X9 + PUNPCKHQDQ X3, X2 + PUNPCKHQDQ X9, X2 + PUNPCKLQDQ X3, X9 + MOVO X8, X3 + MOVO X6, X8 + PUNPCKHQDQ X9, X3 + PUNPCKLQDQ X7, X9 + PUNPCKHQDQ X9, X6 + PUNPCKLQDQ X8, X9 + PUNPCKHQDQ X9, X7 + MOVOU X0, 512(AX) + MOVOU X1, 528(AX) + MOVOU X2, 544(AX) + MOVOU X3, 560(AX) + MOVOU X4, 576(AX) + MOVOU X5, 592(AX) + MOVOU X6, 608(AX) + MOVOU X7, 624(AX) + MOVOU 640(AX), X0 + MOVOU 656(AX), X1 + MOVOU 672(AX), X2 + MOVOU 688(AX), X3 + MOVOU 704(AX), X4 + MOVOU 720(AX), X5 + MOVOU 736(AX), X6 + MOVOU 752(AX), X7 + MOVO X0, X8 + PMULULQ X2, X8 + PADDQ X2, X0 + PADDQ X8, X0 + PADDQ X8, X0 + PXOR X0, X6 + PSHUFD $0xb1, X6, X6 + MOVO X4, X8 + PMULULQ X6, X8 + PADDQ X6, X4 + PADDQ X8, X4 + PADDQ X8, X4 + PXOR X4, X2 + PSHUFB X10, X2 + MOVO X0, X8 + PMULULQ X2, X8 + PADDQ X2, X0 + PADDQ X8, X0 + PADDQ X8, X0 + PXOR X0, X6 + PSHUFB X11, X6 + MOVO X4, X8 + PMULULQ X6, X8 + PADDQ X6, X4 + PADDQ X8, X4 + PADDQ X8, X4 + PXOR X4, X2 + MOVO X2, X8 + PADDQ X2, X8 + PSRLQ $0x3f, X2 + PXOR X8, X2 + MOVO X1, X8 + PMULULQ X3, X8 + PADDQ X3, X1 + PADDQ X8, X1 + PADDQ X8, X1 + PXOR X1, X7 + PSHUFD $0xb1, X7, X7 + MOVO X5, X8 + PMULULQ X7, X8 + PADDQ X7, X5 + PADDQ X8, X5 + PADDQ X8, X5 + PXOR X5, X3 + PSHUFB X10, X3 + MOVO X1, X8 + PMULULQ X3, X8 + PADDQ X3, X1 + PADDQ X8, X1 + PADDQ X8, X1 + PXOR X1, X7 + PSHUFB X11, X7 + MOVO X5, X8 + PMULULQ X7, X8 + PADDQ X7, X5 + PADDQ X8, X5 + PADDQ X8, X5 + PXOR X5, X3 + MOVO X3, X8 + PADDQ X3, X8 + PSRLQ $0x3f, X3 + PXOR X8, X3 + MOVO X4, X8 + MOVO X5, X4 + MOVO X8, X5 + MOVO X6, X8 + PUNPCKLQDQ X6, X9 + PUNPCKHQDQ X7, X6 + PUNPCKHQDQ X9, X6 + PUNPCKLQDQ X7, X9 + MOVO X8, X7 + MOVO X2, X8 + PUNPCKHQDQ X9, X7 + PUNPCKLQDQ X3, X9 + PUNPCKHQDQ X9, X2 + PUNPCKLQDQ X8, X9 + PUNPCKHQDQ X9, X3 + MOVO X0, X8 + PMULULQ X2, X8 + PADDQ X2, X0 + PADDQ X8, X0 + PADDQ X8, X0 + PXOR X0, X6 + PSHUFD $0xb1, X6, X6 + MOVO X4, X8 + PMULULQ X6, X8 + PADDQ X6, X4 + PADDQ X8, X4 + PADDQ X8, X4 + PXOR X4, X2 + PSHUFB X10, X2 + MOVO X0, X8 + PMULULQ X2, X8 + PADDQ X2, X0 + PADDQ X8, X0 + PADDQ X8, X0 + PXOR X0, X6 + PSHUFB X11, X6 + MOVO X4, X8 + PMULULQ X6, X8 + PADDQ X6, X4 + PADDQ X8, X4 + PADDQ X8, X4 + PXOR X4, X2 + MOVO X2, X8 + PADDQ X2, X8 + PSRLQ $0x3f, X2 + PXOR X8, X2 + MOVO X1, X8 + PMULULQ X3, X8 + PADDQ X3, X1 + PADDQ X8, X1 + PADDQ X8, X1 + PXOR X1, X7 + PSHUFD $0xb1, X7, X7 + MOVO X5, X8 + PMULULQ X7, X8 + PADDQ X7, X5 + PADDQ X8, X5 + PADDQ X8, X5 + PXOR X5, X3 + PSHUFB X10, X3 + MOVO X1, X8 + PMULULQ X3, X8 + PADDQ X3, X1 + PADDQ X8, X1 + PADDQ X8, X1 + PXOR X1, X7 + PSHUFB X11, X7 + MOVO X5, X8 + PMULULQ X7, X8 + PADDQ X7, X5 + PADDQ X8, X5 + PADDQ X8, X5 + PXOR X5, X3 + MOVO X3, X8 + PADDQ X3, X8 + PSRLQ $0x3f, X3 + PXOR X8, X3 + MOVO X4, X8 + MOVO X5, X4 + MOVO X8, X5 + MOVO X2, X8 + PUNPCKLQDQ X2, X9 + PUNPCKHQDQ X3, X2 + PUNPCKHQDQ X9, X2 + PUNPCKLQDQ X3, X9 + MOVO X8, X3 + MOVO X6, X8 + PUNPCKHQDQ X9, X3 + PUNPCKLQDQ X7, X9 + PUNPCKHQDQ X9, X6 + PUNPCKLQDQ X8, X9 + PUNPCKHQDQ X9, X7 + MOVOU X0, 640(AX) + MOVOU X1, 656(AX) + MOVOU X2, 672(AX) + MOVOU X3, 688(AX) + MOVOU X4, 704(AX) + MOVOU X5, 720(AX) + MOVOU X6, 736(AX) + MOVOU X7, 752(AX) + MOVOU 768(AX), X0 + MOVOU 784(AX), X1 + MOVOU 800(AX), X2 + MOVOU 816(AX), X3 + MOVOU 832(AX), X4 + MOVOU 848(AX), X5 + MOVOU 864(AX), X6 + MOVOU 880(AX), X7 + MOVO X0, X8 + PMULULQ X2, X8 + PADDQ X2, X0 + PADDQ X8, X0 + PADDQ X8, X0 + PXOR X0, X6 + PSHUFD $0xb1, X6, X6 + MOVO X4, X8 + PMULULQ X6, X8 + PADDQ X6, X4 + PADDQ X8, X4 + PADDQ X8, X4 + PXOR X4, X2 + PSHUFB X10, X2 + MOVO X0, X8 + PMULULQ X2, X8 + PADDQ X2, X0 + PADDQ X8, X0 + PADDQ X8, X0 + PXOR X0, X6 + PSHUFB X11, X6 + MOVO X4, X8 + PMULULQ X6, X8 + PADDQ X6, X4 + PADDQ X8, X4 + PADDQ X8, X4 + PXOR X4, X2 + MOVO X2, X8 + PADDQ X2, X8 + PSRLQ $0x3f, X2 + PXOR X8, X2 + MOVO X1, X8 + PMULULQ X3, X8 + PADDQ X3, X1 + PADDQ X8, X1 + PADDQ X8, X1 + PXOR X1, X7 + PSHUFD $0xb1, X7, X7 + MOVO X5, X8 + PMULULQ X7, X8 + PADDQ X7, X5 + PADDQ X8, X5 + PADDQ X8, X5 + PXOR X5, X3 + PSHUFB X10, X3 + MOVO X1, X8 + PMULULQ X3, X8 + PADDQ X3, X1 + PADDQ X8, X1 + PADDQ X8, X1 + PXOR X1, X7 + PSHUFB X11, X7 + MOVO X5, X8 + PMULULQ X7, X8 + PADDQ X7, X5 + PADDQ X8, X5 + PADDQ X8, X5 + PXOR X5, X3 + MOVO X3, X8 + PADDQ X3, X8 + PSRLQ $0x3f, X3 + PXOR X8, X3 + MOVO X4, X8 + MOVO X5, X4 + MOVO X8, X5 + MOVO X6, X8 + PUNPCKLQDQ X6, X9 + PUNPCKHQDQ X7, X6 + PUNPCKHQDQ X9, X6 + PUNPCKLQDQ X7, X9 + MOVO X8, X7 + MOVO X2, X8 + PUNPCKHQDQ X9, X7 + PUNPCKLQDQ X3, X9 + PUNPCKHQDQ X9, X2 + PUNPCKLQDQ X8, X9 + PUNPCKHQDQ X9, X3 + MOVO X0, X8 + PMULULQ X2, X8 + PADDQ X2, X0 + PADDQ X8, X0 + PADDQ X8, X0 + PXOR X0, X6 + PSHUFD $0xb1, X6, X6 + MOVO X4, X8 + PMULULQ X6, X8 + PADDQ X6, X4 + PADDQ X8, X4 + PADDQ X8, X4 + PXOR X4, X2 + PSHUFB X10, X2 + MOVO X0, X8 + PMULULQ X2, X8 + PADDQ X2, X0 + PADDQ X8, X0 + PADDQ X8, X0 + PXOR X0, X6 + PSHUFB X11, X6 + MOVO X4, X8 + PMULULQ X6, X8 + PADDQ X6, X4 + PADDQ X8, X4 + PADDQ X8, X4 + PXOR X4, X2 + MOVO X2, X8 + PADDQ X2, X8 + PSRLQ $0x3f, X2 + PXOR X8, X2 + MOVO X1, X8 + PMULULQ X3, X8 + PADDQ X3, X1 + PADDQ X8, X1 + PADDQ X8, X1 + PXOR X1, X7 + PSHUFD $0xb1, X7, X7 + MOVO X5, X8 + PMULULQ X7, X8 + PADDQ X7, X5 + PADDQ X8, X5 + PADDQ X8, X5 + PXOR X5, X3 + PSHUFB X10, X3 + MOVO X1, X8 + PMULULQ X3, X8 + PADDQ X3, X1 + PADDQ X8, X1 + PADDQ X8, X1 + PXOR X1, X7 + PSHUFB X11, X7 + MOVO X5, X8 + PMULULQ X7, X8 + PADDQ X7, X5 + PADDQ X8, X5 + PADDQ X8, X5 + PXOR X5, X3 + MOVO X3, X8 + PADDQ X3, X8 + PSRLQ $0x3f, X3 + PXOR X8, X3 + MOVO X4, X8 + MOVO X5, X4 + MOVO X8, X5 + MOVO X2, X8 + PUNPCKLQDQ X2, X9 + PUNPCKHQDQ X3, X2 + PUNPCKHQDQ X9, X2 + PUNPCKLQDQ X3, X9 + MOVO X8, X3 + MOVO X6, X8 + PUNPCKHQDQ X9, X3 + PUNPCKLQDQ X7, X9 + PUNPCKHQDQ X9, X6 + PUNPCKLQDQ X8, X9 + PUNPCKHQDQ X9, X7 + MOVOU X0, 768(AX) + MOVOU X1, 784(AX) + MOVOU X2, 800(AX) + MOVOU X3, 816(AX) + MOVOU X4, 832(AX) + MOVOU X5, 848(AX) + MOVOU X6, 864(AX) + MOVOU X7, 880(AX) + MOVOU 896(AX), X0 + MOVOU 912(AX), X1 + MOVOU 928(AX), X2 + MOVOU 944(AX), X3 + MOVOU 960(AX), X4 + MOVOU 976(AX), X5 + MOVOU 992(AX), X6 + MOVOU 1008(AX), X7 + MOVO X0, X8 + PMULULQ X2, X8 + PADDQ X2, X0 + PADDQ X8, X0 + PADDQ X8, X0 + PXOR X0, X6 + PSHUFD $0xb1, X6, X6 + MOVO X4, X8 + PMULULQ X6, X8 + PADDQ X6, X4 + PADDQ X8, X4 + PADDQ X8, X4 + PXOR X4, X2 + PSHUFB X10, X2 + MOVO X0, X8 + PMULULQ X2, X8 + PADDQ X2, X0 + PADDQ X8, X0 + PADDQ X8, X0 + PXOR X0, X6 + PSHUFB X11, X6 + MOVO X4, X8 + PMULULQ X6, X8 + PADDQ X6, X4 + PADDQ X8, X4 + PADDQ X8, X4 + PXOR X4, X2 + MOVO X2, X8 + PADDQ X2, X8 + PSRLQ $0x3f, X2 + PXOR X8, X2 + MOVO X1, X8 + PMULULQ X3, X8 + PADDQ X3, X1 + PADDQ X8, X1 + PADDQ X8, X1 + PXOR X1, X7 + PSHUFD $0xb1, X7, X7 + MOVO X5, X8 + PMULULQ X7, X8 + PADDQ X7, X5 + PADDQ X8, X5 + PADDQ X8, X5 + PXOR X5, X3 + PSHUFB X10, X3 + MOVO X1, X8 + PMULULQ X3, X8 + PADDQ X3, X1 + PADDQ X8, X1 + PADDQ X8, X1 + PXOR X1, X7 + PSHUFB X11, X7 + MOVO X5, X8 + PMULULQ X7, X8 + PADDQ X7, X5 + PADDQ X8, X5 + PADDQ X8, X5 + PXOR X5, X3 + MOVO X3, X8 + PADDQ X3, X8 + PSRLQ $0x3f, X3 + PXOR X8, X3 + MOVO X4, X8 + MOVO X5, X4 + MOVO X8, X5 + MOVO X6, X8 + PUNPCKLQDQ X6, X9 + PUNPCKHQDQ X7, X6 + PUNPCKHQDQ X9, X6 + PUNPCKLQDQ X7, X9 + MOVO X8, X7 + MOVO X2, X8 + PUNPCKHQDQ X9, X7 + PUNPCKLQDQ X3, X9 + PUNPCKHQDQ X9, X2 + PUNPCKLQDQ X8, X9 + PUNPCKHQDQ X9, X3 + MOVO X0, X8 + PMULULQ X2, X8 + PADDQ X2, X0 + PADDQ X8, X0 + PADDQ X8, X0 + PXOR X0, X6 + PSHUFD $0xb1, X6, X6 + MOVO X4, X8 + PMULULQ X6, X8 + PADDQ X6, X4 + PADDQ X8, X4 + PADDQ X8, X4 + PXOR X4, X2 + PSHUFB X10, X2 + MOVO X0, X8 + PMULULQ X2, X8 + PADDQ X2, X0 + PADDQ X8, X0 + PADDQ X8, X0 + PXOR X0, X6 + PSHUFB X11, X6 + MOVO X4, X8 + PMULULQ X6, X8 + PADDQ X6, X4 + PADDQ X8, X4 + PADDQ X8, X4 + PXOR X4, X2 + MOVO X2, X8 + PADDQ X2, X8 + PSRLQ $0x3f, X2 + PXOR X8, X2 + MOVO X1, X8 + PMULULQ X3, X8 + PADDQ X3, X1 + PADDQ X8, X1 + PADDQ X8, X1 + PXOR X1, X7 + PSHUFD $0xb1, X7, X7 + MOVO X5, X8 + PMULULQ X7, X8 + PADDQ X7, X5 + PADDQ X8, X5 + PADDQ X8, X5 + PXOR X5, X3 + PSHUFB X10, X3 + MOVO X1, X8 + PMULULQ X3, X8 + PADDQ X3, X1 + PADDQ X8, X1 + PADDQ X8, X1 + PXOR X1, X7 + PSHUFB X11, X7 + MOVO X5, X8 + PMULULQ X7, X8 + PADDQ X7, X5 + PADDQ X8, X5 + PADDQ X8, X5 + PXOR X5, X3 + MOVO X3, X8 + PADDQ X3, X8 + PSRLQ $0x3f, X3 + PXOR X8, X3 + MOVO X4, X8 + MOVO X5, X4 + MOVO X8, X5 + MOVO X2, X8 + PUNPCKLQDQ X2, X9 + PUNPCKHQDQ X3, X2 + PUNPCKHQDQ X9, X2 + PUNPCKLQDQ X3, X9 + MOVO X8, X3 + MOVO X6, X8 + PUNPCKHQDQ X9, X3 + PUNPCKLQDQ X7, X9 + PUNPCKHQDQ X9, X6 + PUNPCKLQDQ X8, X9 + PUNPCKHQDQ X9, X7 + MOVOU X0, 896(AX) + MOVOU X1, 912(AX) + MOVOU X2, 928(AX) + MOVOU X3, 944(AX) + MOVOU X4, 960(AX) + MOVOU X5, 976(AX) + MOVOU X6, 992(AX) + MOVOU X7, 1008(AX) + MOVOU (AX), X0 + MOVOU 128(AX), X1 + MOVOU 256(AX), X2 + MOVOU 384(AX), X3 + MOVOU 512(AX), X4 + MOVOU 640(AX), X5 + MOVOU 768(AX), X6 + MOVOU 896(AX), X7 + MOVO X0, X8 + PMULULQ X2, X8 + PADDQ X2, X0 + PADDQ X8, X0 + PADDQ X8, X0 + PXOR X0, X6 + PSHUFD $0xb1, X6, X6 + MOVO X4, X8 + PMULULQ X6, X8 + PADDQ X6, X4 + PADDQ X8, X4 + PADDQ X8, X4 + PXOR X4, X2 + PSHUFB X10, X2 + MOVO X0, X8 + PMULULQ X2, X8 + PADDQ X2, X0 + PADDQ X8, X0 + PADDQ X8, X0 + PXOR X0, X6 + PSHUFB X11, X6 + MOVO X4, X8 + PMULULQ X6, X8 + PADDQ X6, X4 + PADDQ X8, X4 + PADDQ X8, X4 + PXOR X4, X2 + MOVO X2, X8 + PADDQ X2, X8 + PSRLQ $0x3f, X2 + PXOR X8, X2 + MOVO X1, X8 + PMULULQ X3, X8 + PADDQ X3, X1 + PADDQ X8, X1 + PADDQ X8, X1 + PXOR X1, X7 + PSHUFD $0xb1, X7, X7 + MOVO X5, X8 + PMULULQ X7, X8 + PADDQ X7, X5 + PADDQ X8, X5 + PADDQ X8, X5 + PXOR X5, X3 + PSHUFB X10, X3 + MOVO X1, X8 + PMULULQ X3, X8 + PADDQ X3, X1 + PADDQ X8, X1 + PADDQ X8, X1 + PXOR X1, X7 + PSHUFB X11, X7 + MOVO X5, X8 + PMULULQ X7, X8 + PADDQ X7, X5 + PADDQ X8, X5 + PADDQ X8, X5 + PXOR X5, X3 + MOVO X3, X8 + PADDQ X3, X8 + PSRLQ $0x3f, X3 + PXOR X8, X3 + MOVO X4, X8 + MOVO X5, X4 + MOVO X8, X5 + MOVO X6, X8 + PUNPCKLQDQ X6, X9 + PUNPCKHQDQ X7, X6 + PUNPCKHQDQ X9, X6 + PUNPCKLQDQ X7, X9 + MOVO X8, X7 + MOVO X2, X8 + PUNPCKHQDQ X9, X7 + PUNPCKLQDQ X3, X9 + PUNPCKHQDQ X9, X2 + PUNPCKLQDQ X8, X9 + PUNPCKHQDQ X9, X3 + MOVO X0, X8 + PMULULQ X2, X8 + PADDQ X2, X0 + PADDQ X8, X0 + PADDQ X8, X0 + PXOR X0, X6 + PSHUFD $0xb1, X6, X6 + MOVO X4, X8 + PMULULQ X6, X8 + PADDQ X6, X4 + PADDQ X8, X4 + PADDQ X8, X4 + PXOR X4, X2 + PSHUFB X10, X2 + MOVO X0, X8 + PMULULQ X2, X8 + PADDQ X2, X0 + PADDQ X8, X0 + PADDQ X8, X0 + PXOR X0, X6 + PSHUFB X11, X6 + MOVO X4, X8 + PMULULQ X6, X8 + PADDQ X6, X4 + PADDQ X8, X4 + PADDQ X8, X4 + PXOR X4, X2 + MOVO X2, X8 + PADDQ X2, X8 + PSRLQ $0x3f, X2 + PXOR X8, X2 + MOVO X1, X8 + PMULULQ X3, X8 + PADDQ X3, X1 + PADDQ X8, X1 + PADDQ X8, X1 + PXOR X1, X7 + PSHUFD $0xb1, X7, X7 + MOVO X5, X8 + PMULULQ X7, X8 + PADDQ X7, X5 + PADDQ X8, X5 + PADDQ X8, X5 + PXOR X5, X3 + PSHUFB X10, X3 + MOVO X1, X8 + PMULULQ X3, X8 + PADDQ X3, X1 + PADDQ X8, X1 + PADDQ X8, X1 + PXOR X1, X7 + PSHUFB X11, X7 + MOVO X5, X8 + PMULULQ X7, X8 + PADDQ X7, X5 + PADDQ X8, X5 + PADDQ X8, X5 + PXOR X5, X3 + MOVO X3, X8 + PADDQ X3, X8 + PSRLQ $0x3f, X3 + PXOR X8, X3 + MOVO X4, X8 + MOVO X5, X4 + MOVO X8, X5 + MOVO X2, X8 + PUNPCKLQDQ X2, X9 + PUNPCKHQDQ X3, X2 + PUNPCKHQDQ X9, X2 + PUNPCKLQDQ X3, X9 + MOVO X8, X3 + MOVO X6, X8 + PUNPCKHQDQ X9, X3 + PUNPCKLQDQ X7, X9 + PUNPCKHQDQ X9, X6 + PUNPCKLQDQ X8, X9 + PUNPCKHQDQ X9, X7 + MOVOU X0, (AX) + MOVOU X1, 128(AX) + MOVOU X2, 256(AX) + MOVOU X3, 384(AX) + MOVOU X4, 512(AX) + MOVOU X5, 640(AX) + MOVOU X6, 768(AX) + MOVOU X7, 896(AX) + MOVOU 16(AX), X0 + MOVOU 144(AX), X1 + MOVOU 272(AX), X2 + MOVOU 400(AX), X3 + MOVOU 528(AX), X4 + MOVOU 656(AX), X5 + MOVOU 784(AX), X6 + MOVOU 912(AX), X7 + MOVO X0, X8 + PMULULQ X2, X8 + PADDQ X2, X0 + PADDQ X8, X0 + PADDQ X8, X0 + PXOR X0, X6 + PSHUFD $0xb1, X6, X6 + MOVO X4, X8 + PMULULQ X6, X8 + PADDQ X6, X4 + PADDQ X8, X4 + PADDQ X8, X4 + PXOR X4, X2 + PSHUFB X10, X2 + MOVO X0, X8 + PMULULQ X2, X8 + PADDQ X2, X0 + PADDQ X8, X0 + PADDQ X8, X0 + PXOR X0, X6 + PSHUFB X11, X6 + MOVO X4, X8 + PMULULQ X6, X8 + PADDQ X6, X4 + PADDQ X8, X4 + PADDQ X8, X4 + PXOR X4, X2 + MOVO X2, X8 + PADDQ X2, X8 + PSRLQ $0x3f, X2 + PXOR X8, X2 + MOVO X1, X8 + PMULULQ X3, X8 + PADDQ X3, X1 + PADDQ X8, X1 + PADDQ X8, X1 + PXOR X1, X7 + PSHUFD $0xb1, X7, X7 + MOVO X5, X8 + PMULULQ X7, X8 + PADDQ X7, X5 + PADDQ X8, X5 + PADDQ X8, X5 + PXOR X5, X3 + PSHUFB X10, X3 + MOVO X1, X8 + PMULULQ X3, X8 + PADDQ X3, X1 + PADDQ X8, X1 + PADDQ X8, X1 + PXOR X1, X7 + PSHUFB X11, X7 + MOVO X5, X8 + PMULULQ X7, X8 + PADDQ X7, X5 + PADDQ X8, X5 + PADDQ X8, X5 + PXOR X5, X3 + MOVO X3, X8 + PADDQ X3, X8 + PSRLQ $0x3f, X3 + PXOR X8, X3 + MOVO X4, X8 + MOVO X5, X4 + MOVO X8, X5 + MOVO X6, X8 + PUNPCKLQDQ X6, X9 + PUNPCKHQDQ X7, X6 + PUNPCKHQDQ X9, X6 + PUNPCKLQDQ X7, X9 + MOVO X8, X7 + MOVO X2, X8 + PUNPCKHQDQ X9, X7 + PUNPCKLQDQ X3, X9 + PUNPCKHQDQ X9, X2 + PUNPCKLQDQ X8, X9 + PUNPCKHQDQ X9, X3 + MOVO X0, X8 + PMULULQ X2, X8 + PADDQ X2, X0 + PADDQ X8, X0 + PADDQ X8, X0 + PXOR X0, X6 + PSHUFD $0xb1, X6, X6 + MOVO X4, X8 + PMULULQ X6, X8 + PADDQ X6, X4 + PADDQ X8, X4 + PADDQ X8, X4 + PXOR X4, X2 + PSHUFB X10, X2 + MOVO X0, X8 + PMULULQ X2, X8 + PADDQ X2, X0 + PADDQ X8, X0 + PADDQ X8, X0 + PXOR X0, X6 + PSHUFB X11, X6 + MOVO X4, X8 + PMULULQ X6, X8 + PADDQ X6, X4 + PADDQ X8, X4 + PADDQ X8, X4 + PXOR X4, X2 + MOVO X2, X8 + PADDQ X2, X8 + PSRLQ $0x3f, X2 + PXOR X8, X2 + MOVO X1, X8 + PMULULQ X3, X8 + PADDQ X3, X1 + PADDQ X8, X1 + PADDQ X8, X1 + PXOR X1, X7 + PSHUFD $0xb1, X7, X7 + MOVO X5, X8 + PMULULQ X7, X8 + PADDQ X7, X5 + PADDQ X8, X5 + PADDQ X8, X5 + PXOR X5, X3 + PSHUFB X10, X3 + MOVO X1, X8 + PMULULQ X3, X8 + PADDQ X3, X1 + PADDQ X8, X1 + PADDQ X8, X1 + PXOR X1, X7 + PSHUFB X11, X7 + MOVO X5, X8 + PMULULQ X7, X8 + PADDQ X7, X5 + PADDQ X8, X5 + PADDQ X8, X5 + PXOR X5, X3 + MOVO X3, X8 + PADDQ X3, X8 + PSRLQ $0x3f, X3 + PXOR X8, X3 + MOVO X4, X8 + MOVO X5, X4 + MOVO X8, X5 + MOVO X2, X8 + PUNPCKLQDQ X2, X9 + PUNPCKHQDQ X3, X2 + PUNPCKHQDQ X9, X2 + PUNPCKLQDQ X3, X9 + MOVO X8, X3 + MOVO X6, X8 + PUNPCKHQDQ X9, X3 + PUNPCKLQDQ X7, X9 + PUNPCKHQDQ X9, X6 + PUNPCKLQDQ X8, X9 + PUNPCKHQDQ X9, X7 + MOVOU X0, 16(AX) + MOVOU X1, 144(AX) + MOVOU X2, 272(AX) + MOVOU X3, 400(AX) + MOVOU X4, 528(AX) + MOVOU X5, 656(AX) + MOVOU X6, 784(AX) + MOVOU X7, 912(AX) + MOVOU 32(AX), X0 + MOVOU 160(AX), X1 + MOVOU 288(AX), X2 + MOVOU 416(AX), X3 + MOVOU 544(AX), X4 + MOVOU 672(AX), X5 + MOVOU 800(AX), X6 + MOVOU 928(AX), X7 + MOVO X0, X8 + PMULULQ X2, X8 + PADDQ X2, X0 + PADDQ X8, X0 + PADDQ X8, X0 + PXOR X0, X6 + PSHUFD $0xb1, X6, X6 + MOVO X4, X8 + PMULULQ X6, X8 + PADDQ X6, X4 + PADDQ X8, X4 + PADDQ X8, X4 + PXOR X4, X2 + PSHUFB X10, X2 + MOVO X0, X8 + PMULULQ X2, X8 + PADDQ X2, X0 + PADDQ X8, X0 + PADDQ X8, X0 + PXOR X0, X6 + PSHUFB X11, X6 + MOVO X4, X8 + PMULULQ X6, X8 + PADDQ X6, X4 + PADDQ X8, X4 + PADDQ X8, X4 + PXOR X4, X2 + MOVO X2, X8 + PADDQ X2, X8 + PSRLQ $0x3f, X2 + PXOR X8, X2 + MOVO X1, X8 + PMULULQ X3, X8 + PADDQ X3, X1 + PADDQ X8, X1 + PADDQ X8, X1 + PXOR X1, X7 + PSHUFD $0xb1, X7, X7 + MOVO X5, X8 + PMULULQ X7, X8 + PADDQ X7, X5 + PADDQ X8, X5 + PADDQ X8, X5 + PXOR X5, X3 + PSHUFB X10, X3 + MOVO X1, X8 + PMULULQ X3, X8 + PADDQ X3, X1 + PADDQ X8, X1 + PADDQ X8, X1 + PXOR X1, X7 + PSHUFB X11, X7 + MOVO X5, X8 + PMULULQ X7, X8 + PADDQ X7, X5 + PADDQ X8, X5 + PADDQ X8, X5 + PXOR X5, X3 + MOVO X3, X8 + PADDQ X3, X8 + PSRLQ $0x3f, X3 + PXOR X8, X3 + MOVO X4, X8 + MOVO X5, X4 + MOVO X8, X5 + MOVO X6, X8 + PUNPCKLQDQ X6, X9 + PUNPCKHQDQ X7, X6 + PUNPCKHQDQ X9, X6 + PUNPCKLQDQ X7, X9 + MOVO X8, X7 + MOVO X2, X8 + PUNPCKHQDQ X9, X7 + PUNPCKLQDQ X3, X9 + PUNPCKHQDQ X9, X2 + PUNPCKLQDQ X8, X9 + PUNPCKHQDQ X9, X3 + MOVO X0, X8 + PMULULQ X2, X8 + PADDQ X2, X0 + PADDQ X8, X0 + PADDQ X8, X0 + PXOR X0, X6 + PSHUFD $0xb1, X6, X6 + MOVO X4, X8 + PMULULQ X6, X8 + PADDQ X6, X4 + PADDQ X8, X4 + PADDQ X8, X4 + PXOR X4, X2 + PSHUFB X10, X2 + MOVO X0, X8 + PMULULQ X2, X8 + PADDQ X2, X0 + PADDQ X8, X0 + PADDQ X8, X0 + PXOR X0, X6 + PSHUFB X11, X6 + MOVO X4, X8 + PMULULQ X6, X8 + PADDQ X6, X4 + PADDQ X8, X4 + PADDQ X8, X4 + PXOR X4, X2 + MOVO X2, X8 + PADDQ X2, X8 + PSRLQ $0x3f, X2 + PXOR X8, X2 + MOVO X1, X8 + PMULULQ X3, X8 + PADDQ X3, X1 + PADDQ X8, X1 + PADDQ X8, X1 + PXOR X1, X7 + PSHUFD $0xb1, X7, X7 + MOVO X5, X8 + PMULULQ X7, X8 + PADDQ X7, X5 + PADDQ X8, X5 + PADDQ X8, X5 + PXOR X5, X3 + PSHUFB X10, X3 + MOVO X1, X8 + PMULULQ X3, X8 + PADDQ X3, X1 + PADDQ X8, X1 + PADDQ X8, X1 + PXOR X1, X7 + PSHUFB X11, X7 + MOVO X5, X8 + PMULULQ X7, X8 + PADDQ X7, X5 + PADDQ X8, X5 + PADDQ X8, X5 + PXOR X5, X3 + MOVO X3, X8 + PADDQ X3, X8 + PSRLQ $0x3f, X3 + PXOR X8, X3 + MOVO X4, X8 + MOVO X5, X4 + MOVO X8, X5 + MOVO X2, X8 + PUNPCKLQDQ X2, X9 + PUNPCKHQDQ X3, X2 + PUNPCKHQDQ X9, X2 + PUNPCKLQDQ X3, X9 + MOVO X8, X3 + MOVO X6, X8 + PUNPCKHQDQ X9, X3 + PUNPCKLQDQ X7, X9 + PUNPCKHQDQ X9, X6 + PUNPCKLQDQ X8, X9 + PUNPCKHQDQ X9, X7 + MOVOU X0, 32(AX) + MOVOU X1, 160(AX) + MOVOU X2, 288(AX) + MOVOU X3, 416(AX) + MOVOU X4, 544(AX) + MOVOU X5, 672(AX) + MOVOU X6, 800(AX) + MOVOU X7, 928(AX) + MOVOU 48(AX), X0 + MOVOU 176(AX), X1 + MOVOU 304(AX), X2 + MOVOU 432(AX), X3 + MOVOU 560(AX), X4 + MOVOU 688(AX), X5 + MOVOU 816(AX), X6 + MOVOU 944(AX), X7 + MOVO X0, X8 + PMULULQ X2, X8 + PADDQ X2, X0 + PADDQ X8, X0 + PADDQ X8, X0 + PXOR X0, X6 + PSHUFD $0xb1, X6, X6 + MOVO X4, X8 + PMULULQ X6, X8 + PADDQ X6, X4 + PADDQ X8, X4 + PADDQ X8, X4 + PXOR X4, X2 + PSHUFB X10, X2 + MOVO X0, X8 + PMULULQ X2, X8 + PADDQ X2, X0 + PADDQ X8, X0 + PADDQ X8, X0 + PXOR X0, X6 + PSHUFB X11, X6 + MOVO X4, X8 + PMULULQ X6, X8 + PADDQ X6, X4 + PADDQ X8, X4 + PADDQ X8, X4 + PXOR X4, X2 + MOVO X2, X8 + PADDQ X2, X8 + PSRLQ $0x3f, X2 + PXOR X8, X2 + MOVO X1, X8 + PMULULQ X3, X8 + PADDQ X3, X1 + PADDQ X8, X1 + PADDQ X8, X1 + PXOR X1, X7 + PSHUFD $0xb1, X7, X7 + MOVO X5, X8 + PMULULQ X7, X8 + PADDQ X7, X5 + PADDQ X8, X5 + PADDQ X8, X5 + PXOR X5, X3 + PSHUFB X10, X3 + MOVO X1, X8 + PMULULQ X3, X8 + PADDQ X3, X1 + PADDQ X8, X1 + PADDQ X8, X1 + PXOR X1, X7 + PSHUFB X11, X7 + MOVO X5, X8 + PMULULQ X7, X8 + PADDQ X7, X5 + PADDQ X8, X5 + PADDQ X8, X5 + PXOR X5, X3 + MOVO X3, X8 + PADDQ X3, X8 + PSRLQ $0x3f, X3 + PXOR X8, X3 + MOVO X4, X8 + MOVO X5, X4 + MOVO X8, X5 + MOVO X6, X8 + PUNPCKLQDQ X6, X9 + PUNPCKHQDQ X7, X6 + PUNPCKHQDQ X9, X6 + PUNPCKLQDQ X7, X9 + MOVO X8, X7 + MOVO X2, X8 + PUNPCKHQDQ X9, X7 + PUNPCKLQDQ X3, X9 + PUNPCKHQDQ X9, X2 + PUNPCKLQDQ X8, X9 + PUNPCKHQDQ X9, X3 + MOVO X0, X8 + PMULULQ X2, X8 + PADDQ X2, X0 + PADDQ X8, X0 + PADDQ X8, X0 + PXOR X0, X6 + PSHUFD $0xb1, X6, X6 + MOVO X4, X8 + PMULULQ X6, X8 + PADDQ X6, X4 + PADDQ X8, X4 + PADDQ X8, X4 + PXOR X4, X2 + PSHUFB X10, X2 + MOVO X0, X8 + PMULULQ X2, X8 + PADDQ X2, X0 + PADDQ X8, X0 + PADDQ X8, X0 + PXOR X0, X6 + PSHUFB X11, X6 + MOVO X4, X8 + PMULULQ X6, X8 + PADDQ X6, X4 + PADDQ X8, X4 + PADDQ X8, X4 + PXOR X4, X2 + MOVO X2, X8 + PADDQ X2, X8 + PSRLQ $0x3f, X2 + PXOR X8, X2 + MOVO X1, X8 + PMULULQ X3, X8 + PADDQ X3, X1 + PADDQ X8, X1 + PADDQ X8, X1 + PXOR X1, X7 + PSHUFD $0xb1, X7, X7 + MOVO X5, X8 + PMULULQ X7, X8 + PADDQ X7, X5 + PADDQ X8, X5 + PADDQ X8, X5 + PXOR X5, X3 + PSHUFB X10, X3 + MOVO X1, X8 + PMULULQ X3, X8 + PADDQ X3, X1 + PADDQ X8, X1 + PADDQ X8, X1 + PXOR X1, X7 + PSHUFB X11, X7 + MOVO X5, X8 + PMULULQ X7, X8 + PADDQ X7, X5 + PADDQ X8, X5 + PADDQ X8, X5 + PXOR X5, X3 + MOVO X3, X8 + PADDQ X3, X8 + PSRLQ $0x3f, X3 + PXOR X8, X3 + MOVO X4, X8 + MOVO X5, X4 + MOVO X8, X5 + MOVO X2, X8 + PUNPCKLQDQ X2, X9 + PUNPCKHQDQ X3, X2 + PUNPCKHQDQ X9, X2 + PUNPCKLQDQ X3, X9 + MOVO X8, X3 + MOVO X6, X8 + PUNPCKHQDQ X9, X3 + PUNPCKLQDQ X7, X9 + PUNPCKHQDQ X9, X6 + PUNPCKLQDQ X8, X9 + PUNPCKHQDQ X9, X7 + MOVOU X0, 48(AX) + MOVOU X1, 176(AX) + MOVOU X2, 304(AX) + MOVOU X3, 432(AX) + MOVOU X4, 560(AX) + MOVOU X5, 688(AX) + MOVOU X6, 816(AX) + MOVOU X7, 944(AX) + MOVOU 64(AX), X0 + MOVOU 192(AX), X1 + MOVOU 320(AX), X2 + MOVOU 448(AX), X3 + MOVOU 576(AX), X4 + MOVOU 704(AX), X5 + MOVOU 832(AX), X6 + MOVOU 960(AX), X7 + MOVO X0, X8 + PMULULQ X2, X8 + PADDQ X2, X0 + PADDQ X8, X0 + PADDQ X8, X0 + PXOR X0, X6 + PSHUFD $0xb1, X6, X6 + MOVO X4, X8 + PMULULQ X6, X8 + PADDQ X6, X4 + PADDQ X8, X4 + PADDQ X8, X4 + PXOR X4, X2 + PSHUFB X10, X2 + MOVO X0, X8 + PMULULQ X2, X8 + PADDQ X2, X0 + PADDQ X8, X0 + PADDQ X8, X0 + PXOR X0, X6 + PSHUFB X11, X6 + MOVO X4, X8 + PMULULQ X6, X8 + PADDQ X6, X4 + PADDQ X8, X4 + PADDQ X8, X4 + PXOR X4, X2 + MOVO X2, X8 + PADDQ X2, X8 + PSRLQ $0x3f, X2 + PXOR X8, X2 + MOVO X1, X8 + PMULULQ X3, X8 + PADDQ X3, X1 + PADDQ X8, X1 + PADDQ X8, X1 + PXOR X1, X7 + PSHUFD $0xb1, X7, X7 + MOVO X5, X8 + PMULULQ X7, X8 + PADDQ X7, X5 + PADDQ X8, X5 + PADDQ X8, X5 + PXOR X5, X3 + PSHUFB X10, X3 + MOVO X1, X8 + PMULULQ X3, X8 + PADDQ X3, X1 + PADDQ X8, X1 + PADDQ X8, X1 + PXOR X1, X7 + PSHUFB X11, X7 + MOVO X5, X8 + PMULULQ X7, X8 + PADDQ X7, X5 + PADDQ X8, X5 + PADDQ X8, X5 + PXOR X5, X3 + MOVO X3, X8 + PADDQ X3, X8 + PSRLQ $0x3f, X3 + PXOR X8, X3 + MOVO X4, X8 + MOVO X5, X4 + MOVO X8, X5 + MOVO X6, X8 + PUNPCKLQDQ X6, X9 + PUNPCKHQDQ X7, X6 + PUNPCKHQDQ X9, X6 + PUNPCKLQDQ X7, X9 + MOVO X8, X7 + MOVO X2, X8 + PUNPCKHQDQ X9, X7 + PUNPCKLQDQ X3, X9 + PUNPCKHQDQ X9, X2 + PUNPCKLQDQ X8, X9 + PUNPCKHQDQ X9, X3 + MOVO X0, X8 + PMULULQ X2, X8 + PADDQ X2, X0 + PADDQ X8, X0 + PADDQ X8, X0 + PXOR X0, X6 + PSHUFD $0xb1, X6, X6 + MOVO X4, X8 + PMULULQ X6, X8 + PADDQ X6, X4 + PADDQ X8, X4 + PADDQ X8, X4 + PXOR X4, X2 + PSHUFB X10, X2 + MOVO X0, X8 + PMULULQ X2, X8 + PADDQ X2, X0 + PADDQ X8, X0 + PADDQ X8, X0 + PXOR X0, X6 + PSHUFB X11, X6 + MOVO X4, X8 + PMULULQ X6, X8 + PADDQ X6, X4 + PADDQ X8, X4 + PADDQ X8, X4 + PXOR X4, X2 + MOVO X2, X8 + PADDQ X2, X8 + PSRLQ $0x3f, X2 + PXOR X8, X2 + MOVO X1, X8 + PMULULQ X3, X8 + PADDQ X3, X1 + PADDQ X8, X1 + PADDQ X8, X1 + PXOR X1, X7 + PSHUFD $0xb1, X7, X7 + MOVO X5, X8 + PMULULQ X7, X8 + PADDQ X7, X5 + PADDQ X8, X5 + PADDQ X8, X5 + PXOR X5, X3 + PSHUFB X10, X3 + MOVO X1, X8 + PMULULQ X3, X8 + PADDQ X3, X1 + PADDQ X8, X1 + PADDQ X8, X1 + PXOR X1, X7 + PSHUFB X11, X7 + MOVO X5, X8 + PMULULQ X7, X8 + PADDQ X7, X5 + PADDQ X8, X5 + PADDQ X8, X5 + PXOR X5, X3 + MOVO X3, X8 + PADDQ X3, X8 + PSRLQ $0x3f, X3 + PXOR X8, X3 + MOVO X4, X8 + MOVO X5, X4 + MOVO X8, X5 + MOVO X2, X8 + PUNPCKLQDQ X2, X9 + PUNPCKHQDQ X3, X2 + PUNPCKHQDQ X9, X2 + PUNPCKLQDQ X3, X9 + MOVO X8, X3 + MOVO X6, X8 + PUNPCKHQDQ X9, X3 + PUNPCKLQDQ X7, X9 + PUNPCKHQDQ X9, X6 + PUNPCKLQDQ X8, X9 + PUNPCKHQDQ X9, X7 + MOVOU X0, 64(AX) + MOVOU X1, 192(AX) + MOVOU X2, 320(AX) + MOVOU X3, 448(AX) + MOVOU X4, 576(AX) + MOVOU X5, 704(AX) + MOVOU X6, 832(AX) + MOVOU X7, 960(AX) + MOVOU 80(AX), X0 + MOVOU 208(AX), X1 + MOVOU 336(AX), X2 + MOVOU 464(AX), X3 + MOVOU 592(AX), X4 + MOVOU 720(AX), X5 + MOVOU 848(AX), X6 + MOVOU 976(AX), X7 + MOVO X0, X8 + PMULULQ X2, X8 + PADDQ X2, X0 + PADDQ X8, X0 + PADDQ X8, X0 + PXOR X0, X6 + PSHUFD $0xb1, X6, X6 + MOVO X4, X8 + PMULULQ X6, X8 + PADDQ X6, X4 + PADDQ X8, X4 + PADDQ X8, X4 + PXOR X4, X2 + PSHUFB X10, X2 + MOVO X0, X8 + PMULULQ X2, X8 + PADDQ X2, X0 + PADDQ X8, X0 + PADDQ X8, X0 + PXOR X0, X6 + PSHUFB X11, X6 + MOVO X4, X8 + PMULULQ X6, X8 + PADDQ X6, X4 + PADDQ X8, X4 + PADDQ X8, X4 + PXOR X4, X2 + MOVO X2, X8 + PADDQ X2, X8 + PSRLQ $0x3f, X2 + PXOR X8, X2 + MOVO X1, X8 + PMULULQ X3, X8 + PADDQ X3, X1 + PADDQ X8, X1 + PADDQ X8, X1 + PXOR X1, X7 + PSHUFD $0xb1, X7, X7 + MOVO X5, X8 + PMULULQ X7, X8 + PADDQ X7, X5 + PADDQ X8, X5 + PADDQ X8, X5 + PXOR X5, X3 + PSHUFB X10, X3 + MOVO X1, X8 + PMULULQ X3, X8 + PADDQ X3, X1 + PADDQ X8, X1 + PADDQ X8, X1 + PXOR X1, X7 + PSHUFB X11, X7 + MOVO X5, X8 + PMULULQ X7, X8 + PADDQ X7, X5 + PADDQ X8, X5 + PADDQ X8, X5 + PXOR X5, X3 + MOVO X3, X8 + PADDQ X3, X8 + PSRLQ $0x3f, X3 + PXOR X8, X3 + MOVO X4, X8 + MOVO X5, X4 + MOVO X8, X5 + MOVO X6, X8 + PUNPCKLQDQ X6, X9 + PUNPCKHQDQ X7, X6 + PUNPCKHQDQ X9, X6 + PUNPCKLQDQ X7, X9 + MOVO X8, X7 + MOVO X2, X8 + PUNPCKHQDQ X9, X7 + PUNPCKLQDQ X3, X9 + PUNPCKHQDQ X9, X2 + PUNPCKLQDQ X8, X9 + PUNPCKHQDQ X9, X3 + MOVO X0, X8 + PMULULQ X2, X8 + PADDQ X2, X0 + PADDQ X8, X0 + PADDQ X8, X0 + PXOR X0, X6 + PSHUFD $0xb1, X6, X6 + MOVO X4, X8 + PMULULQ X6, X8 + PADDQ X6, X4 + PADDQ X8, X4 + PADDQ X8, X4 + PXOR X4, X2 + PSHUFB X10, X2 + MOVO X0, X8 + PMULULQ X2, X8 + PADDQ X2, X0 + PADDQ X8, X0 + PADDQ X8, X0 + PXOR X0, X6 + PSHUFB X11, X6 + MOVO X4, X8 + PMULULQ X6, X8 + PADDQ X6, X4 + PADDQ X8, X4 + PADDQ X8, X4 + PXOR X4, X2 + MOVO X2, X8 + PADDQ X2, X8 + PSRLQ $0x3f, X2 + PXOR X8, X2 + MOVO X1, X8 + PMULULQ X3, X8 + PADDQ X3, X1 + PADDQ X8, X1 + PADDQ X8, X1 + PXOR X1, X7 + PSHUFD $0xb1, X7, X7 + MOVO X5, X8 + PMULULQ X7, X8 + PADDQ X7, X5 + PADDQ X8, X5 + PADDQ X8, X5 + PXOR X5, X3 + PSHUFB X10, X3 + MOVO X1, X8 + PMULULQ X3, X8 + PADDQ X3, X1 + PADDQ X8, X1 + PADDQ X8, X1 + PXOR X1, X7 + PSHUFB X11, X7 + MOVO X5, X8 + PMULULQ X7, X8 + PADDQ X7, X5 + PADDQ X8, X5 + PADDQ X8, X5 + PXOR X5, X3 + MOVO X3, X8 + PADDQ X3, X8 + PSRLQ $0x3f, X3 + PXOR X8, X3 + MOVO X4, X8 + MOVO X5, X4 + MOVO X8, X5 + MOVO X2, X8 + PUNPCKLQDQ X2, X9 + PUNPCKHQDQ X3, X2 + PUNPCKHQDQ X9, X2 + PUNPCKLQDQ X3, X9 + MOVO X8, X3 + MOVO X6, X8 + PUNPCKHQDQ X9, X3 + PUNPCKLQDQ X7, X9 + PUNPCKHQDQ X9, X6 + PUNPCKLQDQ X8, X9 + PUNPCKHQDQ X9, X7 + MOVOU X0, 80(AX) + MOVOU X1, 208(AX) + MOVOU X2, 336(AX) + MOVOU X3, 464(AX) + MOVOU X4, 592(AX) + MOVOU X5, 720(AX) + MOVOU X6, 848(AX) + MOVOU X7, 976(AX) + MOVOU 96(AX), X0 + MOVOU 224(AX), X1 + MOVOU 352(AX), X2 + MOVOU 480(AX), X3 + MOVOU 608(AX), X4 + MOVOU 736(AX), X5 + MOVOU 864(AX), X6 + MOVOU 992(AX), X7 + MOVO X0, X8 + PMULULQ X2, X8 + PADDQ X2, X0 + PADDQ X8, X0 + PADDQ X8, X0 + PXOR X0, X6 + PSHUFD $0xb1, X6, X6 + MOVO X4, X8 + PMULULQ X6, X8 + PADDQ X6, X4 + PADDQ X8, X4 + PADDQ X8, X4 + PXOR X4, X2 + PSHUFB X10, X2 + MOVO X0, X8 + PMULULQ X2, X8 + PADDQ X2, X0 + PADDQ X8, X0 + PADDQ X8, X0 + PXOR X0, X6 + PSHUFB X11, X6 + MOVO X4, X8 + PMULULQ X6, X8 + PADDQ X6, X4 + PADDQ X8, X4 + PADDQ X8, X4 + PXOR X4, X2 + MOVO X2, X8 + PADDQ X2, X8 + PSRLQ $0x3f, X2 + PXOR X8, X2 + MOVO X1, X8 + PMULULQ X3, X8 + PADDQ X3, X1 + PADDQ X8, X1 + PADDQ X8, X1 + PXOR X1, X7 + PSHUFD $0xb1, X7, X7 + MOVO X5, X8 + PMULULQ X7, X8 + PADDQ X7, X5 + PADDQ X8, X5 + PADDQ X8, X5 + PXOR X5, X3 + PSHUFB X10, X3 + MOVO X1, X8 + PMULULQ X3, X8 + PADDQ X3, X1 + PADDQ X8, X1 + PADDQ X8, X1 + PXOR X1, X7 + PSHUFB X11, X7 + MOVO X5, X8 + PMULULQ X7, X8 + PADDQ X7, X5 + PADDQ X8, X5 + PADDQ X8, X5 + PXOR X5, X3 + MOVO X3, X8 + PADDQ X3, X8 + PSRLQ $0x3f, X3 + PXOR X8, X3 + MOVO X4, X8 + MOVO X5, X4 + MOVO X8, X5 + MOVO X6, X8 + PUNPCKLQDQ X6, X9 + PUNPCKHQDQ X7, X6 + PUNPCKHQDQ X9, X6 + PUNPCKLQDQ X7, X9 + MOVO X8, X7 + MOVO X2, X8 + PUNPCKHQDQ X9, X7 + PUNPCKLQDQ X3, X9 + PUNPCKHQDQ X9, X2 + PUNPCKLQDQ X8, X9 + PUNPCKHQDQ X9, X3 + MOVO X0, X8 + PMULULQ X2, X8 + PADDQ X2, X0 + PADDQ X8, X0 + PADDQ X8, X0 + PXOR X0, X6 + PSHUFD $0xb1, X6, X6 + MOVO X4, X8 + PMULULQ X6, X8 + PADDQ X6, X4 + PADDQ X8, X4 + PADDQ X8, X4 + PXOR X4, X2 + PSHUFB X10, X2 + MOVO X0, X8 + PMULULQ X2, X8 + PADDQ X2, X0 + PADDQ X8, X0 + PADDQ X8, X0 + PXOR X0, X6 + PSHUFB X11, X6 + MOVO X4, X8 + PMULULQ X6, X8 + PADDQ X6, X4 + PADDQ X8, X4 + PADDQ X8, X4 + PXOR X4, X2 + MOVO X2, X8 + PADDQ X2, X8 + PSRLQ $0x3f, X2 + PXOR X8, X2 + MOVO X1, X8 + PMULULQ X3, X8 + PADDQ X3, X1 + PADDQ X8, X1 + PADDQ X8, X1 + PXOR X1, X7 + PSHUFD $0xb1, X7, X7 + MOVO X5, X8 + PMULULQ X7, X8 + PADDQ X7, X5 + PADDQ X8, X5 + PADDQ X8, X5 + PXOR X5, X3 + PSHUFB X10, X3 + MOVO X1, X8 + PMULULQ X3, X8 + PADDQ X3, X1 + PADDQ X8, X1 + PADDQ X8, X1 + PXOR X1, X7 + PSHUFB X11, X7 + MOVO X5, X8 + PMULULQ X7, X8 + PADDQ X7, X5 + PADDQ X8, X5 + PADDQ X8, X5 + PXOR X5, X3 + MOVO X3, X8 + PADDQ X3, X8 + PSRLQ $0x3f, X3 + PXOR X8, X3 + MOVO X4, X8 + MOVO X5, X4 + MOVO X8, X5 + MOVO X2, X8 + PUNPCKLQDQ X2, X9 + PUNPCKHQDQ X3, X2 + PUNPCKHQDQ X9, X2 + PUNPCKLQDQ X3, X9 + MOVO X8, X3 + MOVO X6, X8 + PUNPCKHQDQ X9, X3 + PUNPCKLQDQ X7, X9 + PUNPCKHQDQ X9, X6 + PUNPCKLQDQ X8, X9 + PUNPCKHQDQ X9, X7 + MOVOU X0, 96(AX) + MOVOU X1, 224(AX) + MOVOU X2, 352(AX) + MOVOU X3, 480(AX) + MOVOU X4, 608(AX) + MOVOU X5, 736(AX) + MOVOU X6, 864(AX) + MOVOU X7, 992(AX) + MOVOU 112(AX), X0 + MOVOU 240(AX), X1 + MOVOU 368(AX), X2 + MOVOU 496(AX), X3 + MOVOU 624(AX), X4 + MOVOU 752(AX), X5 + MOVOU 880(AX), X6 + MOVOU 1008(AX), X7 + MOVO X0, X8 + PMULULQ X2, X8 + PADDQ X2, X0 + PADDQ X8, X0 + PADDQ X8, X0 + PXOR X0, X6 + PSHUFD $0xb1, X6, X6 + MOVO X4, X8 + PMULULQ X6, X8 + PADDQ X6, X4 + PADDQ X8, X4 + PADDQ X8, X4 + PXOR X4, X2 + PSHUFB X10, X2 + MOVO X0, X8 + PMULULQ X2, X8 + PADDQ X2, X0 + PADDQ X8, X0 + PADDQ X8, X0 + PXOR X0, X6 + PSHUFB X11, X6 + MOVO X4, X8 + PMULULQ X6, X8 + PADDQ X6, X4 + PADDQ X8, X4 + PADDQ X8, X4 + PXOR X4, X2 + MOVO X2, X8 + PADDQ X2, X8 + PSRLQ $0x3f, X2 + PXOR X8, X2 + MOVO X1, X8 + PMULULQ X3, X8 + PADDQ X3, X1 + PADDQ X8, X1 + PADDQ X8, X1 + PXOR X1, X7 + PSHUFD $0xb1, X7, X7 + MOVO X5, X8 + PMULULQ X7, X8 + PADDQ X7, X5 + PADDQ X8, X5 + PADDQ X8, X5 + PXOR X5, X3 + PSHUFB X10, X3 + MOVO X1, X8 + PMULULQ X3, X8 + PADDQ X3, X1 + PADDQ X8, X1 + PADDQ X8, X1 + PXOR X1, X7 + PSHUFB X11, X7 + MOVO X5, X8 + PMULULQ X7, X8 + PADDQ X7, X5 + PADDQ X8, X5 + PADDQ X8, X5 + PXOR X5, X3 + MOVO X3, X8 + PADDQ X3, X8 + PSRLQ $0x3f, X3 + PXOR X8, X3 + MOVO X4, X8 + MOVO X5, X4 + MOVO X8, X5 + MOVO X6, X8 + PUNPCKLQDQ X6, X9 + PUNPCKHQDQ X7, X6 + PUNPCKHQDQ X9, X6 + PUNPCKLQDQ X7, X9 + MOVO X8, X7 + MOVO X2, X8 + PUNPCKHQDQ X9, X7 + PUNPCKLQDQ X3, X9 + PUNPCKHQDQ X9, X2 + PUNPCKLQDQ X8, X9 + PUNPCKHQDQ X9, X3 + MOVO X0, X8 + PMULULQ X2, X8 + PADDQ X2, X0 + PADDQ X8, X0 + PADDQ X8, X0 + PXOR X0, X6 + PSHUFD $0xb1, X6, X6 + MOVO X4, X8 + PMULULQ X6, X8 + PADDQ X6, X4 + PADDQ X8, X4 + PADDQ X8, X4 + PXOR X4, X2 + PSHUFB X10, X2 + MOVO X0, X8 + PMULULQ X2, X8 + PADDQ X2, X0 + PADDQ X8, X0 + PADDQ X8, X0 + PXOR X0, X6 + PSHUFB X11, X6 + MOVO X4, X8 + PMULULQ X6, X8 + PADDQ X6, X4 + PADDQ X8, X4 + PADDQ X8, X4 + PXOR X4, X2 + MOVO X2, X8 + PADDQ X2, X8 + PSRLQ $0x3f, X2 + PXOR X8, X2 + MOVO X1, X8 + PMULULQ X3, X8 + PADDQ X3, X1 + PADDQ X8, X1 + PADDQ X8, X1 + PXOR X1, X7 + PSHUFD $0xb1, X7, X7 + MOVO X5, X8 + PMULULQ X7, X8 + PADDQ X7, X5 + PADDQ X8, X5 + PADDQ X8, X5 + PXOR X5, X3 + PSHUFB X10, X3 + MOVO X1, X8 + PMULULQ X3, X8 + PADDQ X3, X1 + PADDQ X8, X1 + PADDQ X8, X1 + PXOR X1, X7 + PSHUFB X11, X7 + MOVO X5, X8 + PMULULQ X7, X8 + PADDQ X7, X5 + PADDQ X8, X5 + PADDQ X8, X5 + PXOR X5, X3 + MOVO X3, X8 + PADDQ X3, X8 + PSRLQ $0x3f, X3 + PXOR X8, X3 + MOVO X4, X8 + MOVO X5, X4 + MOVO X8, X5 + MOVO X2, X8 + PUNPCKLQDQ X2, X9 + PUNPCKHQDQ X3, X2 + PUNPCKHQDQ X9, X2 + PUNPCKLQDQ X3, X9 + MOVO X8, X3 + MOVO X6, X8 + PUNPCKHQDQ X9, X3 + PUNPCKLQDQ X7, X9 + PUNPCKHQDQ X9, X6 + PUNPCKLQDQ X8, X9 + PUNPCKHQDQ X9, X7 + MOVOU X0, 112(AX) + MOVOU X1, 240(AX) + MOVOU X2, 368(AX) + MOVOU X3, 496(AX) + MOVOU X4, 624(AX) + MOVOU X5, 752(AX) + MOVOU X6, 880(AX) + MOVOU X7, 1008(AX) + RET - BLAMKA_ROUND_0(AX, 0, X8, X9, X10, X11) - BLAMKA_ROUND_0(AX, 16, X8, X9, X10, X11) - BLAMKA_ROUND_0(AX, 32, X8, X9, X10, X11) - BLAMKA_ROUND_0(AX, 48, X8, X9, X10, X11) - BLAMKA_ROUND_0(AX, 64, X8, X9, X10, X11) - BLAMKA_ROUND_0(AX, 80, X8, X9, X10, X11) - BLAMKA_ROUND_0(AX, 96, X8, X9, X10, X11) - BLAMKA_ROUND_0(AX, 112, X8, X9, X10, X11) +DATA ·c40<>+0(SB)/8, $0x0201000706050403 +DATA ·c40<>+8(SB)/8, $0x0a09080f0e0d0c0b +GLOBL ·c40<>(SB), RODATA|NOPTR, $16 - BLAMKA_ROUND_1(AX, 0, X8, X9, X10, X11) - BLAMKA_ROUND_1(AX, 2, X8, X9, X10, X11) - BLAMKA_ROUND_1(AX, 4, X8, X9, X10, X11) - BLAMKA_ROUND_1(AX, 6, X8, X9, X10, X11) - BLAMKA_ROUND_1(AX, 8, X8, X9, X10, X11) - BLAMKA_ROUND_1(AX, 10, X8, X9, X10, X11) - BLAMKA_ROUND_1(AX, 12, X8, X9, X10, X11) - BLAMKA_ROUND_1(AX, 14, X8, X9, X10, X11) - RET +DATA ·c48<>+0(SB)/8, $0x0100070605040302 +DATA ·c48<>+8(SB)/8, $0x09080f0e0d0c0b0a +GLOBL ·c48<>(SB), RODATA|NOPTR, $16 -// func mixBlocksSSE2(out, a, b, c *block) -TEXT ·mixBlocksSSE2(SB), 4, $0-32 +// func mixBlocksSSE2(out *block, a *block, b *block, c *block) +// Requires: SSE2 +TEXT ·mixBlocksSSE2(SB), NOSPLIT, $0-32 MOVQ out+0(FP), DX MOVQ a+8(FP), AX MOVQ b+16(FP), BX MOVQ c+24(FP), CX - MOVQ $128, DI + MOVQ $0x00000080, DI loop: - MOVOU 0(AX), X0 - MOVOU 0(BX), X1 - MOVOU 0(CX), X2 + MOVOU (AX), X0 + MOVOU (BX), X1 + MOVOU (CX), X2 PXOR X1, X0 PXOR X2, X0 - MOVOU X0, 0(DX) - ADDQ $16, AX - ADDQ $16, BX - ADDQ $16, CX - ADDQ $16, DX - SUBQ $2, DI + MOVOU X0, (DX) + ADDQ $0x10, AX + ADDQ $0x10, BX + ADDQ $0x10, CX + ADDQ $0x10, DX + SUBQ $0x02, DI JA loop RET -// func xorBlocksSSE2(out, a, b, c *block) -TEXT ·xorBlocksSSE2(SB), 4, $0-32 +// func xorBlocksSSE2(out *block, a *block, b *block, c *block) +// Requires: SSE2 +TEXT ·xorBlocksSSE2(SB), NOSPLIT, $0-32 MOVQ out+0(FP), DX MOVQ a+8(FP), AX MOVQ b+16(FP), BX MOVQ c+24(FP), CX - MOVQ $128, DI + MOVQ $0x00000080, DI loop: - MOVOU 0(AX), X0 - MOVOU 0(BX), X1 - MOVOU 0(CX), X2 - MOVOU 0(DX), X3 + MOVOU (AX), X0 + MOVOU (BX), X1 + MOVOU (CX), X2 + MOVOU (DX), X3 PXOR X1, X0 PXOR X2, X0 PXOR X3, X0 - MOVOU X0, 0(DX) - ADDQ $16, AX - ADDQ $16, BX - ADDQ $16, CX - ADDQ $16, DX - SUBQ $2, DI + MOVOU X0, (DX) + ADDQ $0x10, AX + ADDQ $0x10, BX + ADDQ $0x10, CX + ADDQ $0x10, DX + SUBQ $0x02, DI JA loop RET diff --git a/vendor/golang.org/x/crypto/bcrypt/bcrypt.go b/vendor/golang.org/x/crypto/bcrypt/bcrypt.go index 5577c0f939a..dc9311870a5 100644 --- a/vendor/golang.org/x/crypto/bcrypt/bcrypt.go +++ b/vendor/golang.org/x/crypto/bcrypt/bcrypt.go @@ -4,7 +4,7 @@ // Package bcrypt implements Provos and Mazières's bcrypt adaptive hashing // algorithm. See http://www.usenix.org/event/usenix99/provos/provos.pdf -package bcrypt // import "golang.org/x/crypto/bcrypt" +package bcrypt // The code is a port of Provos and Mazières's C implementation. import ( diff --git a/vendor/golang.org/x/crypto/blake2b/blake2bAVX2_amd64.s b/vendor/golang.org/x/crypto/blake2b/blake2bAVX2_amd64.s index 9ae8206c201..f75162e039c 100644 --- a/vendor/golang.org/x/crypto/blake2b/blake2bAVX2_amd64.s +++ b/vendor/golang.org/x/crypto/blake2b/blake2bAVX2_amd64.s @@ -1,722 +1,4517 @@ -// Copyright 2016 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. +// Code generated by command: go run blake2bAVX2_amd64_asm.go -out ../../blake2bAVX2_amd64.s -pkg blake2b. DO NOT EDIT. //go:build amd64 && gc && !purego #include "textflag.h" -DATA ·AVX2_iv0<>+0x00(SB)/8, $0x6a09e667f3bcc908 -DATA ·AVX2_iv0<>+0x08(SB)/8, $0xbb67ae8584caa73b -DATA ·AVX2_iv0<>+0x10(SB)/8, $0x3c6ef372fe94f82b -DATA ·AVX2_iv0<>+0x18(SB)/8, $0xa54ff53a5f1d36f1 -GLOBL ·AVX2_iv0<>(SB), (NOPTR+RODATA), $32 - -DATA ·AVX2_iv1<>+0x00(SB)/8, $0x510e527fade682d1 -DATA ·AVX2_iv1<>+0x08(SB)/8, $0x9b05688c2b3e6c1f -DATA ·AVX2_iv1<>+0x10(SB)/8, $0x1f83d9abfb41bd6b -DATA ·AVX2_iv1<>+0x18(SB)/8, $0x5be0cd19137e2179 -GLOBL ·AVX2_iv1<>(SB), (NOPTR+RODATA), $32 - -DATA ·AVX2_c40<>+0x00(SB)/8, $0x0201000706050403 -DATA ·AVX2_c40<>+0x08(SB)/8, $0x0a09080f0e0d0c0b -DATA ·AVX2_c40<>+0x10(SB)/8, $0x0201000706050403 -DATA ·AVX2_c40<>+0x18(SB)/8, $0x0a09080f0e0d0c0b -GLOBL ·AVX2_c40<>(SB), (NOPTR+RODATA), $32 - -DATA ·AVX2_c48<>+0x00(SB)/8, $0x0100070605040302 -DATA ·AVX2_c48<>+0x08(SB)/8, $0x09080f0e0d0c0b0a -DATA ·AVX2_c48<>+0x10(SB)/8, $0x0100070605040302 -DATA ·AVX2_c48<>+0x18(SB)/8, $0x09080f0e0d0c0b0a -GLOBL ·AVX2_c48<>(SB), (NOPTR+RODATA), $32 - -DATA ·AVX_iv0<>+0x00(SB)/8, $0x6a09e667f3bcc908 -DATA ·AVX_iv0<>+0x08(SB)/8, $0xbb67ae8584caa73b -GLOBL ·AVX_iv0<>(SB), (NOPTR+RODATA), $16 - -DATA ·AVX_iv1<>+0x00(SB)/8, $0x3c6ef372fe94f82b -DATA ·AVX_iv1<>+0x08(SB)/8, $0xa54ff53a5f1d36f1 -GLOBL ·AVX_iv1<>(SB), (NOPTR+RODATA), $16 - -DATA ·AVX_iv2<>+0x00(SB)/8, $0x510e527fade682d1 -DATA ·AVX_iv2<>+0x08(SB)/8, $0x9b05688c2b3e6c1f -GLOBL ·AVX_iv2<>(SB), (NOPTR+RODATA), $16 - -DATA ·AVX_iv3<>+0x00(SB)/8, $0x1f83d9abfb41bd6b -DATA ·AVX_iv3<>+0x08(SB)/8, $0x5be0cd19137e2179 -GLOBL ·AVX_iv3<>(SB), (NOPTR+RODATA), $16 - -DATA ·AVX_c40<>+0x00(SB)/8, $0x0201000706050403 -DATA ·AVX_c40<>+0x08(SB)/8, $0x0a09080f0e0d0c0b -GLOBL ·AVX_c40<>(SB), (NOPTR+RODATA), $16 - -DATA ·AVX_c48<>+0x00(SB)/8, $0x0100070605040302 -DATA ·AVX_c48<>+0x08(SB)/8, $0x09080f0e0d0c0b0a -GLOBL ·AVX_c48<>(SB), (NOPTR+RODATA), $16 - -#define VPERMQ_0x39_Y1_Y1 BYTE $0xc4; BYTE $0xe3; BYTE $0xfd; BYTE $0x00; BYTE $0xc9; BYTE $0x39 -#define VPERMQ_0x93_Y1_Y1 BYTE $0xc4; BYTE $0xe3; BYTE $0xfd; BYTE $0x00; BYTE $0xc9; BYTE $0x93 -#define VPERMQ_0x4E_Y2_Y2 BYTE $0xc4; BYTE $0xe3; BYTE $0xfd; BYTE $0x00; BYTE $0xd2; BYTE $0x4e -#define VPERMQ_0x93_Y3_Y3 BYTE $0xc4; BYTE $0xe3; BYTE $0xfd; BYTE $0x00; BYTE $0xdb; BYTE $0x93 -#define VPERMQ_0x39_Y3_Y3 BYTE $0xc4; BYTE $0xe3; BYTE $0xfd; BYTE $0x00; BYTE $0xdb; BYTE $0x39 - -#define ROUND_AVX2(m0, m1, m2, m3, t, c40, c48) \ - VPADDQ m0, Y0, Y0; \ - VPADDQ Y1, Y0, Y0; \ - VPXOR Y0, Y3, Y3; \ - VPSHUFD $-79, Y3, Y3; \ - VPADDQ Y3, Y2, Y2; \ - VPXOR Y2, Y1, Y1; \ - VPSHUFB c40, Y1, Y1; \ - VPADDQ m1, Y0, Y0; \ - VPADDQ Y1, Y0, Y0; \ - VPXOR Y0, Y3, Y3; \ - VPSHUFB c48, Y3, Y3; \ - VPADDQ Y3, Y2, Y2; \ - VPXOR Y2, Y1, Y1; \ - VPADDQ Y1, Y1, t; \ - VPSRLQ $63, Y1, Y1; \ - VPXOR t, Y1, Y1; \ - VPERMQ_0x39_Y1_Y1; \ - VPERMQ_0x4E_Y2_Y2; \ - VPERMQ_0x93_Y3_Y3; \ - VPADDQ m2, Y0, Y0; \ - VPADDQ Y1, Y0, Y0; \ - VPXOR Y0, Y3, Y3; \ - VPSHUFD $-79, Y3, Y3; \ - VPADDQ Y3, Y2, Y2; \ - VPXOR Y2, Y1, Y1; \ - VPSHUFB c40, Y1, Y1; \ - VPADDQ m3, Y0, Y0; \ - VPADDQ Y1, Y0, Y0; \ - VPXOR Y0, Y3, Y3; \ - VPSHUFB c48, Y3, Y3; \ - VPADDQ Y3, Y2, Y2; \ - VPXOR Y2, Y1, Y1; \ - VPADDQ Y1, Y1, t; \ - VPSRLQ $63, Y1, Y1; \ - VPXOR t, Y1, Y1; \ - VPERMQ_0x39_Y3_Y3; \ - VPERMQ_0x4E_Y2_Y2; \ - VPERMQ_0x93_Y1_Y1 - -#define VMOVQ_SI_X11_0 BYTE $0xC5; BYTE $0x7A; BYTE $0x7E; BYTE $0x1E -#define VMOVQ_SI_X12_0 BYTE $0xC5; BYTE $0x7A; BYTE $0x7E; BYTE $0x26 -#define VMOVQ_SI_X13_0 BYTE $0xC5; BYTE $0x7A; BYTE $0x7E; BYTE $0x2E -#define VMOVQ_SI_X14_0 BYTE $0xC5; BYTE $0x7A; BYTE $0x7E; BYTE $0x36 -#define VMOVQ_SI_X15_0 BYTE $0xC5; BYTE $0x7A; BYTE $0x7E; BYTE $0x3E - -#define VMOVQ_SI_X11(n) BYTE $0xC5; BYTE $0x7A; BYTE $0x7E; BYTE $0x5E; BYTE $n -#define VMOVQ_SI_X12(n) BYTE $0xC5; BYTE $0x7A; BYTE $0x7E; BYTE $0x66; BYTE $n -#define VMOVQ_SI_X13(n) BYTE $0xC5; BYTE $0x7A; BYTE $0x7E; BYTE $0x6E; BYTE $n -#define VMOVQ_SI_X14(n) BYTE $0xC5; BYTE $0x7A; BYTE $0x7E; BYTE $0x76; BYTE $n -#define VMOVQ_SI_X15(n) BYTE $0xC5; BYTE $0x7A; BYTE $0x7E; BYTE $0x7E; BYTE $n - -#define VPINSRQ_1_SI_X11_0 BYTE $0xC4; BYTE $0x63; BYTE $0xA1; BYTE $0x22; BYTE $0x1E; BYTE $0x01 -#define VPINSRQ_1_SI_X12_0 BYTE $0xC4; BYTE $0x63; BYTE $0x99; BYTE $0x22; BYTE $0x26; BYTE $0x01 -#define VPINSRQ_1_SI_X13_0 BYTE $0xC4; BYTE $0x63; BYTE $0x91; BYTE $0x22; BYTE $0x2E; BYTE $0x01 -#define VPINSRQ_1_SI_X14_0 BYTE $0xC4; BYTE $0x63; BYTE $0x89; BYTE $0x22; BYTE $0x36; BYTE $0x01 -#define VPINSRQ_1_SI_X15_0 BYTE $0xC4; BYTE $0x63; BYTE $0x81; BYTE $0x22; BYTE $0x3E; BYTE $0x01 - -#define VPINSRQ_1_SI_X11(n) BYTE $0xC4; BYTE $0x63; BYTE $0xA1; BYTE $0x22; BYTE $0x5E; BYTE $n; BYTE $0x01 -#define VPINSRQ_1_SI_X12(n) BYTE $0xC4; BYTE $0x63; BYTE $0x99; BYTE $0x22; BYTE $0x66; BYTE $n; BYTE $0x01 -#define VPINSRQ_1_SI_X13(n) BYTE $0xC4; BYTE $0x63; BYTE $0x91; BYTE $0x22; BYTE $0x6E; BYTE $n; BYTE $0x01 -#define VPINSRQ_1_SI_X14(n) BYTE $0xC4; BYTE $0x63; BYTE $0x89; BYTE $0x22; BYTE $0x76; BYTE $n; BYTE $0x01 -#define VPINSRQ_1_SI_X15(n) BYTE $0xC4; BYTE $0x63; BYTE $0x81; BYTE $0x22; BYTE $0x7E; BYTE $n; BYTE $0x01 - -#define VMOVQ_R8_X15 BYTE $0xC4; BYTE $0x41; BYTE $0xF9; BYTE $0x6E; BYTE $0xF8 -#define VPINSRQ_1_R9_X15 BYTE $0xC4; BYTE $0x43; BYTE $0x81; BYTE $0x22; BYTE $0xF9; BYTE $0x01 - -// load msg: Y12 = (i0, i1, i2, i3) -// i0, i1, i2, i3 must not be 0 -#define LOAD_MSG_AVX2_Y12(i0, i1, i2, i3) \ - VMOVQ_SI_X12(i0*8); \ - VMOVQ_SI_X11(i2*8); \ - VPINSRQ_1_SI_X12(i1*8); \ - VPINSRQ_1_SI_X11(i3*8); \ - VINSERTI128 $1, X11, Y12, Y12 - -// load msg: Y13 = (i0, i1, i2, i3) -// i0, i1, i2, i3 must not be 0 -#define LOAD_MSG_AVX2_Y13(i0, i1, i2, i3) \ - VMOVQ_SI_X13(i0*8); \ - VMOVQ_SI_X11(i2*8); \ - VPINSRQ_1_SI_X13(i1*8); \ - VPINSRQ_1_SI_X11(i3*8); \ - VINSERTI128 $1, X11, Y13, Y13 - -// load msg: Y14 = (i0, i1, i2, i3) -// i0, i1, i2, i3 must not be 0 -#define LOAD_MSG_AVX2_Y14(i0, i1, i2, i3) \ - VMOVQ_SI_X14(i0*8); \ - VMOVQ_SI_X11(i2*8); \ - VPINSRQ_1_SI_X14(i1*8); \ - VPINSRQ_1_SI_X11(i3*8); \ - VINSERTI128 $1, X11, Y14, Y14 - -// load msg: Y15 = (i0, i1, i2, i3) -// i0, i1, i2, i3 must not be 0 -#define LOAD_MSG_AVX2_Y15(i0, i1, i2, i3) \ - VMOVQ_SI_X15(i0*8); \ - VMOVQ_SI_X11(i2*8); \ - VPINSRQ_1_SI_X15(i1*8); \ - VPINSRQ_1_SI_X11(i3*8); \ - VINSERTI128 $1, X11, Y15, Y15 - -#define LOAD_MSG_AVX2_0_2_4_6_1_3_5_7_8_10_12_14_9_11_13_15() \ - VMOVQ_SI_X12_0; \ - VMOVQ_SI_X11(4*8); \ - VPINSRQ_1_SI_X12(2*8); \ - VPINSRQ_1_SI_X11(6*8); \ - VINSERTI128 $1, X11, Y12, Y12; \ - LOAD_MSG_AVX2_Y13(1, 3, 5, 7); \ - LOAD_MSG_AVX2_Y14(8, 10, 12, 14); \ - LOAD_MSG_AVX2_Y15(9, 11, 13, 15) - -#define LOAD_MSG_AVX2_14_4_9_13_10_8_15_6_1_0_11_5_12_2_7_3() \ - LOAD_MSG_AVX2_Y12(14, 4, 9, 13); \ - LOAD_MSG_AVX2_Y13(10, 8, 15, 6); \ - VMOVQ_SI_X11(11*8); \ - VPSHUFD $0x4E, 0*8(SI), X14; \ - VPINSRQ_1_SI_X11(5*8); \ - VINSERTI128 $1, X11, Y14, Y14; \ - LOAD_MSG_AVX2_Y15(12, 2, 7, 3) - -#define LOAD_MSG_AVX2_11_12_5_15_8_0_2_13_10_3_7_9_14_6_1_4() \ - VMOVQ_SI_X11(5*8); \ - VMOVDQU 11*8(SI), X12; \ - VPINSRQ_1_SI_X11(15*8); \ - VINSERTI128 $1, X11, Y12, Y12; \ - VMOVQ_SI_X13(8*8); \ - VMOVQ_SI_X11(2*8); \ - VPINSRQ_1_SI_X13_0; \ - VPINSRQ_1_SI_X11(13*8); \ - VINSERTI128 $1, X11, Y13, Y13; \ - LOAD_MSG_AVX2_Y14(10, 3, 7, 9); \ - LOAD_MSG_AVX2_Y15(14, 6, 1, 4) - -#define LOAD_MSG_AVX2_7_3_13_11_9_1_12_14_2_5_4_15_6_10_0_8() \ - LOAD_MSG_AVX2_Y12(7, 3, 13, 11); \ - LOAD_MSG_AVX2_Y13(9, 1, 12, 14); \ - LOAD_MSG_AVX2_Y14(2, 5, 4, 15); \ - VMOVQ_SI_X15(6*8); \ - VMOVQ_SI_X11_0; \ - VPINSRQ_1_SI_X15(10*8); \ - VPINSRQ_1_SI_X11(8*8); \ - VINSERTI128 $1, X11, Y15, Y15 - -#define LOAD_MSG_AVX2_9_5_2_10_0_7_4_15_14_11_6_3_1_12_8_13() \ - LOAD_MSG_AVX2_Y12(9, 5, 2, 10); \ - VMOVQ_SI_X13_0; \ - VMOVQ_SI_X11(4*8); \ - VPINSRQ_1_SI_X13(7*8); \ - VPINSRQ_1_SI_X11(15*8); \ - VINSERTI128 $1, X11, Y13, Y13; \ - LOAD_MSG_AVX2_Y14(14, 11, 6, 3); \ - LOAD_MSG_AVX2_Y15(1, 12, 8, 13) - -#define LOAD_MSG_AVX2_2_6_0_8_12_10_11_3_4_7_15_1_13_5_14_9() \ - VMOVQ_SI_X12(2*8); \ - VMOVQ_SI_X11_0; \ - VPINSRQ_1_SI_X12(6*8); \ - VPINSRQ_1_SI_X11(8*8); \ - VINSERTI128 $1, X11, Y12, Y12; \ - LOAD_MSG_AVX2_Y13(12, 10, 11, 3); \ - LOAD_MSG_AVX2_Y14(4, 7, 15, 1); \ - LOAD_MSG_AVX2_Y15(13, 5, 14, 9) - -#define LOAD_MSG_AVX2_12_1_14_4_5_15_13_10_0_6_9_8_7_3_2_11() \ - LOAD_MSG_AVX2_Y12(12, 1, 14, 4); \ - LOAD_MSG_AVX2_Y13(5, 15, 13, 10); \ - VMOVQ_SI_X14_0; \ - VPSHUFD $0x4E, 8*8(SI), X11; \ - VPINSRQ_1_SI_X14(6*8); \ - VINSERTI128 $1, X11, Y14, Y14; \ - LOAD_MSG_AVX2_Y15(7, 3, 2, 11) - -#define LOAD_MSG_AVX2_13_7_12_3_11_14_1_9_5_15_8_2_0_4_6_10() \ - LOAD_MSG_AVX2_Y12(13, 7, 12, 3); \ - LOAD_MSG_AVX2_Y13(11, 14, 1, 9); \ - LOAD_MSG_AVX2_Y14(5, 15, 8, 2); \ - VMOVQ_SI_X15_0; \ - VMOVQ_SI_X11(6*8); \ - VPINSRQ_1_SI_X15(4*8); \ - VPINSRQ_1_SI_X11(10*8); \ - VINSERTI128 $1, X11, Y15, Y15 - -#define LOAD_MSG_AVX2_6_14_11_0_15_9_3_8_12_13_1_10_2_7_4_5() \ - VMOVQ_SI_X12(6*8); \ - VMOVQ_SI_X11(11*8); \ - VPINSRQ_1_SI_X12(14*8); \ - VPINSRQ_1_SI_X11_0; \ - VINSERTI128 $1, X11, Y12, Y12; \ - LOAD_MSG_AVX2_Y13(15, 9, 3, 8); \ - VMOVQ_SI_X11(1*8); \ - VMOVDQU 12*8(SI), X14; \ - VPINSRQ_1_SI_X11(10*8); \ - VINSERTI128 $1, X11, Y14, Y14; \ - VMOVQ_SI_X15(2*8); \ - VMOVDQU 4*8(SI), X11; \ - VPINSRQ_1_SI_X15(7*8); \ - VINSERTI128 $1, X11, Y15, Y15 - -#define LOAD_MSG_AVX2_10_8_7_1_2_4_6_5_15_9_3_13_11_14_12_0() \ - LOAD_MSG_AVX2_Y12(10, 8, 7, 1); \ - VMOVQ_SI_X13(2*8); \ - VPSHUFD $0x4E, 5*8(SI), X11; \ - VPINSRQ_1_SI_X13(4*8); \ - VINSERTI128 $1, X11, Y13, Y13; \ - LOAD_MSG_AVX2_Y14(15, 9, 3, 13); \ - VMOVQ_SI_X15(11*8); \ - VMOVQ_SI_X11(12*8); \ - VPINSRQ_1_SI_X15(14*8); \ - VPINSRQ_1_SI_X11_0; \ - VINSERTI128 $1, X11, Y15, Y15 - // func hashBlocksAVX2(h *[8]uint64, c *[2]uint64, flag uint64, blocks []byte) -TEXT ·hashBlocksAVX2(SB), 4, $320-48 // frame size = 288 + 32 byte alignment - MOVQ h+0(FP), AX - MOVQ c+8(FP), BX - MOVQ flag+16(FP), CX - MOVQ blocks_base+24(FP), SI - MOVQ blocks_len+32(FP), DI - - MOVQ SP, DX - ADDQ $31, DX - ANDQ $~31, DX - - MOVQ CX, 16(DX) - XORQ CX, CX - MOVQ CX, 24(DX) - - VMOVDQU ·AVX2_c40<>(SB), Y4 - VMOVDQU ·AVX2_c48<>(SB), Y5 - - VMOVDQU 0(AX), Y8 +// Requires: AVX, AVX2 +TEXT ·hashBlocksAVX2(SB), NOSPLIT, $320-48 + MOVQ h+0(FP), AX + MOVQ c+8(FP), BX + MOVQ flag+16(FP), CX + MOVQ blocks_base+24(FP), SI + MOVQ blocks_len+32(FP), DI + MOVQ SP, DX + ADDQ $+31, DX + ANDQ $-32, DX + MOVQ CX, 16(DX) + XORQ CX, CX + MOVQ CX, 24(DX) + VMOVDQU ·AVX2_c40<>+0(SB), Y4 + VMOVDQU ·AVX2_c48<>+0(SB), Y5 + VMOVDQU (AX), Y8 VMOVDQU 32(AX), Y9 - VMOVDQU ·AVX2_iv0<>(SB), Y6 - VMOVDQU ·AVX2_iv1<>(SB), Y7 - - MOVQ 0(BX), R8 - MOVQ 8(BX), R9 - MOVQ R9, 8(DX) + VMOVDQU ·AVX2_iv0<>+0(SB), Y6 + VMOVDQU ·AVX2_iv1<>+0(SB), Y7 + MOVQ (BX), R8 + MOVQ 8(BX), R9 + MOVQ R9, 8(DX) loop: - ADDQ $128, R8 - MOVQ R8, 0(DX) - CMPQ R8, $128 + ADDQ $0x80, R8 + MOVQ R8, (DX) + CMPQ R8, $0x80 JGE noinc INCQ R9 MOVQ R9, 8(DX) noinc: - VMOVDQA Y8, Y0 - VMOVDQA Y9, Y1 - VMOVDQA Y6, Y2 - VPXOR 0(DX), Y7, Y3 - - LOAD_MSG_AVX2_0_2_4_6_1_3_5_7_8_10_12_14_9_11_13_15() - VMOVDQA Y12, 32(DX) - VMOVDQA Y13, 64(DX) - VMOVDQA Y14, 96(DX) - VMOVDQA Y15, 128(DX) - ROUND_AVX2(Y12, Y13, Y14, Y15, Y10, Y4, Y5) - LOAD_MSG_AVX2_14_4_9_13_10_8_15_6_1_0_11_5_12_2_7_3() - VMOVDQA Y12, 160(DX) - VMOVDQA Y13, 192(DX) - VMOVDQA Y14, 224(DX) - VMOVDQA Y15, 256(DX) - - ROUND_AVX2(Y12, Y13, Y14, Y15, Y10, Y4, Y5) - LOAD_MSG_AVX2_11_12_5_15_8_0_2_13_10_3_7_9_14_6_1_4() - ROUND_AVX2(Y12, Y13, Y14, Y15, Y10, Y4, Y5) - LOAD_MSG_AVX2_7_3_13_11_9_1_12_14_2_5_4_15_6_10_0_8() - ROUND_AVX2(Y12, Y13, Y14, Y15, Y10, Y4, Y5) - LOAD_MSG_AVX2_9_5_2_10_0_7_4_15_14_11_6_3_1_12_8_13() - ROUND_AVX2(Y12, Y13, Y14, Y15, Y10, Y4, Y5) - LOAD_MSG_AVX2_2_6_0_8_12_10_11_3_4_7_15_1_13_5_14_9() - ROUND_AVX2(Y12, Y13, Y14, Y15, Y10, Y4, Y5) - LOAD_MSG_AVX2_12_1_14_4_5_15_13_10_0_6_9_8_7_3_2_11() - ROUND_AVX2(Y12, Y13, Y14, Y15, Y10, Y4, Y5) - LOAD_MSG_AVX2_13_7_12_3_11_14_1_9_5_15_8_2_0_4_6_10() - ROUND_AVX2(Y12, Y13, Y14, Y15, Y10, Y4, Y5) - LOAD_MSG_AVX2_6_14_11_0_15_9_3_8_12_13_1_10_2_7_4_5() - ROUND_AVX2(Y12, Y13, Y14, Y15, Y10, Y4, Y5) - LOAD_MSG_AVX2_10_8_7_1_2_4_6_5_15_9_3_13_11_14_12_0() - ROUND_AVX2(Y12, Y13, Y14, Y15, Y10, Y4, Y5) - - ROUND_AVX2(32(DX), 64(DX), 96(DX), 128(DX), Y10, Y4, Y5) - ROUND_AVX2(160(DX), 192(DX), 224(DX), 256(DX), Y10, Y4, Y5) - - VPXOR Y0, Y8, Y8 - VPXOR Y1, Y9, Y9 - VPXOR Y2, Y8, Y8 - VPXOR Y3, Y9, Y9 - - LEAQ 128(SI), SI - SUBQ $128, DI - JNE loop - - MOVQ R8, 0(BX) - MOVQ R9, 8(BX) - - VMOVDQU Y8, 0(AX) - VMOVDQU Y9, 32(AX) + VMOVDQA Y8, Y0 + VMOVDQA Y9, Y1 + VMOVDQA Y6, Y2 + VPXOR (DX), Y7, Y3 + BYTE $0xc5 + BYTE $0x7a + BYTE $0x7e + BYTE $0x26 + BYTE $0xc5 + BYTE $0x7a + BYTE $0x7e + BYTE $0x5e + BYTE $0x20 + BYTE $0xc4 + BYTE $0x63 + BYTE $0x99 + BYTE $0x22 + BYTE $0x66 + BYTE $0x10 + BYTE $0x01 + BYTE $0xc4 + BYTE $0x63 + BYTE $0xa1 + BYTE $0x22 + BYTE $0x5e + BYTE $0x30 + BYTE $0x01 + VINSERTI128 $0x01, X11, Y12, Y12 + BYTE $0xc5 + BYTE $0x7a + BYTE $0x7e + BYTE $0x6e + BYTE $0x08 + BYTE $0xc5 + BYTE $0x7a + BYTE $0x7e + BYTE $0x5e + BYTE $0x28 + BYTE $0xc4 + BYTE $0x63 + BYTE $0x91 + BYTE $0x22 + BYTE $0x6e + BYTE $0x18 + BYTE $0x01 + BYTE $0xc4 + BYTE $0x63 + BYTE $0xa1 + BYTE $0x22 + BYTE $0x5e + BYTE $0x38 + BYTE $0x01 + VINSERTI128 $0x01, X11, Y13, Y13 + BYTE $0xc5 + BYTE $0x7a + BYTE $0x7e + BYTE $0x76 + BYTE $0x40 + BYTE $0xc5 + BYTE $0x7a + BYTE $0x7e + BYTE $0x5e + BYTE $0x60 + BYTE $0xc4 + BYTE $0x63 + BYTE $0x89 + BYTE $0x22 + BYTE $0x76 + BYTE $0x50 + BYTE $0x01 + BYTE $0xc4 + BYTE $0x63 + BYTE $0xa1 + BYTE $0x22 + BYTE $0x5e + BYTE $0x70 + BYTE $0x01 + VINSERTI128 $0x01, X11, Y14, Y14 + BYTE $0xc5 + BYTE $0x7a + BYTE $0x7e + BYTE $0x7e + BYTE $0x48 + BYTE $0xc5 + BYTE $0x7a + BYTE $0x7e + BYTE $0x5e + BYTE $0x68 + BYTE $0xc4 + BYTE $0x63 + BYTE $0x81 + BYTE $0x22 + BYTE $0x7e + BYTE $0x58 + BYTE $0x01 + BYTE $0xc4 + BYTE $0x63 + BYTE $0xa1 + BYTE $0x22 + BYTE $0x5e + BYTE $0x78 + BYTE $0x01 + VINSERTI128 $0x01, X11, Y15, Y15 + VMOVDQA Y12, 32(DX) + VMOVDQA Y13, 64(DX) + VMOVDQA Y14, 96(DX) + VMOVDQA Y15, 128(DX) + VPADDQ Y12, Y0, Y0 + VPADDQ Y1, Y0, Y0 + VPXOR Y0, Y3, Y3 + VPSHUFD $-79, Y3, Y3 + VPADDQ Y3, Y2, Y2 + VPXOR Y2, Y1, Y1 + VPSHUFB Y4, Y1, Y1 + VPADDQ Y13, Y0, Y0 + VPADDQ Y1, Y0, Y0 + VPXOR Y0, Y3, Y3 + VPSHUFB Y5, Y3, Y3 + VPADDQ Y3, Y2, Y2 + VPXOR Y2, Y1, Y1 + VPADDQ Y1, Y1, Y10 + VPSRLQ $0x3f, Y1, Y1 + VPXOR Y10, Y1, Y1 + BYTE $0xc4 + BYTE $0xe3 + BYTE $0xfd + BYTE $0x00 + BYTE $0xc9 + BYTE $0x39 + BYTE $0xc4 + BYTE $0xe3 + BYTE $0xfd + BYTE $0x00 + BYTE $0xd2 + BYTE $0x4e + BYTE $0xc4 + BYTE $0xe3 + BYTE $0xfd + BYTE $0x00 + BYTE $0xdb + BYTE $0x93 + VPADDQ Y14, Y0, Y0 + VPADDQ Y1, Y0, Y0 + VPXOR Y0, Y3, Y3 + VPSHUFD $-79, Y3, Y3 + VPADDQ Y3, Y2, Y2 + VPXOR Y2, Y1, Y1 + VPSHUFB Y4, Y1, Y1 + VPADDQ Y15, Y0, Y0 + VPADDQ Y1, Y0, Y0 + VPXOR Y0, Y3, Y3 + VPSHUFB Y5, Y3, Y3 + VPADDQ Y3, Y2, Y2 + VPXOR Y2, Y1, Y1 + VPADDQ Y1, Y1, Y10 + VPSRLQ $0x3f, Y1, Y1 + VPXOR Y10, Y1, Y1 + BYTE $0xc4 + BYTE $0xe3 + BYTE $0xfd + BYTE $0x00 + BYTE $0xdb + BYTE $0x39 + BYTE $0xc4 + BYTE $0xe3 + BYTE $0xfd + BYTE $0x00 + BYTE $0xd2 + BYTE $0x4e + BYTE $0xc4 + BYTE $0xe3 + BYTE $0xfd + BYTE $0x00 + BYTE $0xc9 + BYTE $0x93 + BYTE $0xc5 + BYTE $0x7a + BYTE $0x7e + BYTE $0x66 + BYTE $0x70 + BYTE $0xc5 + BYTE $0x7a + BYTE $0x7e + BYTE $0x5e + BYTE $0x48 + BYTE $0xc4 + BYTE $0x63 + BYTE $0x99 + BYTE $0x22 + BYTE $0x66 + BYTE $0x20 + BYTE $0x01 + BYTE $0xc4 + BYTE $0x63 + BYTE $0xa1 + BYTE $0x22 + BYTE $0x5e + BYTE $0x68 + BYTE $0x01 + VINSERTI128 $0x01, X11, Y12, Y12 + BYTE $0xc5 + BYTE $0x7a + BYTE $0x7e + BYTE $0x6e + BYTE $0x50 + BYTE $0xc5 + BYTE $0x7a + BYTE $0x7e + BYTE $0x5e + BYTE $0x78 + BYTE $0xc4 + BYTE $0x63 + BYTE $0x91 + BYTE $0x22 + BYTE $0x6e + BYTE $0x40 + BYTE $0x01 + BYTE $0xc4 + BYTE $0x63 + BYTE $0xa1 + BYTE $0x22 + BYTE $0x5e + BYTE $0x30 + BYTE $0x01 + VINSERTI128 $0x01, X11, Y13, Y13 + BYTE $0xc5 + BYTE $0x7a + BYTE $0x7e + BYTE $0x5e + BYTE $0x58 + VPSHUFD $0x4e, (SI), X14 + BYTE $0xc4 + BYTE $0x63 + BYTE $0xa1 + BYTE $0x22 + BYTE $0x5e + BYTE $0x28 + BYTE $0x01 + VINSERTI128 $0x01, X11, Y14, Y14 + BYTE $0xc5 + BYTE $0x7a + BYTE $0x7e + BYTE $0x7e + BYTE $0x60 + BYTE $0xc5 + BYTE $0x7a + BYTE $0x7e + BYTE $0x5e + BYTE $0x38 + BYTE $0xc4 + BYTE $0x63 + BYTE $0x81 + BYTE $0x22 + BYTE $0x7e + BYTE $0x10 + BYTE $0x01 + BYTE $0xc4 + BYTE $0x63 + BYTE $0xa1 + BYTE $0x22 + BYTE $0x5e + BYTE $0x18 + BYTE $0x01 + VINSERTI128 $0x01, X11, Y15, Y15 + VMOVDQA Y12, 160(DX) + VMOVDQA Y13, 192(DX) + VMOVDQA Y14, 224(DX) + VMOVDQA Y15, 256(DX) + VPADDQ Y12, Y0, Y0 + VPADDQ Y1, Y0, Y0 + VPXOR Y0, Y3, Y3 + VPSHUFD $-79, Y3, Y3 + VPADDQ Y3, Y2, Y2 + VPXOR Y2, Y1, Y1 + VPSHUFB Y4, Y1, Y1 + VPADDQ Y13, Y0, Y0 + VPADDQ Y1, Y0, Y0 + VPXOR Y0, Y3, Y3 + VPSHUFB Y5, Y3, Y3 + VPADDQ Y3, Y2, Y2 + VPXOR Y2, Y1, Y1 + VPADDQ Y1, Y1, Y10 + VPSRLQ $0x3f, Y1, Y1 + VPXOR Y10, Y1, Y1 + BYTE $0xc4 + BYTE $0xe3 + BYTE $0xfd + BYTE $0x00 + BYTE $0xc9 + BYTE $0x39 + BYTE $0xc4 + BYTE $0xe3 + BYTE $0xfd + BYTE $0x00 + BYTE $0xd2 + BYTE $0x4e + BYTE $0xc4 + BYTE $0xe3 + BYTE $0xfd + BYTE $0x00 + BYTE $0xdb + BYTE $0x93 + VPADDQ Y14, Y0, Y0 + VPADDQ Y1, Y0, Y0 + VPXOR Y0, Y3, Y3 + VPSHUFD $-79, Y3, Y3 + VPADDQ Y3, Y2, Y2 + VPXOR Y2, Y1, Y1 + VPSHUFB Y4, Y1, Y1 + VPADDQ Y15, Y0, Y0 + VPADDQ Y1, Y0, Y0 + VPXOR Y0, Y3, Y3 + VPSHUFB Y5, Y3, Y3 + VPADDQ Y3, Y2, Y2 + VPXOR Y2, Y1, Y1 + VPADDQ Y1, Y1, Y10 + VPSRLQ $0x3f, Y1, Y1 + VPXOR Y10, Y1, Y1 + BYTE $0xc4 + BYTE $0xe3 + BYTE $0xfd + BYTE $0x00 + BYTE $0xdb + BYTE $0x39 + BYTE $0xc4 + BYTE $0xe3 + BYTE $0xfd + BYTE $0x00 + BYTE $0xd2 + BYTE $0x4e + BYTE $0xc4 + BYTE $0xe3 + BYTE $0xfd + BYTE $0x00 + BYTE $0xc9 + BYTE $0x93 + BYTE $0xc5 + BYTE $0x7a + BYTE $0x7e + BYTE $0x5e + BYTE $0x28 + VMOVDQU 88(SI), X12 + BYTE $0xc4 + BYTE $0x63 + BYTE $0xa1 + BYTE $0x22 + BYTE $0x5e + BYTE $0x78 + BYTE $0x01 + VINSERTI128 $0x01, X11, Y12, Y12 + BYTE $0xc5 + BYTE $0x7a + BYTE $0x7e + BYTE $0x6e + BYTE $0x40 + BYTE $0xc5 + BYTE $0x7a + BYTE $0x7e + BYTE $0x5e + BYTE $0x10 + BYTE $0xc4 + BYTE $0x63 + BYTE $0x91 + BYTE $0x22 + BYTE $0x2e + BYTE $0x01 + BYTE $0xc4 + BYTE $0x63 + BYTE $0xa1 + BYTE $0x22 + BYTE $0x5e + BYTE $0x68 + BYTE $0x01 + VINSERTI128 $0x01, X11, Y13, Y13 + BYTE $0xc5 + BYTE $0x7a + BYTE $0x7e + BYTE $0x76 + BYTE $0x50 + BYTE $0xc5 + BYTE $0x7a + BYTE $0x7e + BYTE $0x5e + BYTE $0x38 + BYTE $0xc4 + BYTE $0x63 + BYTE $0x89 + BYTE $0x22 + BYTE $0x76 + BYTE $0x18 + BYTE $0x01 + BYTE $0xc4 + BYTE $0x63 + BYTE $0xa1 + BYTE $0x22 + BYTE $0x5e + BYTE $0x48 + BYTE $0x01 + VINSERTI128 $0x01, X11, Y14, Y14 + BYTE $0xc5 + BYTE $0x7a + BYTE $0x7e + BYTE $0x7e + BYTE $0x70 + BYTE $0xc5 + BYTE $0x7a + BYTE $0x7e + BYTE $0x5e + BYTE $0x08 + BYTE $0xc4 + BYTE $0x63 + BYTE $0x81 + BYTE $0x22 + BYTE $0x7e + BYTE $0x30 + BYTE $0x01 + BYTE $0xc4 + BYTE $0x63 + BYTE $0xa1 + BYTE $0x22 + BYTE $0x5e + BYTE $0x20 + BYTE $0x01 + VINSERTI128 $0x01, X11, Y15, Y15 + VPADDQ Y12, Y0, Y0 + VPADDQ Y1, Y0, Y0 + VPXOR Y0, Y3, Y3 + VPSHUFD $-79, Y3, Y3 + VPADDQ Y3, Y2, Y2 + VPXOR Y2, Y1, Y1 + VPSHUFB Y4, Y1, Y1 + VPADDQ Y13, Y0, Y0 + VPADDQ Y1, Y0, Y0 + VPXOR Y0, Y3, Y3 + VPSHUFB Y5, Y3, Y3 + VPADDQ Y3, Y2, Y2 + VPXOR Y2, Y1, Y1 + VPADDQ Y1, Y1, Y10 + VPSRLQ $0x3f, Y1, Y1 + VPXOR Y10, Y1, Y1 + BYTE $0xc4 + BYTE $0xe3 + BYTE $0xfd + BYTE $0x00 + BYTE $0xc9 + BYTE $0x39 + BYTE $0xc4 + BYTE $0xe3 + BYTE $0xfd + BYTE $0x00 + BYTE $0xd2 + BYTE $0x4e + BYTE $0xc4 + BYTE $0xe3 + BYTE $0xfd + BYTE $0x00 + BYTE $0xdb + BYTE $0x93 + VPADDQ Y14, Y0, Y0 + VPADDQ Y1, Y0, Y0 + VPXOR Y0, Y3, Y3 + VPSHUFD $-79, Y3, Y3 + VPADDQ Y3, Y2, Y2 + VPXOR Y2, Y1, Y1 + VPSHUFB Y4, Y1, Y1 + VPADDQ Y15, Y0, Y0 + VPADDQ Y1, Y0, Y0 + VPXOR Y0, Y3, Y3 + VPSHUFB Y5, Y3, Y3 + VPADDQ Y3, Y2, Y2 + VPXOR Y2, Y1, Y1 + VPADDQ Y1, Y1, Y10 + VPSRLQ $0x3f, Y1, Y1 + VPXOR Y10, Y1, Y1 + BYTE $0xc4 + BYTE $0xe3 + BYTE $0xfd + BYTE $0x00 + BYTE $0xdb + BYTE $0x39 + BYTE $0xc4 + BYTE $0xe3 + BYTE $0xfd + BYTE $0x00 + BYTE $0xd2 + BYTE $0x4e + BYTE $0xc4 + BYTE $0xe3 + BYTE $0xfd + BYTE $0x00 + BYTE $0xc9 + BYTE $0x93 + BYTE $0xc5 + BYTE $0x7a + BYTE $0x7e + BYTE $0x66 + BYTE $0x38 + BYTE $0xc5 + BYTE $0x7a + BYTE $0x7e + BYTE $0x5e + BYTE $0x68 + BYTE $0xc4 + BYTE $0x63 + BYTE $0x99 + BYTE $0x22 + BYTE $0x66 + BYTE $0x18 + BYTE $0x01 + BYTE $0xc4 + BYTE $0x63 + BYTE $0xa1 + BYTE $0x22 + BYTE $0x5e + BYTE $0x58 + BYTE $0x01 + VINSERTI128 $0x01, X11, Y12, Y12 + BYTE $0xc5 + BYTE $0x7a + BYTE $0x7e + BYTE $0x6e + BYTE $0x48 + BYTE $0xc5 + BYTE $0x7a + BYTE $0x7e + BYTE $0x5e + BYTE $0x60 + BYTE $0xc4 + BYTE $0x63 + BYTE $0x91 + BYTE $0x22 + BYTE $0x6e + BYTE $0x08 + BYTE $0x01 + BYTE $0xc4 + BYTE $0x63 + BYTE $0xa1 + BYTE $0x22 + BYTE $0x5e + BYTE $0x70 + BYTE $0x01 + VINSERTI128 $0x01, X11, Y13, Y13 + BYTE $0xc5 + BYTE $0x7a + BYTE $0x7e + BYTE $0x76 + BYTE $0x10 + BYTE $0xc5 + BYTE $0x7a + BYTE $0x7e + BYTE $0x5e + BYTE $0x20 + BYTE $0xc4 + BYTE $0x63 + BYTE $0x89 + BYTE $0x22 + BYTE $0x76 + BYTE $0x28 + BYTE $0x01 + BYTE $0xc4 + BYTE $0x63 + BYTE $0xa1 + BYTE $0x22 + BYTE $0x5e + BYTE $0x78 + BYTE $0x01 + VINSERTI128 $0x01, X11, Y14, Y14 + BYTE $0xc5 + BYTE $0x7a + BYTE $0x7e + BYTE $0x7e + BYTE $0x30 + BYTE $0xc5 + BYTE $0x7a + BYTE $0x7e + BYTE $0x1e + BYTE $0xc4 + BYTE $0x63 + BYTE $0x81 + BYTE $0x22 + BYTE $0x7e + BYTE $0x50 + BYTE $0x01 + BYTE $0xc4 + BYTE $0x63 + BYTE $0xa1 + BYTE $0x22 + BYTE $0x5e + BYTE $0x40 + BYTE $0x01 + VINSERTI128 $0x01, X11, Y15, Y15 + VPADDQ Y12, Y0, Y0 + VPADDQ Y1, Y0, Y0 + VPXOR Y0, Y3, Y3 + VPSHUFD $-79, Y3, Y3 + VPADDQ Y3, Y2, Y2 + VPXOR Y2, Y1, Y1 + VPSHUFB Y4, Y1, Y1 + VPADDQ Y13, Y0, Y0 + VPADDQ Y1, Y0, Y0 + VPXOR Y0, Y3, Y3 + VPSHUFB Y5, Y3, Y3 + VPADDQ Y3, Y2, Y2 + VPXOR Y2, Y1, Y1 + VPADDQ Y1, Y1, Y10 + VPSRLQ $0x3f, Y1, Y1 + VPXOR Y10, Y1, Y1 + BYTE $0xc4 + BYTE $0xe3 + BYTE $0xfd + BYTE $0x00 + BYTE $0xc9 + BYTE $0x39 + BYTE $0xc4 + BYTE $0xe3 + BYTE $0xfd + BYTE $0x00 + BYTE $0xd2 + BYTE $0x4e + BYTE $0xc4 + BYTE $0xe3 + BYTE $0xfd + BYTE $0x00 + BYTE $0xdb + BYTE $0x93 + VPADDQ Y14, Y0, Y0 + VPADDQ Y1, Y0, Y0 + VPXOR Y0, Y3, Y3 + VPSHUFD $-79, Y3, Y3 + VPADDQ Y3, Y2, Y2 + VPXOR Y2, Y1, Y1 + VPSHUFB Y4, Y1, Y1 + VPADDQ Y15, Y0, Y0 + VPADDQ Y1, Y0, Y0 + VPXOR Y0, Y3, Y3 + VPSHUFB Y5, Y3, Y3 + VPADDQ Y3, Y2, Y2 + VPXOR Y2, Y1, Y1 + VPADDQ Y1, Y1, Y10 + VPSRLQ $0x3f, Y1, Y1 + VPXOR Y10, Y1, Y1 + BYTE $0xc4 + BYTE $0xe3 + BYTE $0xfd + BYTE $0x00 + BYTE $0xdb + BYTE $0x39 + BYTE $0xc4 + BYTE $0xe3 + BYTE $0xfd + BYTE $0x00 + BYTE $0xd2 + BYTE $0x4e + BYTE $0xc4 + BYTE $0xe3 + BYTE $0xfd + BYTE $0x00 + BYTE $0xc9 + BYTE $0x93 + BYTE $0xc5 + BYTE $0x7a + BYTE $0x7e + BYTE $0x66 + BYTE $0x48 + BYTE $0xc5 + BYTE $0x7a + BYTE $0x7e + BYTE $0x5e + BYTE $0x10 + BYTE $0xc4 + BYTE $0x63 + BYTE $0x99 + BYTE $0x22 + BYTE $0x66 + BYTE $0x28 + BYTE $0x01 + BYTE $0xc4 + BYTE $0x63 + BYTE $0xa1 + BYTE $0x22 + BYTE $0x5e + BYTE $0x50 + BYTE $0x01 + VINSERTI128 $0x01, X11, Y12, Y12 + BYTE $0xc5 + BYTE $0x7a + BYTE $0x7e + BYTE $0x2e + BYTE $0xc5 + BYTE $0x7a + BYTE $0x7e + BYTE $0x5e + BYTE $0x20 + BYTE $0xc4 + BYTE $0x63 + BYTE $0x91 + BYTE $0x22 + BYTE $0x6e + BYTE $0x38 + BYTE $0x01 + BYTE $0xc4 + BYTE $0x63 + BYTE $0xa1 + BYTE $0x22 + BYTE $0x5e + BYTE $0x78 + BYTE $0x01 + VINSERTI128 $0x01, X11, Y13, Y13 + BYTE $0xc5 + BYTE $0x7a + BYTE $0x7e + BYTE $0x76 + BYTE $0x70 + BYTE $0xc5 + BYTE $0x7a + BYTE $0x7e + BYTE $0x5e + BYTE $0x30 + BYTE $0xc4 + BYTE $0x63 + BYTE $0x89 + BYTE $0x22 + BYTE $0x76 + BYTE $0x58 + BYTE $0x01 + BYTE $0xc4 + BYTE $0x63 + BYTE $0xa1 + BYTE $0x22 + BYTE $0x5e + BYTE $0x18 + BYTE $0x01 + VINSERTI128 $0x01, X11, Y14, Y14 + BYTE $0xc5 + BYTE $0x7a + BYTE $0x7e + BYTE $0x7e + BYTE $0x08 + BYTE $0xc5 + BYTE $0x7a + BYTE $0x7e + BYTE $0x5e + BYTE $0x40 + BYTE $0xc4 + BYTE $0x63 + BYTE $0x81 + BYTE $0x22 + BYTE $0x7e + BYTE $0x60 + BYTE $0x01 + BYTE $0xc4 + BYTE $0x63 + BYTE $0xa1 + BYTE $0x22 + BYTE $0x5e + BYTE $0x68 + BYTE $0x01 + VINSERTI128 $0x01, X11, Y15, Y15 + VPADDQ Y12, Y0, Y0 + VPADDQ Y1, Y0, Y0 + VPXOR Y0, Y3, Y3 + VPSHUFD $-79, Y3, Y3 + VPADDQ Y3, Y2, Y2 + VPXOR Y2, Y1, Y1 + VPSHUFB Y4, Y1, Y1 + VPADDQ Y13, Y0, Y0 + VPADDQ Y1, Y0, Y0 + VPXOR Y0, Y3, Y3 + VPSHUFB Y5, Y3, Y3 + VPADDQ Y3, Y2, Y2 + VPXOR Y2, Y1, Y1 + VPADDQ Y1, Y1, Y10 + VPSRLQ $0x3f, Y1, Y1 + VPXOR Y10, Y1, Y1 + BYTE $0xc4 + BYTE $0xe3 + BYTE $0xfd + BYTE $0x00 + BYTE $0xc9 + BYTE $0x39 + BYTE $0xc4 + BYTE $0xe3 + BYTE $0xfd + BYTE $0x00 + BYTE $0xd2 + BYTE $0x4e + BYTE $0xc4 + BYTE $0xe3 + BYTE $0xfd + BYTE $0x00 + BYTE $0xdb + BYTE $0x93 + VPADDQ Y14, Y0, Y0 + VPADDQ Y1, Y0, Y0 + VPXOR Y0, Y3, Y3 + VPSHUFD $-79, Y3, Y3 + VPADDQ Y3, Y2, Y2 + VPXOR Y2, Y1, Y1 + VPSHUFB Y4, Y1, Y1 + VPADDQ Y15, Y0, Y0 + VPADDQ Y1, Y0, Y0 + VPXOR Y0, Y3, Y3 + VPSHUFB Y5, Y3, Y3 + VPADDQ Y3, Y2, Y2 + VPXOR Y2, Y1, Y1 + VPADDQ Y1, Y1, Y10 + VPSRLQ $0x3f, Y1, Y1 + VPXOR Y10, Y1, Y1 + BYTE $0xc4 + BYTE $0xe3 + BYTE $0xfd + BYTE $0x00 + BYTE $0xdb + BYTE $0x39 + BYTE $0xc4 + BYTE $0xe3 + BYTE $0xfd + BYTE $0x00 + BYTE $0xd2 + BYTE $0x4e + BYTE $0xc4 + BYTE $0xe3 + BYTE $0xfd + BYTE $0x00 + BYTE $0xc9 + BYTE $0x93 + BYTE $0xc5 + BYTE $0x7a + BYTE $0x7e + BYTE $0x66 + BYTE $0x10 + BYTE $0xc5 + BYTE $0x7a + BYTE $0x7e + BYTE $0x1e + BYTE $0xc4 + BYTE $0x63 + BYTE $0x99 + BYTE $0x22 + BYTE $0x66 + BYTE $0x30 + BYTE $0x01 + BYTE $0xc4 + BYTE $0x63 + BYTE $0xa1 + BYTE $0x22 + BYTE $0x5e + BYTE $0x40 + BYTE $0x01 + VINSERTI128 $0x01, X11, Y12, Y12 + BYTE $0xc5 + BYTE $0x7a + BYTE $0x7e + BYTE $0x6e + BYTE $0x60 + BYTE $0xc5 + BYTE $0x7a + BYTE $0x7e + BYTE $0x5e + BYTE $0x58 + BYTE $0xc4 + BYTE $0x63 + BYTE $0x91 + BYTE $0x22 + BYTE $0x6e + BYTE $0x50 + BYTE $0x01 + BYTE $0xc4 + BYTE $0x63 + BYTE $0xa1 + BYTE $0x22 + BYTE $0x5e + BYTE $0x18 + BYTE $0x01 + VINSERTI128 $0x01, X11, Y13, Y13 + BYTE $0xc5 + BYTE $0x7a + BYTE $0x7e + BYTE $0x76 + BYTE $0x20 + BYTE $0xc5 + BYTE $0x7a + BYTE $0x7e + BYTE $0x5e + BYTE $0x78 + BYTE $0xc4 + BYTE $0x63 + BYTE $0x89 + BYTE $0x22 + BYTE $0x76 + BYTE $0x38 + BYTE $0x01 + BYTE $0xc4 + BYTE $0x63 + BYTE $0xa1 + BYTE $0x22 + BYTE $0x5e + BYTE $0x08 + BYTE $0x01 + VINSERTI128 $0x01, X11, Y14, Y14 + BYTE $0xc5 + BYTE $0x7a + BYTE $0x7e + BYTE $0x7e + BYTE $0x68 + BYTE $0xc5 + BYTE $0x7a + BYTE $0x7e + BYTE $0x5e + BYTE $0x70 + BYTE $0xc4 + BYTE $0x63 + BYTE $0x81 + BYTE $0x22 + BYTE $0x7e + BYTE $0x28 + BYTE $0x01 + BYTE $0xc4 + BYTE $0x63 + BYTE $0xa1 + BYTE $0x22 + BYTE $0x5e + BYTE $0x48 + BYTE $0x01 + VINSERTI128 $0x01, X11, Y15, Y15 + VPADDQ Y12, Y0, Y0 + VPADDQ Y1, Y0, Y0 + VPXOR Y0, Y3, Y3 + VPSHUFD $-79, Y3, Y3 + VPADDQ Y3, Y2, Y2 + VPXOR Y2, Y1, Y1 + VPSHUFB Y4, Y1, Y1 + VPADDQ Y13, Y0, Y0 + VPADDQ Y1, Y0, Y0 + VPXOR Y0, Y3, Y3 + VPSHUFB Y5, Y3, Y3 + VPADDQ Y3, Y2, Y2 + VPXOR Y2, Y1, Y1 + VPADDQ Y1, Y1, Y10 + VPSRLQ $0x3f, Y1, Y1 + VPXOR Y10, Y1, Y1 + BYTE $0xc4 + BYTE $0xe3 + BYTE $0xfd + BYTE $0x00 + BYTE $0xc9 + BYTE $0x39 + BYTE $0xc4 + BYTE $0xe3 + BYTE $0xfd + BYTE $0x00 + BYTE $0xd2 + BYTE $0x4e + BYTE $0xc4 + BYTE $0xe3 + BYTE $0xfd + BYTE $0x00 + BYTE $0xdb + BYTE $0x93 + VPADDQ Y14, Y0, Y0 + VPADDQ Y1, Y0, Y0 + VPXOR Y0, Y3, Y3 + VPSHUFD $-79, Y3, Y3 + VPADDQ Y3, Y2, Y2 + VPXOR Y2, Y1, Y1 + VPSHUFB Y4, Y1, Y1 + VPADDQ Y15, Y0, Y0 + VPADDQ Y1, Y0, Y0 + VPXOR Y0, Y3, Y3 + VPSHUFB Y5, Y3, Y3 + VPADDQ Y3, Y2, Y2 + VPXOR Y2, Y1, Y1 + VPADDQ Y1, Y1, Y10 + VPSRLQ $0x3f, Y1, Y1 + VPXOR Y10, Y1, Y1 + BYTE $0xc4 + BYTE $0xe3 + BYTE $0xfd + BYTE $0x00 + BYTE $0xdb + BYTE $0x39 + BYTE $0xc4 + BYTE $0xe3 + BYTE $0xfd + BYTE $0x00 + BYTE $0xd2 + BYTE $0x4e + BYTE $0xc4 + BYTE $0xe3 + BYTE $0xfd + BYTE $0x00 + BYTE $0xc9 + BYTE $0x93 + BYTE $0xc5 + BYTE $0x7a + BYTE $0x7e + BYTE $0x66 + BYTE $0x60 + BYTE $0xc5 + BYTE $0x7a + BYTE $0x7e + BYTE $0x5e + BYTE $0x70 + BYTE $0xc4 + BYTE $0x63 + BYTE $0x99 + BYTE $0x22 + BYTE $0x66 + BYTE $0x08 + BYTE $0x01 + BYTE $0xc4 + BYTE $0x63 + BYTE $0xa1 + BYTE $0x22 + BYTE $0x5e + BYTE $0x20 + BYTE $0x01 + VINSERTI128 $0x01, X11, Y12, Y12 + BYTE $0xc5 + BYTE $0x7a + BYTE $0x7e + BYTE $0x6e + BYTE $0x28 + BYTE $0xc5 + BYTE $0x7a + BYTE $0x7e + BYTE $0x5e + BYTE $0x68 + BYTE $0xc4 + BYTE $0x63 + BYTE $0x91 + BYTE $0x22 + BYTE $0x6e + BYTE $0x78 + BYTE $0x01 + BYTE $0xc4 + BYTE $0x63 + BYTE $0xa1 + BYTE $0x22 + BYTE $0x5e + BYTE $0x50 + BYTE $0x01 + VINSERTI128 $0x01, X11, Y13, Y13 + BYTE $0xc5 + BYTE $0x7a + BYTE $0x7e + BYTE $0x36 + VPSHUFD $0x4e, 64(SI), X11 + BYTE $0xc4 + BYTE $0x63 + BYTE $0x89 + BYTE $0x22 + BYTE $0x76 + BYTE $0x30 + BYTE $0x01 + VINSERTI128 $0x01, X11, Y14, Y14 + BYTE $0xc5 + BYTE $0x7a + BYTE $0x7e + BYTE $0x7e + BYTE $0x38 + BYTE $0xc5 + BYTE $0x7a + BYTE $0x7e + BYTE $0x5e + BYTE $0x10 + BYTE $0xc4 + BYTE $0x63 + BYTE $0x81 + BYTE $0x22 + BYTE $0x7e + BYTE $0x18 + BYTE $0x01 + BYTE $0xc4 + BYTE $0x63 + BYTE $0xa1 + BYTE $0x22 + BYTE $0x5e + BYTE $0x58 + BYTE $0x01 + VINSERTI128 $0x01, X11, Y15, Y15 + VPADDQ Y12, Y0, Y0 + VPADDQ Y1, Y0, Y0 + VPXOR Y0, Y3, Y3 + VPSHUFD $-79, Y3, Y3 + VPADDQ Y3, Y2, Y2 + VPXOR Y2, Y1, Y1 + VPSHUFB Y4, Y1, Y1 + VPADDQ Y13, Y0, Y0 + VPADDQ Y1, Y0, Y0 + VPXOR Y0, Y3, Y3 + VPSHUFB Y5, Y3, Y3 + VPADDQ Y3, Y2, Y2 + VPXOR Y2, Y1, Y1 + VPADDQ Y1, Y1, Y10 + VPSRLQ $0x3f, Y1, Y1 + VPXOR Y10, Y1, Y1 + BYTE $0xc4 + BYTE $0xe3 + BYTE $0xfd + BYTE $0x00 + BYTE $0xc9 + BYTE $0x39 + BYTE $0xc4 + BYTE $0xe3 + BYTE $0xfd + BYTE $0x00 + BYTE $0xd2 + BYTE $0x4e + BYTE $0xc4 + BYTE $0xe3 + BYTE $0xfd + BYTE $0x00 + BYTE $0xdb + BYTE $0x93 + VPADDQ Y14, Y0, Y0 + VPADDQ Y1, Y0, Y0 + VPXOR Y0, Y3, Y3 + VPSHUFD $-79, Y3, Y3 + VPADDQ Y3, Y2, Y2 + VPXOR Y2, Y1, Y1 + VPSHUFB Y4, Y1, Y1 + VPADDQ Y15, Y0, Y0 + VPADDQ Y1, Y0, Y0 + VPXOR Y0, Y3, Y3 + VPSHUFB Y5, Y3, Y3 + VPADDQ Y3, Y2, Y2 + VPXOR Y2, Y1, Y1 + VPADDQ Y1, Y1, Y10 + VPSRLQ $0x3f, Y1, Y1 + VPXOR Y10, Y1, Y1 + BYTE $0xc4 + BYTE $0xe3 + BYTE $0xfd + BYTE $0x00 + BYTE $0xdb + BYTE $0x39 + BYTE $0xc4 + BYTE $0xe3 + BYTE $0xfd + BYTE $0x00 + BYTE $0xd2 + BYTE $0x4e + BYTE $0xc4 + BYTE $0xe3 + BYTE $0xfd + BYTE $0x00 + BYTE $0xc9 + BYTE $0x93 + BYTE $0xc5 + BYTE $0x7a + BYTE $0x7e + BYTE $0x66 + BYTE $0x68 + BYTE $0xc5 + BYTE $0x7a + BYTE $0x7e + BYTE $0x5e + BYTE $0x60 + BYTE $0xc4 + BYTE $0x63 + BYTE $0x99 + BYTE $0x22 + BYTE $0x66 + BYTE $0x38 + BYTE $0x01 + BYTE $0xc4 + BYTE $0x63 + BYTE $0xa1 + BYTE $0x22 + BYTE $0x5e + BYTE $0x18 + BYTE $0x01 + VINSERTI128 $0x01, X11, Y12, Y12 + BYTE $0xc5 + BYTE $0x7a + BYTE $0x7e + BYTE $0x6e + BYTE $0x58 + BYTE $0xc5 + BYTE $0x7a + BYTE $0x7e + BYTE $0x5e + BYTE $0x08 + BYTE $0xc4 + BYTE $0x63 + BYTE $0x91 + BYTE $0x22 + BYTE $0x6e + BYTE $0x70 + BYTE $0x01 + BYTE $0xc4 + BYTE $0x63 + BYTE $0xa1 + BYTE $0x22 + BYTE $0x5e + BYTE $0x48 + BYTE $0x01 + VINSERTI128 $0x01, X11, Y13, Y13 + BYTE $0xc5 + BYTE $0x7a + BYTE $0x7e + BYTE $0x76 + BYTE $0x28 + BYTE $0xc5 + BYTE $0x7a + BYTE $0x7e + BYTE $0x5e + BYTE $0x40 + BYTE $0xc4 + BYTE $0x63 + BYTE $0x89 + BYTE $0x22 + BYTE $0x76 + BYTE $0x78 + BYTE $0x01 + BYTE $0xc4 + BYTE $0x63 + BYTE $0xa1 + BYTE $0x22 + BYTE $0x5e + BYTE $0x10 + BYTE $0x01 + VINSERTI128 $0x01, X11, Y14, Y14 + BYTE $0xc5 + BYTE $0x7a + BYTE $0x7e + BYTE $0x3e + BYTE $0xc5 + BYTE $0x7a + BYTE $0x7e + BYTE $0x5e + BYTE $0x30 + BYTE $0xc4 + BYTE $0x63 + BYTE $0x81 + BYTE $0x22 + BYTE $0x7e + BYTE $0x20 + BYTE $0x01 + BYTE $0xc4 + BYTE $0x63 + BYTE $0xa1 + BYTE $0x22 + BYTE $0x5e + BYTE $0x50 + BYTE $0x01 + VINSERTI128 $0x01, X11, Y15, Y15 + VPADDQ Y12, Y0, Y0 + VPADDQ Y1, Y0, Y0 + VPXOR Y0, Y3, Y3 + VPSHUFD $-79, Y3, Y3 + VPADDQ Y3, Y2, Y2 + VPXOR Y2, Y1, Y1 + VPSHUFB Y4, Y1, Y1 + VPADDQ Y13, Y0, Y0 + VPADDQ Y1, Y0, Y0 + VPXOR Y0, Y3, Y3 + VPSHUFB Y5, Y3, Y3 + VPADDQ Y3, Y2, Y2 + VPXOR Y2, Y1, Y1 + VPADDQ Y1, Y1, Y10 + VPSRLQ $0x3f, Y1, Y1 + VPXOR Y10, Y1, Y1 + BYTE $0xc4 + BYTE $0xe3 + BYTE $0xfd + BYTE $0x00 + BYTE $0xc9 + BYTE $0x39 + BYTE $0xc4 + BYTE $0xe3 + BYTE $0xfd + BYTE $0x00 + BYTE $0xd2 + BYTE $0x4e + BYTE $0xc4 + BYTE $0xe3 + BYTE $0xfd + BYTE $0x00 + BYTE $0xdb + BYTE $0x93 + VPADDQ Y14, Y0, Y0 + VPADDQ Y1, Y0, Y0 + VPXOR Y0, Y3, Y3 + VPSHUFD $-79, Y3, Y3 + VPADDQ Y3, Y2, Y2 + VPXOR Y2, Y1, Y1 + VPSHUFB Y4, Y1, Y1 + VPADDQ Y15, Y0, Y0 + VPADDQ Y1, Y0, Y0 + VPXOR Y0, Y3, Y3 + VPSHUFB Y5, Y3, Y3 + VPADDQ Y3, Y2, Y2 + VPXOR Y2, Y1, Y1 + VPADDQ Y1, Y1, Y10 + VPSRLQ $0x3f, Y1, Y1 + VPXOR Y10, Y1, Y1 + BYTE $0xc4 + BYTE $0xe3 + BYTE $0xfd + BYTE $0x00 + BYTE $0xdb + BYTE $0x39 + BYTE $0xc4 + BYTE $0xe3 + BYTE $0xfd + BYTE $0x00 + BYTE $0xd2 + BYTE $0x4e + BYTE $0xc4 + BYTE $0xe3 + BYTE $0xfd + BYTE $0x00 + BYTE $0xc9 + BYTE $0x93 + BYTE $0xc5 + BYTE $0x7a + BYTE $0x7e + BYTE $0x66 + BYTE $0x30 + BYTE $0xc5 + BYTE $0x7a + BYTE $0x7e + BYTE $0x5e + BYTE $0x58 + BYTE $0xc4 + BYTE $0x63 + BYTE $0x99 + BYTE $0x22 + BYTE $0x66 + BYTE $0x70 + BYTE $0x01 + BYTE $0xc4 + BYTE $0x63 + BYTE $0xa1 + BYTE $0x22 + BYTE $0x1e + BYTE $0x01 + VINSERTI128 $0x01, X11, Y12, Y12 + BYTE $0xc5 + BYTE $0x7a + BYTE $0x7e + BYTE $0x6e + BYTE $0x78 + BYTE $0xc5 + BYTE $0x7a + BYTE $0x7e + BYTE $0x5e + BYTE $0x18 + BYTE $0xc4 + BYTE $0x63 + BYTE $0x91 + BYTE $0x22 + BYTE $0x6e + BYTE $0x48 + BYTE $0x01 + BYTE $0xc4 + BYTE $0x63 + BYTE $0xa1 + BYTE $0x22 + BYTE $0x5e + BYTE $0x40 + BYTE $0x01 + VINSERTI128 $0x01, X11, Y13, Y13 + BYTE $0xc5 + BYTE $0x7a + BYTE $0x7e + BYTE $0x5e + BYTE $0x08 + VMOVDQU 96(SI), X14 + BYTE $0xc4 + BYTE $0x63 + BYTE $0xa1 + BYTE $0x22 + BYTE $0x5e + BYTE $0x50 + BYTE $0x01 + VINSERTI128 $0x01, X11, Y14, Y14 + BYTE $0xc5 + BYTE $0x7a + BYTE $0x7e + BYTE $0x7e + BYTE $0x10 + VMOVDQU 32(SI), X11 + BYTE $0xc4 + BYTE $0x63 + BYTE $0x81 + BYTE $0x22 + BYTE $0x7e + BYTE $0x38 + BYTE $0x01 + VINSERTI128 $0x01, X11, Y15, Y15 + VPADDQ Y12, Y0, Y0 + VPADDQ Y1, Y0, Y0 + VPXOR Y0, Y3, Y3 + VPSHUFD $-79, Y3, Y3 + VPADDQ Y3, Y2, Y2 + VPXOR Y2, Y1, Y1 + VPSHUFB Y4, Y1, Y1 + VPADDQ Y13, Y0, Y0 + VPADDQ Y1, Y0, Y0 + VPXOR Y0, Y3, Y3 + VPSHUFB Y5, Y3, Y3 + VPADDQ Y3, Y2, Y2 + VPXOR Y2, Y1, Y1 + VPADDQ Y1, Y1, Y10 + VPSRLQ $0x3f, Y1, Y1 + VPXOR Y10, Y1, Y1 + BYTE $0xc4 + BYTE $0xe3 + BYTE $0xfd + BYTE $0x00 + BYTE $0xc9 + BYTE $0x39 + BYTE $0xc4 + BYTE $0xe3 + BYTE $0xfd + BYTE $0x00 + BYTE $0xd2 + BYTE $0x4e + BYTE $0xc4 + BYTE $0xe3 + BYTE $0xfd + BYTE $0x00 + BYTE $0xdb + BYTE $0x93 + VPADDQ Y14, Y0, Y0 + VPADDQ Y1, Y0, Y0 + VPXOR Y0, Y3, Y3 + VPSHUFD $-79, Y3, Y3 + VPADDQ Y3, Y2, Y2 + VPXOR Y2, Y1, Y1 + VPSHUFB Y4, Y1, Y1 + VPADDQ Y15, Y0, Y0 + VPADDQ Y1, Y0, Y0 + VPXOR Y0, Y3, Y3 + VPSHUFB Y5, Y3, Y3 + VPADDQ Y3, Y2, Y2 + VPXOR Y2, Y1, Y1 + VPADDQ Y1, Y1, Y10 + VPSRLQ $0x3f, Y1, Y1 + VPXOR Y10, Y1, Y1 + BYTE $0xc4 + BYTE $0xe3 + BYTE $0xfd + BYTE $0x00 + BYTE $0xdb + BYTE $0x39 + BYTE $0xc4 + BYTE $0xe3 + BYTE $0xfd + BYTE $0x00 + BYTE $0xd2 + BYTE $0x4e + BYTE $0xc4 + BYTE $0xe3 + BYTE $0xfd + BYTE $0x00 + BYTE $0xc9 + BYTE $0x93 + BYTE $0xc5 + BYTE $0x7a + BYTE $0x7e + BYTE $0x66 + BYTE $0x50 + BYTE $0xc5 + BYTE $0x7a + BYTE $0x7e + BYTE $0x5e + BYTE $0x38 + BYTE $0xc4 + BYTE $0x63 + BYTE $0x99 + BYTE $0x22 + BYTE $0x66 + BYTE $0x40 + BYTE $0x01 + BYTE $0xc4 + BYTE $0x63 + BYTE $0xa1 + BYTE $0x22 + BYTE $0x5e + BYTE $0x08 + BYTE $0x01 + VINSERTI128 $0x01, X11, Y12, Y12 + BYTE $0xc5 + BYTE $0x7a + BYTE $0x7e + BYTE $0x6e + BYTE $0x10 + VPSHUFD $0x4e, 40(SI), X11 + BYTE $0xc4 + BYTE $0x63 + BYTE $0x91 + BYTE $0x22 + BYTE $0x6e + BYTE $0x20 + BYTE $0x01 + VINSERTI128 $0x01, X11, Y13, Y13 + BYTE $0xc5 + BYTE $0x7a + BYTE $0x7e + BYTE $0x76 + BYTE $0x78 + BYTE $0xc5 + BYTE $0x7a + BYTE $0x7e + BYTE $0x5e + BYTE $0x18 + BYTE $0xc4 + BYTE $0x63 + BYTE $0x89 + BYTE $0x22 + BYTE $0x76 + BYTE $0x48 + BYTE $0x01 + BYTE $0xc4 + BYTE $0x63 + BYTE $0xa1 + BYTE $0x22 + BYTE $0x5e + BYTE $0x68 + BYTE $0x01 + VINSERTI128 $0x01, X11, Y14, Y14 + BYTE $0xc5 + BYTE $0x7a + BYTE $0x7e + BYTE $0x7e + BYTE $0x58 + BYTE $0xc5 + BYTE $0x7a + BYTE $0x7e + BYTE $0x5e + BYTE $0x60 + BYTE $0xc4 + BYTE $0x63 + BYTE $0x81 + BYTE $0x22 + BYTE $0x7e + BYTE $0x70 + BYTE $0x01 + BYTE $0xc4 + BYTE $0x63 + BYTE $0xa1 + BYTE $0x22 + BYTE $0x1e + BYTE $0x01 + VINSERTI128 $0x01, X11, Y15, Y15 + VPADDQ Y12, Y0, Y0 + VPADDQ Y1, Y0, Y0 + VPXOR Y0, Y3, Y3 + VPSHUFD $-79, Y3, Y3 + VPADDQ Y3, Y2, Y2 + VPXOR Y2, Y1, Y1 + VPSHUFB Y4, Y1, Y1 + VPADDQ Y13, Y0, Y0 + VPADDQ Y1, Y0, Y0 + VPXOR Y0, Y3, Y3 + VPSHUFB Y5, Y3, Y3 + VPADDQ Y3, Y2, Y2 + VPXOR Y2, Y1, Y1 + VPADDQ Y1, Y1, Y10 + VPSRLQ $0x3f, Y1, Y1 + VPXOR Y10, Y1, Y1 + BYTE $0xc4 + BYTE $0xe3 + BYTE $0xfd + BYTE $0x00 + BYTE $0xc9 + BYTE $0x39 + BYTE $0xc4 + BYTE $0xe3 + BYTE $0xfd + BYTE $0x00 + BYTE $0xd2 + BYTE $0x4e + BYTE $0xc4 + BYTE $0xe3 + BYTE $0xfd + BYTE $0x00 + BYTE $0xdb + BYTE $0x93 + VPADDQ Y14, Y0, Y0 + VPADDQ Y1, Y0, Y0 + VPXOR Y0, Y3, Y3 + VPSHUFD $-79, Y3, Y3 + VPADDQ Y3, Y2, Y2 + VPXOR Y2, Y1, Y1 + VPSHUFB Y4, Y1, Y1 + VPADDQ Y15, Y0, Y0 + VPADDQ Y1, Y0, Y0 + VPXOR Y0, Y3, Y3 + VPSHUFB Y5, Y3, Y3 + VPADDQ Y3, Y2, Y2 + VPXOR Y2, Y1, Y1 + VPADDQ Y1, Y1, Y10 + VPSRLQ $0x3f, Y1, Y1 + VPXOR Y10, Y1, Y1 + BYTE $0xc4 + BYTE $0xe3 + BYTE $0xfd + BYTE $0x00 + BYTE $0xdb + BYTE $0x39 + BYTE $0xc4 + BYTE $0xe3 + BYTE $0xfd + BYTE $0x00 + BYTE $0xd2 + BYTE $0x4e + BYTE $0xc4 + BYTE $0xe3 + BYTE $0xfd + BYTE $0x00 + BYTE $0xc9 + BYTE $0x93 + VPADDQ 32(DX), Y0, Y0 + VPADDQ Y1, Y0, Y0 + VPXOR Y0, Y3, Y3 + VPSHUFD $-79, Y3, Y3 + VPADDQ Y3, Y2, Y2 + VPXOR Y2, Y1, Y1 + VPSHUFB Y4, Y1, Y1 + VPADDQ 64(DX), Y0, Y0 + VPADDQ Y1, Y0, Y0 + VPXOR Y0, Y3, Y3 + VPSHUFB Y5, Y3, Y3 + VPADDQ Y3, Y2, Y2 + VPXOR Y2, Y1, Y1 + VPADDQ Y1, Y1, Y10 + VPSRLQ $0x3f, Y1, Y1 + VPXOR Y10, Y1, Y1 + BYTE $0xc4 + BYTE $0xe3 + BYTE $0xfd + BYTE $0x00 + BYTE $0xc9 + BYTE $0x39 + BYTE $0xc4 + BYTE $0xe3 + BYTE $0xfd + BYTE $0x00 + BYTE $0xd2 + BYTE $0x4e + BYTE $0xc4 + BYTE $0xe3 + BYTE $0xfd + BYTE $0x00 + BYTE $0xdb + BYTE $0x93 + VPADDQ 96(DX), Y0, Y0 + VPADDQ Y1, Y0, Y0 + VPXOR Y0, Y3, Y3 + VPSHUFD $-79, Y3, Y3 + VPADDQ Y3, Y2, Y2 + VPXOR Y2, Y1, Y1 + VPSHUFB Y4, Y1, Y1 + VPADDQ 128(DX), Y0, Y0 + VPADDQ Y1, Y0, Y0 + VPXOR Y0, Y3, Y3 + VPSHUFB Y5, Y3, Y3 + VPADDQ Y3, Y2, Y2 + VPXOR Y2, Y1, Y1 + VPADDQ Y1, Y1, Y10 + VPSRLQ $0x3f, Y1, Y1 + VPXOR Y10, Y1, Y1 + BYTE $0xc4 + BYTE $0xe3 + BYTE $0xfd + BYTE $0x00 + BYTE $0xdb + BYTE $0x39 + BYTE $0xc4 + BYTE $0xe3 + BYTE $0xfd + BYTE $0x00 + BYTE $0xd2 + BYTE $0x4e + BYTE $0xc4 + BYTE $0xe3 + BYTE $0xfd + BYTE $0x00 + BYTE $0xc9 + BYTE $0x93 + VPADDQ 160(DX), Y0, Y0 + VPADDQ Y1, Y0, Y0 + VPXOR Y0, Y3, Y3 + VPSHUFD $-79, Y3, Y3 + VPADDQ Y3, Y2, Y2 + VPXOR Y2, Y1, Y1 + VPSHUFB Y4, Y1, Y1 + VPADDQ 192(DX), Y0, Y0 + VPADDQ Y1, Y0, Y0 + VPXOR Y0, Y3, Y3 + VPSHUFB Y5, Y3, Y3 + VPADDQ Y3, Y2, Y2 + VPXOR Y2, Y1, Y1 + VPADDQ Y1, Y1, Y10 + VPSRLQ $0x3f, Y1, Y1 + VPXOR Y10, Y1, Y1 + BYTE $0xc4 + BYTE $0xe3 + BYTE $0xfd + BYTE $0x00 + BYTE $0xc9 + BYTE $0x39 + BYTE $0xc4 + BYTE $0xe3 + BYTE $0xfd + BYTE $0x00 + BYTE $0xd2 + BYTE $0x4e + BYTE $0xc4 + BYTE $0xe3 + BYTE $0xfd + BYTE $0x00 + BYTE $0xdb + BYTE $0x93 + VPADDQ 224(DX), Y0, Y0 + VPADDQ Y1, Y0, Y0 + VPXOR Y0, Y3, Y3 + VPSHUFD $-79, Y3, Y3 + VPADDQ Y3, Y2, Y2 + VPXOR Y2, Y1, Y1 + VPSHUFB Y4, Y1, Y1 + VPADDQ 256(DX), Y0, Y0 + VPADDQ Y1, Y0, Y0 + VPXOR Y0, Y3, Y3 + VPSHUFB Y5, Y3, Y3 + VPADDQ Y3, Y2, Y2 + VPXOR Y2, Y1, Y1 + VPADDQ Y1, Y1, Y10 + VPSRLQ $0x3f, Y1, Y1 + VPXOR Y10, Y1, Y1 + BYTE $0xc4 + BYTE $0xe3 + BYTE $0xfd + BYTE $0x00 + BYTE $0xdb + BYTE $0x39 + BYTE $0xc4 + BYTE $0xe3 + BYTE $0xfd + BYTE $0x00 + BYTE $0xd2 + BYTE $0x4e + BYTE $0xc4 + BYTE $0xe3 + BYTE $0xfd + BYTE $0x00 + BYTE $0xc9 + BYTE $0x93 + VPXOR Y0, Y8, Y8 + VPXOR Y1, Y9, Y9 + VPXOR Y2, Y8, Y8 + VPXOR Y3, Y9, Y9 + LEAQ 128(SI), SI + SUBQ $0x80, DI + JNE loop + MOVQ R8, (BX) + MOVQ R9, 8(BX) + VMOVDQU Y8, (AX) + VMOVDQU Y9, 32(AX) VZEROUPPER - RET -#define VPUNPCKLQDQ_X2_X2_X15 BYTE $0xC5; BYTE $0x69; BYTE $0x6C; BYTE $0xFA -#define VPUNPCKLQDQ_X3_X3_X15 BYTE $0xC5; BYTE $0x61; BYTE $0x6C; BYTE $0xFB -#define VPUNPCKLQDQ_X7_X7_X15 BYTE $0xC5; BYTE $0x41; BYTE $0x6C; BYTE $0xFF -#define VPUNPCKLQDQ_X13_X13_X15 BYTE $0xC4; BYTE $0x41; BYTE $0x11; BYTE $0x6C; BYTE $0xFD -#define VPUNPCKLQDQ_X14_X14_X15 BYTE $0xC4; BYTE $0x41; BYTE $0x09; BYTE $0x6C; BYTE $0xFE - -#define VPUNPCKHQDQ_X15_X2_X2 BYTE $0xC4; BYTE $0xC1; BYTE $0x69; BYTE $0x6D; BYTE $0xD7 -#define VPUNPCKHQDQ_X15_X3_X3 BYTE $0xC4; BYTE $0xC1; BYTE $0x61; BYTE $0x6D; BYTE $0xDF -#define VPUNPCKHQDQ_X15_X6_X6 BYTE $0xC4; BYTE $0xC1; BYTE $0x49; BYTE $0x6D; BYTE $0xF7 -#define VPUNPCKHQDQ_X15_X7_X7 BYTE $0xC4; BYTE $0xC1; BYTE $0x41; BYTE $0x6D; BYTE $0xFF -#define VPUNPCKHQDQ_X15_X3_X2 BYTE $0xC4; BYTE $0xC1; BYTE $0x61; BYTE $0x6D; BYTE $0xD7 -#define VPUNPCKHQDQ_X15_X7_X6 BYTE $0xC4; BYTE $0xC1; BYTE $0x41; BYTE $0x6D; BYTE $0xF7 -#define VPUNPCKHQDQ_X15_X13_X3 BYTE $0xC4; BYTE $0xC1; BYTE $0x11; BYTE $0x6D; BYTE $0xDF -#define VPUNPCKHQDQ_X15_X13_X7 BYTE $0xC4; BYTE $0xC1; BYTE $0x11; BYTE $0x6D; BYTE $0xFF - -#define SHUFFLE_AVX() \ - VMOVDQA X6, X13; \ - VMOVDQA X2, X14; \ - VMOVDQA X4, X6; \ - VPUNPCKLQDQ_X13_X13_X15; \ - VMOVDQA X5, X4; \ - VMOVDQA X6, X5; \ - VPUNPCKHQDQ_X15_X7_X6; \ - VPUNPCKLQDQ_X7_X7_X15; \ - VPUNPCKHQDQ_X15_X13_X7; \ - VPUNPCKLQDQ_X3_X3_X15; \ - VPUNPCKHQDQ_X15_X2_X2; \ - VPUNPCKLQDQ_X14_X14_X15; \ - VPUNPCKHQDQ_X15_X3_X3; \ - -#define SHUFFLE_AVX_INV() \ - VMOVDQA X2, X13; \ - VMOVDQA X4, X14; \ - VPUNPCKLQDQ_X2_X2_X15; \ - VMOVDQA X5, X4; \ - VPUNPCKHQDQ_X15_X3_X2; \ - VMOVDQA X14, X5; \ - VPUNPCKLQDQ_X3_X3_X15; \ - VMOVDQA X6, X14; \ - VPUNPCKHQDQ_X15_X13_X3; \ - VPUNPCKLQDQ_X7_X7_X15; \ - VPUNPCKHQDQ_X15_X6_X6; \ - VPUNPCKLQDQ_X14_X14_X15; \ - VPUNPCKHQDQ_X15_X7_X7; \ - -#define HALF_ROUND_AVX(v0, v1, v2, v3, v4, v5, v6, v7, m0, m1, m2, m3, t0, c40, c48) \ - VPADDQ m0, v0, v0; \ - VPADDQ v2, v0, v0; \ - VPADDQ m1, v1, v1; \ - VPADDQ v3, v1, v1; \ - VPXOR v0, v6, v6; \ - VPXOR v1, v7, v7; \ - VPSHUFD $-79, v6, v6; \ - VPSHUFD $-79, v7, v7; \ - VPADDQ v6, v4, v4; \ - VPADDQ v7, v5, v5; \ - VPXOR v4, v2, v2; \ - VPXOR v5, v3, v3; \ - VPSHUFB c40, v2, v2; \ - VPSHUFB c40, v3, v3; \ - VPADDQ m2, v0, v0; \ - VPADDQ v2, v0, v0; \ - VPADDQ m3, v1, v1; \ - VPADDQ v3, v1, v1; \ - VPXOR v0, v6, v6; \ - VPXOR v1, v7, v7; \ - VPSHUFB c48, v6, v6; \ - VPSHUFB c48, v7, v7; \ - VPADDQ v6, v4, v4; \ - VPADDQ v7, v5, v5; \ - VPXOR v4, v2, v2; \ - VPXOR v5, v3, v3; \ - VPADDQ v2, v2, t0; \ - VPSRLQ $63, v2, v2; \ - VPXOR t0, v2, v2; \ - VPADDQ v3, v3, t0; \ - VPSRLQ $63, v3, v3; \ - VPXOR t0, v3, v3 - -// load msg: X12 = (i0, i1), X13 = (i2, i3), X14 = (i4, i5), X15 = (i6, i7) -// i0, i1, i2, i3, i4, i5, i6, i7 must not be 0 -#define LOAD_MSG_AVX(i0, i1, i2, i3, i4, i5, i6, i7) \ - VMOVQ_SI_X12(i0*8); \ - VMOVQ_SI_X13(i2*8); \ - VMOVQ_SI_X14(i4*8); \ - VMOVQ_SI_X15(i6*8); \ - VPINSRQ_1_SI_X12(i1*8); \ - VPINSRQ_1_SI_X13(i3*8); \ - VPINSRQ_1_SI_X14(i5*8); \ - VPINSRQ_1_SI_X15(i7*8) - -// load msg: X12 = (0, 2), X13 = (4, 6), X14 = (1, 3), X15 = (5, 7) -#define LOAD_MSG_AVX_0_2_4_6_1_3_5_7() \ - VMOVQ_SI_X12_0; \ - VMOVQ_SI_X13(4*8); \ - VMOVQ_SI_X14(1*8); \ - VMOVQ_SI_X15(5*8); \ - VPINSRQ_1_SI_X12(2*8); \ - VPINSRQ_1_SI_X13(6*8); \ - VPINSRQ_1_SI_X14(3*8); \ - VPINSRQ_1_SI_X15(7*8) - -// load msg: X12 = (1, 0), X13 = (11, 5), X14 = (12, 2), X15 = (7, 3) -#define LOAD_MSG_AVX_1_0_11_5_12_2_7_3() \ - VPSHUFD $0x4E, 0*8(SI), X12; \ - VMOVQ_SI_X13(11*8); \ - VMOVQ_SI_X14(12*8); \ - VMOVQ_SI_X15(7*8); \ - VPINSRQ_1_SI_X13(5*8); \ - VPINSRQ_1_SI_X14(2*8); \ - VPINSRQ_1_SI_X15(3*8) - -// load msg: X12 = (11, 12), X13 = (5, 15), X14 = (8, 0), X15 = (2, 13) -#define LOAD_MSG_AVX_11_12_5_15_8_0_2_13() \ - VMOVDQU 11*8(SI), X12; \ - VMOVQ_SI_X13(5*8); \ - VMOVQ_SI_X14(8*8); \ - VMOVQ_SI_X15(2*8); \ - VPINSRQ_1_SI_X13(15*8); \ - VPINSRQ_1_SI_X14_0; \ - VPINSRQ_1_SI_X15(13*8) - -// load msg: X12 = (2, 5), X13 = (4, 15), X14 = (6, 10), X15 = (0, 8) -#define LOAD_MSG_AVX_2_5_4_15_6_10_0_8() \ - VMOVQ_SI_X12(2*8); \ - VMOVQ_SI_X13(4*8); \ - VMOVQ_SI_X14(6*8); \ - VMOVQ_SI_X15_0; \ - VPINSRQ_1_SI_X12(5*8); \ - VPINSRQ_1_SI_X13(15*8); \ - VPINSRQ_1_SI_X14(10*8); \ - VPINSRQ_1_SI_X15(8*8) +DATA ·AVX2_c40<>+0(SB)/8, $0x0201000706050403 +DATA ·AVX2_c40<>+8(SB)/8, $0x0a09080f0e0d0c0b +DATA ·AVX2_c40<>+16(SB)/8, $0x0201000706050403 +DATA ·AVX2_c40<>+24(SB)/8, $0x0a09080f0e0d0c0b +GLOBL ·AVX2_c40<>(SB), RODATA|NOPTR, $32 -// load msg: X12 = (9, 5), X13 = (2, 10), X14 = (0, 7), X15 = (4, 15) -#define LOAD_MSG_AVX_9_5_2_10_0_7_4_15() \ - VMOVQ_SI_X12(9*8); \ - VMOVQ_SI_X13(2*8); \ - VMOVQ_SI_X14_0; \ - VMOVQ_SI_X15(4*8); \ - VPINSRQ_1_SI_X12(5*8); \ - VPINSRQ_1_SI_X13(10*8); \ - VPINSRQ_1_SI_X14(7*8); \ - VPINSRQ_1_SI_X15(15*8) +DATA ·AVX2_c48<>+0(SB)/8, $0x0100070605040302 +DATA ·AVX2_c48<>+8(SB)/8, $0x09080f0e0d0c0b0a +DATA ·AVX2_c48<>+16(SB)/8, $0x0100070605040302 +DATA ·AVX2_c48<>+24(SB)/8, $0x09080f0e0d0c0b0a +GLOBL ·AVX2_c48<>(SB), RODATA|NOPTR, $32 -// load msg: X12 = (2, 6), X13 = (0, 8), X14 = (12, 10), X15 = (11, 3) -#define LOAD_MSG_AVX_2_6_0_8_12_10_11_3() \ - VMOVQ_SI_X12(2*8); \ - VMOVQ_SI_X13_0; \ - VMOVQ_SI_X14(12*8); \ - VMOVQ_SI_X15(11*8); \ - VPINSRQ_1_SI_X12(6*8); \ - VPINSRQ_1_SI_X13(8*8); \ - VPINSRQ_1_SI_X14(10*8); \ - VPINSRQ_1_SI_X15(3*8) +DATA ·AVX2_iv0<>+0(SB)/8, $0x6a09e667f3bcc908 +DATA ·AVX2_iv0<>+8(SB)/8, $0xbb67ae8584caa73b +DATA ·AVX2_iv0<>+16(SB)/8, $0x3c6ef372fe94f82b +DATA ·AVX2_iv0<>+24(SB)/8, $0xa54ff53a5f1d36f1 +GLOBL ·AVX2_iv0<>(SB), RODATA|NOPTR, $32 -// load msg: X12 = (0, 6), X13 = (9, 8), X14 = (7, 3), X15 = (2, 11) -#define LOAD_MSG_AVX_0_6_9_8_7_3_2_11() \ - MOVQ 0*8(SI), X12; \ - VPSHUFD $0x4E, 8*8(SI), X13; \ - MOVQ 7*8(SI), X14; \ - MOVQ 2*8(SI), X15; \ - VPINSRQ_1_SI_X12(6*8); \ - VPINSRQ_1_SI_X14(3*8); \ - VPINSRQ_1_SI_X15(11*8) - -// load msg: X12 = (6, 14), X13 = (11, 0), X14 = (15, 9), X15 = (3, 8) -#define LOAD_MSG_AVX_6_14_11_0_15_9_3_8() \ - MOVQ 6*8(SI), X12; \ - MOVQ 11*8(SI), X13; \ - MOVQ 15*8(SI), X14; \ - MOVQ 3*8(SI), X15; \ - VPINSRQ_1_SI_X12(14*8); \ - VPINSRQ_1_SI_X13_0; \ - VPINSRQ_1_SI_X14(9*8); \ - VPINSRQ_1_SI_X15(8*8) - -// load msg: X12 = (5, 15), X13 = (8, 2), X14 = (0, 4), X15 = (6, 10) -#define LOAD_MSG_AVX_5_15_8_2_0_4_6_10() \ - MOVQ 5*8(SI), X12; \ - MOVQ 8*8(SI), X13; \ - MOVQ 0*8(SI), X14; \ - MOVQ 6*8(SI), X15; \ - VPINSRQ_1_SI_X12(15*8); \ - VPINSRQ_1_SI_X13(2*8); \ - VPINSRQ_1_SI_X14(4*8); \ - VPINSRQ_1_SI_X15(10*8) - -// load msg: X12 = (12, 13), X13 = (1, 10), X14 = (2, 7), X15 = (4, 5) -#define LOAD_MSG_AVX_12_13_1_10_2_7_4_5() \ - VMOVDQU 12*8(SI), X12; \ - MOVQ 1*8(SI), X13; \ - MOVQ 2*8(SI), X14; \ - VPINSRQ_1_SI_X13(10*8); \ - VPINSRQ_1_SI_X14(7*8); \ - VMOVDQU 4*8(SI), X15 - -// load msg: X12 = (15, 9), X13 = (3, 13), X14 = (11, 14), X15 = (12, 0) -#define LOAD_MSG_AVX_15_9_3_13_11_14_12_0() \ - MOVQ 15*8(SI), X12; \ - MOVQ 3*8(SI), X13; \ - MOVQ 11*8(SI), X14; \ - MOVQ 12*8(SI), X15; \ - VPINSRQ_1_SI_X12(9*8); \ - VPINSRQ_1_SI_X13(13*8); \ - VPINSRQ_1_SI_X14(14*8); \ - VPINSRQ_1_SI_X15_0 +DATA ·AVX2_iv1<>+0(SB)/8, $0x510e527fade682d1 +DATA ·AVX2_iv1<>+8(SB)/8, $0x9b05688c2b3e6c1f +DATA ·AVX2_iv1<>+16(SB)/8, $0x1f83d9abfb41bd6b +DATA ·AVX2_iv1<>+24(SB)/8, $0x5be0cd19137e2179 +GLOBL ·AVX2_iv1<>(SB), RODATA|NOPTR, $32 // func hashBlocksAVX(h *[8]uint64, c *[2]uint64, flag uint64, blocks []byte) -TEXT ·hashBlocksAVX(SB), 4, $288-48 // frame size = 272 + 16 byte alignment - MOVQ h+0(FP), AX - MOVQ c+8(FP), BX - MOVQ flag+16(FP), CX - MOVQ blocks_base+24(FP), SI - MOVQ blocks_len+32(FP), DI - - MOVQ SP, R10 - ADDQ $15, R10 - ANDQ $~15, R10 - - VMOVDQU ·AVX_c40<>(SB), X0 - VMOVDQU ·AVX_c48<>(SB), X1 +// Requires: AVX, SSE2 +TEXT ·hashBlocksAVX(SB), NOSPLIT, $288-48 + MOVQ h+0(FP), AX + MOVQ c+8(FP), BX + MOVQ flag+16(FP), CX + MOVQ blocks_base+24(FP), SI + MOVQ blocks_len+32(FP), DI + MOVQ SP, R10 + ADDQ $0x0f, R10 + ANDQ $-16, R10 + VMOVDQU ·AVX_c40<>+0(SB), X0 + VMOVDQU ·AVX_c48<>+0(SB), X1 VMOVDQA X0, X8 VMOVDQA X1, X9 - - VMOVDQU ·AVX_iv3<>(SB), X0 - VMOVDQA X0, 0(R10) - XORQ CX, 0(R10) // 0(R10) = ·AVX_iv3 ^ (CX || 0) - - VMOVDQU 0(AX), X10 + VMOVDQU ·AVX_iv3<>+0(SB), X0 + VMOVDQA X0, (R10) + XORQ CX, (R10) + VMOVDQU (AX), X10 VMOVDQU 16(AX), X11 VMOVDQU 32(AX), X2 VMOVDQU 48(AX), X3 - - MOVQ 0(BX), R8 - MOVQ 8(BX), R9 + MOVQ (BX), R8 + MOVQ 8(BX), R9 loop: - ADDQ $128, R8 - CMPQ R8, $128 + ADDQ $0x80, R8 + CMPQ R8, $0x80 JGE noinc INCQ R9 noinc: - VMOVQ_R8_X15 - VPINSRQ_1_R9_X15 - + BYTE $0xc4 + BYTE $0x41 + BYTE $0xf9 + BYTE $0x6e + BYTE $0xf8 + BYTE $0xc4 + BYTE $0x43 + BYTE $0x81 + BYTE $0x22 + BYTE $0xf9 + BYTE $0x01 VMOVDQA X10, X0 VMOVDQA X11, X1 - VMOVDQU ·AVX_iv0<>(SB), X4 - VMOVDQU ·AVX_iv1<>(SB), X5 - VMOVDQU ·AVX_iv2<>(SB), X6 - + VMOVDQU ·AVX_iv0<>+0(SB), X4 + VMOVDQU ·AVX_iv1<>+0(SB), X5 + VMOVDQU ·AVX_iv2<>+0(SB), X6 VPXOR X15, X6, X6 - VMOVDQA 0(R10), X7 - - LOAD_MSG_AVX_0_2_4_6_1_3_5_7() + VMOVDQA (R10), X7 + BYTE $0xc5 + BYTE $0x7a + BYTE $0x7e + BYTE $0x26 + BYTE $0xc5 + BYTE $0x7a + BYTE $0x7e + BYTE $0x6e + BYTE $0x20 + BYTE $0xc5 + BYTE $0x7a + BYTE $0x7e + BYTE $0x76 + BYTE $0x08 + BYTE $0xc5 + BYTE $0x7a + BYTE $0x7e + BYTE $0x7e + BYTE $0x28 + BYTE $0xc4 + BYTE $0x63 + BYTE $0x99 + BYTE $0x22 + BYTE $0x66 + BYTE $0x10 + BYTE $0x01 + BYTE $0xc4 + BYTE $0x63 + BYTE $0x91 + BYTE $0x22 + BYTE $0x6e + BYTE $0x30 + BYTE $0x01 + BYTE $0xc4 + BYTE $0x63 + BYTE $0x89 + BYTE $0x22 + BYTE $0x76 + BYTE $0x18 + BYTE $0x01 + BYTE $0xc4 + BYTE $0x63 + BYTE $0x81 + BYTE $0x22 + BYTE $0x7e + BYTE $0x38 + BYTE $0x01 VMOVDQA X12, 16(R10) VMOVDQA X13, 32(R10) VMOVDQA X14, 48(R10) VMOVDQA X15, 64(R10) - HALF_ROUND_AVX(X0, X1, X2, X3, X4, X5, X6, X7, X12, X13, X14, X15, X15, X8, X9) - SHUFFLE_AVX() - LOAD_MSG_AVX(8, 10, 12, 14, 9, 11, 13, 15) + VPADDQ X12, X0, X0 + VPADDQ X2, X0, X0 + VPADDQ X13, X1, X1 + VPADDQ X3, X1, X1 + VPXOR X0, X6, X6 + VPXOR X1, X7, X7 + VPSHUFD $-79, X6, X6 + VPSHUFD $-79, X7, X7 + VPADDQ X6, X4, X4 + VPADDQ X7, X5, X5 + VPXOR X4, X2, X2 + VPXOR X5, X3, X3 + VPSHUFB X8, X2, X2 + VPSHUFB X8, X3, X3 + VPADDQ X14, X0, X0 + VPADDQ X2, X0, X0 + VPADDQ X15, X1, X1 + VPADDQ X3, X1, X1 + VPXOR X0, X6, X6 + VPXOR X1, X7, X7 + VPSHUFB X9, X6, X6 + VPSHUFB X9, X7, X7 + VPADDQ X6, X4, X4 + VPADDQ X7, X5, X5 + VPXOR X4, X2, X2 + VPXOR X5, X3, X3 + VPADDQ X2, X2, X15 + VPSRLQ $0x3f, X2, X2 + VPXOR X15, X2, X2 + VPADDQ X3, X3, X15 + VPSRLQ $0x3f, X3, X3 + VPXOR X15, X3, X3 + VMOVDQA X6, X13 + VMOVDQA X2, X14 + VMOVDQA X4, X6 + BYTE $0xc4 + BYTE $0x41 + BYTE $0x11 + BYTE $0x6c + BYTE $0xfd + VMOVDQA X5, X4 + VMOVDQA X6, X5 + BYTE $0xc4 + BYTE $0xc1 + BYTE $0x41 + BYTE $0x6d + BYTE $0xf7 + BYTE $0xc5 + BYTE $0x41 + BYTE $0x6c + BYTE $0xff + BYTE $0xc4 + BYTE $0xc1 + BYTE $0x11 + BYTE $0x6d + BYTE $0xff + BYTE $0xc5 + BYTE $0x61 + BYTE $0x6c + BYTE $0xfb + BYTE $0xc4 + BYTE $0xc1 + BYTE $0x69 + BYTE $0x6d + BYTE $0xd7 + BYTE $0xc4 + BYTE $0x41 + BYTE $0x09 + BYTE $0x6c + BYTE $0xfe + BYTE $0xc4 + BYTE $0xc1 + BYTE $0x61 + BYTE $0x6d + BYTE $0xdf + BYTE $0xc5 + BYTE $0x7a + BYTE $0x7e + BYTE $0x66 + BYTE $0x40 + BYTE $0xc5 + BYTE $0x7a + BYTE $0x7e + BYTE $0x6e + BYTE $0x60 + BYTE $0xc5 + BYTE $0x7a + BYTE $0x7e + BYTE $0x76 + BYTE $0x48 + BYTE $0xc5 + BYTE $0x7a + BYTE $0x7e + BYTE $0x7e + BYTE $0x68 + BYTE $0xc4 + BYTE $0x63 + BYTE $0x99 + BYTE $0x22 + BYTE $0x66 + BYTE $0x50 + BYTE $0x01 + BYTE $0xc4 + BYTE $0x63 + BYTE $0x91 + BYTE $0x22 + BYTE $0x6e + BYTE $0x70 + BYTE $0x01 + BYTE $0xc4 + BYTE $0x63 + BYTE $0x89 + BYTE $0x22 + BYTE $0x76 + BYTE $0x58 + BYTE $0x01 + BYTE $0xc4 + BYTE $0x63 + BYTE $0x81 + BYTE $0x22 + BYTE $0x7e + BYTE $0x78 + BYTE $0x01 VMOVDQA X12, 80(R10) VMOVDQA X13, 96(R10) VMOVDQA X14, 112(R10) VMOVDQA X15, 128(R10) - HALF_ROUND_AVX(X0, X1, X2, X3, X4, X5, X6, X7, X12, X13, X14, X15, X15, X8, X9) - SHUFFLE_AVX_INV() - - LOAD_MSG_AVX(14, 4, 9, 13, 10, 8, 15, 6) + VPADDQ X12, X0, X0 + VPADDQ X2, X0, X0 + VPADDQ X13, X1, X1 + VPADDQ X3, X1, X1 + VPXOR X0, X6, X6 + VPXOR X1, X7, X7 + VPSHUFD $-79, X6, X6 + VPSHUFD $-79, X7, X7 + VPADDQ X6, X4, X4 + VPADDQ X7, X5, X5 + VPXOR X4, X2, X2 + VPXOR X5, X3, X3 + VPSHUFB X8, X2, X2 + VPSHUFB X8, X3, X3 + VPADDQ X14, X0, X0 + VPADDQ X2, X0, X0 + VPADDQ X15, X1, X1 + VPADDQ X3, X1, X1 + VPXOR X0, X6, X6 + VPXOR X1, X7, X7 + VPSHUFB X9, X6, X6 + VPSHUFB X9, X7, X7 + VPADDQ X6, X4, X4 + VPADDQ X7, X5, X5 + VPXOR X4, X2, X2 + VPXOR X5, X3, X3 + VPADDQ X2, X2, X15 + VPSRLQ $0x3f, X2, X2 + VPXOR X15, X2, X2 + VPADDQ X3, X3, X15 + VPSRLQ $0x3f, X3, X3 + VPXOR X15, X3, X3 + VMOVDQA X2, X13 + VMOVDQA X4, X14 + BYTE $0xc5 + BYTE $0x69 + BYTE $0x6c + BYTE $0xfa + VMOVDQA X5, X4 + BYTE $0xc4 + BYTE $0xc1 + BYTE $0x61 + BYTE $0x6d + BYTE $0xd7 + VMOVDQA X14, X5 + BYTE $0xc5 + BYTE $0x61 + BYTE $0x6c + BYTE $0xfb + VMOVDQA X6, X14 + BYTE $0xc4 + BYTE $0xc1 + BYTE $0x11 + BYTE $0x6d + BYTE $0xdf + BYTE $0xc5 + BYTE $0x41 + BYTE $0x6c + BYTE $0xff + BYTE $0xc4 + BYTE $0xc1 + BYTE $0x49 + BYTE $0x6d + BYTE $0xf7 + BYTE $0xc4 + BYTE $0x41 + BYTE $0x09 + BYTE $0x6c + BYTE $0xfe + BYTE $0xc4 + BYTE $0xc1 + BYTE $0x41 + BYTE $0x6d + BYTE $0xff + BYTE $0xc5 + BYTE $0x7a + BYTE $0x7e + BYTE $0x66 + BYTE $0x70 + BYTE $0xc5 + BYTE $0x7a + BYTE $0x7e + BYTE $0x6e + BYTE $0x48 + BYTE $0xc5 + BYTE $0x7a + BYTE $0x7e + BYTE $0x76 + BYTE $0x50 + BYTE $0xc5 + BYTE $0x7a + BYTE $0x7e + BYTE $0x7e + BYTE $0x78 + BYTE $0xc4 + BYTE $0x63 + BYTE $0x99 + BYTE $0x22 + BYTE $0x66 + BYTE $0x20 + BYTE $0x01 + BYTE $0xc4 + BYTE $0x63 + BYTE $0x91 + BYTE $0x22 + BYTE $0x6e + BYTE $0x68 + BYTE $0x01 + BYTE $0xc4 + BYTE $0x63 + BYTE $0x89 + BYTE $0x22 + BYTE $0x76 + BYTE $0x40 + BYTE $0x01 + BYTE $0xc4 + BYTE $0x63 + BYTE $0x81 + BYTE $0x22 + BYTE $0x7e + BYTE $0x30 + BYTE $0x01 VMOVDQA X12, 144(R10) VMOVDQA X13, 160(R10) VMOVDQA X14, 176(R10) VMOVDQA X15, 192(R10) - HALF_ROUND_AVX(X0, X1, X2, X3, X4, X5, X6, X7, X12, X13, X14, X15, X15, X8, X9) - SHUFFLE_AVX() - LOAD_MSG_AVX_1_0_11_5_12_2_7_3() + VPADDQ X12, X0, X0 + VPADDQ X2, X0, X0 + VPADDQ X13, X1, X1 + VPADDQ X3, X1, X1 + VPXOR X0, X6, X6 + VPXOR X1, X7, X7 + VPSHUFD $-79, X6, X6 + VPSHUFD $-79, X7, X7 + VPADDQ X6, X4, X4 + VPADDQ X7, X5, X5 + VPXOR X4, X2, X2 + VPXOR X5, X3, X3 + VPSHUFB X8, X2, X2 + VPSHUFB X8, X3, X3 + VPADDQ X14, X0, X0 + VPADDQ X2, X0, X0 + VPADDQ X15, X1, X1 + VPADDQ X3, X1, X1 + VPXOR X0, X6, X6 + VPXOR X1, X7, X7 + VPSHUFB X9, X6, X6 + VPSHUFB X9, X7, X7 + VPADDQ X6, X4, X4 + VPADDQ X7, X5, X5 + VPXOR X4, X2, X2 + VPXOR X5, X3, X3 + VPADDQ X2, X2, X15 + VPSRLQ $0x3f, X2, X2 + VPXOR X15, X2, X2 + VPADDQ X3, X3, X15 + VPSRLQ $0x3f, X3, X3 + VPXOR X15, X3, X3 + VMOVDQA X6, X13 + VMOVDQA X2, X14 + VMOVDQA X4, X6 + BYTE $0xc4 + BYTE $0x41 + BYTE $0x11 + BYTE $0x6c + BYTE $0xfd + VMOVDQA X5, X4 + VMOVDQA X6, X5 + BYTE $0xc4 + BYTE $0xc1 + BYTE $0x41 + BYTE $0x6d + BYTE $0xf7 + BYTE $0xc5 + BYTE $0x41 + BYTE $0x6c + BYTE $0xff + BYTE $0xc4 + BYTE $0xc1 + BYTE $0x11 + BYTE $0x6d + BYTE $0xff + BYTE $0xc5 + BYTE $0x61 + BYTE $0x6c + BYTE $0xfb + BYTE $0xc4 + BYTE $0xc1 + BYTE $0x69 + BYTE $0x6d + BYTE $0xd7 + BYTE $0xc4 + BYTE $0x41 + BYTE $0x09 + BYTE $0x6c + BYTE $0xfe + BYTE $0xc4 + BYTE $0xc1 + BYTE $0x61 + BYTE $0x6d + BYTE $0xdf + VPSHUFD $0x4e, (SI), X12 + BYTE $0xc5 + BYTE $0x7a + BYTE $0x7e + BYTE $0x6e + BYTE $0x58 + BYTE $0xc5 + BYTE $0x7a + BYTE $0x7e + BYTE $0x76 + BYTE $0x60 + BYTE $0xc5 + BYTE $0x7a + BYTE $0x7e + BYTE $0x7e + BYTE $0x38 + BYTE $0xc4 + BYTE $0x63 + BYTE $0x91 + BYTE $0x22 + BYTE $0x6e + BYTE $0x28 + BYTE $0x01 + BYTE $0xc4 + BYTE $0x63 + BYTE $0x89 + BYTE $0x22 + BYTE $0x76 + BYTE $0x10 + BYTE $0x01 + BYTE $0xc4 + BYTE $0x63 + BYTE $0x81 + BYTE $0x22 + BYTE $0x7e + BYTE $0x18 + BYTE $0x01 VMOVDQA X12, 208(R10) VMOVDQA X13, 224(R10) VMOVDQA X14, 240(R10) VMOVDQA X15, 256(R10) - HALF_ROUND_AVX(X0, X1, X2, X3, X4, X5, X6, X7, X12, X13, X14, X15, X15, X8, X9) - SHUFFLE_AVX_INV() - - LOAD_MSG_AVX_11_12_5_15_8_0_2_13() - HALF_ROUND_AVX(X0, X1, X2, X3, X4, X5, X6, X7, X12, X13, X14, X15, X15, X8, X9) - SHUFFLE_AVX() - LOAD_MSG_AVX(10, 3, 7, 9, 14, 6, 1, 4) - HALF_ROUND_AVX(X0, X1, X2, X3, X4, X5, X6, X7, X12, X13, X14, X15, X15, X8, X9) - SHUFFLE_AVX_INV() - - LOAD_MSG_AVX(7, 3, 13, 11, 9, 1, 12, 14) - HALF_ROUND_AVX(X0, X1, X2, X3, X4, X5, X6, X7, X12, X13, X14, X15, X15, X8, X9) - SHUFFLE_AVX() - LOAD_MSG_AVX_2_5_4_15_6_10_0_8() - HALF_ROUND_AVX(X0, X1, X2, X3, X4, X5, X6, X7, X12, X13, X14, X15, X15, X8, X9) - SHUFFLE_AVX_INV() - - LOAD_MSG_AVX_9_5_2_10_0_7_4_15() - HALF_ROUND_AVX(X0, X1, X2, X3, X4, X5, X6, X7, X12, X13, X14, X15, X15, X8, X9) - SHUFFLE_AVX() - LOAD_MSG_AVX(14, 11, 6, 3, 1, 12, 8, 13) - HALF_ROUND_AVX(X0, X1, X2, X3, X4, X5, X6, X7, X12, X13, X14, X15, X15, X8, X9) - SHUFFLE_AVX_INV() - - LOAD_MSG_AVX_2_6_0_8_12_10_11_3() - HALF_ROUND_AVX(X0, X1, X2, X3, X4, X5, X6, X7, X12, X13, X14, X15, X15, X8, X9) - SHUFFLE_AVX() - LOAD_MSG_AVX(4, 7, 15, 1, 13, 5, 14, 9) - HALF_ROUND_AVX(X0, X1, X2, X3, X4, X5, X6, X7, X12, X13, X14, X15, X15, X8, X9) - SHUFFLE_AVX_INV() - - LOAD_MSG_AVX(12, 1, 14, 4, 5, 15, 13, 10) - HALF_ROUND_AVX(X0, X1, X2, X3, X4, X5, X6, X7, X12, X13, X14, X15, X15, X8, X9) - SHUFFLE_AVX() - LOAD_MSG_AVX_0_6_9_8_7_3_2_11() - HALF_ROUND_AVX(X0, X1, X2, X3, X4, X5, X6, X7, X12, X13, X14, X15, X15, X8, X9) - SHUFFLE_AVX_INV() - - LOAD_MSG_AVX(13, 7, 12, 3, 11, 14, 1, 9) - HALF_ROUND_AVX(X0, X1, X2, X3, X4, X5, X6, X7, X12, X13, X14, X15, X15, X8, X9) - SHUFFLE_AVX() - LOAD_MSG_AVX_5_15_8_2_0_4_6_10() - HALF_ROUND_AVX(X0, X1, X2, X3, X4, X5, X6, X7, X12, X13, X14, X15, X15, X8, X9) - SHUFFLE_AVX_INV() - - LOAD_MSG_AVX_6_14_11_0_15_9_3_8() - HALF_ROUND_AVX(X0, X1, X2, X3, X4, X5, X6, X7, X12, X13, X14, X15, X15, X8, X9) - SHUFFLE_AVX() - LOAD_MSG_AVX_12_13_1_10_2_7_4_5() - HALF_ROUND_AVX(X0, X1, X2, X3, X4, X5, X6, X7, X12, X13, X14, X15, X15, X8, X9) - SHUFFLE_AVX_INV() - - LOAD_MSG_AVX(10, 8, 7, 1, 2, 4, 6, 5) - HALF_ROUND_AVX(X0, X1, X2, X3, X4, X5, X6, X7, X12, X13, X14, X15, X15, X8, X9) - SHUFFLE_AVX() - LOAD_MSG_AVX_15_9_3_13_11_14_12_0() - HALF_ROUND_AVX(X0, X1, X2, X3, X4, X5, X6, X7, X12, X13, X14, X15, X15, X8, X9) - SHUFFLE_AVX_INV() - - HALF_ROUND_AVX(X0, X1, X2, X3, X4, X5, X6, X7, 16(R10), 32(R10), 48(R10), 64(R10), X15, X8, X9) - SHUFFLE_AVX() - HALF_ROUND_AVX(X0, X1, X2, X3, X4, X5, X6, X7, 80(R10), 96(R10), 112(R10), 128(R10), X15, X8, X9) - SHUFFLE_AVX_INV() - - HALF_ROUND_AVX(X0, X1, X2, X3, X4, X5, X6, X7, 144(R10), 160(R10), 176(R10), 192(R10), X15, X8, X9) - SHUFFLE_AVX() - HALF_ROUND_AVX(X0, X1, X2, X3, X4, X5, X6, X7, 208(R10), 224(R10), 240(R10), 256(R10), X15, X8, X9) - SHUFFLE_AVX_INV() - + VPADDQ X12, X0, X0 + VPADDQ X2, X0, X0 + VPADDQ X13, X1, X1 + VPADDQ X3, X1, X1 + VPXOR X0, X6, X6 + VPXOR X1, X7, X7 + VPSHUFD $-79, X6, X6 + VPSHUFD $-79, X7, X7 + VPADDQ X6, X4, X4 + VPADDQ X7, X5, X5 + VPXOR X4, X2, X2 + VPXOR X5, X3, X3 + VPSHUFB X8, X2, X2 + VPSHUFB X8, X3, X3 + VPADDQ X14, X0, X0 + VPADDQ X2, X0, X0 + VPADDQ X15, X1, X1 + VPADDQ X3, X1, X1 + VPXOR X0, X6, X6 + VPXOR X1, X7, X7 + VPSHUFB X9, X6, X6 + VPSHUFB X9, X7, X7 + VPADDQ X6, X4, X4 + VPADDQ X7, X5, X5 + VPXOR X4, X2, X2 + VPXOR X5, X3, X3 + VPADDQ X2, X2, X15 + VPSRLQ $0x3f, X2, X2 + VPXOR X15, X2, X2 + VPADDQ X3, X3, X15 + VPSRLQ $0x3f, X3, X3 + VPXOR X15, X3, X3 + VMOVDQA X2, X13 + VMOVDQA X4, X14 + BYTE $0xc5 + BYTE $0x69 + BYTE $0x6c + BYTE $0xfa + VMOVDQA X5, X4 + BYTE $0xc4 + BYTE $0xc1 + BYTE $0x61 + BYTE $0x6d + BYTE $0xd7 + VMOVDQA X14, X5 + BYTE $0xc5 + BYTE $0x61 + BYTE $0x6c + BYTE $0xfb + VMOVDQA X6, X14 + BYTE $0xc4 + BYTE $0xc1 + BYTE $0x11 + BYTE $0x6d + BYTE $0xdf + BYTE $0xc5 + BYTE $0x41 + BYTE $0x6c + BYTE $0xff + BYTE $0xc4 + BYTE $0xc1 + BYTE $0x49 + BYTE $0x6d + BYTE $0xf7 + BYTE $0xc4 + BYTE $0x41 + BYTE $0x09 + BYTE $0x6c + BYTE $0xfe + BYTE $0xc4 + BYTE $0xc1 + BYTE $0x41 + BYTE $0x6d + BYTE $0xff + VMOVDQU 88(SI), X12 + BYTE $0xc5 + BYTE $0x7a + BYTE $0x7e + BYTE $0x6e + BYTE $0x28 + BYTE $0xc5 + BYTE $0x7a + BYTE $0x7e + BYTE $0x76 + BYTE $0x40 + BYTE $0xc5 + BYTE $0x7a + BYTE $0x7e + BYTE $0x7e + BYTE $0x10 + BYTE $0xc4 + BYTE $0x63 + BYTE $0x91 + BYTE $0x22 + BYTE $0x6e + BYTE $0x78 + BYTE $0x01 + BYTE $0xc4 + BYTE $0x63 + BYTE $0x89 + BYTE $0x22 + BYTE $0x36 + BYTE $0x01 + BYTE $0xc4 + BYTE $0x63 + BYTE $0x81 + BYTE $0x22 + BYTE $0x7e + BYTE $0x68 + BYTE $0x01 + VPADDQ X12, X0, X0 + VPADDQ X2, X0, X0 + VPADDQ X13, X1, X1 + VPADDQ X3, X1, X1 + VPXOR X0, X6, X6 + VPXOR X1, X7, X7 + VPSHUFD $-79, X6, X6 + VPSHUFD $-79, X7, X7 + VPADDQ X6, X4, X4 + VPADDQ X7, X5, X5 + VPXOR X4, X2, X2 + VPXOR X5, X3, X3 + VPSHUFB X8, X2, X2 + VPSHUFB X8, X3, X3 + VPADDQ X14, X0, X0 + VPADDQ X2, X0, X0 + VPADDQ X15, X1, X1 + VPADDQ X3, X1, X1 + VPXOR X0, X6, X6 + VPXOR X1, X7, X7 + VPSHUFB X9, X6, X6 + VPSHUFB X9, X7, X7 + VPADDQ X6, X4, X4 + VPADDQ X7, X5, X5 + VPXOR X4, X2, X2 + VPXOR X5, X3, X3 + VPADDQ X2, X2, X15 + VPSRLQ $0x3f, X2, X2 + VPXOR X15, X2, X2 + VPADDQ X3, X3, X15 + VPSRLQ $0x3f, X3, X3 + VPXOR X15, X3, X3 + VMOVDQA X6, X13 + VMOVDQA X2, X14 + VMOVDQA X4, X6 + BYTE $0xc4 + BYTE $0x41 + BYTE $0x11 + BYTE $0x6c + BYTE $0xfd + VMOVDQA X5, X4 + VMOVDQA X6, X5 + BYTE $0xc4 + BYTE $0xc1 + BYTE $0x41 + BYTE $0x6d + BYTE $0xf7 + BYTE $0xc5 + BYTE $0x41 + BYTE $0x6c + BYTE $0xff + BYTE $0xc4 + BYTE $0xc1 + BYTE $0x11 + BYTE $0x6d + BYTE $0xff + BYTE $0xc5 + BYTE $0x61 + BYTE $0x6c + BYTE $0xfb + BYTE $0xc4 + BYTE $0xc1 + BYTE $0x69 + BYTE $0x6d + BYTE $0xd7 + BYTE $0xc4 + BYTE $0x41 + BYTE $0x09 + BYTE $0x6c + BYTE $0xfe + BYTE $0xc4 + BYTE $0xc1 + BYTE $0x61 + BYTE $0x6d + BYTE $0xdf + BYTE $0xc5 + BYTE $0x7a + BYTE $0x7e + BYTE $0x66 + BYTE $0x50 + BYTE $0xc5 + BYTE $0x7a + BYTE $0x7e + BYTE $0x6e + BYTE $0x38 + BYTE $0xc5 + BYTE $0x7a + BYTE $0x7e + BYTE $0x76 + BYTE $0x70 + BYTE $0xc5 + BYTE $0x7a + BYTE $0x7e + BYTE $0x7e + BYTE $0x08 + BYTE $0xc4 + BYTE $0x63 + BYTE $0x99 + BYTE $0x22 + BYTE $0x66 + BYTE $0x18 + BYTE $0x01 + BYTE $0xc4 + BYTE $0x63 + BYTE $0x91 + BYTE $0x22 + BYTE $0x6e + BYTE $0x48 + BYTE $0x01 + BYTE $0xc4 + BYTE $0x63 + BYTE $0x89 + BYTE $0x22 + BYTE $0x76 + BYTE $0x30 + BYTE $0x01 + BYTE $0xc4 + BYTE $0x63 + BYTE $0x81 + BYTE $0x22 + BYTE $0x7e + BYTE $0x20 + BYTE $0x01 + VPADDQ X12, X0, X0 + VPADDQ X2, X0, X0 + VPADDQ X13, X1, X1 + VPADDQ X3, X1, X1 + VPXOR X0, X6, X6 + VPXOR X1, X7, X7 + VPSHUFD $-79, X6, X6 + VPSHUFD $-79, X7, X7 + VPADDQ X6, X4, X4 + VPADDQ X7, X5, X5 + VPXOR X4, X2, X2 + VPXOR X5, X3, X3 + VPSHUFB X8, X2, X2 + VPSHUFB X8, X3, X3 + VPADDQ X14, X0, X0 + VPADDQ X2, X0, X0 + VPADDQ X15, X1, X1 + VPADDQ X3, X1, X1 + VPXOR X0, X6, X6 + VPXOR X1, X7, X7 + VPSHUFB X9, X6, X6 + VPSHUFB X9, X7, X7 + VPADDQ X6, X4, X4 + VPADDQ X7, X5, X5 + VPXOR X4, X2, X2 + VPXOR X5, X3, X3 + VPADDQ X2, X2, X15 + VPSRLQ $0x3f, X2, X2 + VPXOR X15, X2, X2 + VPADDQ X3, X3, X15 + VPSRLQ $0x3f, X3, X3 + VPXOR X15, X3, X3 + VMOVDQA X2, X13 + VMOVDQA X4, X14 + BYTE $0xc5 + BYTE $0x69 + BYTE $0x6c + BYTE $0xfa + VMOVDQA X5, X4 + BYTE $0xc4 + BYTE $0xc1 + BYTE $0x61 + BYTE $0x6d + BYTE $0xd7 + VMOVDQA X14, X5 + BYTE $0xc5 + BYTE $0x61 + BYTE $0x6c + BYTE $0xfb + VMOVDQA X6, X14 + BYTE $0xc4 + BYTE $0xc1 + BYTE $0x11 + BYTE $0x6d + BYTE $0xdf + BYTE $0xc5 + BYTE $0x41 + BYTE $0x6c + BYTE $0xff + BYTE $0xc4 + BYTE $0xc1 + BYTE $0x49 + BYTE $0x6d + BYTE $0xf7 + BYTE $0xc4 + BYTE $0x41 + BYTE $0x09 + BYTE $0x6c + BYTE $0xfe + BYTE $0xc4 + BYTE $0xc1 + BYTE $0x41 + BYTE $0x6d + BYTE $0xff + BYTE $0xc5 + BYTE $0x7a + BYTE $0x7e + BYTE $0x66 + BYTE $0x38 + BYTE $0xc5 + BYTE $0x7a + BYTE $0x7e + BYTE $0x6e + BYTE $0x68 + BYTE $0xc5 + BYTE $0x7a + BYTE $0x7e + BYTE $0x76 + BYTE $0x48 + BYTE $0xc5 + BYTE $0x7a + BYTE $0x7e + BYTE $0x7e + BYTE $0x60 + BYTE $0xc4 + BYTE $0x63 + BYTE $0x99 + BYTE $0x22 + BYTE $0x66 + BYTE $0x18 + BYTE $0x01 + BYTE $0xc4 + BYTE $0x63 + BYTE $0x91 + BYTE $0x22 + BYTE $0x6e + BYTE $0x58 + BYTE $0x01 + BYTE $0xc4 + BYTE $0x63 + BYTE $0x89 + BYTE $0x22 + BYTE $0x76 + BYTE $0x08 + BYTE $0x01 + BYTE $0xc4 + BYTE $0x63 + BYTE $0x81 + BYTE $0x22 + BYTE $0x7e + BYTE $0x70 + BYTE $0x01 + VPADDQ X12, X0, X0 + VPADDQ X2, X0, X0 + VPADDQ X13, X1, X1 + VPADDQ X3, X1, X1 + VPXOR X0, X6, X6 + VPXOR X1, X7, X7 + VPSHUFD $-79, X6, X6 + VPSHUFD $-79, X7, X7 + VPADDQ X6, X4, X4 + VPADDQ X7, X5, X5 + VPXOR X4, X2, X2 + VPXOR X5, X3, X3 + VPSHUFB X8, X2, X2 + VPSHUFB X8, X3, X3 + VPADDQ X14, X0, X0 + VPADDQ X2, X0, X0 + VPADDQ X15, X1, X1 + VPADDQ X3, X1, X1 + VPXOR X0, X6, X6 + VPXOR X1, X7, X7 + VPSHUFB X9, X6, X6 + VPSHUFB X9, X7, X7 + VPADDQ X6, X4, X4 + VPADDQ X7, X5, X5 + VPXOR X4, X2, X2 + VPXOR X5, X3, X3 + VPADDQ X2, X2, X15 + VPSRLQ $0x3f, X2, X2 + VPXOR X15, X2, X2 + VPADDQ X3, X3, X15 + VPSRLQ $0x3f, X3, X3 + VPXOR X15, X3, X3 + VMOVDQA X6, X13 + VMOVDQA X2, X14 + VMOVDQA X4, X6 + BYTE $0xc4 + BYTE $0x41 + BYTE $0x11 + BYTE $0x6c + BYTE $0xfd + VMOVDQA X5, X4 + VMOVDQA X6, X5 + BYTE $0xc4 + BYTE $0xc1 + BYTE $0x41 + BYTE $0x6d + BYTE $0xf7 + BYTE $0xc5 + BYTE $0x41 + BYTE $0x6c + BYTE $0xff + BYTE $0xc4 + BYTE $0xc1 + BYTE $0x11 + BYTE $0x6d + BYTE $0xff + BYTE $0xc5 + BYTE $0x61 + BYTE $0x6c + BYTE $0xfb + BYTE $0xc4 + BYTE $0xc1 + BYTE $0x69 + BYTE $0x6d + BYTE $0xd7 + BYTE $0xc4 + BYTE $0x41 + BYTE $0x09 + BYTE $0x6c + BYTE $0xfe + BYTE $0xc4 + BYTE $0xc1 + BYTE $0x61 + BYTE $0x6d + BYTE $0xdf + BYTE $0xc5 + BYTE $0x7a + BYTE $0x7e + BYTE $0x66 + BYTE $0x10 + BYTE $0xc5 + BYTE $0x7a + BYTE $0x7e + BYTE $0x6e + BYTE $0x20 + BYTE $0xc5 + BYTE $0x7a + BYTE $0x7e + BYTE $0x76 + BYTE $0x30 + BYTE $0xc5 + BYTE $0x7a + BYTE $0x7e + BYTE $0x3e + BYTE $0xc4 + BYTE $0x63 + BYTE $0x99 + BYTE $0x22 + BYTE $0x66 + BYTE $0x28 + BYTE $0x01 + BYTE $0xc4 + BYTE $0x63 + BYTE $0x91 + BYTE $0x22 + BYTE $0x6e + BYTE $0x78 + BYTE $0x01 + BYTE $0xc4 + BYTE $0x63 + BYTE $0x89 + BYTE $0x22 + BYTE $0x76 + BYTE $0x50 + BYTE $0x01 + BYTE $0xc4 + BYTE $0x63 + BYTE $0x81 + BYTE $0x22 + BYTE $0x7e + BYTE $0x40 + BYTE $0x01 + VPADDQ X12, X0, X0 + VPADDQ X2, X0, X0 + VPADDQ X13, X1, X1 + VPADDQ X3, X1, X1 + VPXOR X0, X6, X6 + VPXOR X1, X7, X7 + VPSHUFD $-79, X6, X6 + VPSHUFD $-79, X7, X7 + VPADDQ X6, X4, X4 + VPADDQ X7, X5, X5 + VPXOR X4, X2, X2 + VPXOR X5, X3, X3 + VPSHUFB X8, X2, X2 + VPSHUFB X8, X3, X3 + VPADDQ X14, X0, X0 + VPADDQ X2, X0, X0 + VPADDQ X15, X1, X1 + VPADDQ X3, X1, X1 + VPXOR X0, X6, X6 + VPXOR X1, X7, X7 + VPSHUFB X9, X6, X6 + VPSHUFB X9, X7, X7 + VPADDQ X6, X4, X4 + VPADDQ X7, X5, X5 + VPXOR X4, X2, X2 + VPXOR X5, X3, X3 + VPADDQ X2, X2, X15 + VPSRLQ $0x3f, X2, X2 + VPXOR X15, X2, X2 + VPADDQ X3, X3, X15 + VPSRLQ $0x3f, X3, X3 + VPXOR X15, X3, X3 + VMOVDQA X2, X13 + VMOVDQA X4, X14 + BYTE $0xc5 + BYTE $0x69 + BYTE $0x6c + BYTE $0xfa + VMOVDQA X5, X4 + BYTE $0xc4 + BYTE $0xc1 + BYTE $0x61 + BYTE $0x6d + BYTE $0xd7 + VMOVDQA X14, X5 + BYTE $0xc5 + BYTE $0x61 + BYTE $0x6c + BYTE $0xfb + VMOVDQA X6, X14 + BYTE $0xc4 + BYTE $0xc1 + BYTE $0x11 + BYTE $0x6d + BYTE $0xdf + BYTE $0xc5 + BYTE $0x41 + BYTE $0x6c + BYTE $0xff + BYTE $0xc4 + BYTE $0xc1 + BYTE $0x49 + BYTE $0x6d + BYTE $0xf7 + BYTE $0xc4 + BYTE $0x41 + BYTE $0x09 + BYTE $0x6c + BYTE $0xfe + BYTE $0xc4 + BYTE $0xc1 + BYTE $0x41 + BYTE $0x6d + BYTE $0xff + BYTE $0xc5 + BYTE $0x7a + BYTE $0x7e + BYTE $0x66 + BYTE $0x48 + BYTE $0xc5 + BYTE $0x7a + BYTE $0x7e + BYTE $0x6e + BYTE $0x10 + BYTE $0xc5 + BYTE $0x7a + BYTE $0x7e + BYTE $0x36 + BYTE $0xc5 + BYTE $0x7a + BYTE $0x7e + BYTE $0x7e + BYTE $0x20 + BYTE $0xc4 + BYTE $0x63 + BYTE $0x99 + BYTE $0x22 + BYTE $0x66 + BYTE $0x28 + BYTE $0x01 + BYTE $0xc4 + BYTE $0x63 + BYTE $0x91 + BYTE $0x22 + BYTE $0x6e + BYTE $0x50 + BYTE $0x01 + BYTE $0xc4 + BYTE $0x63 + BYTE $0x89 + BYTE $0x22 + BYTE $0x76 + BYTE $0x38 + BYTE $0x01 + BYTE $0xc4 + BYTE $0x63 + BYTE $0x81 + BYTE $0x22 + BYTE $0x7e + BYTE $0x78 + BYTE $0x01 + VPADDQ X12, X0, X0 + VPADDQ X2, X0, X0 + VPADDQ X13, X1, X1 + VPADDQ X3, X1, X1 + VPXOR X0, X6, X6 + VPXOR X1, X7, X7 + VPSHUFD $-79, X6, X6 + VPSHUFD $-79, X7, X7 + VPADDQ X6, X4, X4 + VPADDQ X7, X5, X5 + VPXOR X4, X2, X2 + VPXOR X5, X3, X3 + VPSHUFB X8, X2, X2 + VPSHUFB X8, X3, X3 + VPADDQ X14, X0, X0 + VPADDQ X2, X0, X0 + VPADDQ X15, X1, X1 + VPADDQ X3, X1, X1 + VPXOR X0, X6, X6 + VPXOR X1, X7, X7 + VPSHUFB X9, X6, X6 + VPSHUFB X9, X7, X7 + VPADDQ X6, X4, X4 + VPADDQ X7, X5, X5 + VPXOR X4, X2, X2 + VPXOR X5, X3, X3 + VPADDQ X2, X2, X15 + VPSRLQ $0x3f, X2, X2 + VPXOR X15, X2, X2 + VPADDQ X3, X3, X15 + VPSRLQ $0x3f, X3, X3 + VPXOR X15, X3, X3 + VMOVDQA X6, X13 + VMOVDQA X2, X14 + VMOVDQA X4, X6 + BYTE $0xc4 + BYTE $0x41 + BYTE $0x11 + BYTE $0x6c + BYTE $0xfd + VMOVDQA X5, X4 + VMOVDQA X6, X5 + BYTE $0xc4 + BYTE $0xc1 + BYTE $0x41 + BYTE $0x6d + BYTE $0xf7 + BYTE $0xc5 + BYTE $0x41 + BYTE $0x6c + BYTE $0xff + BYTE $0xc4 + BYTE $0xc1 + BYTE $0x11 + BYTE $0x6d + BYTE $0xff + BYTE $0xc5 + BYTE $0x61 + BYTE $0x6c + BYTE $0xfb + BYTE $0xc4 + BYTE $0xc1 + BYTE $0x69 + BYTE $0x6d + BYTE $0xd7 + BYTE $0xc4 + BYTE $0x41 + BYTE $0x09 + BYTE $0x6c + BYTE $0xfe + BYTE $0xc4 + BYTE $0xc1 + BYTE $0x61 + BYTE $0x6d + BYTE $0xdf + BYTE $0xc5 + BYTE $0x7a + BYTE $0x7e + BYTE $0x66 + BYTE $0x70 + BYTE $0xc5 + BYTE $0x7a + BYTE $0x7e + BYTE $0x6e + BYTE $0x30 + BYTE $0xc5 + BYTE $0x7a + BYTE $0x7e + BYTE $0x76 + BYTE $0x08 + BYTE $0xc5 + BYTE $0x7a + BYTE $0x7e + BYTE $0x7e + BYTE $0x40 + BYTE $0xc4 + BYTE $0x63 + BYTE $0x99 + BYTE $0x22 + BYTE $0x66 + BYTE $0x58 + BYTE $0x01 + BYTE $0xc4 + BYTE $0x63 + BYTE $0x91 + BYTE $0x22 + BYTE $0x6e + BYTE $0x18 + BYTE $0x01 + BYTE $0xc4 + BYTE $0x63 + BYTE $0x89 + BYTE $0x22 + BYTE $0x76 + BYTE $0x60 + BYTE $0x01 + BYTE $0xc4 + BYTE $0x63 + BYTE $0x81 + BYTE $0x22 + BYTE $0x7e + BYTE $0x68 + BYTE $0x01 + VPADDQ X12, X0, X0 + VPADDQ X2, X0, X0 + VPADDQ X13, X1, X1 + VPADDQ X3, X1, X1 + VPXOR X0, X6, X6 + VPXOR X1, X7, X7 + VPSHUFD $-79, X6, X6 + VPSHUFD $-79, X7, X7 + VPADDQ X6, X4, X4 + VPADDQ X7, X5, X5 + VPXOR X4, X2, X2 + VPXOR X5, X3, X3 + VPSHUFB X8, X2, X2 + VPSHUFB X8, X3, X3 + VPADDQ X14, X0, X0 + VPADDQ X2, X0, X0 + VPADDQ X15, X1, X1 + VPADDQ X3, X1, X1 + VPXOR X0, X6, X6 + VPXOR X1, X7, X7 + VPSHUFB X9, X6, X6 + VPSHUFB X9, X7, X7 + VPADDQ X6, X4, X4 + VPADDQ X7, X5, X5 + VPXOR X4, X2, X2 + VPXOR X5, X3, X3 + VPADDQ X2, X2, X15 + VPSRLQ $0x3f, X2, X2 + VPXOR X15, X2, X2 + VPADDQ X3, X3, X15 + VPSRLQ $0x3f, X3, X3 + VPXOR X15, X3, X3 + VMOVDQA X2, X13 + VMOVDQA X4, X14 + BYTE $0xc5 + BYTE $0x69 + BYTE $0x6c + BYTE $0xfa + VMOVDQA X5, X4 + BYTE $0xc4 + BYTE $0xc1 + BYTE $0x61 + BYTE $0x6d + BYTE $0xd7 + VMOVDQA X14, X5 + BYTE $0xc5 + BYTE $0x61 + BYTE $0x6c + BYTE $0xfb + VMOVDQA X6, X14 + BYTE $0xc4 + BYTE $0xc1 + BYTE $0x11 + BYTE $0x6d + BYTE $0xdf + BYTE $0xc5 + BYTE $0x41 + BYTE $0x6c + BYTE $0xff + BYTE $0xc4 + BYTE $0xc1 + BYTE $0x49 + BYTE $0x6d + BYTE $0xf7 + BYTE $0xc4 + BYTE $0x41 + BYTE $0x09 + BYTE $0x6c + BYTE $0xfe + BYTE $0xc4 + BYTE $0xc1 + BYTE $0x41 + BYTE $0x6d + BYTE $0xff + BYTE $0xc5 + BYTE $0x7a + BYTE $0x7e + BYTE $0x66 + BYTE $0x10 + BYTE $0xc5 + BYTE $0x7a + BYTE $0x7e + BYTE $0x2e + BYTE $0xc5 + BYTE $0x7a + BYTE $0x7e + BYTE $0x76 + BYTE $0x60 + BYTE $0xc5 + BYTE $0x7a + BYTE $0x7e + BYTE $0x7e + BYTE $0x58 + BYTE $0xc4 + BYTE $0x63 + BYTE $0x99 + BYTE $0x22 + BYTE $0x66 + BYTE $0x30 + BYTE $0x01 + BYTE $0xc4 + BYTE $0x63 + BYTE $0x91 + BYTE $0x22 + BYTE $0x6e + BYTE $0x40 + BYTE $0x01 + BYTE $0xc4 + BYTE $0x63 + BYTE $0x89 + BYTE $0x22 + BYTE $0x76 + BYTE $0x50 + BYTE $0x01 + BYTE $0xc4 + BYTE $0x63 + BYTE $0x81 + BYTE $0x22 + BYTE $0x7e + BYTE $0x18 + BYTE $0x01 + VPADDQ X12, X0, X0 + VPADDQ X2, X0, X0 + VPADDQ X13, X1, X1 + VPADDQ X3, X1, X1 + VPXOR X0, X6, X6 + VPXOR X1, X7, X7 + VPSHUFD $-79, X6, X6 + VPSHUFD $-79, X7, X7 + VPADDQ X6, X4, X4 + VPADDQ X7, X5, X5 + VPXOR X4, X2, X2 + VPXOR X5, X3, X3 + VPSHUFB X8, X2, X2 + VPSHUFB X8, X3, X3 + VPADDQ X14, X0, X0 + VPADDQ X2, X0, X0 + VPADDQ X15, X1, X1 + VPADDQ X3, X1, X1 + VPXOR X0, X6, X6 + VPXOR X1, X7, X7 + VPSHUFB X9, X6, X6 + VPSHUFB X9, X7, X7 + VPADDQ X6, X4, X4 + VPADDQ X7, X5, X5 + VPXOR X4, X2, X2 + VPXOR X5, X3, X3 + VPADDQ X2, X2, X15 + VPSRLQ $0x3f, X2, X2 + VPXOR X15, X2, X2 + VPADDQ X3, X3, X15 + VPSRLQ $0x3f, X3, X3 + VPXOR X15, X3, X3 + VMOVDQA X6, X13 + VMOVDQA X2, X14 + VMOVDQA X4, X6 + BYTE $0xc4 + BYTE $0x41 + BYTE $0x11 + BYTE $0x6c + BYTE $0xfd + VMOVDQA X5, X4 + VMOVDQA X6, X5 + BYTE $0xc4 + BYTE $0xc1 + BYTE $0x41 + BYTE $0x6d + BYTE $0xf7 + BYTE $0xc5 + BYTE $0x41 + BYTE $0x6c + BYTE $0xff + BYTE $0xc4 + BYTE $0xc1 + BYTE $0x11 + BYTE $0x6d + BYTE $0xff + BYTE $0xc5 + BYTE $0x61 + BYTE $0x6c + BYTE $0xfb + BYTE $0xc4 + BYTE $0xc1 + BYTE $0x69 + BYTE $0x6d + BYTE $0xd7 + BYTE $0xc4 + BYTE $0x41 + BYTE $0x09 + BYTE $0x6c + BYTE $0xfe + BYTE $0xc4 + BYTE $0xc1 + BYTE $0x61 + BYTE $0x6d + BYTE $0xdf + BYTE $0xc5 + BYTE $0x7a + BYTE $0x7e + BYTE $0x66 + BYTE $0x20 + BYTE $0xc5 + BYTE $0x7a + BYTE $0x7e + BYTE $0x6e + BYTE $0x78 + BYTE $0xc5 + BYTE $0x7a + BYTE $0x7e + BYTE $0x76 + BYTE $0x68 + BYTE $0xc5 + BYTE $0x7a + BYTE $0x7e + BYTE $0x7e + BYTE $0x70 + BYTE $0xc4 + BYTE $0x63 + BYTE $0x99 + BYTE $0x22 + BYTE $0x66 + BYTE $0x38 + BYTE $0x01 + BYTE $0xc4 + BYTE $0x63 + BYTE $0x91 + BYTE $0x22 + BYTE $0x6e + BYTE $0x08 + BYTE $0x01 + BYTE $0xc4 + BYTE $0x63 + BYTE $0x89 + BYTE $0x22 + BYTE $0x76 + BYTE $0x28 + BYTE $0x01 + BYTE $0xc4 + BYTE $0x63 + BYTE $0x81 + BYTE $0x22 + BYTE $0x7e + BYTE $0x48 + BYTE $0x01 + VPADDQ X12, X0, X0 + VPADDQ X2, X0, X0 + VPADDQ X13, X1, X1 + VPADDQ X3, X1, X1 + VPXOR X0, X6, X6 + VPXOR X1, X7, X7 + VPSHUFD $-79, X6, X6 + VPSHUFD $-79, X7, X7 + VPADDQ X6, X4, X4 + VPADDQ X7, X5, X5 + VPXOR X4, X2, X2 + VPXOR X5, X3, X3 + VPSHUFB X8, X2, X2 + VPSHUFB X8, X3, X3 + VPADDQ X14, X0, X0 + VPADDQ X2, X0, X0 + VPADDQ X15, X1, X1 + VPADDQ X3, X1, X1 + VPXOR X0, X6, X6 + VPXOR X1, X7, X7 + VPSHUFB X9, X6, X6 + VPSHUFB X9, X7, X7 + VPADDQ X6, X4, X4 + VPADDQ X7, X5, X5 + VPXOR X4, X2, X2 + VPXOR X5, X3, X3 + VPADDQ X2, X2, X15 + VPSRLQ $0x3f, X2, X2 + VPXOR X15, X2, X2 + VPADDQ X3, X3, X15 + VPSRLQ $0x3f, X3, X3 + VPXOR X15, X3, X3 + VMOVDQA X2, X13 + VMOVDQA X4, X14 + BYTE $0xc5 + BYTE $0x69 + BYTE $0x6c + BYTE $0xfa + VMOVDQA X5, X4 + BYTE $0xc4 + BYTE $0xc1 + BYTE $0x61 + BYTE $0x6d + BYTE $0xd7 + VMOVDQA X14, X5 + BYTE $0xc5 + BYTE $0x61 + BYTE $0x6c + BYTE $0xfb + VMOVDQA X6, X14 + BYTE $0xc4 + BYTE $0xc1 + BYTE $0x11 + BYTE $0x6d + BYTE $0xdf + BYTE $0xc5 + BYTE $0x41 + BYTE $0x6c + BYTE $0xff + BYTE $0xc4 + BYTE $0xc1 + BYTE $0x49 + BYTE $0x6d + BYTE $0xf7 + BYTE $0xc4 + BYTE $0x41 + BYTE $0x09 + BYTE $0x6c + BYTE $0xfe + BYTE $0xc4 + BYTE $0xc1 + BYTE $0x41 + BYTE $0x6d + BYTE $0xff + BYTE $0xc5 + BYTE $0x7a + BYTE $0x7e + BYTE $0x66 + BYTE $0x60 + BYTE $0xc5 + BYTE $0x7a + BYTE $0x7e + BYTE $0x6e + BYTE $0x70 + BYTE $0xc5 + BYTE $0x7a + BYTE $0x7e + BYTE $0x76 + BYTE $0x28 + BYTE $0xc5 + BYTE $0x7a + BYTE $0x7e + BYTE $0x7e + BYTE $0x68 + BYTE $0xc4 + BYTE $0x63 + BYTE $0x99 + BYTE $0x22 + BYTE $0x66 + BYTE $0x08 + BYTE $0x01 + BYTE $0xc4 + BYTE $0x63 + BYTE $0x91 + BYTE $0x22 + BYTE $0x6e + BYTE $0x20 + BYTE $0x01 + BYTE $0xc4 + BYTE $0x63 + BYTE $0x89 + BYTE $0x22 + BYTE $0x76 + BYTE $0x78 + BYTE $0x01 + BYTE $0xc4 + BYTE $0x63 + BYTE $0x81 + BYTE $0x22 + BYTE $0x7e + BYTE $0x50 + BYTE $0x01 + VPADDQ X12, X0, X0 + VPADDQ X2, X0, X0 + VPADDQ X13, X1, X1 + VPADDQ X3, X1, X1 + VPXOR X0, X6, X6 + VPXOR X1, X7, X7 + VPSHUFD $-79, X6, X6 + VPSHUFD $-79, X7, X7 + VPADDQ X6, X4, X4 + VPADDQ X7, X5, X5 + VPXOR X4, X2, X2 + VPXOR X5, X3, X3 + VPSHUFB X8, X2, X2 + VPSHUFB X8, X3, X3 + VPADDQ X14, X0, X0 + VPADDQ X2, X0, X0 + VPADDQ X15, X1, X1 + VPADDQ X3, X1, X1 + VPXOR X0, X6, X6 + VPXOR X1, X7, X7 + VPSHUFB X9, X6, X6 + VPSHUFB X9, X7, X7 + VPADDQ X6, X4, X4 + VPADDQ X7, X5, X5 + VPXOR X4, X2, X2 + VPXOR X5, X3, X3 + VPADDQ X2, X2, X15 + VPSRLQ $0x3f, X2, X2 + VPXOR X15, X2, X2 + VPADDQ X3, X3, X15 + VPSRLQ $0x3f, X3, X3 + VPXOR X15, X3, X3 + VMOVDQA X6, X13 + VMOVDQA X2, X14 + VMOVDQA X4, X6 + BYTE $0xc4 + BYTE $0x41 + BYTE $0x11 + BYTE $0x6c + BYTE $0xfd + VMOVDQA X5, X4 + VMOVDQA X6, X5 + BYTE $0xc4 + BYTE $0xc1 + BYTE $0x41 + BYTE $0x6d + BYTE $0xf7 + BYTE $0xc5 + BYTE $0x41 + BYTE $0x6c + BYTE $0xff + BYTE $0xc4 + BYTE $0xc1 + BYTE $0x11 + BYTE $0x6d + BYTE $0xff + BYTE $0xc5 + BYTE $0x61 + BYTE $0x6c + BYTE $0xfb + BYTE $0xc4 + BYTE $0xc1 + BYTE $0x69 + BYTE $0x6d + BYTE $0xd7 + BYTE $0xc4 + BYTE $0x41 + BYTE $0x09 + BYTE $0x6c + BYTE $0xfe + BYTE $0xc4 + BYTE $0xc1 + BYTE $0x61 + BYTE $0x6d + BYTE $0xdf + MOVQ (SI), X12 + VPSHUFD $0x4e, 64(SI), X13 + MOVQ 56(SI), X14 + MOVQ 16(SI), X15 + BYTE $0xc4 + BYTE $0x63 + BYTE $0x99 + BYTE $0x22 + BYTE $0x66 + BYTE $0x30 + BYTE $0x01 + BYTE $0xc4 + BYTE $0x63 + BYTE $0x89 + BYTE $0x22 + BYTE $0x76 + BYTE $0x18 + BYTE $0x01 + BYTE $0xc4 + BYTE $0x63 + BYTE $0x81 + BYTE $0x22 + BYTE $0x7e + BYTE $0x58 + BYTE $0x01 + VPADDQ X12, X0, X0 + VPADDQ X2, X0, X0 + VPADDQ X13, X1, X1 + VPADDQ X3, X1, X1 + VPXOR X0, X6, X6 + VPXOR X1, X7, X7 + VPSHUFD $-79, X6, X6 + VPSHUFD $-79, X7, X7 + VPADDQ X6, X4, X4 + VPADDQ X7, X5, X5 + VPXOR X4, X2, X2 + VPXOR X5, X3, X3 + VPSHUFB X8, X2, X2 + VPSHUFB X8, X3, X3 + VPADDQ X14, X0, X0 + VPADDQ X2, X0, X0 + VPADDQ X15, X1, X1 + VPADDQ X3, X1, X1 + VPXOR X0, X6, X6 + VPXOR X1, X7, X7 + VPSHUFB X9, X6, X6 + VPSHUFB X9, X7, X7 + VPADDQ X6, X4, X4 + VPADDQ X7, X5, X5 + VPXOR X4, X2, X2 + VPXOR X5, X3, X3 + VPADDQ X2, X2, X15 + VPSRLQ $0x3f, X2, X2 + VPXOR X15, X2, X2 + VPADDQ X3, X3, X15 + VPSRLQ $0x3f, X3, X3 + VPXOR X15, X3, X3 + VMOVDQA X2, X13 + VMOVDQA X4, X14 + BYTE $0xc5 + BYTE $0x69 + BYTE $0x6c + BYTE $0xfa + VMOVDQA X5, X4 + BYTE $0xc4 + BYTE $0xc1 + BYTE $0x61 + BYTE $0x6d + BYTE $0xd7 + VMOVDQA X14, X5 + BYTE $0xc5 + BYTE $0x61 + BYTE $0x6c + BYTE $0xfb + VMOVDQA X6, X14 + BYTE $0xc4 + BYTE $0xc1 + BYTE $0x11 + BYTE $0x6d + BYTE $0xdf + BYTE $0xc5 + BYTE $0x41 + BYTE $0x6c + BYTE $0xff + BYTE $0xc4 + BYTE $0xc1 + BYTE $0x49 + BYTE $0x6d + BYTE $0xf7 + BYTE $0xc4 + BYTE $0x41 + BYTE $0x09 + BYTE $0x6c + BYTE $0xfe + BYTE $0xc4 + BYTE $0xc1 + BYTE $0x41 + BYTE $0x6d + BYTE $0xff + BYTE $0xc5 + BYTE $0x7a + BYTE $0x7e + BYTE $0x66 + BYTE $0x68 + BYTE $0xc5 + BYTE $0x7a + BYTE $0x7e + BYTE $0x6e + BYTE $0x60 + BYTE $0xc5 + BYTE $0x7a + BYTE $0x7e + BYTE $0x76 + BYTE $0x58 + BYTE $0xc5 + BYTE $0x7a + BYTE $0x7e + BYTE $0x7e + BYTE $0x08 + BYTE $0xc4 + BYTE $0x63 + BYTE $0x99 + BYTE $0x22 + BYTE $0x66 + BYTE $0x38 + BYTE $0x01 + BYTE $0xc4 + BYTE $0x63 + BYTE $0x91 + BYTE $0x22 + BYTE $0x6e + BYTE $0x18 + BYTE $0x01 + BYTE $0xc4 + BYTE $0x63 + BYTE $0x89 + BYTE $0x22 + BYTE $0x76 + BYTE $0x70 + BYTE $0x01 + BYTE $0xc4 + BYTE $0x63 + BYTE $0x81 + BYTE $0x22 + BYTE $0x7e + BYTE $0x48 + BYTE $0x01 + VPADDQ X12, X0, X0 + VPADDQ X2, X0, X0 + VPADDQ X13, X1, X1 + VPADDQ X3, X1, X1 + VPXOR X0, X6, X6 + VPXOR X1, X7, X7 + VPSHUFD $-79, X6, X6 + VPSHUFD $-79, X7, X7 + VPADDQ X6, X4, X4 + VPADDQ X7, X5, X5 + VPXOR X4, X2, X2 + VPXOR X5, X3, X3 + VPSHUFB X8, X2, X2 + VPSHUFB X8, X3, X3 + VPADDQ X14, X0, X0 + VPADDQ X2, X0, X0 + VPADDQ X15, X1, X1 + VPADDQ X3, X1, X1 + VPXOR X0, X6, X6 + VPXOR X1, X7, X7 + VPSHUFB X9, X6, X6 + VPSHUFB X9, X7, X7 + VPADDQ X6, X4, X4 + VPADDQ X7, X5, X5 + VPXOR X4, X2, X2 + VPXOR X5, X3, X3 + VPADDQ X2, X2, X15 + VPSRLQ $0x3f, X2, X2 + VPXOR X15, X2, X2 + VPADDQ X3, X3, X15 + VPSRLQ $0x3f, X3, X3 + VPXOR X15, X3, X3 + VMOVDQA X6, X13 + VMOVDQA X2, X14 + VMOVDQA X4, X6 + BYTE $0xc4 + BYTE $0x41 + BYTE $0x11 + BYTE $0x6c + BYTE $0xfd + VMOVDQA X5, X4 + VMOVDQA X6, X5 + BYTE $0xc4 + BYTE $0xc1 + BYTE $0x41 + BYTE $0x6d + BYTE $0xf7 + BYTE $0xc5 + BYTE $0x41 + BYTE $0x6c + BYTE $0xff + BYTE $0xc4 + BYTE $0xc1 + BYTE $0x11 + BYTE $0x6d + BYTE $0xff + BYTE $0xc5 + BYTE $0x61 + BYTE $0x6c + BYTE $0xfb + BYTE $0xc4 + BYTE $0xc1 + BYTE $0x69 + BYTE $0x6d + BYTE $0xd7 + BYTE $0xc4 + BYTE $0x41 + BYTE $0x09 + BYTE $0x6c + BYTE $0xfe + BYTE $0xc4 + BYTE $0xc1 + BYTE $0x61 + BYTE $0x6d + BYTE $0xdf + MOVQ 40(SI), X12 + MOVQ 64(SI), X13 + MOVQ (SI), X14 + MOVQ 48(SI), X15 + BYTE $0xc4 + BYTE $0x63 + BYTE $0x99 + BYTE $0x22 + BYTE $0x66 + BYTE $0x78 + BYTE $0x01 + BYTE $0xc4 + BYTE $0x63 + BYTE $0x91 + BYTE $0x22 + BYTE $0x6e + BYTE $0x10 + BYTE $0x01 + BYTE $0xc4 + BYTE $0x63 + BYTE $0x89 + BYTE $0x22 + BYTE $0x76 + BYTE $0x20 + BYTE $0x01 + BYTE $0xc4 + BYTE $0x63 + BYTE $0x81 + BYTE $0x22 + BYTE $0x7e + BYTE $0x50 + BYTE $0x01 + VPADDQ X12, X0, X0 + VPADDQ X2, X0, X0 + VPADDQ X13, X1, X1 + VPADDQ X3, X1, X1 + VPXOR X0, X6, X6 + VPXOR X1, X7, X7 + VPSHUFD $-79, X6, X6 + VPSHUFD $-79, X7, X7 + VPADDQ X6, X4, X4 + VPADDQ X7, X5, X5 + VPXOR X4, X2, X2 + VPXOR X5, X3, X3 + VPSHUFB X8, X2, X2 + VPSHUFB X8, X3, X3 + VPADDQ X14, X0, X0 + VPADDQ X2, X0, X0 + VPADDQ X15, X1, X1 + VPADDQ X3, X1, X1 + VPXOR X0, X6, X6 + VPXOR X1, X7, X7 + VPSHUFB X9, X6, X6 + VPSHUFB X9, X7, X7 + VPADDQ X6, X4, X4 + VPADDQ X7, X5, X5 + VPXOR X4, X2, X2 + VPXOR X5, X3, X3 + VPADDQ X2, X2, X15 + VPSRLQ $0x3f, X2, X2 + VPXOR X15, X2, X2 + VPADDQ X3, X3, X15 + VPSRLQ $0x3f, X3, X3 + VPXOR X15, X3, X3 + VMOVDQA X2, X13 + VMOVDQA X4, X14 + BYTE $0xc5 + BYTE $0x69 + BYTE $0x6c + BYTE $0xfa + VMOVDQA X5, X4 + BYTE $0xc4 + BYTE $0xc1 + BYTE $0x61 + BYTE $0x6d + BYTE $0xd7 + VMOVDQA X14, X5 + BYTE $0xc5 + BYTE $0x61 + BYTE $0x6c + BYTE $0xfb + VMOVDQA X6, X14 + BYTE $0xc4 + BYTE $0xc1 + BYTE $0x11 + BYTE $0x6d + BYTE $0xdf + BYTE $0xc5 + BYTE $0x41 + BYTE $0x6c + BYTE $0xff + BYTE $0xc4 + BYTE $0xc1 + BYTE $0x49 + BYTE $0x6d + BYTE $0xf7 + BYTE $0xc4 + BYTE $0x41 + BYTE $0x09 + BYTE $0x6c + BYTE $0xfe + BYTE $0xc4 + BYTE $0xc1 + BYTE $0x41 + BYTE $0x6d + BYTE $0xff + MOVQ 48(SI), X12 + MOVQ 88(SI), X13 + MOVQ 120(SI), X14 + MOVQ 24(SI), X15 + BYTE $0xc4 + BYTE $0x63 + BYTE $0x99 + BYTE $0x22 + BYTE $0x66 + BYTE $0x70 + BYTE $0x01 + BYTE $0xc4 + BYTE $0x63 + BYTE $0x91 + BYTE $0x22 + BYTE $0x2e + BYTE $0x01 + BYTE $0xc4 + BYTE $0x63 + BYTE $0x89 + BYTE $0x22 + BYTE $0x76 + BYTE $0x48 + BYTE $0x01 + BYTE $0xc4 + BYTE $0x63 + BYTE $0x81 + BYTE $0x22 + BYTE $0x7e + BYTE $0x40 + BYTE $0x01 + VPADDQ X12, X0, X0 + VPADDQ X2, X0, X0 + VPADDQ X13, X1, X1 + VPADDQ X3, X1, X1 + VPXOR X0, X6, X6 + VPXOR X1, X7, X7 + VPSHUFD $-79, X6, X6 + VPSHUFD $-79, X7, X7 + VPADDQ X6, X4, X4 + VPADDQ X7, X5, X5 + VPXOR X4, X2, X2 + VPXOR X5, X3, X3 + VPSHUFB X8, X2, X2 + VPSHUFB X8, X3, X3 + VPADDQ X14, X0, X0 + VPADDQ X2, X0, X0 + VPADDQ X15, X1, X1 + VPADDQ X3, X1, X1 + VPXOR X0, X6, X6 + VPXOR X1, X7, X7 + VPSHUFB X9, X6, X6 + VPSHUFB X9, X7, X7 + VPADDQ X6, X4, X4 + VPADDQ X7, X5, X5 + VPXOR X4, X2, X2 + VPXOR X5, X3, X3 + VPADDQ X2, X2, X15 + VPSRLQ $0x3f, X2, X2 + VPXOR X15, X2, X2 + VPADDQ X3, X3, X15 + VPSRLQ $0x3f, X3, X3 + VPXOR X15, X3, X3 + VMOVDQA X6, X13 + VMOVDQA X2, X14 + VMOVDQA X4, X6 + BYTE $0xc4 + BYTE $0x41 + BYTE $0x11 + BYTE $0x6c + BYTE $0xfd + VMOVDQA X5, X4 + VMOVDQA X6, X5 + BYTE $0xc4 + BYTE $0xc1 + BYTE $0x41 + BYTE $0x6d + BYTE $0xf7 + BYTE $0xc5 + BYTE $0x41 + BYTE $0x6c + BYTE $0xff + BYTE $0xc4 + BYTE $0xc1 + BYTE $0x11 + BYTE $0x6d + BYTE $0xff + BYTE $0xc5 + BYTE $0x61 + BYTE $0x6c + BYTE $0xfb + BYTE $0xc4 + BYTE $0xc1 + BYTE $0x69 + BYTE $0x6d + BYTE $0xd7 + BYTE $0xc4 + BYTE $0x41 + BYTE $0x09 + BYTE $0x6c + BYTE $0xfe + BYTE $0xc4 + BYTE $0xc1 + BYTE $0x61 + BYTE $0x6d + BYTE $0xdf + VMOVDQU 96(SI), X12 + MOVQ 8(SI), X13 + MOVQ 16(SI), X14 + BYTE $0xc4 + BYTE $0x63 + BYTE $0x91 + BYTE $0x22 + BYTE $0x6e + BYTE $0x50 + BYTE $0x01 + BYTE $0xc4 + BYTE $0x63 + BYTE $0x89 + BYTE $0x22 + BYTE $0x76 + BYTE $0x38 + BYTE $0x01 + VMOVDQU 32(SI), X15 + VPADDQ X12, X0, X0 + VPADDQ X2, X0, X0 + VPADDQ X13, X1, X1 + VPADDQ X3, X1, X1 + VPXOR X0, X6, X6 + VPXOR X1, X7, X7 + VPSHUFD $-79, X6, X6 + VPSHUFD $-79, X7, X7 + VPADDQ X6, X4, X4 + VPADDQ X7, X5, X5 + VPXOR X4, X2, X2 + VPXOR X5, X3, X3 + VPSHUFB X8, X2, X2 + VPSHUFB X8, X3, X3 + VPADDQ X14, X0, X0 + VPADDQ X2, X0, X0 + VPADDQ X15, X1, X1 + VPADDQ X3, X1, X1 + VPXOR X0, X6, X6 + VPXOR X1, X7, X7 + VPSHUFB X9, X6, X6 + VPSHUFB X9, X7, X7 + VPADDQ X6, X4, X4 + VPADDQ X7, X5, X5 + VPXOR X4, X2, X2 + VPXOR X5, X3, X3 + VPADDQ X2, X2, X15 + VPSRLQ $0x3f, X2, X2 + VPXOR X15, X2, X2 + VPADDQ X3, X3, X15 + VPSRLQ $0x3f, X3, X3 + VPXOR X15, X3, X3 + VMOVDQA X2, X13 + VMOVDQA X4, X14 + BYTE $0xc5 + BYTE $0x69 + BYTE $0x6c + BYTE $0xfa + VMOVDQA X5, X4 + BYTE $0xc4 + BYTE $0xc1 + BYTE $0x61 + BYTE $0x6d + BYTE $0xd7 + VMOVDQA X14, X5 + BYTE $0xc5 + BYTE $0x61 + BYTE $0x6c + BYTE $0xfb + VMOVDQA X6, X14 + BYTE $0xc4 + BYTE $0xc1 + BYTE $0x11 + BYTE $0x6d + BYTE $0xdf + BYTE $0xc5 + BYTE $0x41 + BYTE $0x6c + BYTE $0xff + BYTE $0xc4 + BYTE $0xc1 + BYTE $0x49 + BYTE $0x6d + BYTE $0xf7 + BYTE $0xc4 + BYTE $0x41 + BYTE $0x09 + BYTE $0x6c + BYTE $0xfe + BYTE $0xc4 + BYTE $0xc1 + BYTE $0x41 + BYTE $0x6d + BYTE $0xff + BYTE $0xc5 + BYTE $0x7a + BYTE $0x7e + BYTE $0x66 + BYTE $0x50 + BYTE $0xc5 + BYTE $0x7a + BYTE $0x7e + BYTE $0x6e + BYTE $0x38 + BYTE $0xc5 + BYTE $0x7a + BYTE $0x7e + BYTE $0x76 + BYTE $0x10 + BYTE $0xc5 + BYTE $0x7a + BYTE $0x7e + BYTE $0x7e + BYTE $0x30 + BYTE $0xc4 + BYTE $0x63 + BYTE $0x99 + BYTE $0x22 + BYTE $0x66 + BYTE $0x40 + BYTE $0x01 + BYTE $0xc4 + BYTE $0x63 + BYTE $0x91 + BYTE $0x22 + BYTE $0x6e + BYTE $0x08 + BYTE $0x01 + BYTE $0xc4 + BYTE $0x63 + BYTE $0x89 + BYTE $0x22 + BYTE $0x76 + BYTE $0x20 + BYTE $0x01 + BYTE $0xc4 + BYTE $0x63 + BYTE $0x81 + BYTE $0x22 + BYTE $0x7e + BYTE $0x28 + BYTE $0x01 + VPADDQ X12, X0, X0 + VPADDQ X2, X0, X0 + VPADDQ X13, X1, X1 + VPADDQ X3, X1, X1 + VPXOR X0, X6, X6 + VPXOR X1, X7, X7 + VPSHUFD $-79, X6, X6 + VPSHUFD $-79, X7, X7 + VPADDQ X6, X4, X4 + VPADDQ X7, X5, X5 + VPXOR X4, X2, X2 + VPXOR X5, X3, X3 + VPSHUFB X8, X2, X2 + VPSHUFB X8, X3, X3 + VPADDQ X14, X0, X0 + VPADDQ X2, X0, X0 + VPADDQ X15, X1, X1 + VPADDQ X3, X1, X1 + VPXOR X0, X6, X6 + VPXOR X1, X7, X7 + VPSHUFB X9, X6, X6 + VPSHUFB X9, X7, X7 + VPADDQ X6, X4, X4 + VPADDQ X7, X5, X5 + VPXOR X4, X2, X2 + VPXOR X5, X3, X3 + VPADDQ X2, X2, X15 + VPSRLQ $0x3f, X2, X2 + VPXOR X15, X2, X2 + VPADDQ X3, X3, X15 + VPSRLQ $0x3f, X3, X3 + VPXOR X15, X3, X3 + VMOVDQA X6, X13 + VMOVDQA X2, X14 + VMOVDQA X4, X6 + BYTE $0xc4 + BYTE $0x41 + BYTE $0x11 + BYTE $0x6c + BYTE $0xfd + VMOVDQA X5, X4 + VMOVDQA X6, X5 + BYTE $0xc4 + BYTE $0xc1 + BYTE $0x41 + BYTE $0x6d + BYTE $0xf7 + BYTE $0xc5 + BYTE $0x41 + BYTE $0x6c + BYTE $0xff + BYTE $0xc4 + BYTE $0xc1 + BYTE $0x11 + BYTE $0x6d + BYTE $0xff + BYTE $0xc5 + BYTE $0x61 + BYTE $0x6c + BYTE $0xfb + BYTE $0xc4 + BYTE $0xc1 + BYTE $0x69 + BYTE $0x6d + BYTE $0xd7 + BYTE $0xc4 + BYTE $0x41 + BYTE $0x09 + BYTE $0x6c + BYTE $0xfe + BYTE $0xc4 + BYTE $0xc1 + BYTE $0x61 + BYTE $0x6d + BYTE $0xdf + MOVQ 120(SI), X12 + MOVQ 24(SI), X13 + MOVQ 88(SI), X14 + MOVQ 96(SI), X15 + BYTE $0xc4 + BYTE $0x63 + BYTE $0x99 + BYTE $0x22 + BYTE $0x66 + BYTE $0x48 + BYTE $0x01 + BYTE $0xc4 + BYTE $0x63 + BYTE $0x91 + BYTE $0x22 + BYTE $0x6e + BYTE $0x68 + BYTE $0x01 + BYTE $0xc4 + BYTE $0x63 + BYTE $0x89 + BYTE $0x22 + BYTE $0x76 + BYTE $0x70 + BYTE $0x01 + BYTE $0xc4 + BYTE $0x63 + BYTE $0x81 + BYTE $0x22 + BYTE $0x3e + BYTE $0x01 + VPADDQ X12, X0, X0 + VPADDQ X2, X0, X0 + VPADDQ X13, X1, X1 + VPADDQ X3, X1, X1 + VPXOR X0, X6, X6 + VPXOR X1, X7, X7 + VPSHUFD $-79, X6, X6 + VPSHUFD $-79, X7, X7 + VPADDQ X6, X4, X4 + VPADDQ X7, X5, X5 + VPXOR X4, X2, X2 + VPXOR X5, X3, X3 + VPSHUFB X8, X2, X2 + VPSHUFB X8, X3, X3 + VPADDQ X14, X0, X0 + VPADDQ X2, X0, X0 + VPADDQ X15, X1, X1 + VPADDQ X3, X1, X1 + VPXOR X0, X6, X6 + VPXOR X1, X7, X7 + VPSHUFB X9, X6, X6 + VPSHUFB X9, X7, X7 + VPADDQ X6, X4, X4 + VPADDQ X7, X5, X5 + VPXOR X4, X2, X2 + VPXOR X5, X3, X3 + VPADDQ X2, X2, X15 + VPSRLQ $0x3f, X2, X2 + VPXOR X15, X2, X2 + VPADDQ X3, X3, X15 + VPSRLQ $0x3f, X3, X3 + VPXOR X15, X3, X3 + VMOVDQA X2, X13 + VMOVDQA X4, X14 + BYTE $0xc5 + BYTE $0x69 + BYTE $0x6c + BYTE $0xfa + VMOVDQA X5, X4 + BYTE $0xc4 + BYTE $0xc1 + BYTE $0x61 + BYTE $0x6d + BYTE $0xd7 + VMOVDQA X14, X5 + BYTE $0xc5 + BYTE $0x61 + BYTE $0x6c + BYTE $0xfb + VMOVDQA X6, X14 + BYTE $0xc4 + BYTE $0xc1 + BYTE $0x11 + BYTE $0x6d + BYTE $0xdf + BYTE $0xc5 + BYTE $0x41 + BYTE $0x6c + BYTE $0xff + BYTE $0xc4 + BYTE $0xc1 + BYTE $0x49 + BYTE $0x6d + BYTE $0xf7 + BYTE $0xc4 + BYTE $0x41 + BYTE $0x09 + BYTE $0x6c + BYTE $0xfe + BYTE $0xc4 + BYTE $0xc1 + BYTE $0x41 + BYTE $0x6d + BYTE $0xff + VPADDQ 16(R10), X0, X0 + VPADDQ X2, X0, X0 + VPADDQ 32(R10), X1, X1 + VPADDQ X3, X1, X1 + VPXOR X0, X6, X6 + VPXOR X1, X7, X7 + VPSHUFD $-79, X6, X6 + VPSHUFD $-79, X7, X7 + VPADDQ X6, X4, X4 + VPADDQ X7, X5, X5 + VPXOR X4, X2, X2 + VPXOR X5, X3, X3 + VPSHUFB X8, X2, X2 + VPSHUFB X8, X3, X3 + VPADDQ 48(R10), X0, X0 + VPADDQ X2, X0, X0 + VPADDQ 64(R10), X1, X1 + VPADDQ X3, X1, X1 + VPXOR X0, X6, X6 + VPXOR X1, X7, X7 + VPSHUFB X9, X6, X6 + VPSHUFB X9, X7, X7 + VPADDQ X6, X4, X4 + VPADDQ X7, X5, X5 + VPXOR X4, X2, X2 + VPXOR X5, X3, X3 + VPADDQ X2, X2, X15 + VPSRLQ $0x3f, X2, X2 + VPXOR X15, X2, X2 + VPADDQ X3, X3, X15 + VPSRLQ $0x3f, X3, X3 + VPXOR X15, X3, X3 + VMOVDQA X6, X13 + VMOVDQA X2, X14 + VMOVDQA X4, X6 + BYTE $0xc4 + BYTE $0x41 + BYTE $0x11 + BYTE $0x6c + BYTE $0xfd + VMOVDQA X5, X4 + VMOVDQA X6, X5 + BYTE $0xc4 + BYTE $0xc1 + BYTE $0x41 + BYTE $0x6d + BYTE $0xf7 + BYTE $0xc5 + BYTE $0x41 + BYTE $0x6c + BYTE $0xff + BYTE $0xc4 + BYTE $0xc1 + BYTE $0x11 + BYTE $0x6d + BYTE $0xff + BYTE $0xc5 + BYTE $0x61 + BYTE $0x6c + BYTE $0xfb + BYTE $0xc4 + BYTE $0xc1 + BYTE $0x69 + BYTE $0x6d + BYTE $0xd7 + BYTE $0xc4 + BYTE $0x41 + BYTE $0x09 + BYTE $0x6c + BYTE $0xfe + BYTE $0xc4 + BYTE $0xc1 + BYTE $0x61 + BYTE $0x6d + BYTE $0xdf + VPADDQ 80(R10), X0, X0 + VPADDQ X2, X0, X0 + VPADDQ 96(R10), X1, X1 + VPADDQ X3, X1, X1 + VPXOR X0, X6, X6 + VPXOR X1, X7, X7 + VPSHUFD $-79, X6, X6 + VPSHUFD $-79, X7, X7 + VPADDQ X6, X4, X4 + VPADDQ X7, X5, X5 + VPXOR X4, X2, X2 + VPXOR X5, X3, X3 + VPSHUFB X8, X2, X2 + VPSHUFB X8, X3, X3 + VPADDQ 112(R10), X0, X0 + VPADDQ X2, X0, X0 + VPADDQ 128(R10), X1, X1 + VPADDQ X3, X1, X1 + VPXOR X0, X6, X6 + VPXOR X1, X7, X7 + VPSHUFB X9, X6, X6 + VPSHUFB X9, X7, X7 + VPADDQ X6, X4, X4 + VPADDQ X7, X5, X5 + VPXOR X4, X2, X2 + VPXOR X5, X3, X3 + VPADDQ X2, X2, X15 + VPSRLQ $0x3f, X2, X2 + VPXOR X15, X2, X2 + VPADDQ X3, X3, X15 + VPSRLQ $0x3f, X3, X3 + VPXOR X15, X3, X3 + VMOVDQA X2, X13 + VMOVDQA X4, X14 + BYTE $0xc5 + BYTE $0x69 + BYTE $0x6c + BYTE $0xfa + VMOVDQA X5, X4 + BYTE $0xc4 + BYTE $0xc1 + BYTE $0x61 + BYTE $0x6d + BYTE $0xd7 + VMOVDQA X14, X5 + BYTE $0xc5 + BYTE $0x61 + BYTE $0x6c + BYTE $0xfb + VMOVDQA X6, X14 + BYTE $0xc4 + BYTE $0xc1 + BYTE $0x11 + BYTE $0x6d + BYTE $0xdf + BYTE $0xc5 + BYTE $0x41 + BYTE $0x6c + BYTE $0xff + BYTE $0xc4 + BYTE $0xc1 + BYTE $0x49 + BYTE $0x6d + BYTE $0xf7 + BYTE $0xc4 + BYTE $0x41 + BYTE $0x09 + BYTE $0x6c + BYTE $0xfe + BYTE $0xc4 + BYTE $0xc1 + BYTE $0x41 + BYTE $0x6d + BYTE $0xff + VPADDQ 144(R10), X0, X0 + VPADDQ X2, X0, X0 + VPADDQ 160(R10), X1, X1 + VPADDQ X3, X1, X1 + VPXOR X0, X6, X6 + VPXOR X1, X7, X7 + VPSHUFD $-79, X6, X6 + VPSHUFD $-79, X7, X7 + VPADDQ X6, X4, X4 + VPADDQ X7, X5, X5 + VPXOR X4, X2, X2 + VPXOR X5, X3, X3 + VPSHUFB X8, X2, X2 + VPSHUFB X8, X3, X3 + VPADDQ 176(R10), X0, X0 + VPADDQ X2, X0, X0 + VPADDQ 192(R10), X1, X1 + VPADDQ X3, X1, X1 + VPXOR X0, X6, X6 + VPXOR X1, X7, X7 + VPSHUFB X9, X6, X6 + VPSHUFB X9, X7, X7 + VPADDQ X6, X4, X4 + VPADDQ X7, X5, X5 + VPXOR X4, X2, X2 + VPXOR X5, X3, X3 + VPADDQ X2, X2, X15 + VPSRLQ $0x3f, X2, X2 + VPXOR X15, X2, X2 + VPADDQ X3, X3, X15 + VPSRLQ $0x3f, X3, X3 + VPXOR X15, X3, X3 + VMOVDQA X6, X13 + VMOVDQA X2, X14 + VMOVDQA X4, X6 + BYTE $0xc4 + BYTE $0x41 + BYTE $0x11 + BYTE $0x6c + BYTE $0xfd + VMOVDQA X5, X4 + VMOVDQA X6, X5 + BYTE $0xc4 + BYTE $0xc1 + BYTE $0x41 + BYTE $0x6d + BYTE $0xf7 + BYTE $0xc5 + BYTE $0x41 + BYTE $0x6c + BYTE $0xff + BYTE $0xc4 + BYTE $0xc1 + BYTE $0x11 + BYTE $0x6d + BYTE $0xff + BYTE $0xc5 + BYTE $0x61 + BYTE $0x6c + BYTE $0xfb + BYTE $0xc4 + BYTE $0xc1 + BYTE $0x69 + BYTE $0x6d + BYTE $0xd7 + BYTE $0xc4 + BYTE $0x41 + BYTE $0x09 + BYTE $0x6c + BYTE $0xfe + BYTE $0xc4 + BYTE $0xc1 + BYTE $0x61 + BYTE $0x6d + BYTE $0xdf + VPADDQ 208(R10), X0, X0 + VPADDQ X2, X0, X0 + VPADDQ 224(R10), X1, X1 + VPADDQ X3, X1, X1 + VPXOR X0, X6, X6 + VPXOR X1, X7, X7 + VPSHUFD $-79, X6, X6 + VPSHUFD $-79, X7, X7 + VPADDQ X6, X4, X4 + VPADDQ X7, X5, X5 + VPXOR X4, X2, X2 + VPXOR X5, X3, X3 + VPSHUFB X8, X2, X2 + VPSHUFB X8, X3, X3 + VPADDQ 240(R10), X0, X0 + VPADDQ X2, X0, X0 + VPADDQ 256(R10), X1, X1 + VPADDQ X3, X1, X1 + VPXOR X0, X6, X6 + VPXOR X1, X7, X7 + VPSHUFB X9, X6, X6 + VPSHUFB X9, X7, X7 + VPADDQ X6, X4, X4 + VPADDQ X7, X5, X5 + VPXOR X4, X2, X2 + VPXOR X5, X3, X3 + VPADDQ X2, X2, X15 + VPSRLQ $0x3f, X2, X2 + VPXOR X15, X2, X2 + VPADDQ X3, X3, X15 + VPSRLQ $0x3f, X3, X3 + VPXOR X15, X3, X3 + VMOVDQA X2, X13 + VMOVDQA X4, X14 + BYTE $0xc5 + BYTE $0x69 + BYTE $0x6c + BYTE $0xfa + VMOVDQA X5, X4 + BYTE $0xc4 + BYTE $0xc1 + BYTE $0x61 + BYTE $0x6d + BYTE $0xd7 + VMOVDQA X14, X5 + BYTE $0xc5 + BYTE $0x61 + BYTE $0x6c + BYTE $0xfb + VMOVDQA X6, X14 + BYTE $0xc4 + BYTE $0xc1 + BYTE $0x11 + BYTE $0x6d + BYTE $0xdf + BYTE $0xc5 + BYTE $0x41 + BYTE $0x6c + BYTE $0xff + BYTE $0xc4 + BYTE $0xc1 + BYTE $0x49 + BYTE $0x6d + BYTE $0xf7 + BYTE $0xc4 + BYTE $0x41 + BYTE $0x09 + BYTE $0x6c + BYTE $0xfe + BYTE $0xc4 + BYTE $0xc1 + BYTE $0x41 + BYTE $0x6d + BYTE $0xff VMOVDQU 32(AX), X14 VMOVDQU 48(AX), X15 VPXOR X0, X10, X10 @@ -729,16 +4524,36 @@ noinc: VPXOR X7, X15, X3 VMOVDQU X2, 32(AX) VMOVDQU X3, 48(AX) + LEAQ 128(SI), SI + SUBQ $0x80, DI + JNE loop + VMOVDQU X10, (AX) + VMOVDQU X11, 16(AX) + MOVQ R8, (BX) + MOVQ R9, 8(BX) + VZEROUPPER + RET - LEAQ 128(SI), SI - SUBQ $128, DI - JNE loop +DATA ·AVX_c40<>+0(SB)/8, $0x0201000706050403 +DATA ·AVX_c40<>+8(SB)/8, $0x0a09080f0e0d0c0b +GLOBL ·AVX_c40<>(SB), RODATA|NOPTR, $16 - VMOVDQU X10, 0(AX) - VMOVDQU X11, 16(AX) +DATA ·AVX_c48<>+0(SB)/8, $0x0100070605040302 +DATA ·AVX_c48<>+8(SB)/8, $0x09080f0e0d0c0b0a +GLOBL ·AVX_c48<>(SB), RODATA|NOPTR, $16 - MOVQ R8, 0(BX) - MOVQ R9, 8(BX) - VZEROUPPER +DATA ·AVX_iv3<>+0(SB)/8, $0x1f83d9abfb41bd6b +DATA ·AVX_iv3<>+8(SB)/8, $0x5be0cd19137e2179 +GLOBL ·AVX_iv3<>(SB), RODATA|NOPTR, $16 - RET +DATA ·AVX_iv0<>+0(SB)/8, $0x6a09e667f3bcc908 +DATA ·AVX_iv0<>+8(SB)/8, $0xbb67ae8584caa73b +GLOBL ·AVX_iv0<>(SB), RODATA|NOPTR, $16 + +DATA ·AVX_iv1<>+0(SB)/8, $0x3c6ef372fe94f82b +DATA ·AVX_iv1<>+8(SB)/8, $0xa54ff53a5f1d36f1 +GLOBL ·AVX_iv1<>(SB), RODATA|NOPTR, $16 + +DATA ·AVX_iv2<>+0(SB)/8, $0x510e527fade682d1 +DATA ·AVX_iv2<>+8(SB)/8, $0x9b05688c2b3e6c1f +GLOBL ·AVX_iv2<>(SB), RODATA|NOPTR, $16 diff --git a/vendor/golang.org/x/crypto/blake2b/blake2b_amd64.s b/vendor/golang.org/x/crypto/blake2b/blake2b_amd64.s index adfac00c15c..9a0ce212446 100644 --- a/vendor/golang.org/x/crypto/blake2b/blake2b_amd64.s +++ b/vendor/golang.org/x/crypto/blake2b/blake2b_amd64.s @@ -1,278 +1,1441 @@ -// Copyright 2016 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. +// Code generated by command: go run blake2b_amd64_asm.go -out ../../blake2b_amd64.s -pkg blake2b. DO NOT EDIT. //go:build amd64 && gc && !purego #include "textflag.h" -DATA ·iv0<>+0x00(SB)/8, $0x6a09e667f3bcc908 -DATA ·iv0<>+0x08(SB)/8, $0xbb67ae8584caa73b -GLOBL ·iv0<>(SB), (NOPTR+RODATA), $16 - -DATA ·iv1<>+0x00(SB)/8, $0x3c6ef372fe94f82b -DATA ·iv1<>+0x08(SB)/8, $0xa54ff53a5f1d36f1 -GLOBL ·iv1<>(SB), (NOPTR+RODATA), $16 - -DATA ·iv2<>+0x00(SB)/8, $0x510e527fade682d1 -DATA ·iv2<>+0x08(SB)/8, $0x9b05688c2b3e6c1f -GLOBL ·iv2<>(SB), (NOPTR+RODATA), $16 - -DATA ·iv3<>+0x00(SB)/8, $0x1f83d9abfb41bd6b -DATA ·iv3<>+0x08(SB)/8, $0x5be0cd19137e2179 -GLOBL ·iv3<>(SB), (NOPTR+RODATA), $16 - -DATA ·c40<>+0x00(SB)/8, $0x0201000706050403 -DATA ·c40<>+0x08(SB)/8, $0x0a09080f0e0d0c0b -GLOBL ·c40<>(SB), (NOPTR+RODATA), $16 - -DATA ·c48<>+0x00(SB)/8, $0x0100070605040302 -DATA ·c48<>+0x08(SB)/8, $0x09080f0e0d0c0b0a -GLOBL ·c48<>(SB), (NOPTR+RODATA), $16 - -#define SHUFFLE(v2, v3, v4, v5, v6, v7, t1, t2) \ - MOVO v4, t1; \ - MOVO v5, v4; \ - MOVO t1, v5; \ - MOVO v6, t1; \ - PUNPCKLQDQ v6, t2; \ - PUNPCKHQDQ v7, v6; \ - PUNPCKHQDQ t2, v6; \ - PUNPCKLQDQ v7, t2; \ - MOVO t1, v7; \ - MOVO v2, t1; \ - PUNPCKHQDQ t2, v7; \ - PUNPCKLQDQ v3, t2; \ - PUNPCKHQDQ t2, v2; \ - PUNPCKLQDQ t1, t2; \ - PUNPCKHQDQ t2, v3 - -#define SHUFFLE_INV(v2, v3, v4, v5, v6, v7, t1, t2) \ - MOVO v4, t1; \ - MOVO v5, v4; \ - MOVO t1, v5; \ - MOVO v2, t1; \ - PUNPCKLQDQ v2, t2; \ - PUNPCKHQDQ v3, v2; \ - PUNPCKHQDQ t2, v2; \ - PUNPCKLQDQ v3, t2; \ - MOVO t1, v3; \ - MOVO v6, t1; \ - PUNPCKHQDQ t2, v3; \ - PUNPCKLQDQ v7, t2; \ - PUNPCKHQDQ t2, v6; \ - PUNPCKLQDQ t1, t2; \ - PUNPCKHQDQ t2, v7 - -#define HALF_ROUND(v0, v1, v2, v3, v4, v5, v6, v7, m0, m1, m2, m3, t0, c40, c48) \ - PADDQ m0, v0; \ - PADDQ m1, v1; \ - PADDQ v2, v0; \ - PADDQ v3, v1; \ - PXOR v0, v6; \ - PXOR v1, v7; \ - PSHUFD $0xB1, v6, v6; \ - PSHUFD $0xB1, v7, v7; \ - PADDQ v6, v4; \ - PADDQ v7, v5; \ - PXOR v4, v2; \ - PXOR v5, v3; \ - PSHUFB c40, v2; \ - PSHUFB c40, v3; \ - PADDQ m2, v0; \ - PADDQ m3, v1; \ - PADDQ v2, v0; \ - PADDQ v3, v1; \ - PXOR v0, v6; \ - PXOR v1, v7; \ - PSHUFB c48, v6; \ - PSHUFB c48, v7; \ - PADDQ v6, v4; \ - PADDQ v7, v5; \ - PXOR v4, v2; \ - PXOR v5, v3; \ - MOVOU v2, t0; \ - PADDQ v2, t0; \ - PSRLQ $63, v2; \ - PXOR t0, v2; \ - MOVOU v3, t0; \ - PADDQ v3, t0; \ - PSRLQ $63, v3; \ - PXOR t0, v3 - -#define LOAD_MSG(m0, m1, m2, m3, src, i0, i1, i2, i3, i4, i5, i6, i7) \ - MOVQ i0*8(src), m0; \ - PINSRQ $1, i1*8(src), m0; \ - MOVQ i2*8(src), m1; \ - PINSRQ $1, i3*8(src), m1; \ - MOVQ i4*8(src), m2; \ - PINSRQ $1, i5*8(src), m2; \ - MOVQ i6*8(src), m3; \ - PINSRQ $1, i7*8(src), m3 - // func hashBlocksSSE4(h *[8]uint64, c *[2]uint64, flag uint64, blocks []byte) -TEXT ·hashBlocksSSE4(SB), 4, $288-48 // frame size = 272 + 16 byte alignment - MOVQ h+0(FP), AX - MOVQ c+8(FP), BX - MOVQ flag+16(FP), CX - MOVQ blocks_base+24(FP), SI - MOVQ blocks_len+32(FP), DI - - MOVQ SP, R10 - ADDQ $15, R10 - ANDQ $~15, R10 - - MOVOU ·iv3<>(SB), X0 - MOVO X0, 0(R10) - XORQ CX, 0(R10) // 0(R10) = ·iv3 ^ (CX || 0) - - MOVOU ·c40<>(SB), X13 - MOVOU ·c48<>(SB), X14 - - MOVOU 0(AX), X12 +// Requires: SSE2, SSE4.1, SSSE3 +TEXT ·hashBlocksSSE4(SB), NOSPLIT, $288-48 + MOVQ h+0(FP), AX + MOVQ c+8(FP), BX + MOVQ flag+16(FP), CX + MOVQ blocks_base+24(FP), SI + MOVQ blocks_len+32(FP), DI + MOVQ SP, R10 + ADDQ $0x0f, R10 + ANDQ $-16, R10 + MOVOU ·iv3<>+0(SB), X0 + MOVO X0, (R10) + XORQ CX, (R10) + MOVOU ·c40<>+0(SB), X13 + MOVOU ·c48<>+0(SB), X14 + MOVOU (AX), X12 MOVOU 16(AX), X15 - - MOVQ 0(BX), R8 - MOVQ 8(BX), R9 + MOVQ (BX), R8 + MOVQ 8(BX), R9 loop: - ADDQ $128, R8 - CMPQ R8, $128 + ADDQ $0x80, R8 + CMPQ R8, $0x80 JGE noinc INCQ R9 noinc: - MOVQ R8, X8 - PINSRQ $1, R9, X8 - - MOVO X12, X0 - MOVO X15, X1 - MOVOU 32(AX), X2 - MOVOU 48(AX), X3 - MOVOU ·iv0<>(SB), X4 - MOVOU ·iv1<>(SB), X5 - MOVOU ·iv2<>(SB), X6 - - PXOR X8, X6 - MOVO 0(R10), X7 - - LOAD_MSG(X8, X9, X10, X11, SI, 0, 2, 4, 6, 1, 3, 5, 7) - MOVO X8, 16(R10) - MOVO X9, 32(R10) - MOVO X10, 48(R10) - MOVO X11, 64(R10) - HALF_ROUND(X0, X1, X2, X3, X4, X5, X6, X7, X8, X9, X10, X11, X11, X13, X14) - SHUFFLE(X2, X3, X4, X5, X6, X7, X8, X9) - LOAD_MSG(X8, X9, X10, X11, SI, 8, 10, 12, 14, 9, 11, 13, 15) - MOVO X8, 80(R10) - MOVO X9, 96(R10) - MOVO X10, 112(R10) - MOVO X11, 128(R10) - HALF_ROUND(X0, X1, X2, X3, X4, X5, X6, X7, X8, X9, X10, X11, X11, X13, X14) - SHUFFLE_INV(X2, X3, X4, X5, X6, X7, X8, X9) - - LOAD_MSG(X8, X9, X10, X11, SI, 14, 4, 9, 13, 10, 8, 15, 6) - MOVO X8, 144(R10) - MOVO X9, 160(R10) - MOVO X10, 176(R10) - MOVO X11, 192(R10) - HALF_ROUND(X0, X1, X2, X3, X4, X5, X6, X7, X8, X9, X10, X11, X11, X13, X14) - SHUFFLE(X2, X3, X4, X5, X6, X7, X8, X9) - LOAD_MSG(X8, X9, X10, X11, SI, 1, 0, 11, 5, 12, 2, 7, 3) - MOVO X8, 208(R10) - MOVO X9, 224(R10) - MOVO X10, 240(R10) - MOVO X11, 256(R10) - HALF_ROUND(X0, X1, X2, X3, X4, X5, X6, X7, X8, X9, X10, X11, X11, X13, X14) - SHUFFLE_INV(X2, X3, X4, X5, X6, X7, X8, X9) - - LOAD_MSG(X8, X9, X10, X11, SI, 11, 12, 5, 15, 8, 0, 2, 13) - HALF_ROUND(X0, X1, X2, X3, X4, X5, X6, X7, X8, X9, X10, X11, X11, X13, X14) - SHUFFLE(X2, X3, X4, X5, X6, X7, X8, X9) - LOAD_MSG(X8, X9, X10, X11, SI, 10, 3, 7, 9, 14, 6, 1, 4) - HALF_ROUND(X0, X1, X2, X3, X4, X5, X6, X7, X8, X9, X10, X11, X11, X13, X14) - SHUFFLE_INV(X2, X3, X4, X5, X6, X7, X8, X9) - - LOAD_MSG(X8, X9, X10, X11, SI, 7, 3, 13, 11, 9, 1, 12, 14) - HALF_ROUND(X0, X1, X2, X3, X4, X5, X6, X7, X8, X9, X10, X11, X11, X13, X14) - SHUFFLE(X2, X3, X4, X5, X6, X7, X8, X9) - LOAD_MSG(X8, X9, X10, X11, SI, 2, 5, 4, 15, 6, 10, 0, 8) - HALF_ROUND(X0, X1, X2, X3, X4, X5, X6, X7, X8, X9, X10, X11, X11, X13, X14) - SHUFFLE_INV(X2, X3, X4, X5, X6, X7, X8, X9) - - LOAD_MSG(X8, X9, X10, X11, SI, 9, 5, 2, 10, 0, 7, 4, 15) - HALF_ROUND(X0, X1, X2, X3, X4, X5, X6, X7, X8, X9, X10, X11, X11, X13, X14) - SHUFFLE(X2, X3, X4, X5, X6, X7, X8, X9) - LOAD_MSG(X8, X9, X10, X11, SI, 14, 11, 6, 3, 1, 12, 8, 13) - HALF_ROUND(X0, X1, X2, X3, X4, X5, X6, X7, X8, X9, X10, X11, X11, X13, X14) - SHUFFLE_INV(X2, X3, X4, X5, X6, X7, X8, X9) - - LOAD_MSG(X8, X9, X10, X11, SI, 2, 6, 0, 8, 12, 10, 11, 3) - HALF_ROUND(X0, X1, X2, X3, X4, X5, X6, X7, X8, X9, X10, X11, X11, X13, X14) - SHUFFLE(X2, X3, X4, X5, X6, X7, X8, X9) - LOAD_MSG(X8, X9, X10, X11, SI, 4, 7, 15, 1, 13, 5, 14, 9) - HALF_ROUND(X0, X1, X2, X3, X4, X5, X6, X7, X8, X9, X10, X11, X11, X13, X14) - SHUFFLE_INV(X2, X3, X4, X5, X6, X7, X8, X9) - - LOAD_MSG(X8, X9, X10, X11, SI, 12, 1, 14, 4, 5, 15, 13, 10) - HALF_ROUND(X0, X1, X2, X3, X4, X5, X6, X7, X8, X9, X10, X11, X11, X13, X14) - SHUFFLE(X2, X3, X4, X5, X6, X7, X8, X9) - LOAD_MSG(X8, X9, X10, X11, SI, 0, 6, 9, 8, 7, 3, 2, 11) - HALF_ROUND(X0, X1, X2, X3, X4, X5, X6, X7, X8, X9, X10, X11, X11, X13, X14) - SHUFFLE_INV(X2, X3, X4, X5, X6, X7, X8, X9) - - LOAD_MSG(X8, X9, X10, X11, SI, 13, 7, 12, 3, 11, 14, 1, 9) - HALF_ROUND(X0, X1, X2, X3, X4, X5, X6, X7, X8, X9, X10, X11, X11, X13, X14) - SHUFFLE(X2, X3, X4, X5, X6, X7, X8, X9) - LOAD_MSG(X8, X9, X10, X11, SI, 5, 15, 8, 2, 0, 4, 6, 10) - HALF_ROUND(X0, X1, X2, X3, X4, X5, X6, X7, X8, X9, X10, X11, X11, X13, X14) - SHUFFLE_INV(X2, X3, X4, X5, X6, X7, X8, X9) - - LOAD_MSG(X8, X9, X10, X11, SI, 6, 14, 11, 0, 15, 9, 3, 8) - HALF_ROUND(X0, X1, X2, X3, X4, X5, X6, X7, X8, X9, X10, X11, X11, X13, X14) - SHUFFLE(X2, X3, X4, X5, X6, X7, X8, X9) - LOAD_MSG(X8, X9, X10, X11, SI, 12, 13, 1, 10, 2, 7, 4, 5) - HALF_ROUND(X0, X1, X2, X3, X4, X5, X6, X7, X8, X9, X10, X11, X11, X13, X14) - SHUFFLE_INV(X2, X3, X4, X5, X6, X7, X8, X9) - - LOAD_MSG(X8, X9, X10, X11, SI, 10, 8, 7, 1, 2, 4, 6, 5) - HALF_ROUND(X0, X1, X2, X3, X4, X5, X6, X7, X8, X9, X10, X11, X11, X13, X14) - SHUFFLE(X2, X3, X4, X5, X6, X7, X8, X9) - LOAD_MSG(X8, X9, X10, X11, SI, 15, 9, 3, 13, 11, 14, 12, 0) - HALF_ROUND(X0, X1, X2, X3, X4, X5, X6, X7, X8, X9, X10, X11, X11, X13, X14) - SHUFFLE_INV(X2, X3, X4, X5, X6, X7, X8, X9) - - HALF_ROUND(X0, X1, X2, X3, X4, X5, X6, X7, 16(R10), 32(R10), 48(R10), 64(R10), X11, X13, X14) - SHUFFLE(X2, X3, X4, X5, X6, X7, X8, X9) - HALF_ROUND(X0, X1, X2, X3, X4, X5, X6, X7, 80(R10), 96(R10), 112(R10), 128(R10), X11, X13, X14) - SHUFFLE_INV(X2, X3, X4, X5, X6, X7, X8, X9) + MOVQ R8, X8 + PINSRQ $0x01, R9, X8 + MOVO X12, X0 + MOVO X15, X1 + MOVOU 32(AX), X2 + MOVOU 48(AX), X3 + MOVOU ·iv0<>+0(SB), X4 + MOVOU ·iv1<>+0(SB), X5 + MOVOU ·iv2<>+0(SB), X6 + PXOR X8, X6 + MOVO (R10), X7 + MOVQ (SI), X8 + PINSRQ $0x01, 16(SI), X8 + MOVQ 32(SI), X9 + PINSRQ $0x01, 48(SI), X9 + MOVQ 8(SI), X10 + PINSRQ $0x01, 24(SI), X10 + MOVQ 40(SI), X11 + PINSRQ $0x01, 56(SI), X11 + MOVO X8, 16(R10) + MOVO X9, 32(R10) + MOVO X10, 48(R10) + MOVO X11, 64(R10) + PADDQ X8, X0 + PADDQ X9, X1 + PADDQ X2, X0 + PADDQ X3, X1 + PXOR X0, X6 + PXOR X1, X7 + PSHUFD $0xb1, X6, X6 + PSHUFD $0xb1, X7, X7 + PADDQ X6, X4 + PADDQ X7, X5 + PXOR X4, X2 + PXOR X5, X3 + PSHUFB X13, X2 + PSHUFB X13, X3 + PADDQ X10, X0 + PADDQ X11, X1 + PADDQ X2, X0 + PADDQ X3, X1 + PXOR X0, X6 + PXOR X1, X7 + PSHUFB X14, X6 + PSHUFB X14, X7 + PADDQ X6, X4 + PADDQ X7, X5 + PXOR X4, X2 + PXOR X5, X3 + MOVOU X2, X11 + PADDQ X2, X11 + PSRLQ $0x3f, X2 + PXOR X11, X2 + MOVOU X3, X11 + PADDQ X3, X11 + PSRLQ $0x3f, X3 + PXOR X11, X3 + MOVO X4, X8 + MOVO X5, X4 + MOVO X8, X5 + MOVO X6, X8 + PUNPCKLQDQ X6, X9 + PUNPCKHQDQ X7, X6 + PUNPCKHQDQ X9, X6 + PUNPCKLQDQ X7, X9 + MOVO X8, X7 + MOVO X2, X8 + PUNPCKHQDQ X9, X7 + PUNPCKLQDQ X3, X9 + PUNPCKHQDQ X9, X2 + PUNPCKLQDQ X8, X9 + PUNPCKHQDQ X9, X3 + MOVQ 64(SI), X8 + PINSRQ $0x01, 80(SI), X8 + MOVQ 96(SI), X9 + PINSRQ $0x01, 112(SI), X9 + MOVQ 72(SI), X10 + PINSRQ $0x01, 88(SI), X10 + MOVQ 104(SI), X11 + PINSRQ $0x01, 120(SI), X11 + MOVO X8, 80(R10) + MOVO X9, 96(R10) + MOVO X10, 112(R10) + MOVO X11, 128(R10) + PADDQ X8, X0 + PADDQ X9, X1 + PADDQ X2, X0 + PADDQ X3, X1 + PXOR X0, X6 + PXOR X1, X7 + PSHUFD $0xb1, X6, X6 + PSHUFD $0xb1, X7, X7 + PADDQ X6, X4 + PADDQ X7, X5 + PXOR X4, X2 + PXOR X5, X3 + PSHUFB X13, X2 + PSHUFB X13, X3 + PADDQ X10, X0 + PADDQ X11, X1 + PADDQ X2, X0 + PADDQ X3, X1 + PXOR X0, X6 + PXOR X1, X7 + PSHUFB X14, X6 + PSHUFB X14, X7 + PADDQ X6, X4 + PADDQ X7, X5 + PXOR X4, X2 + PXOR X5, X3 + MOVOU X2, X11 + PADDQ X2, X11 + PSRLQ $0x3f, X2 + PXOR X11, X2 + MOVOU X3, X11 + PADDQ X3, X11 + PSRLQ $0x3f, X3 + PXOR X11, X3 + MOVO X4, X8 + MOVO X5, X4 + MOVO X8, X5 + MOVO X2, X8 + PUNPCKLQDQ X2, X9 + PUNPCKHQDQ X3, X2 + PUNPCKHQDQ X9, X2 + PUNPCKLQDQ X3, X9 + MOVO X8, X3 + MOVO X6, X8 + PUNPCKHQDQ X9, X3 + PUNPCKLQDQ X7, X9 + PUNPCKHQDQ X9, X6 + PUNPCKLQDQ X8, X9 + PUNPCKHQDQ X9, X7 + MOVQ 112(SI), X8 + PINSRQ $0x01, 32(SI), X8 + MOVQ 72(SI), X9 + PINSRQ $0x01, 104(SI), X9 + MOVQ 80(SI), X10 + PINSRQ $0x01, 64(SI), X10 + MOVQ 120(SI), X11 + PINSRQ $0x01, 48(SI), X11 + MOVO X8, 144(R10) + MOVO X9, 160(R10) + MOVO X10, 176(R10) + MOVO X11, 192(R10) + PADDQ X8, X0 + PADDQ X9, X1 + PADDQ X2, X0 + PADDQ X3, X1 + PXOR X0, X6 + PXOR X1, X7 + PSHUFD $0xb1, X6, X6 + PSHUFD $0xb1, X7, X7 + PADDQ X6, X4 + PADDQ X7, X5 + PXOR X4, X2 + PXOR X5, X3 + PSHUFB X13, X2 + PSHUFB X13, X3 + PADDQ X10, X0 + PADDQ X11, X1 + PADDQ X2, X0 + PADDQ X3, X1 + PXOR X0, X6 + PXOR X1, X7 + PSHUFB X14, X6 + PSHUFB X14, X7 + PADDQ X6, X4 + PADDQ X7, X5 + PXOR X4, X2 + PXOR X5, X3 + MOVOU X2, X11 + PADDQ X2, X11 + PSRLQ $0x3f, X2 + PXOR X11, X2 + MOVOU X3, X11 + PADDQ X3, X11 + PSRLQ $0x3f, X3 + PXOR X11, X3 + MOVO X4, X8 + MOVO X5, X4 + MOVO X8, X5 + MOVO X6, X8 + PUNPCKLQDQ X6, X9 + PUNPCKHQDQ X7, X6 + PUNPCKHQDQ X9, X6 + PUNPCKLQDQ X7, X9 + MOVO X8, X7 + MOVO X2, X8 + PUNPCKHQDQ X9, X7 + PUNPCKLQDQ X3, X9 + PUNPCKHQDQ X9, X2 + PUNPCKLQDQ X8, X9 + PUNPCKHQDQ X9, X3 + MOVQ 8(SI), X8 + PINSRQ $0x01, (SI), X8 + MOVQ 88(SI), X9 + PINSRQ $0x01, 40(SI), X9 + MOVQ 96(SI), X10 + PINSRQ $0x01, 16(SI), X10 + MOVQ 56(SI), X11 + PINSRQ $0x01, 24(SI), X11 + MOVO X8, 208(R10) + MOVO X9, 224(R10) + MOVO X10, 240(R10) + MOVO X11, 256(R10) + PADDQ X8, X0 + PADDQ X9, X1 + PADDQ X2, X0 + PADDQ X3, X1 + PXOR X0, X6 + PXOR X1, X7 + PSHUFD $0xb1, X6, X6 + PSHUFD $0xb1, X7, X7 + PADDQ X6, X4 + PADDQ X7, X5 + PXOR X4, X2 + PXOR X5, X3 + PSHUFB X13, X2 + PSHUFB X13, X3 + PADDQ X10, X0 + PADDQ X11, X1 + PADDQ X2, X0 + PADDQ X3, X1 + PXOR X0, X6 + PXOR X1, X7 + PSHUFB X14, X6 + PSHUFB X14, X7 + PADDQ X6, X4 + PADDQ X7, X5 + PXOR X4, X2 + PXOR X5, X3 + MOVOU X2, X11 + PADDQ X2, X11 + PSRLQ $0x3f, X2 + PXOR X11, X2 + MOVOU X3, X11 + PADDQ X3, X11 + PSRLQ $0x3f, X3 + PXOR X11, X3 + MOVO X4, X8 + MOVO X5, X4 + MOVO X8, X5 + MOVO X2, X8 + PUNPCKLQDQ X2, X9 + PUNPCKHQDQ X3, X2 + PUNPCKHQDQ X9, X2 + PUNPCKLQDQ X3, X9 + MOVO X8, X3 + MOVO X6, X8 + PUNPCKHQDQ X9, X3 + PUNPCKLQDQ X7, X9 + PUNPCKHQDQ X9, X6 + PUNPCKLQDQ X8, X9 + PUNPCKHQDQ X9, X7 + MOVQ 88(SI), X8 + PINSRQ $0x01, 96(SI), X8 + MOVQ 40(SI), X9 + PINSRQ $0x01, 120(SI), X9 + MOVQ 64(SI), X10 + PINSRQ $0x01, (SI), X10 + MOVQ 16(SI), X11 + PINSRQ $0x01, 104(SI), X11 + PADDQ X8, X0 + PADDQ X9, X1 + PADDQ X2, X0 + PADDQ X3, X1 + PXOR X0, X6 + PXOR X1, X7 + PSHUFD $0xb1, X6, X6 + PSHUFD $0xb1, X7, X7 + PADDQ X6, X4 + PADDQ X7, X5 + PXOR X4, X2 + PXOR X5, X3 + PSHUFB X13, X2 + PSHUFB X13, X3 + PADDQ X10, X0 + PADDQ X11, X1 + PADDQ X2, X0 + PADDQ X3, X1 + PXOR X0, X6 + PXOR X1, X7 + PSHUFB X14, X6 + PSHUFB X14, X7 + PADDQ X6, X4 + PADDQ X7, X5 + PXOR X4, X2 + PXOR X5, X3 + MOVOU X2, X11 + PADDQ X2, X11 + PSRLQ $0x3f, X2 + PXOR X11, X2 + MOVOU X3, X11 + PADDQ X3, X11 + PSRLQ $0x3f, X3 + PXOR X11, X3 + MOVO X4, X8 + MOVO X5, X4 + MOVO X8, X5 + MOVO X6, X8 + PUNPCKLQDQ X6, X9 + PUNPCKHQDQ X7, X6 + PUNPCKHQDQ X9, X6 + PUNPCKLQDQ X7, X9 + MOVO X8, X7 + MOVO X2, X8 + PUNPCKHQDQ X9, X7 + PUNPCKLQDQ X3, X9 + PUNPCKHQDQ X9, X2 + PUNPCKLQDQ X8, X9 + PUNPCKHQDQ X9, X3 + MOVQ 80(SI), X8 + PINSRQ $0x01, 24(SI), X8 + MOVQ 56(SI), X9 + PINSRQ $0x01, 72(SI), X9 + MOVQ 112(SI), X10 + PINSRQ $0x01, 48(SI), X10 + MOVQ 8(SI), X11 + PINSRQ $0x01, 32(SI), X11 + PADDQ X8, X0 + PADDQ X9, X1 + PADDQ X2, X0 + PADDQ X3, X1 + PXOR X0, X6 + PXOR X1, X7 + PSHUFD $0xb1, X6, X6 + PSHUFD $0xb1, X7, X7 + PADDQ X6, X4 + PADDQ X7, X5 + PXOR X4, X2 + PXOR X5, X3 + PSHUFB X13, X2 + PSHUFB X13, X3 + PADDQ X10, X0 + PADDQ X11, X1 + PADDQ X2, X0 + PADDQ X3, X1 + PXOR X0, X6 + PXOR X1, X7 + PSHUFB X14, X6 + PSHUFB X14, X7 + PADDQ X6, X4 + PADDQ X7, X5 + PXOR X4, X2 + PXOR X5, X3 + MOVOU X2, X11 + PADDQ X2, X11 + PSRLQ $0x3f, X2 + PXOR X11, X2 + MOVOU X3, X11 + PADDQ X3, X11 + PSRLQ $0x3f, X3 + PXOR X11, X3 + MOVO X4, X8 + MOVO X5, X4 + MOVO X8, X5 + MOVO X2, X8 + PUNPCKLQDQ X2, X9 + PUNPCKHQDQ X3, X2 + PUNPCKHQDQ X9, X2 + PUNPCKLQDQ X3, X9 + MOVO X8, X3 + MOVO X6, X8 + PUNPCKHQDQ X9, X3 + PUNPCKLQDQ X7, X9 + PUNPCKHQDQ X9, X6 + PUNPCKLQDQ X8, X9 + PUNPCKHQDQ X9, X7 + MOVQ 56(SI), X8 + PINSRQ $0x01, 24(SI), X8 + MOVQ 104(SI), X9 + PINSRQ $0x01, 88(SI), X9 + MOVQ 72(SI), X10 + PINSRQ $0x01, 8(SI), X10 + MOVQ 96(SI), X11 + PINSRQ $0x01, 112(SI), X11 + PADDQ X8, X0 + PADDQ X9, X1 + PADDQ X2, X0 + PADDQ X3, X1 + PXOR X0, X6 + PXOR X1, X7 + PSHUFD $0xb1, X6, X6 + PSHUFD $0xb1, X7, X7 + PADDQ X6, X4 + PADDQ X7, X5 + PXOR X4, X2 + PXOR X5, X3 + PSHUFB X13, X2 + PSHUFB X13, X3 + PADDQ X10, X0 + PADDQ X11, X1 + PADDQ X2, X0 + PADDQ X3, X1 + PXOR X0, X6 + PXOR X1, X7 + PSHUFB X14, X6 + PSHUFB X14, X7 + PADDQ X6, X4 + PADDQ X7, X5 + PXOR X4, X2 + PXOR X5, X3 + MOVOU X2, X11 + PADDQ X2, X11 + PSRLQ $0x3f, X2 + PXOR X11, X2 + MOVOU X3, X11 + PADDQ X3, X11 + PSRLQ $0x3f, X3 + PXOR X11, X3 + MOVO X4, X8 + MOVO X5, X4 + MOVO X8, X5 + MOVO X6, X8 + PUNPCKLQDQ X6, X9 + PUNPCKHQDQ X7, X6 + PUNPCKHQDQ X9, X6 + PUNPCKLQDQ X7, X9 + MOVO X8, X7 + MOVO X2, X8 + PUNPCKHQDQ X9, X7 + PUNPCKLQDQ X3, X9 + PUNPCKHQDQ X9, X2 + PUNPCKLQDQ X8, X9 + PUNPCKHQDQ X9, X3 + MOVQ 16(SI), X8 + PINSRQ $0x01, 40(SI), X8 + MOVQ 32(SI), X9 + PINSRQ $0x01, 120(SI), X9 + MOVQ 48(SI), X10 + PINSRQ $0x01, 80(SI), X10 + MOVQ (SI), X11 + PINSRQ $0x01, 64(SI), X11 + PADDQ X8, X0 + PADDQ X9, X1 + PADDQ X2, X0 + PADDQ X3, X1 + PXOR X0, X6 + PXOR X1, X7 + PSHUFD $0xb1, X6, X6 + PSHUFD $0xb1, X7, X7 + PADDQ X6, X4 + PADDQ X7, X5 + PXOR X4, X2 + PXOR X5, X3 + PSHUFB X13, X2 + PSHUFB X13, X3 + PADDQ X10, X0 + PADDQ X11, X1 + PADDQ X2, X0 + PADDQ X3, X1 + PXOR X0, X6 + PXOR X1, X7 + PSHUFB X14, X6 + PSHUFB X14, X7 + PADDQ X6, X4 + PADDQ X7, X5 + PXOR X4, X2 + PXOR X5, X3 + MOVOU X2, X11 + PADDQ X2, X11 + PSRLQ $0x3f, X2 + PXOR X11, X2 + MOVOU X3, X11 + PADDQ X3, X11 + PSRLQ $0x3f, X3 + PXOR X11, X3 + MOVO X4, X8 + MOVO X5, X4 + MOVO X8, X5 + MOVO X2, X8 + PUNPCKLQDQ X2, X9 + PUNPCKHQDQ X3, X2 + PUNPCKHQDQ X9, X2 + PUNPCKLQDQ X3, X9 + MOVO X8, X3 + MOVO X6, X8 + PUNPCKHQDQ X9, X3 + PUNPCKLQDQ X7, X9 + PUNPCKHQDQ X9, X6 + PUNPCKLQDQ X8, X9 + PUNPCKHQDQ X9, X7 + MOVQ 72(SI), X8 + PINSRQ $0x01, 40(SI), X8 + MOVQ 16(SI), X9 + PINSRQ $0x01, 80(SI), X9 + MOVQ (SI), X10 + PINSRQ $0x01, 56(SI), X10 + MOVQ 32(SI), X11 + PINSRQ $0x01, 120(SI), X11 + PADDQ X8, X0 + PADDQ X9, X1 + PADDQ X2, X0 + PADDQ X3, X1 + PXOR X0, X6 + PXOR X1, X7 + PSHUFD $0xb1, X6, X6 + PSHUFD $0xb1, X7, X7 + PADDQ X6, X4 + PADDQ X7, X5 + PXOR X4, X2 + PXOR X5, X3 + PSHUFB X13, X2 + PSHUFB X13, X3 + PADDQ X10, X0 + PADDQ X11, X1 + PADDQ X2, X0 + PADDQ X3, X1 + PXOR X0, X6 + PXOR X1, X7 + PSHUFB X14, X6 + PSHUFB X14, X7 + PADDQ X6, X4 + PADDQ X7, X5 + PXOR X4, X2 + PXOR X5, X3 + MOVOU X2, X11 + PADDQ X2, X11 + PSRLQ $0x3f, X2 + PXOR X11, X2 + MOVOU X3, X11 + PADDQ X3, X11 + PSRLQ $0x3f, X3 + PXOR X11, X3 + MOVO X4, X8 + MOVO X5, X4 + MOVO X8, X5 + MOVO X6, X8 + PUNPCKLQDQ X6, X9 + PUNPCKHQDQ X7, X6 + PUNPCKHQDQ X9, X6 + PUNPCKLQDQ X7, X9 + MOVO X8, X7 + MOVO X2, X8 + PUNPCKHQDQ X9, X7 + PUNPCKLQDQ X3, X9 + PUNPCKHQDQ X9, X2 + PUNPCKLQDQ X8, X9 + PUNPCKHQDQ X9, X3 + MOVQ 112(SI), X8 + PINSRQ $0x01, 88(SI), X8 + MOVQ 48(SI), X9 + PINSRQ $0x01, 24(SI), X9 + MOVQ 8(SI), X10 + PINSRQ $0x01, 96(SI), X10 + MOVQ 64(SI), X11 + PINSRQ $0x01, 104(SI), X11 + PADDQ X8, X0 + PADDQ X9, X1 + PADDQ X2, X0 + PADDQ X3, X1 + PXOR X0, X6 + PXOR X1, X7 + PSHUFD $0xb1, X6, X6 + PSHUFD $0xb1, X7, X7 + PADDQ X6, X4 + PADDQ X7, X5 + PXOR X4, X2 + PXOR X5, X3 + PSHUFB X13, X2 + PSHUFB X13, X3 + PADDQ X10, X0 + PADDQ X11, X1 + PADDQ X2, X0 + PADDQ X3, X1 + PXOR X0, X6 + PXOR X1, X7 + PSHUFB X14, X6 + PSHUFB X14, X7 + PADDQ X6, X4 + PADDQ X7, X5 + PXOR X4, X2 + PXOR X5, X3 + MOVOU X2, X11 + PADDQ X2, X11 + PSRLQ $0x3f, X2 + PXOR X11, X2 + MOVOU X3, X11 + PADDQ X3, X11 + PSRLQ $0x3f, X3 + PXOR X11, X3 + MOVO X4, X8 + MOVO X5, X4 + MOVO X8, X5 + MOVO X2, X8 + PUNPCKLQDQ X2, X9 + PUNPCKHQDQ X3, X2 + PUNPCKHQDQ X9, X2 + PUNPCKLQDQ X3, X9 + MOVO X8, X3 + MOVO X6, X8 + PUNPCKHQDQ X9, X3 + PUNPCKLQDQ X7, X9 + PUNPCKHQDQ X9, X6 + PUNPCKLQDQ X8, X9 + PUNPCKHQDQ X9, X7 + MOVQ 16(SI), X8 + PINSRQ $0x01, 48(SI), X8 + MOVQ (SI), X9 + PINSRQ $0x01, 64(SI), X9 + MOVQ 96(SI), X10 + PINSRQ $0x01, 80(SI), X10 + MOVQ 88(SI), X11 + PINSRQ $0x01, 24(SI), X11 + PADDQ X8, X0 + PADDQ X9, X1 + PADDQ X2, X0 + PADDQ X3, X1 + PXOR X0, X6 + PXOR X1, X7 + PSHUFD $0xb1, X6, X6 + PSHUFD $0xb1, X7, X7 + PADDQ X6, X4 + PADDQ X7, X5 + PXOR X4, X2 + PXOR X5, X3 + PSHUFB X13, X2 + PSHUFB X13, X3 + PADDQ X10, X0 + PADDQ X11, X1 + PADDQ X2, X0 + PADDQ X3, X1 + PXOR X0, X6 + PXOR X1, X7 + PSHUFB X14, X6 + PSHUFB X14, X7 + PADDQ X6, X4 + PADDQ X7, X5 + PXOR X4, X2 + PXOR X5, X3 + MOVOU X2, X11 + PADDQ X2, X11 + PSRLQ $0x3f, X2 + PXOR X11, X2 + MOVOU X3, X11 + PADDQ X3, X11 + PSRLQ $0x3f, X3 + PXOR X11, X3 + MOVO X4, X8 + MOVO X5, X4 + MOVO X8, X5 + MOVO X6, X8 + PUNPCKLQDQ X6, X9 + PUNPCKHQDQ X7, X6 + PUNPCKHQDQ X9, X6 + PUNPCKLQDQ X7, X9 + MOVO X8, X7 + MOVO X2, X8 + PUNPCKHQDQ X9, X7 + PUNPCKLQDQ X3, X9 + PUNPCKHQDQ X9, X2 + PUNPCKLQDQ X8, X9 + PUNPCKHQDQ X9, X3 + MOVQ 32(SI), X8 + PINSRQ $0x01, 56(SI), X8 + MOVQ 120(SI), X9 + PINSRQ $0x01, 8(SI), X9 + MOVQ 104(SI), X10 + PINSRQ $0x01, 40(SI), X10 + MOVQ 112(SI), X11 + PINSRQ $0x01, 72(SI), X11 + PADDQ X8, X0 + PADDQ X9, X1 + PADDQ X2, X0 + PADDQ X3, X1 + PXOR X0, X6 + PXOR X1, X7 + PSHUFD $0xb1, X6, X6 + PSHUFD $0xb1, X7, X7 + PADDQ X6, X4 + PADDQ X7, X5 + PXOR X4, X2 + PXOR X5, X3 + PSHUFB X13, X2 + PSHUFB X13, X3 + PADDQ X10, X0 + PADDQ X11, X1 + PADDQ X2, X0 + PADDQ X3, X1 + PXOR X0, X6 + PXOR X1, X7 + PSHUFB X14, X6 + PSHUFB X14, X7 + PADDQ X6, X4 + PADDQ X7, X5 + PXOR X4, X2 + PXOR X5, X3 + MOVOU X2, X11 + PADDQ X2, X11 + PSRLQ $0x3f, X2 + PXOR X11, X2 + MOVOU X3, X11 + PADDQ X3, X11 + PSRLQ $0x3f, X3 + PXOR X11, X3 + MOVO X4, X8 + MOVO X5, X4 + MOVO X8, X5 + MOVO X2, X8 + PUNPCKLQDQ X2, X9 + PUNPCKHQDQ X3, X2 + PUNPCKHQDQ X9, X2 + PUNPCKLQDQ X3, X9 + MOVO X8, X3 + MOVO X6, X8 + PUNPCKHQDQ X9, X3 + PUNPCKLQDQ X7, X9 + PUNPCKHQDQ X9, X6 + PUNPCKLQDQ X8, X9 + PUNPCKHQDQ X9, X7 + MOVQ 96(SI), X8 + PINSRQ $0x01, 8(SI), X8 + MOVQ 112(SI), X9 + PINSRQ $0x01, 32(SI), X9 + MOVQ 40(SI), X10 + PINSRQ $0x01, 120(SI), X10 + MOVQ 104(SI), X11 + PINSRQ $0x01, 80(SI), X11 + PADDQ X8, X0 + PADDQ X9, X1 + PADDQ X2, X0 + PADDQ X3, X1 + PXOR X0, X6 + PXOR X1, X7 + PSHUFD $0xb1, X6, X6 + PSHUFD $0xb1, X7, X7 + PADDQ X6, X4 + PADDQ X7, X5 + PXOR X4, X2 + PXOR X5, X3 + PSHUFB X13, X2 + PSHUFB X13, X3 + PADDQ X10, X0 + PADDQ X11, X1 + PADDQ X2, X0 + PADDQ X3, X1 + PXOR X0, X6 + PXOR X1, X7 + PSHUFB X14, X6 + PSHUFB X14, X7 + PADDQ X6, X4 + PADDQ X7, X5 + PXOR X4, X2 + PXOR X5, X3 + MOVOU X2, X11 + PADDQ X2, X11 + PSRLQ $0x3f, X2 + PXOR X11, X2 + MOVOU X3, X11 + PADDQ X3, X11 + PSRLQ $0x3f, X3 + PXOR X11, X3 + MOVO X4, X8 + MOVO X5, X4 + MOVO X8, X5 + MOVO X6, X8 + PUNPCKLQDQ X6, X9 + PUNPCKHQDQ X7, X6 + PUNPCKHQDQ X9, X6 + PUNPCKLQDQ X7, X9 + MOVO X8, X7 + MOVO X2, X8 + PUNPCKHQDQ X9, X7 + PUNPCKLQDQ X3, X9 + PUNPCKHQDQ X9, X2 + PUNPCKLQDQ X8, X9 + PUNPCKHQDQ X9, X3 + MOVQ (SI), X8 + PINSRQ $0x01, 48(SI), X8 + MOVQ 72(SI), X9 + PINSRQ $0x01, 64(SI), X9 + MOVQ 56(SI), X10 + PINSRQ $0x01, 24(SI), X10 + MOVQ 16(SI), X11 + PINSRQ $0x01, 88(SI), X11 + PADDQ X8, X0 + PADDQ X9, X1 + PADDQ X2, X0 + PADDQ X3, X1 + PXOR X0, X6 + PXOR X1, X7 + PSHUFD $0xb1, X6, X6 + PSHUFD $0xb1, X7, X7 + PADDQ X6, X4 + PADDQ X7, X5 + PXOR X4, X2 + PXOR X5, X3 + PSHUFB X13, X2 + PSHUFB X13, X3 + PADDQ X10, X0 + PADDQ X11, X1 + PADDQ X2, X0 + PADDQ X3, X1 + PXOR X0, X6 + PXOR X1, X7 + PSHUFB X14, X6 + PSHUFB X14, X7 + PADDQ X6, X4 + PADDQ X7, X5 + PXOR X4, X2 + PXOR X5, X3 + MOVOU X2, X11 + PADDQ X2, X11 + PSRLQ $0x3f, X2 + PXOR X11, X2 + MOVOU X3, X11 + PADDQ X3, X11 + PSRLQ $0x3f, X3 + PXOR X11, X3 + MOVO X4, X8 + MOVO X5, X4 + MOVO X8, X5 + MOVO X2, X8 + PUNPCKLQDQ X2, X9 + PUNPCKHQDQ X3, X2 + PUNPCKHQDQ X9, X2 + PUNPCKLQDQ X3, X9 + MOVO X8, X3 + MOVO X6, X8 + PUNPCKHQDQ X9, X3 + PUNPCKLQDQ X7, X9 + PUNPCKHQDQ X9, X6 + PUNPCKLQDQ X8, X9 + PUNPCKHQDQ X9, X7 + MOVQ 104(SI), X8 + PINSRQ $0x01, 56(SI), X8 + MOVQ 96(SI), X9 + PINSRQ $0x01, 24(SI), X9 + MOVQ 88(SI), X10 + PINSRQ $0x01, 112(SI), X10 + MOVQ 8(SI), X11 + PINSRQ $0x01, 72(SI), X11 + PADDQ X8, X0 + PADDQ X9, X1 + PADDQ X2, X0 + PADDQ X3, X1 + PXOR X0, X6 + PXOR X1, X7 + PSHUFD $0xb1, X6, X6 + PSHUFD $0xb1, X7, X7 + PADDQ X6, X4 + PADDQ X7, X5 + PXOR X4, X2 + PXOR X5, X3 + PSHUFB X13, X2 + PSHUFB X13, X3 + PADDQ X10, X0 + PADDQ X11, X1 + PADDQ X2, X0 + PADDQ X3, X1 + PXOR X0, X6 + PXOR X1, X7 + PSHUFB X14, X6 + PSHUFB X14, X7 + PADDQ X6, X4 + PADDQ X7, X5 + PXOR X4, X2 + PXOR X5, X3 + MOVOU X2, X11 + PADDQ X2, X11 + PSRLQ $0x3f, X2 + PXOR X11, X2 + MOVOU X3, X11 + PADDQ X3, X11 + PSRLQ $0x3f, X3 + PXOR X11, X3 + MOVO X4, X8 + MOVO X5, X4 + MOVO X8, X5 + MOVO X6, X8 + PUNPCKLQDQ X6, X9 + PUNPCKHQDQ X7, X6 + PUNPCKHQDQ X9, X6 + PUNPCKLQDQ X7, X9 + MOVO X8, X7 + MOVO X2, X8 + PUNPCKHQDQ X9, X7 + PUNPCKLQDQ X3, X9 + PUNPCKHQDQ X9, X2 + PUNPCKLQDQ X8, X9 + PUNPCKHQDQ X9, X3 + MOVQ 40(SI), X8 + PINSRQ $0x01, 120(SI), X8 + MOVQ 64(SI), X9 + PINSRQ $0x01, 16(SI), X9 + MOVQ (SI), X10 + PINSRQ $0x01, 32(SI), X10 + MOVQ 48(SI), X11 + PINSRQ $0x01, 80(SI), X11 + PADDQ X8, X0 + PADDQ X9, X1 + PADDQ X2, X0 + PADDQ X3, X1 + PXOR X0, X6 + PXOR X1, X7 + PSHUFD $0xb1, X6, X6 + PSHUFD $0xb1, X7, X7 + PADDQ X6, X4 + PADDQ X7, X5 + PXOR X4, X2 + PXOR X5, X3 + PSHUFB X13, X2 + PSHUFB X13, X3 + PADDQ X10, X0 + PADDQ X11, X1 + PADDQ X2, X0 + PADDQ X3, X1 + PXOR X0, X6 + PXOR X1, X7 + PSHUFB X14, X6 + PSHUFB X14, X7 + PADDQ X6, X4 + PADDQ X7, X5 + PXOR X4, X2 + PXOR X5, X3 + MOVOU X2, X11 + PADDQ X2, X11 + PSRLQ $0x3f, X2 + PXOR X11, X2 + MOVOU X3, X11 + PADDQ X3, X11 + PSRLQ $0x3f, X3 + PXOR X11, X3 + MOVO X4, X8 + MOVO X5, X4 + MOVO X8, X5 + MOVO X2, X8 + PUNPCKLQDQ X2, X9 + PUNPCKHQDQ X3, X2 + PUNPCKHQDQ X9, X2 + PUNPCKLQDQ X3, X9 + MOVO X8, X3 + MOVO X6, X8 + PUNPCKHQDQ X9, X3 + PUNPCKLQDQ X7, X9 + PUNPCKHQDQ X9, X6 + PUNPCKLQDQ X8, X9 + PUNPCKHQDQ X9, X7 + MOVQ 48(SI), X8 + PINSRQ $0x01, 112(SI), X8 + MOVQ 88(SI), X9 + PINSRQ $0x01, (SI), X9 + MOVQ 120(SI), X10 + PINSRQ $0x01, 72(SI), X10 + MOVQ 24(SI), X11 + PINSRQ $0x01, 64(SI), X11 + PADDQ X8, X0 + PADDQ X9, X1 + PADDQ X2, X0 + PADDQ X3, X1 + PXOR X0, X6 + PXOR X1, X7 + PSHUFD $0xb1, X6, X6 + PSHUFD $0xb1, X7, X7 + PADDQ X6, X4 + PADDQ X7, X5 + PXOR X4, X2 + PXOR X5, X3 + PSHUFB X13, X2 + PSHUFB X13, X3 + PADDQ X10, X0 + PADDQ X11, X1 + PADDQ X2, X0 + PADDQ X3, X1 + PXOR X0, X6 + PXOR X1, X7 + PSHUFB X14, X6 + PSHUFB X14, X7 + PADDQ X6, X4 + PADDQ X7, X5 + PXOR X4, X2 + PXOR X5, X3 + MOVOU X2, X11 + PADDQ X2, X11 + PSRLQ $0x3f, X2 + PXOR X11, X2 + MOVOU X3, X11 + PADDQ X3, X11 + PSRLQ $0x3f, X3 + PXOR X11, X3 + MOVO X4, X8 + MOVO X5, X4 + MOVO X8, X5 + MOVO X6, X8 + PUNPCKLQDQ X6, X9 + PUNPCKHQDQ X7, X6 + PUNPCKHQDQ X9, X6 + PUNPCKLQDQ X7, X9 + MOVO X8, X7 + MOVO X2, X8 + PUNPCKHQDQ X9, X7 + PUNPCKLQDQ X3, X9 + PUNPCKHQDQ X9, X2 + PUNPCKLQDQ X8, X9 + PUNPCKHQDQ X9, X3 + MOVQ 96(SI), X8 + PINSRQ $0x01, 104(SI), X8 + MOVQ 8(SI), X9 + PINSRQ $0x01, 80(SI), X9 + MOVQ 16(SI), X10 + PINSRQ $0x01, 56(SI), X10 + MOVQ 32(SI), X11 + PINSRQ $0x01, 40(SI), X11 + PADDQ X8, X0 + PADDQ X9, X1 + PADDQ X2, X0 + PADDQ X3, X1 + PXOR X0, X6 + PXOR X1, X7 + PSHUFD $0xb1, X6, X6 + PSHUFD $0xb1, X7, X7 + PADDQ X6, X4 + PADDQ X7, X5 + PXOR X4, X2 + PXOR X5, X3 + PSHUFB X13, X2 + PSHUFB X13, X3 + PADDQ X10, X0 + PADDQ X11, X1 + PADDQ X2, X0 + PADDQ X3, X1 + PXOR X0, X6 + PXOR X1, X7 + PSHUFB X14, X6 + PSHUFB X14, X7 + PADDQ X6, X4 + PADDQ X7, X5 + PXOR X4, X2 + PXOR X5, X3 + MOVOU X2, X11 + PADDQ X2, X11 + PSRLQ $0x3f, X2 + PXOR X11, X2 + MOVOU X3, X11 + PADDQ X3, X11 + PSRLQ $0x3f, X3 + PXOR X11, X3 + MOVO X4, X8 + MOVO X5, X4 + MOVO X8, X5 + MOVO X2, X8 + PUNPCKLQDQ X2, X9 + PUNPCKHQDQ X3, X2 + PUNPCKHQDQ X9, X2 + PUNPCKLQDQ X3, X9 + MOVO X8, X3 + MOVO X6, X8 + PUNPCKHQDQ X9, X3 + PUNPCKLQDQ X7, X9 + PUNPCKHQDQ X9, X6 + PUNPCKLQDQ X8, X9 + PUNPCKHQDQ X9, X7 + MOVQ 80(SI), X8 + PINSRQ $0x01, 64(SI), X8 + MOVQ 56(SI), X9 + PINSRQ $0x01, 8(SI), X9 + MOVQ 16(SI), X10 + PINSRQ $0x01, 32(SI), X10 + MOVQ 48(SI), X11 + PINSRQ $0x01, 40(SI), X11 + PADDQ X8, X0 + PADDQ X9, X1 + PADDQ X2, X0 + PADDQ X3, X1 + PXOR X0, X6 + PXOR X1, X7 + PSHUFD $0xb1, X6, X6 + PSHUFD $0xb1, X7, X7 + PADDQ X6, X4 + PADDQ X7, X5 + PXOR X4, X2 + PXOR X5, X3 + PSHUFB X13, X2 + PSHUFB X13, X3 + PADDQ X10, X0 + PADDQ X11, X1 + PADDQ X2, X0 + PADDQ X3, X1 + PXOR X0, X6 + PXOR X1, X7 + PSHUFB X14, X6 + PSHUFB X14, X7 + PADDQ X6, X4 + PADDQ X7, X5 + PXOR X4, X2 + PXOR X5, X3 + MOVOU X2, X11 + PADDQ X2, X11 + PSRLQ $0x3f, X2 + PXOR X11, X2 + MOVOU X3, X11 + PADDQ X3, X11 + PSRLQ $0x3f, X3 + PXOR X11, X3 + MOVO X4, X8 + MOVO X5, X4 + MOVO X8, X5 + MOVO X6, X8 + PUNPCKLQDQ X6, X9 + PUNPCKHQDQ X7, X6 + PUNPCKHQDQ X9, X6 + PUNPCKLQDQ X7, X9 + MOVO X8, X7 + MOVO X2, X8 + PUNPCKHQDQ X9, X7 + PUNPCKLQDQ X3, X9 + PUNPCKHQDQ X9, X2 + PUNPCKLQDQ X8, X9 + PUNPCKHQDQ X9, X3 + MOVQ 120(SI), X8 + PINSRQ $0x01, 72(SI), X8 + MOVQ 24(SI), X9 + PINSRQ $0x01, 104(SI), X9 + MOVQ 88(SI), X10 + PINSRQ $0x01, 112(SI), X10 + MOVQ 96(SI), X11 + PINSRQ $0x01, (SI), X11 + PADDQ X8, X0 + PADDQ X9, X1 + PADDQ X2, X0 + PADDQ X3, X1 + PXOR X0, X6 + PXOR X1, X7 + PSHUFD $0xb1, X6, X6 + PSHUFD $0xb1, X7, X7 + PADDQ X6, X4 + PADDQ X7, X5 + PXOR X4, X2 + PXOR X5, X3 + PSHUFB X13, X2 + PSHUFB X13, X3 + PADDQ X10, X0 + PADDQ X11, X1 + PADDQ X2, X0 + PADDQ X3, X1 + PXOR X0, X6 + PXOR X1, X7 + PSHUFB X14, X6 + PSHUFB X14, X7 + PADDQ X6, X4 + PADDQ X7, X5 + PXOR X4, X2 + PXOR X5, X3 + MOVOU X2, X11 + PADDQ X2, X11 + PSRLQ $0x3f, X2 + PXOR X11, X2 + MOVOU X3, X11 + PADDQ X3, X11 + PSRLQ $0x3f, X3 + PXOR X11, X3 + MOVO X4, X8 + MOVO X5, X4 + MOVO X8, X5 + MOVO X2, X8 + PUNPCKLQDQ X2, X9 + PUNPCKHQDQ X3, X2 + PUNPCKHQDQ X9, X2 + PUNPCKLQDQ X3, X9 + MOVO X8, X3 + MOVO X6, X8 + PUNPCKHQDQ X9, X3 + PUNPCKLQDQ X7, X9 + PUNPCKHQDQ X9, X6 + PUNPCKLQDQ X8, X9 + PUNPCKHQDQ X9, X7 + PADDQ 16(R10), X0 + PADDQ 32(R10), X1 + PADDQ X2, X0 + PADDQ X3, X1 + PXOR X0, X6 + PXOR X1, X7 + PSHUFD $0xb1, X6, X6 + PSHUFD $0xb1, X7, X7 + PADDQ X6, X4 + PADDQ X7, X5 + PXOR X4, X2 + PXOR X5, X3 + PSHUFB X13, X2 + PSHUFB X13, X3 + PADDQ 48(R10), X0 + PADDQ 64(R10), X1 + PADDQ X2, X0 + PADDQ X3, X1 + PXOR X0, X6 + PXOR X1, X7 + PSHUFB X14, X6 + PSHUFB X14, X7 + PADDQ X6, X4 + PADDQ X7, X5 + PXOR X4, X2 + PXOR X5, X3 + MOVOU X2, X11 + PADDQ X2, X11 + PSRLQ $0x3f, X2 + PXOR X11, X2 + MOVOU X3, X11 + PADDQ X3, X11 + PSRLQ $0x3f, X3 + PXOR X11, X3 + MOVO X4, X8 + MOVO X5, X4 + MOVO X8, X5 + MOVO X6, X8 + PUNPCKLQDQ X6, X9 + PUNPCKHQDQ X7, X6 + PUNPCKHQDQ X9, X6 + PUNPCKLQDQ X7, X9 + MOVO X8, X7 + MOVO X2, X8 + PUNPCKHQDQ X9, X7 + PUNPCKLQDQ X3, X9 + PUNPCKHQDQ X9, X2 + PUNPCKLQDQ X8, X9 + PUNPCKHQDQ X9, X3 + PADDQ 80(R10), X0 + PADDQ 96(R10), X1 + PADDQ X2, X0 + PADDQ X3, X1 + PXOR X0, X6 + PXOR X1, X7 + PSHUFD $0xb1, X6, X6 + PSHUFD $0xb1, X7, X7 + PADDQ X6, X4 + PADDQ X7, X5 + PXOR X4, X2 + PXOR X5, X3 + PSHUFB X13, X2 + PSHUFB X13, X3 + PADDQ 112(R10), X0 + PADDQ 128(R10), X1 + PADDQ X2, X0 + PADDQ X3, X1 + PXOR X0, X6 + PXOR X1, X7 + PSHUFB X14, X6 + PSHUFB X14, X7 + PADDQ X6, X4 + PADDQ X7, X5 + PXOR X4, X2 + PXOR X5, X3 + MOVOU X2, X11 + PADDQ X2, X11 + PSRLQ $0x3f, X2 + PXOR X11, X2 + MOVOU X3, X11 + PADDQ X3, X11 + PSRLQ $0x3f, X3 + PXOR X11, X3 + MOVO X4, X8 + MOVO X5, X4 + MOVO X8, X5 + MOVO X2, X8 + PUNPCKLQDQ X2, X9 + PUNPCKHQDQ X3, X2 + PUNPCKHQDQ X9, X2 + PUNPCKLQDQ X3, X9 + MOVO X8, X3 + MOVO X6, X8 + PUNPCKHQDQ X9, X3 + PUNPCKLQDQ X7, X9 + PUNPCKHQDQ X9, X6 + PUNPCKLQDQ X8, X9 + PUNPCKHQDQ X9, X7 + PADDQ 144(R10), X0 + PADDQ 160(R10), X1 + PADDQ X2, X0 + PADDQ X3, X1 + PXOR X0, X6 + PXOR X1, X7 + PSHUFD $0xb1, X6, X6 + PSHUFD $0xb1, X7, X7 + PADDQ X6, X4 + PADDQ X7, X5 + PXOR X4, X2 + PXOR X5, X3 + PSHUFB X13, X2 + PSHUFB X13, X3 + PADDQ 176(R10), X0 + PADDQ 192(R10), X1 + PADDQ X2, X0 + PADDQ X3, X1 + PXOR X0, X6 + PXOR X1, X7 + PSHUFB X14, X6 + PSHUFB X14, X7 + PADDQ X6, X4 + PADDQ X7, X5 + PXOR X4, X2 + PXOR X5, X3 + MOVOU X2, X11 + PADDQ X2, X11 + PSRLQ $0x3f, X2 + PXOR X11, X2 + MOVOU X3, X11 + PADDQ X3, X11 + PSRLQ $0x3f, X3 + PXOR X11, X3 + MOVO X4, X8 + MOVO X5, X4 + MOVO X8, X5 + MOVO X6, X8 + PUNPCKLQDQ X6, X9 + PUNPCKHQDQ X7, X6 + PUNPCKHQDQ X9, X6 + PUNPCKLQDQ X7, X9 + MOVO X8, X7 + MOVO X2, X8 + PUNPCKHQDQ X9, X7 + PUNPCKLQDQ X3, X9 + PUNPCKHQDQ X9, X2 + PUNPCKLQDQ X8, X9 + PUNPCKHQDQ X9, X3 + PADDQ 208(R10), X0 + PADDQ 224(R10), X1 + PADDQ X2, X0 + PADDQ X3, X1 + PXOR X0, X6 + PXOR X1, X7 + PSHUFD $0xb1, X6, X6 + PSHUFD $0xb1, X7, X7 + PADDQ X6, X4 + PADDQ X7, X5 + PXOR X4, X2 + PXOR X5, X3 + PSHUFB X13, X2 + PSHUFB X13, X3 + PADDQ 240(R10), X0 + PADDQ 256(R10), X1 + PADDQ X2, X0 + PADDQ X3, X1 + PXOR X0, X6 + PXOR X1, X7 + PSHUFB X14, X6 + PSHUFB X14, X7 + PADDQ X6, X4 + PADDQ X7, X5 + PXOR X4, X2 + PXOR X5, X3 + MOVOU X2, X11 + PADDQ X2, X11 + PSRLQ $0x3f, X2 + PXOR X11, X2 + MOVOU X3, X11 + PADDQ X3, X11 + PSRLQ $0x3f, X3 + PXOR X11, X3 + MOVO X4, X8 + MOVO X5, X4 + MOVO X8, X5 + MOVO X2, X8 + PUNPCKLQDQ X2, X9 + PUNPCKHQDQ X3, X2 + PUNPCKHQDQ X9, X2 + PUNPCKLQDQ X3, X9 + MOVO X8, X3 + MOVO X6, X8 + PUNPCKHQDQ X9, X3 + PUNPCKLQDQ X7, X9 + PUNPCKHQDQ X9, X6 + PUNPCKLQDQ X8, X9 + PUNPCKHQDQ X9, X7 + MOVOU 32(AX), X10 + MOVOU 48(AX), X11 + PXOR X0, X12 + PXOR X1, X15 + PXOR X2, X10 + PXOR X3, X11 + PXOR X4, X12 + PXOR X5, X15 + PXOR X6, X10 + PXOR X7, X11 + MOVOU X10, 32(AX) + MOVOU X11, 48(AX) + LEAQ 128(SI), SI + SUBQ $0x80, DI + JNE loop + MOVOU X12, (AX) + MOVOU X15, 16(AX) + MOVQ R8, (BX) + MOVQ R9, 8(BX) + RET - HALF_ROUND(X0, X1, X2, X3, X4, X5, X6, X7, 144(R10), 160(R10), 176(R10), 192(R10), X11, X13, X14) - SHUFFLE(X2, X3, X4, X5, X6, X7, X8, X9) - HALF_ROUND(X0, X1, X2, X3, X4, X5, X6, X7, 208(R10), 224(R10), 240(R10), 256(R10), X11, X13, X14) - SHUFFLE_INV(X2, X3, X4, X5, X6, X7, X8, X9) +DATA ·iv3<>+0(SB)/8, $0x1f83d9abfb41bd6b +DATA ·iv3<>+8(SB)/8, $0x5be0cd19137e2179 +GLOBL ·iv3<>(SB), RODATA|NOPTR, $16 - MOVOU 32(AX), X10 - MOVOU 48(AX), X11 - PXOR X0, X12 - PXOR X1, X15 - PXOR X2, X10 - PXOR X3, X11 - PXOR X4, X12 - PXOR X5, X15 - PXOR X6, X10 - PXOR X7, X11 - MOVOU X10, 32(AX) - MOVOU X11, 48(AX) +DATA ·c40<>+0(SB)/8, $0x0201000706050403 +DATA ·c40<>+8(SB)/8, $0x0a09080f0e0d0c0b +GLOBL ·c40<>(SB), RODATA|NOPTR, $16 - LEAQ 128(SI), SI - SUBQ $128, DI - JNE loop +DATA ·c48<>+0(SB)/8, $0x0100070605040302 +DATA ·c48<>+8(SB)/8, $0x09080f0e0d0c0b0a +GLOBL ·c48<>(SB), RODATA|NOPTR, $16 - MOVOU X12, 0(AX) - MOVOU X15, 16(AX) +DATA ·iv0<>+0(SB)/8, $0x6a09e667f3bcc908 +DATA ·iv0<>+8(SB)/8, $0xbb67ae8584caa73b +GLOBL ·iv0<>(SB), RODATA|NOPTR, $16 - MOVQ R8, 0(BX) - MOVQ R9, 8(BX) +DATA ·iv1<>+0(SB)/8, $0x3c6ef372fe94f82b +DATA ·iv1<>+8(SB)/8, $0xa54ff53a5f1d36f1 +GLOBL ·iv1<>(SB), RODATA|NOPTR, $16 - RET +DATA ·iv2<>+0(SB)/8, $0x510e527fade682d1 +DATA ·iv2<>+8(SB)/8, $0x9b05688c2b3e6c1f +GLOBL ·iv2<>(SB), RODATA|NOPTR, $16 diff --git a/vendor/golang.org/x/crypto/blowfish/cipher.go b/vendor/golang.org/x/crypto/blowfish/cipher.go index 213bf204afe..0898956807c 100644 --- a/vendor/golang.org/x/crypto/blowfish/cipher.go +++ b/vendor/golang.org/x/crypto/blowfish/cipher.go @@ -11,7 +11,7 @@ // Deprecated: any new system should use AES (from crypto/aes, if necessary in // an AEAD mode like crypto/cipher.NewGCM) or XChaCha20-Poly1305 (from // golang.org/x/crypto/chacha20poly1305). -package blowfish // import "golang.org/x/crypto/blowfish" +package blowfish // The code is a port of Bruce Schneier's C implementation. // See https://www.schneier.com/blowfish.html. diff --git a/vendor/golang.org/x/crypto/cast5/cast5.go b/vendor/golang.org/x/crypto/cast5/cast5.go index 425e8eecb06..016e90215cd 100644 --- a/vendor/golang.org/x/crypto/cast5/cast5.go +++ b/vendor/golang.org/x/crypto/cast5/cast5.go @@ -11,7 +11,7 @@ // Deprecated: any new system should use AES (from crypto/aes, if necessary in // an AEAD mode like crypto/cipher.NewGCM) or XChaCha20-Poly1305 (from // golang.org/x/crypto/chacha20poly1305). -package cast5 // import "golang.org/x/crypto/cast5" +package cast5 import ( "errors" diff --git a/vendor/golang.org/x/crypto/chacha20/chacha_noasm.go b/vendor/golang.org/x/crypto/chacha20/chacha_noasm.go index db42e6676ab..c709b728477 100644 --- a/vendor/golang.org/x/crypto/chacha20/chacha_noasm.go +++ b/vendor/golang.org/x/crypto/chacha20/chacha_noasm.go @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -//go:build (!arm64 && !s390x && !ppc64le) || !gc || purego +//go:build (!arm64 && !s390x && !ppc64 && !ppc64le) || !gc || purego package chacha20 diff --git a/vendor/golang.org/x/crypto/chacha20/chacha_ppc64le.go b/vendor/golang.org/x/crypto/chacha20/chacha_ppc64x.go similarity index 89% rename from vendor/golang.org/x/crypto/chacha20/chacha_ppc64le.go rename to vendor/golang.org/x/crypto/chacha20/chacha_ppc64x.go index 3a4287f9900..bd183d9ba12 100644 --- a/vendor/golang.org/x/crypto/chacha20/chacha_ppc64le.go +++ b/vendor/golang.org/x/crypto/chacha20/chacha_ppc64x.go @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -//go:build gc && !purego +//go:build gc && !purego && (ppc64 || ppc64le) package chacha20 diff --git a/vendor/golang.org/x/crypto/chacha20/chacha_ppc64le.s b/vendor/golang.org/x/crypto/chacha20/chacha_ppc64x.s similarity index 76% rename from vendor/golang.org/x/crypto/chacha20/chacha_ppc64le.s rename to vendor/golang.org/x/crypto/chacha20/chacha_ppc64x.s index c672ccf6986..a660b4112fa 100644 --- a/vendor/golang.org/x/crypto/chacha20/chacha_ppc64le.s +++ b/vendor/golang.org/x/crypto/chacha20/chacha_ppc64x.s @@ -19,7 +19,7 @@ // The differences in this and the original implementation are // due to the calling conventions and initialization of constants. -//go:build gc && !purego +//go:build gc && !purego && (ppc64 || ppc64le) #include "textflag.h" @@ -36,32 +36,68 @@ // for VPERMXOR #define MASK R18 -DATA consts<>+0x00(SB)/8, $0x3320646e61707865 -DATA consts<>+0x08(SB)/8, $0x6b20657479622d32 -DATA consts<>+0x10(SB)/8, $0x0000000000000001 -DATA consts<>+0x18(SB)/8, $0x0000000000000000 -DATA consts<>+0x20(SB)/8, $0x0000000000000004 -DATA consts<>+0x28(SB)/8, $0x0000000000000000 -DATA consts<>+0x30(SB)/8, $0x0a0b08090e0f0c0d -DATA consts<>+0x38(SB)/8, $0x0203000106070405 -DATA consts<>+0x40(SB)/8, $0x090a0b080d0e0f0c -DATA consts<>+0x48(SB)/8, $0x0102030005060704 -DATA consts<>+0x50(SB)/8, $0x6170786561707865 -DATA consts<>+0x58(SB)/8, $0x6170786561707865 -DATA consts<>+0x60(SB)/8, $0x3320646e3320646e -DATA consts<>+0x68(SB)/8, $0x3320646e3320646e -DATA consts<>+0x70(SB)/8, $0x79622d3279622d32 -DATA consts<>+0x78(SB)/8, $0x79622d3279622d32 -DATA consts<>+0x80(SB)/8, $0x6b2065746b206574 -DATA consts<>+0x88(SB)/8, $0x6b2065746b206574 -DATA consts<>+0x90(SB)/8, $0x0000000100000000 -DATA consts<>+0x98(SB)/8, $0x0000000300000002 -DATA consts<>+0xa0(SB)/8, $0x5566774411223300 -DATA consts<>+0xa8(SB)/8, $0xddeeffcc99aabb88 -DATA consts<>+0xb0(SB)/8, $0x6677445522330011 -DATA consts<>+0xb8(SB)/8, $0xeeffccddaabb8899 +DATA consts<>+0x00(SB)/4, $0x61707865 +DATA consts<>+0x04(SB)/4, $0x3320646e +DATA consts<>+0x08(SB)/4, $0x79622d32 +DATA consts<>+0x0c(SB)/4, $0x6b206574 +DATA consts<>+0x10(SB)/4, $0x00000001 +DATA consts<>+0x14(SB)/4, $0x00000000 +DATA consts<>+0x18(SB)/4, $0x00000000 +DATA consts<>+0x1c(SB)/4, $0x00000000 +DATA consts<>+0x20(SB)/4, $0x00000004 +DATA consts<>+0x24(SB)/4, $0x00000000 +DATA consts<>+0x28(SB)/4, $0x00000000 +DATA consts<>+0x2c(SB)/4, $0x00000000 +DATA consts<>+0x30(SB)/4, $0x0e0f0c0d +DATA consts<>+0x34(SB)/4, $0x0a0b0809 +DATA consts<>+0x38(SB)/4, $0x06070405 +DATA consts<>+0x3c(SB)/4, $0x02030001 +DATA consts<>+0x40(SB)/4, $0x0d0e0f0c +DATA consts<>+0x44(SB)/4, $0x090a0b08 +DATA consts<>+0x48(SB)/4, $0x05060704 +DATA consts<>+0x4c(SB)/4, $0x01020300 +DATA consts<>+0x50(SB)/4, $0x61707865 +DATA consts<>+0x54(SB)/4, $0x61707865 +DATA consts<>+0x58(SB)/4, $0x61707865 +DATA consts<>+0x5c(SB)/4, $0x61707865 +DATA consts<>+0x60(SB)/4, $0x3320646e +DATA consts<>+0x64(SB)/4, $0x3320646e +DATA consts<>+0x68(SB)/4, $0x3320646e +DATA consts<>+0x6c(SB)/4, $0x3320646e +DATA consts<>+0x70(SB)/4, $0x79622d32 +DATA consts<>+0x74(SB)/4, $0x79622d32 +DATA consts<>+0x78(SB)/4, $0x79622d32 +DATA consts<>+0x7c(SB)/4, $0x79622d32 +DATA consts<>+0x80(SB)/4, $0x6b206574 +DATA consts<>+0x84(SB)/4, $0x6b206574 +DATA consts<>+0x88(SB)/4, $0x6b206574 +DATA consts<>+0x8c(SB)/4, $0x6b206574 +DATA consts<>+0x90(SB)/4, $0x00000000 +DATA consts<>+0x94(SB)/4, $0x00000001 +DATA consts<>+0x98(SB)/4, $0x00000002 +DATA consts<>+0x9c(SB)/4, $0x00000003 +DATA consts<>+0xa0(SB)/4, $0x11223300 +DATA consts<>+0xa4(SB)/4, $0x55667744 +DATA consts<>+0xa8(SB)/4, $0x99aabb88 +DATA consts<>+0xac(SB)/4, $0xddeeffcc +DATA consts<>+0xb0(SB)/4, $0x22330011 +DATA consts<>+0xb4(SB)/4, $0x66774455 +DATA consts<>+0xb8(SB)/4, $0xaabb8899 +DATA consts<>+0xbc(SB)/4, $0xeeffccdd GLOBL consts<>(SB), RODATA, $0xc0 +#ifdef GOARCH_ppc64 +#define BE_XXBRW_INIT() \ + LVSL (R0)(R0), V24 \ + VSPLTISB $3, V25 \ + VXOR V24, V25, V24 \ + +#define BE_XXBRW(vr) VPERM vr, vr, V24, vr +#else +#define BE_XXBRW_INIT() +#define BE_XXBRW(vr) +#endif + //func chaCha20_ctr32_vsx(out, inp *byte, len int, key *[8]uint32, counter *uint32) TEXT ·chaCha20_ctr32_vsx(SB),NOSPLIT,$64-40 MOVD out+0(FP), OUT @@ -94,6 +130,8 @@ TEXT ·chaCha20_ctr32_vsx(SB),NOSPLIT,$64-40 // Clear V27 VXOR V27, V27, V27 + BE_XXBRW_INIT() + // V28 LXVW4X (CONSTBASE)(R11), VS60 @@ -299,6 +337,11 @@ loop_vsx: VADDUWM V8, V18, V8 VADDUWM V12, V19, V12 + BE_XXBRW(V0) + BE_XXBRW(V4) + BE_XXBRW(V8) + BE_XXBRW(V12) + CMPU LEN, $64 BLT tail_vsx @@ -327,6 +370,11 @@ loop_vsx: VADDUWM V9, V18, V8 VADDUWM V13, V19, V12 + BE_XXBRW(V0) + BE_XXBRW(V4) + BE_XXBRW(V8) + BE_XXBRW(V12) + CMPU LEN, $64 BLT tail_vsx @@ -334,8 +382,8 @@ loop_vsx: LXVW4X (INP)(R8), VS60 LXVW4X (INP)(R9), VS61 LXVW4X (INP)(R10), VS62 - VXOR V27, V0, V27 + VXOR V27, V0, V27 VXOR V28, V4, V28 VXOR V29, V8, V29 VXOR V30, V12, V30 @@ -354,6 +402,11 @@ loop_vsx: VADDUWM V10, V18, V8 VADDUWM V14, V19, V12 + BE_XXBRW(V0) + BE_XXBRW(V4) + BE_XXBRW(V8) + BE_XXBRW(V12) + CMPU LEN, $64 BLT tail_vsx @@ -381,6 +434,11 @@ loop_vsx: VADDUWM V11, V18, V8 VADDUWM V15, V19, V12 + BE_XXBRW(V0) + BE_XXBRW(V4) + BE_XXBRW(V8) + BE_XXBRW(V12) + CMPU LEN, $64 BLT tail_vsx @@ -408,9 +466,9 @@ loop_vsx: done_vsx: // Increment counter by number of 64 byte blocks - MOVD (CNT), R14 + MOVWZ (CNT), R14 ADD BLOCKS, R14 - MOVD R14, (CNT) + MOVWZ R14, (CNT) RET tail_vsx: diff --git a/vendor/golang.org/x/crypto/curve25519/curve25519.go b/vendor/golang.org/x/crypto/curve25519/curve25519.go index 00f963ea20a..21ca3b2ee4b 100644 --- a/vendor/golang.org/x/crypto/curve25519/curve25519.go +++ b/vendor/golang.org/x/crypto/curve25519/curve25519.go @@ -6,9 +6,11 @@ // performs scalar multiplication on the elliptic curve known as Curve25519. // See RFC 7748. // -// Starting in Go 1.20, this package is a wrapper for the X25519 implementation +// This package is a wrapper for the X25519 implementation // in the crypto/ecdh package. -package curve25519 // import "golang.org/x/crypto/curve25519" +package curve25519 + +import "crypto/ecdh" // ScalarMult sets dst to the product scalar * point. // @@ -16,7 +18,13 @@ package curve25519 // import "golang.org/x/crypto/curve25519" // zeroes, irrespective of the scalar. Instead, use the X25519 function, which // will return an error. func ScalarMult(dst, scalar, point *[32]byte) { - scalarMult(dst, scalar, point) + if _, err := x25519(dst, scalar[:], point[:]); err != nil { + // The only error condition for x25519 when the inputs are 32 bytes long + // is if the output would have been the all-zero value. + for i := range dst { + dst[i] = 0 + } + } } // ScalarBaseMult sets dst to the product scalar * base where base is the @@ -25,7 +33,12 @@ func ScalarMult(dst, scalar, point *[32]byte) { // It is recommended to use the X25519 function with Basepoint instead, as // copying into fixed size arrays can lead to unexpected bugs. func ScalarBaseMult(dst, scalar *[32]byte) { - scalarBaseMult(dst, scalar) + curve := ecdh.X25519() + priv, err := curve.NewPrivateKey(scalar[:]) + if err != nil { + panic("curve25519: internal error: scalarBaseMult was not 32 bytes") + } + copy(dst[:], priv.PublicKey().Bytes()) } const ( @@ -57,3 +70,21 @@ func X25519(scalar, point []byte) ([]byte, error) { var dst [32]byte return x25519(&dst, scalar, point) } + +func x25519(dst *[32]byte, scalar, point []byte) ([]byte, error) { + curve := ecdh.X25519() + pub, err := curve.NewPublicKey(point) + if err != nil { + return nil, err + } + priv, err := curve.NewPrivateKey(scalar) + if err != nil { + return nil, err + } + out, err := priv.ECDH(pub) + if err != nil { + return nil, err + } + copy(dst[:], out) + return dst[:], nil +} diff --git a/vendor/golang.org/x/crypto/curve25519/curve25519_compat.go b/vendor/golang.org/x/crypto/curve25519/curve25519_compat.go deleted file mode 100644 index ba647e8d77d..00000000000 --- a/vendor/golang.org/x/crypto/curve25519/curve25519_compat.go +++ /dev/null @@ -1,105 +0,0 @@ -// Copyright 2019 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -//go:build !go1.20 - -package curve25519 - -import ( - "crypto/subtle" - "errors" - "strconv" - - "golang.org/x/crypto/curve25519/internal/field" -) - -func scalarMult(dst, scalar, point *[32]byte) { - var e [32]byte - - copy(e[:], scalar[:]) - e[0] &= 248 - e[31] &= 127 - e[31] |= 64 - - var x1, x2, z2, x3, z3, tmp0, tmp1 field.Element - x1.SetBytes(point[:]) - x2.One() - x3.Set(&x1) - z3.One() - - swap := 0 - for pos := 254; pos >= 0; pos-- { - b := e[pos/8] >> uint(pos&7) - b &= 1 - swap ^= int(b) - x2.Swap(&x3, swap) - z2.Swap(&z3, swap) - swap = int(b) - - tmp0.Subtract(&x3, &z3) - tmp1.Subtract(&x2, &z2) - x2.Add(&x2, &z2) - z2.Add(&x3, &z3) - z3.Multiply(&tmp0, &x2) - z2.Multiply(&z2, &tmp1) - tmp0.Square(&tmp1) - tmp1.Square(&x2) - x3.Add(&z3, &z2) - z2.Subtract(&z3, &z2) - x2.Multiply(&tmp1, &tmp0) - tmp1.Subtract(&tmp1, &tmp0) - z2.Square(&z2) - - z3.Mult32(&tmp1, 121666) - x3.Square(&x3) - tmp0.Add(&tmp0, &z3) - z3.Multiply(&x1, &z2) - z2.Multiply(&tmp1, &tmp0) - } - - x2.Swap(&x3, swap) - z2.Swap(&z3, swap) - - z2.Invert(&z2) - x2.Multiply(&x2, &z2) - copy(dst[:], x2.Bytes()) -} - -func scalarBaseMult(dst, scalar *[32]byte) { - checkBasepoint() - scalarMult(dst, scalar, &basePoint) -} - -func x25519(dst *[32]byte, scalar, point []byte) ([]byte, error) { - var in [32]byte - if l := len(scalar); l != 32 { - return nil, errors.New("bad scalar length: " + strconv.Itoa(l) + ", expected 32") - } - if l := len(point); l != 32 { - return nil, errors.New("bad point length: " + strconv.Itoa(l) + ", expected 32") - } - copy(in[:], scalar) - if &point[0] == &Basepoint[0] { - scalarBaseMult(dst, &in) - } else { - var base, zero [32]byte - copy(base[:], point) - scalarMult(dst, &in, &base) - if subtle.ConstantTimeCompare(dst[:], zero[:]) == 1 { - return nil, errors.New("bad input point: low order point") - } - } - return dst[:], nil -} - -func checkBasepoint() { - if subtle.ConstantTimeCompare(Basepoint, []byte{ - 0x09, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - }) != 1 { - panic("curve25519: global Basepoint value was modified") - } -} diff --git a/vendor/golang.org/x/crypto/curve25519/curve25519_go120.go b/vendor/golang.org/x/crypto/curve25519/curve25519_go120.go deleted file mode 100644 index 627df497270..00000000000 --- a/vendor/golang.org/x/crypto/curve25519/curve25519_go120.go +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright 2022 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -//go:build go1.20 - -package curve25519 - -import "crypto/ecdh" - -func x25519(dst *[32]byte, scalar, point []byte) ([]byte, error) { - curve := ecdh.X25519() - pub, err := curve.NewPublicKey(point) - if err != nil { - return nil, err - } - priv, err := curve.NewPrivateKey(scalar) - if err != nil { - return nil, err - } - out, err := priv.ECDH(pub) - if err != nil { - return nil, err - } - copy(dst[:], out) - return dst[:], nil -} - -func scalarMult(dst, scalar, point *[32]byte) { - if _, err := x25519(dst, scalar[:], point[:]); err != nil { - // The only error condition for x25519 when the inputs are 32 bytes long - // is if the output would have been the all-zero value. - for i := range dst { - dst[i] = 0 - } - } -} - -func scalarBaseMult(dst, scalar *[32]byte) { - curve := ecdh.X25519() - priv, err := curve.NewPrivateKey(scalar[:]) - if err != nil { - panic("curve25519: internal error: scalarBaseMult was not 32 bytes") - } - copy(dst[:], priv.PublicKey().Bytes()) -} diff --git a/vendor/golang.org/x/crypto/curve25519/internal/field/README b/vendor/golang.org/x/crypto/curve25519/internal/field/README deleted file mode 100644 index e25bca7dc80..00000000000 --- a/vendor/golang.org/x/crypto/curve25519/internal/field/README +++ /dev/null @@ -1,7 +0,0 @@ -This package is kept in sync with crypto/ed25519/internal/edwards25519/field in -the standard library. - -If there are any changes in the standard library that need to be synced to this -package, run sync.sh. It will not overwrite any local changes made since the -previous sync, so it's ok to land changes in this package first, and then sync -to the standard library later. diff --git a/vendor/golang.org/x/crypto/curve25519/internal/field/fe.go b/vendor/golang.org/x/crypto/curve25519/internal/field/fe.go deleted file mode 100644 index ca841ad99e3..00000000000 --- a/vendor/golang.org/x/crypto/curve25519/internal/field/fe.go +++ /dev/null @@ -1,416 +0,0 @@ -// Copyright (c) 2017 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// Package field implements fast arithmetic modulo 2^255-19. -package field - -import ( - "crypto/subtle" - "encoding/binary" - "math/bits" -) - -// Element represents an element of the field GF(2^255-19). Note that this -// is not a cryptographically secure group, and should only be used to interact -// with edwards25519.Point coordinates. -// -// This type works similarly to math/big.Int, and all arguments and receivers -// are allowed to alias. -// -// The zero value is a valid zero element. -type Element struct { - // An element t represents the integer - // t.l0 + t.l1*2^51 + t.l2*2^102 + t.l3*2^153 + t.l4*2^204 - // - // Between operations, all limbs are expected to be lower than 2^52. - l0 uint64 - l1 uint64 - l2 uint64 - l3 uint64 - l4 uint64 -} - -const maskLow51Bits uint64 = (1 << 51) - 1 - -var feZero = &Element{0, 0, 0, 0, 0} - -// Zero sets v = 0, and returns v. -func (v *Element) Zero() *Element { - *v = *feZero - return v -} - -var feOne = &Element{1, 0, 0, 0, 0} - -// One sets v = 1, and returns v. -func (v *Element) One() *Element { - *v = *feOne - return v -} - -// reduce reduces v modulo 2^255 - 19 and returns it. -func (v *Element) reduce() *Element { - v.carryPropagate() - - // After the light reduction we now have a field element representation - // v < 2^255 + 2^13 * 19, but need v < 2^255 - 19. - - // If v >= 2^255 - 19, then v + 19 >= 2^255, which would overflow 2^255 - 1, - // generating a carry. That is, c will be 0 if v < 2^255 - 19, and 1 otherwise. - c := (v.l0 + 19) >> 51 - c = (v.l1 + c) >> 51 - c = (v.l2 + c) >> 51 - c = (v.l3 + c) >> 51 - c = (v.l4 + c) >> 51 - - // If v < 2^255 - 19 and c = 0, this will be a no-op. Otherwise, it's - // effectively applying the reduction identity to the carry. - v.l0 += 19 * c - - v.l1 += v.l0 >> 51 - v.l0 = v.l0 & maskLow51Bits - v.l2 += v.l1 >> 51 - v.l1 = v.l1 & maskLow51Bits - v.l3 += v.l2 >> 51 - v.l2 = v.l2 & maskLow51Bits - v.l4 += v.l3 >> 51 - v.l3 = v.l3 & maskLow51Bits - // no additional carry - v.l4 = v.l4 & maskLow51Bits - - return v -} - -// Add sets v = a + b, and returns v. -func (v *Element) Add(a, b *Element) *Element { - v.l0 = a.l0 + b.l0 - v.l1 = a.l1 + b.l1 - v.l2 = a.l2 + b.l2 - v.l3 = a.l3 + b.l3 - v.l4 = a.l4 + b.l4 - // Using the generic implementation here is actually faster than the - // assembly. Probably because the body of this function is so simple that - // the compiler can figure out better optimizations by inlining the carry - // propagation. TODO - return v.carryPropagateGeneric() -} - -// Subtract sets v = a - b, and returns v. -func (v *Element) Subtract(a, b *Element) *Element { - // We first add 2 * p, to guarantee the subtraction won't underflow, and - // then subtract b (which can be up to 2^255 + 2^13 * 19). - v.l0 = (a.l0 + 0xFFFFFFFFFFFDA) - b.l0 - v.l1 = (a.l1 + 0xFFFFFFFFFFFFE) - b.l1 - v.l2 = (a.l2 + 0xFFFFFFFFFFFFE) - b.l2 - v.l3 = (a.l3 + 0xFFFFFFFFFFFFE) - b.l3 - v.l4 = (a.l4 + 0xFFFFFFFFFFFFE) - b.l4 - return v.carryPropagate() -} - -// Negate sets v = -a, and returns v. -func (v *Element) Negate(a *Element) *Element { - return v.Subtract(feZero, a) -} - -// Invert sets v = 1/z mod p, and returns v. -// -// If z == 0, Invert returns v = 0. -func (v *Element) Invert(z *Element) *Element { - // Inversion is implemented as exponentiation with exponent p − 2. It uses the - // same sequence of 255 squarings and 11 multiplications as [Curve25519]. - var z2, z9, z11, z2_5_0, z2_10_0, z2_20_0, z2_50_0, z2_100_0, t Element - - z2.Square(z) // 2 - t.Square(&z2) // 4 - t.Square(&t) // 8 - z9.Multiply(&t, z) // 9 - z11.Multiply(&z9, &z2) // 11 - t.Square(&z11) // 22 - z2_5_0.Multiply(&t, &z9) // 31 = 2^5 - 2^0 - - t.Square(&z2_5_0) // 2^6 - 2^1 - for i := 0; i < 4; i++ { - t.Square(&t) // 2^10 - 2^5 - } - z2_10_0.Multiply(&t, &z2_5_0) // 2^10 - 2^0 - - t.Square(&z2_10_0) // 2^11 - 2^1 - for i := 0; i < 9; i++ { - t.Square(&t) // 2^20 - 2^10 - } - z2_20_0.Multiply(&t, &z2_10_0) // 2^20 - 2^0 - - t.Square(&z2_20_0) // 2^21 - 2^1 - for i := 0; i < 19; i++ { - t.Square(&t) // 2^40 - 2^20 - } - t.Multiply(&t, &z2_20_0) // 2^40 - 2^0 - - t.Square(&t) // 2^41 - 2^1 - for i := 0; i < 9; i++ { - t.Square(&t) // 2^50 - 2^10 - } - z2_50_0.Multiply(&t, &z2_10_0) // 2^50 - 2^0 - - t.Square(&z2_50_0) // 2^51 - 2^1 - for i := 0; i < 49; i++ { - t.Square(&t) // 2^100 - 2^50 - } - z2_100_0.Multiply(&t, &z2_50_0) // 2^100 - 2^0 - - t.Square(&z2_100_0) // 2^101 - 2^1 - for i := 0; i < 99; i++ { - t.Square(&t) // 2^200 - 2^100 - } - t.Multiply(&t, &z2_100_0) // 2^200 - 2^0 - - t.Square(&t) // 2^201 - 2^1 - for i := 0; i < 49; i++ { - t.Square(&t) // 2^250 - 2^50 - } - t.Multiply(&t, &z2_50_0) // 2^250 - 2^0 - - t.Square(&t) // 2^251 - 2^1 - t.Square(&t) // 2^252 - 2^2 - t.Square(&t) // 2^253 - 2^3 - t.Square(&t) // 2^254 - 2^4 - t.Square(&t) // 2^255 - 2^5 - - return v.Multiply(&t, &z11) // 2^255 - 21 -} - -// Set sets v = a, and returns v. -func (v *Element) Set(a *Element) *Element { - *v = *a - return v -} - -// SetBytes sets v to x, which must be a 32-byte little-endian encoding. -// -// Consistent with RFC 7748, the most significant bit (the high bit of the -// last byte) is ignored, and non-canonical values (2^255-19 through 2^255-1) -// are accepted. Note that this is laxer than specified by RFC 8032. -func (v *Element) SetBytes(x []byte) *Element { - if len(x) != 32 { - panic("edwards25519: invalid field element input size") - } - - // Bits 0:51 (bytes 0:8, bits 0:64, shift 0, mask 51). - v.l0 = binary.LittleEndian.Uint64(x[0:8]) - v.l0 &= maskLow51Bits - // Bits 51:102 (bytes 6:14, bits 48:112, shift 3, mask 51). - v.l1 = binary.LittleEndian.Uint64(x[6:14]) >> 3 - v.l1 &= maskLow51Bits - // Bits 102:153 (bytes 12:20, bits 96:160, shift 6, mask 51). - v.l2 = binary.LittleEndian.Uint64(x[12:20]) >> 6 - v.l2 &= maskLow51Bits - // Bits 153:204 (bytes 19:27, bits 152:216, shift 1, mask 51). - v.l3 = binary.LittleEndian.Uint64(x[19:27]) >> 1 - v.l3 &= maskLow51Bits - // Bits 204:251 (bytes 24:32, bits 192:256, shift 12, mask 51). - // Note: not bytes 25:33, shift 4, to avoid overread. - v.l4 = binary.LittleEndian.Uint64(x[24:32]) >> 12 - v.l4 &= maskLow51Bits - - return v -} - -// Bytes returns the canonical 32-byte little-endian encoding of v. -func (v *Element) Bytes() []byte { - // This function is outlined to make the allocations inline in the caller - // rather than happen on the heap. - var out [32]byte - return v.bytes(&out) -} - -func (v *Element) bytes(out *[32]byte) []byte { - t := *v - t.reduce() - - var buf [8]byte - for i, l := range [5]uint64{t.l0, t.l1, t.l2, t.l3, t.l4} { - bitsOffset := i * 51 - binary.LittleEndian.PutUint64(buf[:], l<= len(out) { - break - } - out[off] |= bb - } - } - - return out[:] -} - -// Equal returns 1 if v and u are equal, and 0 otherwise. -func (v *Element) Equal(u *Element) int { - sa, sv := u.Bytes(), v.Bytes() - return subtle.ConstantTimeCompare(sa, sv) -} - -// mask64Bits returns 0xffffffff if cond is 1, and 0 otherwise. -func mask64Bits(cond int) uint64 { return ^(uint64(cond) - 1) } - -// Select sets v to a if cond == 1, and to b if cond == 0. -func (v *Element) Select(a, b *Element, cond int) *Element { - m := mask64Bits(cond) - v.l0 = (m & a.l0) | (^m & b.l0) - v.l1 = (m & a.l1) | (^m & b.l1) - v.l2 = (m & a.l2) | (^m & b.l2) - v.l3 = (m & a.l3) | (^m & b.l3) - v.l4 = (m & a.l4) | (^m & b.l4) - return v -} - -// Swap swaps v and u if cond == 1 or leaves them unchanged if cond == 0, and returns v. -func (v *Element) Swap(u *Element, cond int) { - m := mask64Bits(cond) - t := m & (v.l0 ^ u.l0) - v.l0 ^= t - u.l0 ^= t - t = m & (v.l1 ^ u.l1) - v.l1 ^= t - u.l1 ^= t - t = m & (v.l2 ^ u.l2) - v.l2 ^= t - u.l2 ^= t - t = m & (v.l3 ^ u.l3) - v.l3 ^= t - u.l3 ^= t - t = m & (v.l4 ^ u.l4) - v.l4 ^= t - u.l4 ^= t -} - -// IsNegative returns 1 if v is negative, and 0 otherwise. -func (v *Element) IsNegative() int { - return int(v.Bytes()[0] & 1) -} - -// Absolute sets v to |u|, and returns v. -func (v *Element) Absolute(u *Element) *Element { - return v.Select(new(Element).Negate(u), u, u.IsNegative()) -} - -// Multiply sets v = x * y, and returns v. -func (v *Element) Multiply(x, y *Element) *Element { - feMul(v, x, y) - return v -} - -// Square sets v = x * x, and returns v. -func (v *Element) Square(x *Element) *Element { - feSquare(v, x) - return v -} - -// Mult32 sets v = x * y, and returns v. -func (v *Element) Mult32(x *Element, y uint32) *Element { - x0lo, x0hi := mul51(x.l0, y) - x1lo, x1hi := mul51(x.l1, y) - x2lo, x2hi := mul51(x.l2, y) - x3lo, x3hi := mul51(x.l3, y) - x4lo, x4hi := mul51(x.l4, y) - v.l0 = x0lo + 19*x4hi // carried over per the reduction identity - v.l1 = x1lo + x0hi - v.l2 = x2lo + x1hi - v.l3 = x3lo + x2hi - v.l4 = x4lo + x3hi - // The hi portions are going to be only 32 bits, plus any previous excess, - // so we can skip the carry propagation. - return v -} - -// mul51 returns lo + hi * 2⁵¹ = a * b. -func mul51(a uint64, b uint32) (lo uint64, hi uint64) { - mh, ml := bits.Mul64(a, uint64(b)) - lo = ml & maskLow51Bits - hi = (mh << 13) | (ml >> 51) - return -} - -// Pow22523 set v = x^((p-5)/8), and returns v. (p-5)/8 is 2^252-3. -func (v *Element) Pow22523(x *Element) *Element { - var t0, t1, t2 Element - - t0.Square(x) // x^2 - t1.Square(&t0) // x^4 - t1.Square(&t1) // x^8 - t1.Multiply(x, &t1) // x^9 - t0.Multiply(&t0, &t1) // x^11 - t0.Square(&t0) // x^22 - t0.Multiply(&t1, &t0) // x^31 - t1.Square(&t0) // x^62 - for i := 1; i < 5; i++ { // x^992 - t1.Square(&t1) - } - t0.Multiply(&t1, &t0) // x^1023 -> 1023 = 2^10 - 1 - t1.Square(&t0) // 2^11 - 2 - for i := 1; i < 10; i++ { // 2^20 - 2^10 - t1.Square(&t1) - } - t1.Multiply(&t1, &t0) // 2^20 - 1 - t2.Square(&t1) // 2^21 - 2 - for i := 1; i < 20; i++ { // 2^40 - 2^20 - t2.Square(&t2) - } - t1.Multiply(&t2, &t1) // 2^40 - 1 - t1.Square(&t1) // 2^41 - 2 - for i := 1; i < 10; i++ { // 2^50 - 2^10 - t1.Square(&t1) - } - t0.Multiply(&t1, &t0) // 2^50 - 1 - t1.Square(&t0) // 2^51 - 2 - for i := 1; i < 50; i++ { // 2^100 - 2^50 - t1.Square(&t1) - } - t1.Multiply(&t1, &t0) // 2^100 - 1 - t2.Square(&t1) // 2^101 - 2 - for i := 1; i < 100; i++ { // 2^200 - 2^100 - t2.Square(&t2) - } - t1.Multiply(&t2, &t1) // 2^200 - 1 - t1.Square(&t1) // 2^201 - 2 - for i := 1; i < 50; i++ { // 2^250 - 2^50 - t1.Square(&t1) - } - t0.Multiply(&t1, &t0) // 2^250 - 1 - t0.Square(&t0) // 2^251 - 2 - t0.Square(&t0) // 2^252 - 4 - return v.Multiply(&t0, x) // 2^252 - 3 -> x^(2^252-3) -} - -// sqrtM1 is 2^((p-1)/4), which squared is equal to -1 by Euler's Criterion. -var sqrtM1 = &Element{1718705420411056, 234908883556509, - 2233514472574048, 2117202627021982, 765476049583133} - -// SqrtRatio sets r to the non-negative square root of the ratio of u and v. -// -// If u/v is square, SqrtRatio returns r and 1. If u/v is not square, SqrtRatio -// sets r according to Section 4.3 of draft-irtf-cfrg-ristretto255-decaf448-00, -// and returns r and 0. -func (r *Element) SqrtRatio(u, v *Element) (rr *Element, wasSquare int) { - var a, b Element - - // r = (u * v3) * (u * v7)^((p-5)/8) - v2 := a.Square(v) - uv3 := b.Multiply(u, b.Multiply(v2, v)) - uv7 := a.Multiply(uv3, a.Square(v2)) - r.Multiply(uv3, r.Pow22523(uv7)) - - check := a.Multiply(v, a.Square(r)) // check = v * r^2 - - uNeg := b.Negate(u) - correctSignSqrt := check.Equal(u) - flippedSignSqrt := check.Equal(uNeg) - flippedSignSqrtI := check.Equal(uNeg.Multiply(uNeg, sqrtM1)) - - rPrime := b.Multiply(r, sqrtM1) // r_prime = SQRT_M1 * r - // r = CT_SELECT(r_prime IF flipped_sign_sqrt | flipped_sign_sqrt_i ELSE r) - r.Select(rPrime, r, flippedSignSqrt|flippedSignSqrtI) - - r.Absolute(r) // Choose the nonnegative square root. - return r, correctSignSqrt | flippedSignSqrt -} diff --git a/vendor/golang.org/x/crypto/curve25519/internal/field/fe_amd64.go b/vendor/golang.org/x/crypto/curve25519/internal/field/fe_amd64.go deleted file mode 100644 index 70c541692c3..00000000000 --- a/vendor/golang.org/x/crypto/curve25519/internal/field/fe_amd64.go +++ /dev/null @@ -1,15 +0,0 @@ -// Code generated by command: go run fe_amd64_asm.go -out ../fe_amd64.s -stubs ../fe_amd64.go -pkg field. DO NOT EDIT. - -//go:build amd64 && gc && !purego - -package field - -// feMul sets out = a * b. It works like feMulGeneric. -// -//go:noescape -func feMul(out *Element, a *Element, b *Element) - -// feSquare sets out = a * a. It works like feSquareGeneric. -// -//go:noescape -func feSquare(out *Element, a *Element) diff --git a/vendor/golang.org/x/crypto/curve25519/internal/field/fe_amd64.s b/vendor/golang.org/x/crypto/curve25519/internal/field/fe_amd64.s deleted file mode 100644 index 60817acc413..00000000000 --- a/vendor/golang.org/x/crypto/curve25519/internal/field/fe_amd64.s +++ /dev/null @@ -1,378 +0,0 @@ -// Code generated by command: go run fe_amd64_asm.go -out ../fe_amd64.s -stubs ../fe_amd64.go -pkg field. DO NOT EDIT. - -//go:build amd64 && gc && !purego - -#include "textflag.h" - -// func feMul(out *Element, a *Element, b *Element) -TEXT ·feMul(SB), NOSPLIT, $0-24 - MOVQ a+8(FP), CX - MOVQ b+16(FP), BX - - // r0 = a0×b0 - MOVQ (CX), AX - MULQ (BX) - MOVQ AX, DI - MOVQ DX, SI - - // r0 += 19×a1×b4 - MOVQ 8(CX), AX - IMUL3Q $0x13, AX, AX - MULQ 32(BX) - ADDQ AX, DI - ADCQ DX, SI - - // r0 += 19×a2×b3 - MOVQ 16(CX), AX - IMUL3Q $0x13, AX, AX - MULQ 24(BX) - ADDQ AX, DI - ADCQ DX, SI - - // r0 += 19×a3×b2 - MOVQ 24(CX), AX - IMUL3Q $0x13, AX, AX - MULQ 16(BX) - ADDQ AX, DI - ADCQ DX, SI - - // r0 += 19×a4×b1 - MOVQ 32(CX), AX - IMUL3Q $0x13, AX, AX - MULQ 8(BX) - ADDQ AX, DI - ADCQ DX, SI - - // r1 = a0×b1 - MOVQ (CX), AX - MULQ 8(BX) - MOVQ AX, R9 - MOVQ DX, R8 - - // r1 += a1×b0 - MOVQ 8(CX), AX - MULQ (BX) - ADDQ AX, R9 - ADCQ DX, R8 - - // r1 += 19×a2×b4 - MOVQ 16(CX), AX - IMUL3Q $0x13, AX, AX - MULQ 32(BX) - ADDQ AX, R9 - ADCQ DX, R8 - - // r1 += 19×a3×b3 - MOVQ 24(CX), AX - IMUL3Q $0x13, AX, AX - MULQ 24(BX) - ADDQ AX, R9 - ADCQ DX, R8 - - // r1 += 19×a4×b2 - MOVQ 32(CX), AX - IMUL3Q $0x13, AX, AX - MULQ 16(BX) - ADDQ AX, R9 - ADCQ DX, R8 - - // r2 = a0×b2 - MOVQ (CX), AX - MULQ 16(BX) - MOVQ AX, R11 - MOVQ DX, R10 - - // r2 += a1×b1 - MOVQ 8(CX), AX - MULQ 8(BX) - ADDQ AX, R11 - ADCQ DX, R10 - - // r2 += a2×b0 - MOVQ 16(CX), AX - MULQ (BX) - ADDQ AX, R11 - ADCQ DX, R10 - - // r2 += 19×a3×b4 - MOVQ 24(CX), AX - IMUL3Q $0x13, AX, AX - MULQ 32(BX) - ADDQ AX, R11 - ADCQ DX, R10 - - // r2 += 19×a4×b3 - MOVQ 32(CX), AX - IMUL3Q $0x13, AX, AX - MULQ 24(BX) - ADDQ AX, R11 - ADCQ DX, R10 - - // r3 = a0×b3 - MOVQ (CX), AX - MULQ 24(BX) - MOVQ AX, R13 - MOVQ DX, R12 - - // r3 += a1×b2 - MOVQ 8(CX), AX - MULQ 16(BX) - ADDQ AX, R13 - ADCQ DX, R12 - - // r3 += a2×b1 - MOVQ 16(CX), AX - MULQ 8(BX) - ADDQ AX, R13 - ADCQ DX, R12 - - // r3 += a3×b0 - MOVQ 24(CX), AX - MULQ (BX) - ADDQ AX, R13 - ADCQ DX, R12 - - // r3 += 19×a4×b4 - MOVQ 32(CX), AX - IMUL3Q $0x13, AX, AX - MULQ 32(BX) - ADDQ AX, R13 - ADCQ DX, R12 - - // r4 = a0×b4 - MOVQ (CX), AX - MULQ 32(BX) - MOVQ AX, R15 - MOVQ DX, R14 - - // r4 += a1×b3 - MOVQ 8(CX), AX - MULQ 24(BX) - ADDQ AX, R15 - ADCQ DX, R14 - - // r4 += a2×b2 - MOVQ 16(CX), AX - MULQ 16(BX) - ADDQ AX, R15 - ADCQ DX, R14 - - // r4 += a3×b1 - MOVQ 24(CX), AX - MULQ 8(BX) - ADDQ AX, R15 - ADCQ DX, R14 - - // r4 += a4×b0 - MOVQ 32(CX), AX - MULQ (BX) - ADDQ AX, R15 - ADCQ DX, R14 - - // First reduction chain - MOVQ $0x0007ffffffffffff, AX - SHLQ $0x0d, DI, SI - SHLQ $0x0d, R9, R8 - SHLQ $0x0d, R11, R10 - SHLQ $0x0d, R13, R12 - SHLQ $0x0d, R15, R14 - ANDQ AX, DI - IMUL3Q $0x13, R14, R14 - ADDQ R14, DI - ANDQ AX, R9 - ADDQ SI, R9 - ANDQ AX, R11 - ADDQ R8, R11 - ANDQ AX, R13 - ADDQ R10, R13 - ANDQ AX, R15 - ADDQ R12, R15 - - // Second reduction chain (carryPropagate) - MOVQ DI, SI - SHRQ $0x33, SI - MOVQ R9, R8 - SHRQ $0x33, R8 - MOVQ R11, R10 - SHRQ $0x33, R10 - MOVQ R13, R12 - SHRQ $0x33, R12 - MOVQ R15, R14 - SHRQ $0x33, R14 - ANDQ AX, DI - IMUL3Q $0x13, R14, R14 - ADDQ R14, DI - ANDQ AX, R9 - ADDQ SI, R9 - ANDQ AX, R11 - ADDQ R8, R11 - ANDQ AX, R13 - ADDQ R10, R13 - ANDQ AX, R15 - ADDQ R12, R15 - - // Store output - MOVQ out+0(FP), AX - MOVQ DI, (AX) - MOVQ R9, 8(AX) - MOVQ R11, 16(AX) - MOVQ R13, 24(AX) - MOVQ R15, 32(AX) - RET - -// func feSquare(out *Element, a *Element) -TEXT ·feSquare(SB), NOSPLIT, $0-16 - MOVQ a+8(FP), CX - - // r0 = l0×l0 - MOVQ (CX), AX - MULQ (CX) - MOVQ AX, SI - MOVQ DX, BX - - // r0 += 38×l1×l4 - MOVQ 8(CX), AX - IMUL3Q $0x26, AX, AX - MULQ 32(CX) - ADDQ AX, SI - ADCQ DX, BX - - // r0 += 38×l2×l3 - MOVQ 16(CX), AX - IMUL3Q $0x26, AX, AX - MULQ 24(CX) - ADDQ AX, SI - ADCQ DX, BX - - // r1 = 2×l0×l1 - MOVQ (CX), AX - SHLQ $0x01, AX - MULQ 8(CX) - MOVQ AX, R8 - MOVQ DX, DI - - // r1 += 38×l2×l4 - MOVQ 16(CX), AX - IMUL3Q $0x26, AX, AX - MULQ 32(CX) - ADDQ AX, R8 - ADCQ DX, DI - - // r1 += 19×l3×l3 - MOVQ 24(CX), AX - IMUL3Q $0x13, AX, AX - MULQ 24(CX) - ADDQ AX, R8 - ADCQ DX, DI - - // r2 = 2×l0×l2 - MOVQ (CX), AX - SHLQ $0x01, AX - MULQ 16(CX) - MOVQ AX, R10 - MOVQ DX, R9 - - // r2 += l1×l1 - MOVQ 8(CX), AX - MULQ 8(CX) - ADDQ AX, R10 - ADCQ DX, R9 - - // r2 += 38×l3×l4 - MOVQ 24(CX), AX - IMUL3Q $0x26, AX, AX - MULQ 32(CX) - ADDQ AX, R10 - ADCQ DX, R9 - - // r3 = 2×l0×l3 - MOVQ (CX), AX - SHLQ $0x01, AX - MULQ 24(CX) - MOVQ AX, R12 - MOVQ DX, R11 - - // r3 += 2×l1×l2 - MOVQ 8(CX), AX - IMUL3Q $0x02, AX, AX - MULQ 16(CX) - ADDQ AX, R12 - ADCQ DX, R11 - - // r3 += 19×l4×l4 - MOVQ 32(CX), AX - IMUL3Q $0x13, AX, AX - MULQ 32(CX) - ADDQ AX, R12 - ADCQ DX, R11 - - // r4 = 2×l0×l4 - MOVQ (CX), AX - SHLQ $0x01, AX - MULQ 32(CX) - MOVQ AX, R14 - MOVQ DX, R13 - - // r4 += 2×l1×l3 - MOVQ 8(CX), AX - IMUL3Q $0x02, AX, AX - MULQ 24(CX) - ADDQ AX, R14 - ADCQ DX, R13 - - // r4 += l2×l2 - MOVQ 16(CX), AX - MULQ 16(CX) - ADDQ AX, R14 - ADCQ DX, R13 - - // First reduction chain - MOVQ $0x0007ffffffffffff, AX - SHLQ $0x0d, SI, BX - SHLQ $0x0d, R8, DI - SHLQ $0x0d, R10, R9 - SHLQ $0x0d, R12, R11 - SHLQ $0x0d, R14, R13 - ANDQ AX, SI - IMUL3Q $0x13, R13, R13 - ADDQ R13, SI - ANDQ AX, R8 - ADDQ BX, R8 - ANDQ AX, R10 - ADDQ DI, R10 - ANDQ AX, R12 - ADDQ R9, R12 - ANDQ AX, R14 - ADDQ R11, R14 - - // Second reduction chain (carryPropagate) - MOVQ SI, BX - SHRQ $0x33, BX - MOVQ R8, DI - SHRQ $0x33, DI - MOVQ R10, R9 - SHRQ $0x33, R9 - MOVQ R12, R11 - SHRQ $0x33, R11 - MOVQ R14, R13 - SHRQ $0x33, R13 - ANDQ AX, SI - IMUL3Q $0x13, R13, R13 - ADDQ R13, SI - ANDQ AX, R8 - ADDQ BX, R8 - ANDQ AX, R10 - ADDQ DI, R10 - ANDQ AX, R12 - ADDQ R9, R12 - ANDQ AX, R14 - ADDQ R11, R14 - - // Store output - MOVQ out+0(FP), AX - MOVQ SI, (AX) - MOVQ R8, 8(AX) - MOVQ R10, 16(AX) - MOVQ R12, 24(AX) - MOVQ R14, 32(AX) - RET diff --git a/vendor/golang.org/x/crypto/curve25519/internal/field/fe_amd64_noasm.go b/vendor/golang.org/x/crypto/curve25519/internal/field/fe_amd64_noasm.go deleted file mode 100644 index 9da280d1d88..00000000000 --- a/vendor/golang.org/x/crypto/curve25519/internal/field/fe_amd64_noasm.go +++ /dev/null @@ -1,11 +0,0 @@ -// Copyright (c) 2019 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -//go:build !amd64 || !gc || purego - -package field - -func feMul(v, x, y *Element) { feMulGeneric(v, x, y) } - -func feSquare(v, x *Element) { feSquareGeneric(v, x) } diff --git a/vendor/golang.org/x/crypto/curve25519/internal/field/fe_arm64.go b/vendor/golang.org/x/crypto/curve25519/internal/field/fe_arm64.go deleted file mode 100644 index 075fe9b9257..00000000000 --- a/vendor/golang.org/x/crypto/curve25519/internal/field/fe_arm64.go +++ /dev/null @@ -1,15 +0,0 @@ -// Copyright (c) 2020 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -//go:build arm64 && gc && !purego - -package field - -//go:noescape -func carryPropagate(v *Element) - -func (v *Element) carryPropagate() *Element { - carryPropagate(v) - return v -} diff --git a/vendor/golang.org/x/crypto/curve25519/internal/field/fe_arm64.s b/vendor/golang.org/x/crypto/curve25519/internal/field/fe_arm64.s deleted file mode 100644 index 3126a434191..00000000000 --- a/vendor/golang.org/x/crypto/curve25519/internal/field/fe_arm64.s +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright (c) 2020 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -//go:build arm64 && gc && !purego - -#include "textflag.h" - -// carryPropagate works exactly like carryPropagateGeneric and uses the -// same AND, ADD, and LSR+MADD instructions emitted by the compiler, but -// avoids loading R0-R4 twice and uses LDP and STP. -// -// See https://golang.org/issues/43145 for the main compiler issue. -// -// func carryPropagate(v *Element) -TEXT ·carryPropagate(SB),NOFRAME|NOSPLIT,$0-8 - MOVD v+0(FP), R20 - - LDP 0(R20), (R0, R1) - LDP 16(R20), (R2, R3) - MOVD 32(R20), R4 - - AND $0x7ffffffffffff, R0, R10 - AND $0x7ffffffffffff, R1, R11 - AND $0x7ffffffffffff, R2, R12 - AND $0x7ffffffffffff, R3, R13 - AND $0x7ffffffffffff, R4, R14 - - ADD R0>>51, R11, R11 - ADD R1>>51, R12, R12 - ADD R2>>51, R13, R13 - ADD R3>>51, R14, R14 - // R4>>51 * 19 + R10 -> R10 - LSR $51, R4, R21 - MOVD $19, R22 - MADD R22, R10, R21, R10 - - STP (R10, R11), 0(R20) - STP (R12, R13), 16(R20) - MOVD R14, 32(R20) - - RET diff --git a/vendor/golang.org/x/crypto/curve25519/internal/field/fe_arm64_noasm.go b/vendor/golang.org/x/crypto/curve25519/internal/field/fe_arm64_noasm.go deleted file mode 100644 index fc029ac12da..00000000000 --- a/vendor/golang.org/x/crypto/curve25519/internal/field/fe_arm64_noasm.go +++ /dev/null @@ -1,11 +0,0 @@ -// Copyright (c) 2021 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -//go:build !arm64 || !gc || purego - -package field - -func (v *Element) carryPropagate() *Element { - return v.carryPropagateGeneric() -} diff --git a/vendor/golang.org/x/crypto/curve25519/internal/field/fe_generic.go b/vendor/golang.org/x/crypto/curve25519/internal/field/fe_generic.go deleted file mode 100644 index 2671217da59..00000000000 --- a/vendor/golang.org/x/crypto/curve25519/internal/field/fe_generic.go +++ /dev/null @@ -1,264 +0,0 @@ -// Copyright (c) 2017 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package field - -import "math/bits" - -// uint128 holds a 128-bit number as two 64-bit limbs, for use with the -// bits.Mul64 and bits.Add64 intrinsics. -type uint128 struct { - lo, hi uint64 -} - -// mul64 returns a * b. -func mul64(a, b uint64) uint128 { - hi, lo := bits.Mul64(a, b) - return uint128{lo, hi} -} - -// addMul64 returns v + a * b. -func addMul64(v uint128, a, b uint64) uint128 { - hi, lo := bits.Mul64(a, b) - lo, c := bits.Add64(lo, v.lo, 0) - hi, _ = bits.Add64(hi, v.hi, c) - return uint128{lo, hi} -} - -// shiftRightBy51 returns a >> 51. a is assumed to be at most 115 bits. -func shiftRightBy51(a uint128) uint64 { - return (a.hi << (64 - 51)) | (a.lo >> 51) -} - -func feMulGeneric(v, a, b *Element) { - a0 := a.l0 - a1 := a.l1 - a2 := a.l2 - a3 := a.l3 - a4 := a.l4 - - b0 := b.l0 - b1 := b.l1 - b2 := b.l2 - b3 := b.l3 - b4 := b.l4 - - // Limb multiplication works like pen-and-paper columnar multiplication, but - // with 51-bit limbs instead of digits. - // - // a4 a3 a2 a1 a0 x - // b4 b3 b2 b1 b0 = - // ------------------------ - // a4b0 a3b0 a2b0 a1b0 a0b0 + - // a4b1 a3b1 a2b1 a1b1 a0b1 + - // a4b2 a3b2 a2b2 a1b2 a0b2 + - // a4b3 a3b3 a2b3 a1b3 a0b3 + - // a4b4 a3b4 a2b4 a1b4 a0b4 = - // ---------------------------------------------- - // r8 r7 r6 r5 r4 r3 r2 r1 r0 - // - // We can then use the reduction identity (a * 2²⁵⁵ + b = a * 19 + b) to - // reduce the limbs that would overflow 255 bits. r5 * 2²⁵⁵ becomes 19 * r5, - // r6 * 2³⁰⁶ becomes 19 * r6 * 2⁵¹, etc. - // - // Reduction can be carried out simultaneously to multiplication. For - // example, we do not compute r5: whenever the result of a multiplication - // belongs to r5, like a1b4, we multiply it by 19 and add the result to r0. - // - // a4b0 a3b0 a2b0 a1b0 a0b0 + - // a3b1 a2b1 a1b1 a0b1 19×a4b1 + - // a2b2 a1b2 a0b2 19×a4b2 19×a3b2 + - // a1b3 a0b3 19×a4b3 19×a3b3 19×a2b3 + - // a0b4 19×a4b4 19×a3b4 19×a2b4 19×a1b4 = - // -------------------------------------- - // r4 r3 r2 r1 r0 - // - // Finally we add up the columns into wide, overlapping limbs. - - a1_19 := a1 * 19 - a2_19 := a2 * 19 - a3_19 := a3 * 19 - a4_19 := a4 * 19 - - // r0 = a0×b0 + 19×(a1×b4 + a2×b3 + a3×b2 + a4×b1) - r0 := mul64(a0, b0) - r0 = addMul64(r0, a1_19, b4) - r0 = addMul64(r0, a2_19, b3) - r0 = addMul64(r0, a3_19, b2) - r0 = addMul64(r0, a4_19, b1) - - // r1 = a0×b1 + a1×b0 + 19×(a2×b4 + a3×b3 + a4×b2) - r1 := mul64(a0, b1) - r1 = addMul64(r1, a1, b0) - r1 = addMul64(r1, a2_19, b4) - r1 = addMul64(r1, a3_19, b3) - r1 = addMul64(r1, a4_19, b2) - - // r2 = a0×b2 + a1×b1 + a2×b0 + 19×(a3×b4 + a4×b3) - r2 := mul64(a0, b2) - r2 = addMul64(r2, a1, b1) - r2 = addMul64(r2, a2, b0) - r2 = addMul64(r2, a3_19, b4) - r2 = addMul64(r2, a4_19, b3) - - // r3 = a0×b3 + a1×b2 + a2×b1 + a3×b0 + 19×a4×b4 - r3 := mul64(a0, b3) - r3 = addMul64(r3, a1, b2) - r3 = addMul64(r3, a2, b1) - r3 = addMul64(r3, a3, b0) - r3 = addMul64(r3, a4_19, b4) - - // r4 = a0×b4 + a1×b3 + a2×b2 + a3×b1 + a4×b0 - r4 := mul64(a0, b4) - r4 = addMul64(r4, a1, b3) - r4 = addMul64(r4, a2, b2) - r4 = addMul64(r4, a3, b1) - r4 = addMul64(r4, a4, b0) - - // After the multiplication, we need to reduce (carry) the five coefficients - // to obtain a result with limbs that are at most slightly larger than 2⁵¹, - // to respect the Element invariant. - // - // Overall, the reduction works the same as carryPropagate, except with - // wider inputs: we take the carry for each coefficient by shifting it right - // by 51, and add it to the limb above it. The top carry is multiplied by 19 - // according to the reduction identity and added to the lowest limb. - // - // The largest coefficient (r0) will be at most 111 bits, which guarantees - // that all carries are at most 111 - 51 = 60 bits, which fits in a uint64. - // - // r0 = a0×b0 + 19×(a1×b4 + a2×b3 + a3×b2 + a4×b1) - // r0 < 2⁵²×2⁵² + 19×(2⁵²×2⁵² + 2⁵²×2⁵² + 2⁵²×2⁵² + 2⁵²×2⁵²) - // r0 < (1 + 19 × 4) × 2⁵² × 2⁵² - // r0 < 2⁷ × 2⁵² × 2⁵² - // r0 < 2¹¹¹ - // - // Moreover, the top coefficient (r4) is at most 107 bits, so c4 is at most - // 56 bits, and c4 * 19 is at most 61 bits, which again fits in a uint64 and - // allows us to easily apply the reduction identity. - // - // r4 = a0×b4 + a1×b3 + a2×b2 + a3×b1 + a4×b0 - // r4 < 5 × 2⁵² × 2⁵² - // r4 < 2¹⁰⁷ - // - - c0 := shiftRightBy51(r0) - c1 := shiftRightBy51(r1) - c2 := shiftRightBy51(r2) - c3 := shiftRightBy51(r3) - c4 := shiftRightBy51(r4) - - rr0 := r0.lo&maskLow51Bits + c4*19 - rr1 := r1.lo&maskLow51Bits + c0 - rr2 := r2.lo&maskLow51Bits + c1 - rr3 := r3.lo&maskLow51Bits + c2 - rr4 := r4.lo&maskLow51Bits + c3 - - // Now all coefficients fit into 64-bit registers but are still too large to - // be passed around as a Element. We therefore do one last carry chain, - // where the carries will be small enough to fit in the wiggle room above 2⁵¹. - *v = Element{rr0, rr1, rr2, rr3, rr4} - v.carryPropagate() -} - -func feSquareGeneric(v, a *Element) { - l0 := a.l0 - l1 := a.l1 - l2 := a.l2 - l3 := a.l3 - l4 := a.l4 - - // Squaring works precisely like multiplication above, but thanks to its - // symmetry we get to group a few terms together. - // - // l4 l3 l2 l1 l0 x - // l4 l3 l2 l1 l0 = - // ------------------------ - // l4l0 l3l0 l2l0 l1l0 l0l0 + - // l4l1 l3l1 l2l1 l1l1 l0l1 + - // l4l2 l3l2 l2l2 l1l2 l0l2 + - // l4l3 l3l3 l2l3 l1l3 l0l3 + - // l4l4 l3l4 l2l4 l1l4 l0l4 = - // ---------------------------------------------- - // r8 r7 r6 r5 r4 r3 r2 r1 r0 - // - // l4l0 l3l0 l2l0 l1l0 l0l0 + - // l3l1 l2l1 l1l1 l0l1 19×l4l1 + - // l2l2 l1l2 l0l2 19×l4l2 19×l3l2 + - // l1l3 l0l3 19×l4l3 19×l3l3 19×l2l3 + - // l0l4 19×l4l4 19×l3l4 19×l2l4 19×l1l4 = - // -------------------------------------- - // r4 r3 r2 r1 r0 - // - // With precomputed 2×, 19×, and 2×19× terms, we can compute each limb with - // only three Mul64 and four Add64, instead of five and eight. - - l0_2 := l0 * 2 - l1_2 := l1 * 2 - - l1_38 := l1 * 38 - l2_38 := l2 * 38 - l3_38 := l3 * 38 - - l3_19 := l3 * 19 - l4_19 := l4 * 19 - - // r0 = l0×l0 + 19×(l1×l4 + l2×l3 + l3×l2 + l4×l1) = l0×l0 + 19×2×(l1×l4 + l2×l3) - r0 := mul64(l0, l0) - r0 = addMul64(r0, l1_38, l4) - r0 = addMul64(r0, l2_38, l3) - - // r1 = l0×l1 + l1×l0 + 19×(l2×l4 + l3×l3 + l4×l2) = 2×l0×l1 + 19×2×l2×l4 + 19×l3×l3 - r1 := mul64(l0_2, l1) - r1 = addMul64(r1, l2_38, l4) - r1 = addMul64(r1, l3_19, l3) - - // r2 = l0×l2 + l1×l1 + l2×l0 + 19×(l3×l4 + l4×l3) = 2×l0×l2 + l1×l1 + 19×2×l3×l4 - r2 := mul64(l0_2, l2) - r2 = addMul64(r2, l1, l1) - r2 = addMul64(r2, l3_38, l4) - - // r3 = l0×l3 + l1×l2 + l2×l1 + l3×l0 + 19×l4×l4 = 2×l0×l3 + 2×l1×l2 + 19×l4×l4 - r3 := mul64(l0_2, l3) - r3 = addMul64(r3, l1_2, l2) - r3 = addMul64(r3, l4_19, l4) - - // r4 = l0×l4 + l1×l3 + l2×l2 + l3×l1 + l4×l0 = 2×l0×l4 + 2×l1×l3 + l2×l2 - r4 := mul64(l0_2, l4) - r4 = addMul64(r4, l1_2, l3) - r4 = addMul64(r4, l2, l2) - - c0 := shiftRightBy51(r0) - c1 := shiftRightBy51(r1) - c2 := shiftRightBy51(r2) - c3 := shiftRightBy51(r3) - c4 := shiftRightBy51(r4) - - rr0 := r0.lo&maskLow51Bits + c4*19 - rr1 := r1.lo&maskLow51Bits + c0 - rr2 := r2.lo&maskLow51Bits + c1 - rr3 := r3.lo&maskLow51Bits + c2 - rr4 := r4.lo&maskLow51Bits + c3 - - *v = Element{rr0, rr1, rr2, rr3, rr4} - v.carryPropagate() -} - -// carryPropagateGeneric brings the limbs below 52 bits by applying the reduction -// identity (a * 2²⁵⁵ + b = a * 19 + b) to the l4 carry. TODO inline -func (v *Element) carryPropagateGeneric() *Element { - c0 := v.l0 >> 51 - c1 := v.l1 >> 51 - c2 := v.l2 >> 51 - c3 := v.l3 >> 51 - c4 := v.l4 >> 51 - - v.l0 = v.l0&maskLow51Bits + c4*19 - v.l1 = v.l1&maskLow51Bits + c0 - v.l2 = v.l2&maskLow51Bits + c1 - v.l3 = v.l3&maskLow51Bits + c2 - v.l4 = v.l4&maskLow51Bits + c3 - - return v -} diff --git a/vendor/golang.org/x/crypto/curve25519/internal/field/sync.checkpoint b/vendor/golang.org/x/crypto/curve25519/internal/field/sync.checkpoint deleted file mode 100644 index e3685f95cab..00000000000 --- a/vendor/golang.org/x/crypto/curve25519/internal/field/sync.checkpoint +++ /dev/null @@ -1 +0,0 @@ -b0c49ae9f59d233526f8934262c5bbbe14d4358d diff --git a/vendor/golang.org/x/crypto/curve25519/internal/field/sync.sh b/vendor/golang.org/x/crypto/curve25519/internal/field/sync.sh deleted file mode 100644 index 1ba22a8b4c9..00000000000 --- a/vendor/golang.org/x/crypto/curve25519/internal/field/sync.sh +++ /dev/null @@ -1,19 +0,0 @@ -#! /bin/bash -set -euo pipefail - -cd "$(git rev-parse --show-toplevel)" - -STD_PATH=src/crypto/ed25519/internal/edwards25519/field -LOCAL_PATH=curve25519/internal/field -LAST_SYNC_REF=$(cat $LOCAL_PATH/sync.checkpoint) - -git fetch https://go.googlesource.com/go master - -if git diff --quiet $LAST_SYNC_REF:$STD_PATH FETCH_HEAD:$STD_PATH; then - echo "No changes." -else - NEW_REF=$(git rev-parse FETCH_HEAD | tee $LOCAL_PATH/sync.checkpoint) - echo "Applying changes from $LAST_SYNC_REF to $NEW_REF..." - git diff $LAST_SYNC_REF:$STD_PATH FETCH_HEAD:$STD_PATH | \ - git apply -3 --directory=$LOCAL_PATH -fi diff --git a/vendor/golang.org/x/crypto/ed25519/ed25519.go b/vendor/golang.org/x/crypto/ed25519/ed25519.go index a7828345fcc..59b3a95a7d2 100644 --- a/vendor/golang.org/x/crypto/ed25519/ed25519.go +++ b/vendor/golang.org/x/crypto/ed25519/ed25519.go @@ -11,9 +11,7 @@ // operations with the same key more efficient. This package refers to the RFC // 8032 private key as the “seed”. // -// Beginning with Go 1.13, the functionality of this package was moved to the -// standard library as crypto/ed25519. This package only acts as a compatibility -// wrapper. +// This package is a wrapper around the standard library crypto/ed25519 package. package ed25519 import ( diff --git a/vendor/golang.org/x/crypto/hkdf/hkdf.go b/vendor/golang.org/x/crypto/hkdf/hkdf.go index f4ded5fee2f..3bee66294ec 100644 --- a/vendor/golang.org/x/crypto/hkdf/hkdf.go +++ b/vendor/golang.org/x/crypto/hkdf/hkdf.go @@ -8,7 +8,7 @@ // HKDF is a cryptographic key derivation function (KDF) with the goal of // expanding limited input keying material into one or more cryptographically // strong secret keys. -package hkdf // import "golang.org/x/crypto/hkdf" +package hkdf import ( "crypto/hmac" diff --git a/vendor/golang.org/x/crypto/internal/poly1305/mac_noasm.go b/vendor/golang.org/x/crypto/internal/poly1305/mac_noasm.go index 333da285b32..bd896bdc76d 100644 --- a/vendor/golang.org/x/crypto/internal/poly1305/mac_noasm.go +++ b/vendor/golang.org/x/crypto/internal/poly1305/mac_noasm.go @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -//go:build (!amd64 && !ppc64le && !s390x) || !gc || purego +//go:build (!amd64 && !ppc64le && !ppc64 && !s390x) || !gc || purego package poly1305 diff --git a/vendor/golang.org/x/crypto/internal/poly1305/sum_amd64.s b/vendor/golang.org/x/crypto/internal/poly1305/sum_amd64.s index e0d3c647566..133757384b7 100644 --- a/vendor/golang.org/x/crypto/internal/poly1305/sum_amd64.s +++ b/vendor/golang.org/x/crypto/internal/poly1305/sum_amd64.s @@ -1,108 +1,93 @@ -// Copyright 2012 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. +// Code generated by command: go run sum_amd64_asm.go -out ../sum_amd64.s -pkg poly1305. DO NOT EDIT. //go:build gc && !purego -#include "textflag.h" - -#define POLY1305_ADD(msg, h0, h1, h2) \ - ADDQ 0(msg), h0; \ - ADCQ 8(msg), h1; \ - ADCQ $1, h2; \ - LEAQ 16(msg), msg - -#define POLY1305_MUL(h0, h1, h2, r0, r1, t0, t1, t2, t3) \ - MOVQ r0, AX; \ - MULQ h0; \ - MOVQ AX, t0; \ - MOVQ DX, t1; \ - MOVQ r0, AX; \ - MULQ h1; \ - ADDQ AX, t1; \ - ADCQ $0, DX; \ - MOVQ r0, t2; \ - IMULQ h2, t2; \ - ADDQ DX, t2; \ - \ - MOVQ r1, AX; \ - MULQ h0; \ - ADDQ AX, t1; \ - ADCQ $0, DX; \ - MOVQ DX, h0; \ - MOVQ r1, t3; \ - IMULQ h2, t3; \ - MOVQ r1, AX; \ - MULQ h1; \ - ADDQ AX, t2; \ - ADCQ DX, t3; \ - ADDQ h0, t2; \ - ADCQ $0, t3; \ - \ - MOVQ t0, h0; \ - MOVQ t1, h1; \ - MOVQ t2, h2; \ - ANDQ $3, h2; \ - MOVQ t2, t0; \ - ANDQ $0xFFFFFFFFFFFFFFFC, t0; \ - ADDQ t0, h0; \ - ADCQ t3, h1; \ - ADCQ $0, h2; \ - SHRQ $2, t3, t2; \ - SHRQ $2, t3; \ - ADDQ t2, h0; \ - ADCQ t3, h1; \ - ADCQ $0, h2 - -// func update(state *[7]uint64, msg []byte) +// func update(state *macState, msg []byte) TEXT ·update(SB), $0-32 MOVQ state+0(FP), DI MOVQ msg_base+8(FP), SI MOVQ msg_len+16(FP), R15 - - MOVQ 0(DI), R8 // h0 - MOVQ 8(DI), R9 // h1 - MOVQ 16(DI), R10 // h2 - MOVQ 24(DI), R11 // r0 - MOVQ 32(DI), R12 // r1 - - CMPQ R15, $16 + MOVQ (DI), R8 + MOVQ 8(DI), R9 + MOVQ 16(DI), R10 + MOVQ 24(DI), R11 + MOVQ 32(DI), R12 + CMPQ R15, $0x10 JB bytes_between_0_and_15 loop: - POLY1305_ADD(SI, R8, R9, R10) + ADDQ (SI), R8 + ADCQ 8(SI), R9 + ADCQ $0x01, R10 + LEAQ 16(SI), SI multiply: - POLY1305_MUL(R8, R9, R10, R11, R12, BX, CX, R13, R14) - SUBQ $16, R15 - CMPQ R15, $16 - JAE loop + MOVQ R11, AX + MULQ R8 + MOVQ AX, BX + MOVQ DX, CX + MOVQ R11, AX + MULQ R9 + ADDQ AX, CX + ADCQ $0x00, DX + MOVQ R11, R13 + IMULQ R10, R13 + ADDQ DX, R13 + MOVQ R12, AX + MULQ R8 + ADDQ AX, CX + ADCQ $0x00, DX + MOVQ DX, R8 + MOVQ R12, R14 + IMULQ R10, R14 + MOVQ R12, AX + MULQ R9 + ADDQ AX, R13 + ADCQ DX, R14 + ADDQ R8, R13 + ADCQ $0x00, R14 + MOVQ BX, R8 + MOVQ CX, R9 + MOVQ R13, R10 + ANDQ $0x03, R10 + MOVQ R13, BX + ANDQ $-4, BX + ADDQ BX, R8 + ADCQ R14, R9 + ADCQ $0x00, R10 + SHRQ $0x02, R14, R13 + SHRQ $0x02, R14 + ADDQ R13, R8 + ADCQ R14, R9 + ADCQ $0x00, R10 + SUBQ $0x10, R15 + CMPQ R15, $0x10 + JAE loop bytes_between_0_and_15: TESTQ R15, R15 JZ done - MOVQ $1, BX + MOVQ $0x00000001, BX XORQ CX, CX XORQ R13, R13 ADDQ R15, SI flush_buffer: - SHLQ $8, BX, CX - SHLQ $8, BX + SHLQ $0x08, BX, CX + SHLQ $0x08, BX MOVB -1(SI), R13 XORQ R13, BX DECQ SI DECQ R15 JNZ flush_buffer - ADDQ BX, R8 ADCQ CX, R9 - ADCQ $0, R10 - MOVQ $16, R15 + ADCQ $0x00, R10 + MOVQ $0x00000010, R15 JMP multiply done: - MOVQ R8, 0(DI) + MOVQ R8, (DI) MOVQ R9, 8(DI) MOVQ R10, 16(DI) RET diff --git a/vendor/golang.org/x/crypto/internal/poly1305/sum_ppc64le.go b/vendor/golang.org/x/crypto/internal/poly1305/sum_ppc64x.go similarity index 95% rename from vendor/golang.org/x/crypto/internal/poly1305/sum_ppc64le.go rename to vendor/golang.org/x/crypto/internal/poly1305/sum_ppc64x.go index 4aec4874b50..1a1679aaad9 100644 --- a/vendor/golang.org/x/crypto/internal/poly1305/sum_ppc64le.go +++ b/vendor/golang.org/x/crypto/internal/poly1305/sum_ppc64x.go @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -//go:build gc && !purego +//go:build gc && !purego && (ppc64 || ppc64le) package poly1305 diff --git a/vendor/golang.org/x/crypto/internal/poly1305/sum_ppc64le.s b/vendor/golang.org/x/crypto/internal/poly1305/sum_ppc64x.s similarity index 89% rename from vendor/golang.org/x/crypto/internal/poly1305/sum_ppc64le.s rename to vendor/golang.org/x/crypto/internal/poly1305/sum_ppc64x.s index b3c1699bff5..6899a1dabc0 100644 --- a/vendor/golang.org/x/crypto/internal/poly1305/sum_ppc64le.s +++ b/vendor/golang.org/x/crypto/internal/poly1305/sum_ppc64x.s @@ -2,15 +2,25 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -//go:build gc && !purego +//go:build gc && !purego && (ppc64 || ppc64le) #include "textflag.h" // This was ported from the amd64 implementation. +#ifdef GOARCH_ppc64le +#define LE_MOVD MOVD +#define LE_MOVWZ MOVWZ +#define LE_MOVHZ MOVHZ +#else +#define LE_MOVD MOVDBR +#define LE_MOVWZ MOVWBR +#define LE_MOVHZ MOVHBR +#endif + #define POLY1305_ADD(msg, h0, h1, h2, t0, t1, t2) \ - MOVD (msg), t0; \ - MOVD 8(msg), t1; \ + LE_MOVD (msg)( R0), t0; \ + LE_MOVD (msg)(R24), t1; \ MOVD $1, t2; \ ADDC t0, h0, h0; \ ADDE t1, h1, h1; \ @@ -50,10 +60,6 @@ ADDE t3, h1, h1; \ ADDZE h2 -DATA ·poly1305Mask<>+0x00(SB)/8, $0x0FFFFFFC0FFFFFFF -DATA ·poly1305Mask<>+0x08(SB)/8, $0x0FFFFFFC0FFFFFFC -GLOBL ·poly1305Mask<>(SB), RODATA, $16 - // func update(state *[7]uint64, msg []byte) TEXT ·update(SB), $0-32 MOVD state+0(FP), R3 @@ -66,6 +72,8 @@ TEXT ·update(SB), $0-32 MOVD 24(R3), R11 // r0 MOVD 32(R3), R12 // r1 + MOVD $8, R24 + CMP R5, $16 BLT bytes_between_0_and_15 @@ -94,7 +102,7 @@ flush_buffer: // Greater than 8 -- load the rightmost remaining bytes in msg // and put into R17 (h1) - MOVD (R4)(R21), R17 + LE_MOVD (R4)(R21), R17 MOVD $16, R22 // Find the offset to those bytes @@ -118,7 +126,7 @@ just1: BLT less8 // Exactly 8 - MOVD (R4), R16 + LE_MOVD (R4), R16 CMP R17, $0 @@ -133,7 +141,7 @@ less8: MOVD $0, R22 // shift count CMP R5, $4 BLT less4 - MOVWZ (R4), R16 + LE_MOVWZ (R4), R16 ADD $4, R4 ADD $-4, R5 MOVD $32, R22 @@ -141,7 +149,7 @@ less8: less4: CMP R5, $2 BLT less2 - MOVHZ (R4), R21 + LE_MOVHZ (R4), R21 SLD R22, R21, R21 OR R16, R21, R16 ADD $16, R22 diff --git a/vendor/golang.org/x/crypto/openpgp/armor/armor.go b/vendor/golang.org/x/crypto/openpgp/armor/armor.go index 8907183ec0a..e664d127cb2 100644 --- a/vendor/golang.org/x/crypto/openpgp/armor/armor.go +++ b/vendor/golang.org/x/crypto/openpgp/armor/armor.go @@ -10,14 +10,15 @@ // for their specific task. If you are required to interoperate with OpenPGP // systems and need a maintained package, consider a community fork. // See https://golang.org/issue/44226. -package armor // import "golang.org/x/crypto/openpgp/armor" +package armor import ( "bufio" "bytes" "encoding/base64" - "golang.org/x/crypto/openpgp/errors" "io" + + "golang.org/x/crypto/openpgp/errors" ) // A Block represents an OpenPGP armored structure. diff --git a/vendor/golang.org/x/crypto/openpgp/clearsign/clearsign.go b/vendor/golang.org/x/crypto/openpgp/clearsign/clearsign.go index 644b2e078bc..cea48efdcd2 100644 --- a/vendor/golang.org/x/crypto/openpgp/clearsign/clearsign.go +++ b/vendor/golang.org/x/crypto/openpgp/clearsign/clearsign.go @@ -13,7 +13,7 @@ // for their specific task. If you are required to interoperate with OpenPGP // systems and need a maintained package, consider a community fork. // See https://golang.org/issue/44226. -package clearsign // import "golang.org/x/crypto/openpgp/clearsign" +package clearsign import ( "bufio" diff --git a/vendor/golang.org/x/crypto/openpgp/elgamal/elgamal.go b/vendor/golang.org/x/crypto/openpgp/elgamal/elgamal.go index 743b35a1204..f922bdbcaa7 100644 --- a/vendor/golang.org/x/crypto/openpgp/elgamal/elgamal.go +++ b/vendor/golang.org/x/crypto/openpgp/elgamal/elgamal.go @@ -16,7 +16,7 @@ // https://golang.org/issue/44226), and ElGamal in the OpenPGP ecosystem has // compatibility and security issues (see https://eprint.iacr.org/2021/923). // Moreover, this package doesn't protect against side-channel attacks. -package elgamal // import "golang.org/x/crypto/openpgp/elgamal" +package elgamal import ( "crypto/rand" diff --git a/vendor/golang.org/x/crypto/openpgp/errors/errors.go b/vendor/golang.org/x/crypto/openpgp/errors/errors.go index 1d7a0ea05ad..a328749471a 100644 --- a/vendor/golang.org/x/crypto/openpgp/errors/errors.go +++ b/vendor/golang.org/x/crypto/openpgp/errors/errors.go @@ -9,7 +9,7 @@ // for their specific task. If you are required to interoperate with OpenPGP // systems and need a maintained package, consider a community fork. // See https://golang.org/issue/44226. -package errors // import "golang.org/x/crypto/openpgp/errors" +package errors import ( "strconv" diff --git a/vendor/golang.org/x/crypto/openpgp/packet/packet.go b/vendor/golang.org/x/crypto/openpgp/packet/packet.go index 0a19794a8e4..a84a1a214e2 100644 --- a/vendor/golang.org/x/crypto/openpgp/packet/packet.go +++ b/vendor/golang.org/x/crypto/openpgp/packet/packet.go @@ -10,7 +10,7 @@ // for their specific task. If you are required to interoperate with OpenPGP // systems and need a maintained package, consider a community fork. // See https://golang.org/issue/44226. -package packet // import "golang.org/x/crypto/openpgp/packet" +package packet import ( "bufio" diff --git a/vendor/golang.org/x/crypto/openpgp/read.go b/vendor/golang.org/x/crypto/openpgp/read.go index 48a89314685..cff3db91969 100644 --- a/vendor/golang.org/x/crypto/openpgp/read.go +++ b/vendor/golang.org/x/crypto/openpgp/read.go @@ -9,7 +9,7 @@ // for their specific task. If you are required to interoperate with OpenPGP // systems and need a maintained package, consider a community fork. // See https://golang.org/issue/44226. -package openpgp // import "golang.org/x/crypto/openpgp" +package openpgp import ( "crypto" diff --git a/vendor/golang.org/x/crypto/openpgp/s2k/s2k.go b/vendor/golang.org/x/crypto/openpgp/s2k/s2k.go index f53244a1c7b..fa1a9190795 100644 --- a/vendor/golang.org/x/crypto/openpgp/s2k/s2k.go +++ b/vendor/golang.org/x/crypto/openpgp/s2k/s2k.go @@ -10,7 +10,7 @@ // for their specific task. If you are required to interoperate with OpenPGP // systems and need a maintained package, consider a community fork. // See https://golang.org/issue/44226. -package s2k // import "golang.org/x/crypto/openpgp/s2k" +package s2k import ( "crypto" diff --git a/vendor/golang.org/x/crypto/pbkdf2/pbkdf2.go b/vendor/golang.org/x/crypto/pbkdf2/pbkdf2.go index 904b57e01d7..28cd99c7f3f 100644 --- a/vendor/golang.org/x/crypto/pbkdf2/pbkdf2.go +++ b/vendor/golang.org/x/crypto/pbkdf2/pbkdf2.go @@ -16,7 +16,7 @@ Hash Functions SHA-1, SHA-224, SHA-256, SHA-384 and SHA-512 for HMAC. To choose, you can pass the `New` functions from the different SHA packages to pbkdf2.Key. */ -package pbkdf2 // import "golang.org/x/crypto/pbkdf2" +package pbkdf2 import ( "crypto/hmac" diff --git a/vendor/golang.org/x/crypto/scrypt/scrypt.go b/vendor/golang.org/x/crypto/scrypt/scrypt.go index c971a99fa67..76fa40fb20a 100644 --- a/vendor/golang.org/x/crypto/scrypt/scrypt.go +++ b/vendor/golang.org/x/crypto/scrypt/scrypt.go @@ -5,7 +5,7 @@ // Package scrypt implements the scrypt key derivation function as defined in // Colin Percival's paper "Stronger Key Derivation via Sequential Memory-Hard // Functions" (https://www.tarsnap.com/scrypt/scrypt.pdf). -package scrypt // import "golang.org/x/crypto/scrypt" +package scrypt import ( "crypto/sha256" diff --git a/vendor/golang.org/x/crypto/sha3/doc.go b/vendor/golang.org/x/crypto/sha3/doc.go index decd8cf9bf7..bbf391fe6e5 100644 --- a/vendor/golang.org/x/crypto/sha3/doc.go +++ b/vendor/golang.org/x/crypto/sha3/doc.go @@ -5,6 +5,10 @@ // Package sha3 implements the SHA-3 fixed-output-length hash functions and // the SHAKE variable-output-length hash functions defined by FIPS-202. // +// All types in this package also implement [encoding.BinaryMarshaler], +// [encoding.BinaryAppender] and [encoding.BinaryUnmarshaler] to marshal and +// unmarshal the internal state of the hash. +// // Both types of hash function use the "sponge" construction and the Keccak // permutation. For a detailed specification see http://keccak.noekeon.org/ // @@ -59,4 +63,4 @@ // They produce output of the same length, with the same security strengths // against all attacks. This means, in particular, that SHA3-256 only has // 128-bit collision resistance, because its output length is 32 bytes. -package sha3 // import "golang.org/x/crypto/sha3" +package sha3 diff --git a/vendor/golang.org/x/crypto/sha3/hashes.go b/vendor/golang.org/x/crypto/sha3/hashes.go index 5eae6cb922f..31fffbe0440 100644 --- a/vendor/golang.org/x/crypto/sha3/hashes.go +++ b/vendor/golang.org/x/crypto/sha3/hashes.go @@ -9,6 +9,7 @@ package sha3 // bytes. import ( + "crypto" "hash" ) @@ -40,33 +41,59 @@ func New512() hash.Hash { return new512() } +func init() { + crypto.RegisterHash(crypto.SHA3_224, New224) + crypto.RegisterHash(crypto.SHA3_256, New256) + crypto.RegisterHash(crypto.SHA3_384, New384) + crypto.RegisterHash(crypto.SHA3_512, New512) +} + +const ( + dsbyteSHA3 = 0b00000110 + dsbyteKeccak = 0b00000001 + dsbyteShake = 0b00011111 + dsbyteCShake = 0b00000100 + + // rateK[c] is the rate in bytes for Keccak[c] where c is the capacity in + // bits. Given the sponge size is 1600 bits, the rate is 1600 - c bits. + rateK256 = (1600 - 256) / 8 + rateK448 = (1600 - 448) / 8 + rateK512 = (1600 - 512) / 8 + rateK768 = (1600 - 768) / 8 + rateK1024 = (1600 - 1024) / 8 +) + func new224Generic() *state { - return &state{rate: 144, outputLen: 28, dsbyte: 0x06} + return &state{rate: rateK448, outputLen: 28, dsbyte: dsbyteSHA3} } func new256Generic() *state { - return &state{rate: 136, outputLen: 32, dsbyte: 0x06} + return &state{rate: rateK512, outputLen: 32, dsbyte: dsbyteSHA3} } func new384Generic() *state { - return &state{rate: 104, outputLen: 48, dsbyte: 0x06} + return &state{rate: rateK768, outputLen: 48, dsbyte: dsbyteSHA3} } func new512Generic() *state { - return &state{rate: 72, outputLen: 64, dsbyte: 0x06} + return &state{rate: rateK1024, outputLen: 64, dsbyte: dsbyteSHA3} } // NewLegacyKeccak256 creates a new Keccak-256 hash. // // Only use this function if you require compatibility with an existing cryptosystem // that uses non-standard padding. All other users should use New256 instead. -func NewLegacyKeccak256() hash.Hash { return &state{rate: 136, outputLen: 32, dsbyte: 0x01} } +func NewLegacyKeccak256() hash.Hash { + return &state{rate: rateK512, outputLen: 32, dsbyte: dsbyteKeccak} +} // NewLegacyKeccak512 creates a new Keccak-512 hash. // // Only use this function if you require compatibility with an existing cryptosystem // that uses non-standard padding. All other users should use New512 instead. -func NewLegacyKeccak512() hash.Hash { return &state{rate: 72, outputLen: 64, dsbyte: 0x01} } +func NewLegacyKeccak512() hash.Hash { + return &state{rate: rateK1024, outputLen: 64, dsbyte: dsbyteKeccak} +} // Sum224 returns the SHA3-224 digest of the data. func Sum224(data []byte) (digest [28]byte) { diff --git a/vendor/golang.org/x/crypto/sha3/keccakf_amd64.s b/vendor/golang.org/x/crypto/sha3/keccakf_amd64.s index 1f539388619..99e2f16e971 100644 --- a/vendor/golang.org/x/crypto/sha3/keccakf_amd64.s +++ b/vendor/golang.org/x/crypto/sha3/keccakf_amd64.s @@ -1,390 +1,5419 @@ -// Copyright 2015 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. +// Code generated by command: go run keccakf_amd64_asm.go -out ../keccakf_amd64.s -pkg sha3. DO NOT EDIT. //go:build amd64 && !purego && gc -// This code was translated into a form compatible with 6a from the public -// domain sources at https://github.com/gvanas/KeccakCodePackage - -// Offsets in state -#define _ba (0*8) -#define _be (1*8) -#define _bi (2*8) -#define _bo (3*8) -#define _bu (4*8) -#define _ga (5*8) -#define _ge (6*8) -#define _gi (7*8) -#define _go (8*8) -#define _gu (9*8) -#define _ka (10*8) -#define _ke (11*8) -#define _ki (12*8) -#define _ko (13*8) -#define _ku (14*8) -#define _ma (15*8) -#define _me (16*8) -#define _mi (17*8) -#define _mo (18*8) -#define _mu (19*8) -#define _sa (20*8) -#define _se (21*8) -#define _si (22*8) -#define _so (23*8) -#define _su (24*8) - -// Temporary registers -#define rT1 AX - -// Round vars -#define rpState DI -#define rpStack SP - -#define rDa BX -#define rDe CX -#define rDi DX -#define rDo R8 -#define rDu R9 - -#define rBa R10 -#define rBe R11 -#define rBi R12 -#define rBo R13 -#define rBu R14 - -#define rCa SI -#define rCe BP -#define rCi rBi -#define rCo rBo -#define rCu R15 - -#define MOVQ_RBI_RCE MOVQ rBi, rCe -#define XORQ_RT1_RCA XORQ rT1, rCa -#define XORQ_RT1_RCE XORQ rT1, rCe -#define XORQ_RBA_RCU XORQ rBa, rCu -#define XORQ_RBE_RCU XORQ rBe, rCu -#define XORQ_RDU_RCU XORQ rDu, rCu -#define XORQ_RDA_RCA XORQ rDa, rCa -#define XORQ_RDE_RCE XORQ rDe, rCe - -#define mKeccakRound(iState, oState, rc, B_RBI_RCE, G_RT1_RCA, G_RT1_RCE, G_RBA_RCU, K_RT1_RCA, K_RT1_RCE, K_RBA_RCU, M_RT1_RCA, M_RT1_RCE, M_RBE_RCU, S_RDU_RCU, S_RDA_RCA, S_RDE_RCE) \ - /* Prepare round */ \ - MOVQ rCe, rDa; \ - ROLQ $1, rDa; \ - \ - MOVQ _bi(iState), rCi; \ - XORQ _gi(iState), rDi; \ - XORQ rCu, rDa; \ - XORQ _ki(iState), rCi; \ - XORQ _mi(iState), rDi; \ - XORQ rDi, rCi; \ - \ - MOVQ rCi, rDe; \ - ROLQ $1, rDe; \ - \ - MOVQ _bo(iState), rCo; \ - XORQ _go(iState), rDo; \ - XORQ rCa, rDe; \ - XORQ _ko(iState), rCo; \ - XORQ _mo(iState), rDo; \ - XORQ rDo, rCo; \ - \ - MOVQ rCo, rDi; \ - ROLQ $1, rDi; \ - \ - MOVQ rCu, rDo; \ - XORQ rCe, rDi; \ - ROLQ $1, rDo; \ - \ - MOVQ rCa, rDu; \ - XORQ rCi, rDo; \ - ROLQ $1, rDu; \ - \ - /* Result b */ \ - MOVQ _ba(iState), rBa; \ - MOVQ _ge(iState), rBe; \ - XORQ rCo, rDu; \ - MOVQ _ki(iState), rBi; \ - MOVQ _mo(iState), rBo; \ - MOVQ _su(iState), rBu; \ - XORQ rDe, rBe; \ - ROLQ $44, rBe; \ - XORQ rDi, rBi; \ - XORQ rDa, rBa; \ - ROLQ $43, rBi; \ - \ - MOVQ rBe, rCa; \ - MOVQ rc, rT1; \ - ORQ rBi, rCa; \ - XORQ rBa, rT1; \ - XORQ rT1, rCa; \ - MOVQ rCa, _ba(oState); \ - \ - XORQ rDu, rBu; \ - ROLQ $14, rBu; \ - MOVQ rBa, rCu; \ - ANDQ rBe, rCu; \ - XORQ rBu, rCu; \ - MOVQ rCu, _bu(oState); \ - \ - XORQ rDo, rBo; \ - ROLQ $21, rBo; \ - MOVQ rBo, rT1; \ - ANDQ rBu, rT1; \ - XORQ rBi, rT1; \ - MOVQ rT1, _bi(oState); \ - \ - NOTQ rBi; \ - ORQ rBa, rBu; \ - ORQ rBo, rBi; \ - XORQ rBo, rBu; \ - XORQ rBe, rBi; \ - MOVQ rBu, _bo(oState); \ - MOVQ rBi, _be(oState); \ - B_RBI_RCE; \ - \ - /* Result g */ \ - MOVQ _gu(iState), rBe; \ - XORQ rDu, rBe; \ - MOVQ _ka(iState), rBi; \ - ROLQ $20, rBe; \ - XORQ rDa, rBi; \ - ROLQ $3, rBi; \ - MOVQ _bo(iState), rBa; \ - MOVQ rBe, rT1; \ - ORQ rBi, rT1; \ - XORQ rDo, rBa; \ - MOVQ _me(iState), rBo; \ - MOVQ _si(iState), rBu; \ - ROLQ $28, rBa; \ - XORQ rBa, rT1; \ - MOVQ rT1, _ga(oState); \ - G_RT1_RCA; \ - \ - XORQ rDe, rBo; \ - ROLQ $45, rBo; \ - MOVQ rBi, rT1; \ - ANDQ rBo, rT1; \ - XORQ rBe, rT1; \ - MOVQ rT1, _ge(oState); \ - G_RT1_RCE; \ - \ - XORQ rDi, rBu; \ - ROLQ $61, rBu; \ - MOVQ rBu, rT1; \ - ORQ rBa, rT1; \ - XORQ rBo, rT1; \ - MOVQ rT1, _go(oState); \ - \ - ANDQ rBe, rBa; \ - XORQ rBu, rBa; \ - MOVQ rBa, _gu(oState); \ - NOTQ rBu; \ - G_RBA_RCU; \ - \ - ORQ rBu, rBo; \ - XORQ rBi, rBo; \ - MOVQ rBo, _gi(oState); \ - \ - /* Result k */ \ - MOVQ _be(iState), rBa; \ - MOVQ _gi(iState), rBe; \ - MOVQ _ko(iState), rBi; \ - MOVQ _mu(iState), rBo; \ - MOVQ _sa(iState), rBu; \ - XORQ rDi, rBe; \ - ROLQ $6, rBe; \ - XORQ rDo, rBi; \ - ROLQ $25, rBi; \ - MOVQ rBe, rT1; \ - ORQ rBi, rT1; \ - XORQ rDe, rBa; \ - ROLQ $1, rBa; \ - XORQ rBa, rT1; \ - MOVQ rT1, _ka(oState); \ - K_RT1_RCA; \ - \ - XORQ rDu, rBo; \ - ROLQ $8, rBo; \ - MOVQ rBi, rT1; \ - ANDQ rBo, rT1; \ - XORQ rBe, rT1; \ - MOVQ rT1, _ke(oState); \ - K_RT1_RCE; \ - \ - XORQ rDa, rBu; \ - ROLQ $18, rBu; \ - NOTQ rBo; \ - MOVQ rBo, rT1; \ - ANDQ rBu, rT1; \ - XORQ rBi, rT1; \ - MOVQ rT1, _ki(oState); \ - \ - MOVQ rBu, rT1; \ - ORQ rBa, rT1; \ - XORQ rBo, rT1; \ - MOVQ rT1, _ko(oState); \ - \ - ANDQ rBe, rBa; \ - XORQ rBu, rBa; \ - MOVQ rBa, _ku(oState); \ - K_RBA_RCU; \ - \ - /* Result m */ \ - MOVQ _ga(iState), rBe; \ - XORQ rDa, rBe; \ - MOVQ _ke(iState), rBi; \ - ROLQ $36, rBe; \ - XORQ rDe, rBi; \ - MOVQ _bu(iState), rBa; \ - ROLQ $10, rBi; \ - MOVQ rBe, rT1; \ - MOVQ _mi(iState), rBo; \ - ANDQ rBi, rT1; \ - XORQ rDu, rBa; \ - MOVQ _so(iState), rBu; \ - ROLQ $27, rBa; \ - XORQ rBa, rT1; \ - MOVQ rT1, _ma(oState); \ - M_RT1_RCA; \ - \ - XORQ rDi, rBo; \ - ROLQ $15, rBo; \ - MOVQ rBi, rT1; \ - ORQ rBo, rT1; \ - XORQ rBe, rT1; \ - MOVQ rT1, _me(oState); \ - M_RT1_RCE; \ - \ - XORQ rDo, rBu; \ - ROLQ $56, rBu; \ - NOTQ rBo; \ - MOVQ rBo, rT1; \ - ORQ rBu, rT1; \ - XORQ rBi, rT1; \ - MOVQ rT1, _mi(oState); \ - \ - ORQ rBa, rBe; \ - XORQ rBu, rBe; \ - MOVQ rBe, _mu(oState); \ - \ - ANDQ rBa, rBu; \ - XORQ rBo, rBu; \ - MOVQ rBu, _mo(oState); \ - M_RBE_RCU; \ - \ - /* Result s */ \ - MOVQ _bi(iState), rBa; \ - MOVQ _go(iState), rBe; \ - MOVQ _ku(iState), rBi; \ - XORQ rDi, rBa; \ - MOVQ _ma(iState), rBo; \ - ROLQ $62, rBa; \ - XORQ rDo, rBe; \ - MOVQ _se(iState), rBu; \ - ROLQ $55, rBe; \ - \ - XORQ rDu, rBi; \ - MOVQ rBa, rDu; \ - XORQ rDe, rBu; \ - ROLQ $2, rBu; \ - ANDQ rBe, rDu; \ - XORQ rBu, rDu; \ - MOVQ rDu, _su(oState); \ - \ - ROLQ $39, rBi; \ - S_RDU_RCU; \ - NOTQ rBe; \ - XORQ rDa, rBo; \ - MOVQ rBe, rDa; \ - ANDQ rBi, rDa; \ - XORQ rBa, rDa; \ - MOVQ rDa, _sa(oState); \ - S_RDA_RCA; \ - \ - ROLQ $41, rBo; \ - MOVQ rBi, rDe; \ - ORQ rBo, rDe; \ - XORQ rBe, rDe; \ - MOVQ rDe, _se(oState); \ - S_RDE_RCE; \ - \ - MOVQ rBo, rDi; \ - MOVQ rBu, rDo; \ - ANDQ rBu, rDi; \ - ORQ rBa, rDo; \ - XORQ rBi, rDi; \ - XORQ rBo, rDo; \ - MOVQ rDi, _si(oState); \ - MOVQ rDo, _so(oState) \ - // func keccakF1600(a *[25]uint64) -TEXT ·keccakF1600(SB), 0, $200-8 - MOVQ a+0(FP), rpState +TEXT ·keccakF1600(SB), $200-8 + MOVQ a+0(FP), DI // Convert the user state into an internal state - NOTQ _be(rpState) - NOTQ _bi(rpState) - NOTQ _go(rpState) - NOTQ _ki(rpState) - NOTQ _mi(rpState) - NOTQ _sa(rpState) + NOTQ 8(DI) + NOTQ 16(DI) + NOTQ 64(DI) + NOTQ 96(DI) + NOTQ 136(DI) + NOTQ 160(DI) // Execute the KeccakF permutation - MOVQ _ba(rpState), rCa - MOVQ _be(rpState), rCe - MOVQ _bu(rpState), rCu - - XORQ _ga(rpState), rCa - XORQ _ge(rpState), rCe - XORQ _gu(rpState), rCu - - XORQ _ka(rpState), rCa - XORQ _ke(rpState), rCe - XORQ _ku(rpState), rCu - - XORQ _ma(rpState), rCa - XORQ _me(rpState), rCe - XORQ _mu(rpState), rCu - - XORQ _sa(rpState), rCa - XORQ _se(rpState), rCe - MOVQ _si(rpState), rDi - MOVQ _so(rpState), rDo - XORQ _su(rpState), rCu - - mKeccakRound(rpState, rpStack, $0x0000000000000001, MOVQ_RBI_RCE, XORQ_RT1_RCA, XORQ_RT1_RCE, XORQ_RBA_RCU, XORQ_RT1_RCA, XORQ_RT1_RCE, XORQ_RBA_RCU, XORQ_RT1_RCA, XORQ_RT1_RCE, XORQ_RBE_RCU, XORQ_RDU_RCU, XORQ_RDA_RCA, XORQ_RDE_RCE) - mKeccakRound(rpStack, rpState, $0x0000000000008082, MOVQ_RBI_RCE, XORQ_RT1_RCA, XORQ_RT1_RCE, XORQ_RBA_RCU, XORQ_RT1_RCA, XORQ_RT1_RCE, XORQ_RBA_RCU, XORQ_RT1_RCA, XORQ_RT1_RCE, XORQ_RBE_RCU, XORQ_RDU_RCU, XORQ_RDA_RCA, XORQ_RDE_RCE) - mKeccakRound(rpState, rpStack, $0x800000000000808a, MOVQ_RBI_RCE, XORQ_RT1_RCA, XORQ_RT1_RCE, XORQ_RBA_RCU, XORQ_RT1_RCA, XORQ_RT1_RCE, XORQ_RBA_RCU, XORQ_RT1_RCA, XORQ_RT1_RCE, XORQ_RBE_RCU, XORQ_RDU_RCU, XORQ_RDA_RCA, XORQ_RDE_RCE) - mKeccakRound(rpStack, rpState, $0x8000000080008000, MOVQ_RBI_RCE, XORQ_RT1_RCA, XORQ_RT1_RCE, XORQ_RBA_RCU, XORQ_RT1_RCA, XORQ_RT1_RCE, XORQ_RBA_RCU, XORQ_RT1_RCA, XORQ_RT1_RCE, XORQ_RBE_RCU, XORQ_RDU_RCU, XORQ_RDA_RCA, XORQ_RDE_RCE) - mKeccakRound(rpState, rpStack, $0x000000000000808b, MOVQ_RBI_RCE, XORQ_RT1_RCA, XORQ_RT1_RCE, XORQ_RBA_RCU, XORQ_RT1_RCA, XORQ_RT1_RCE, XORQ_RBA_RCU, XORQ_RT1_RCA, XORQ_RT1_RCE, XORQ_RBE_RCU, XORQ_RDU_RCU, XORQ_RDA_RCA, XORQ_RDE_RCE) - mKeccakRound(rpStack, rpState, $0x0000000080000001, MOVQ_RBI_RCE, XORQ_RT1_RCA, XORQ_RT1_RCE, XORQ_RBA_RCU, XORQ_RT1_RCA, XORQ_RT1_RCE, XORQ_RBA_RCU, XORQ_RT1_RCA, XORQ_RT1_RCE, XORQ_RBE_RCU, XORQ_RDU_RCU, XORQ_RDA_RCA, XORQ_RDE_RCE) - mKeccakRound(rpState, rpStack, $0x8000000080008081, MOVQ_RBI_RCE, XORQ_RT1_RCA, XORQ_RT1_RCE, XORQ_RBA_RCU, XORQ_RT1_RCA, XORQ_RT1_RCE, XORQ_RBA_RCU, XORQ_RT1_RCA, XORQ_RT1_RCE, XORQ_RBE_RCU, XORQ_RDU_RCU, XORQ_RDA_RCA, XORQ_RDE_RCE) - mKeccakRound(rpStack, rpState, $0x8000000000008009, MOVQ_RBI_RCE, XORQ_RT1_RCA, XORQ_RT1_RCE, XORQ_RBA_RCU, XORQ_RT1_RCA, XORQ_RT1_RCE, XORQ_RBA_RCU, XORQ_RT1_RCA, XORQ_RT1_RCE, XORQ_RBE_RCU, XORQ_RDU_RCU, XORQ_RDA_RCA, XORQ_RDE_RCE) - mKeccakRound(rpState, rpStack, $0x000000000000008a, MOVQ_RBI_RCE, XORQ_RT1_RCA, XORQ_RT1_RCE, XORQ_RBA_RCU, XORQ_RT1_RCA, XORQ_RT1_RCE, XORQ_RBA_RCU, XORQ_RT1_RCA, XORQ_RT1_RCE, XORQ_RBE_RCU, XORQ_RDU_RCU, XORQ_RDA_RCA, XORQ_RDE_RCE) - mKeccakRound(rpStack, rpState, $0x0000000000000088, MOVQ_RBI_RCE, XORQ_RT1_RCA, XORQ_RT1_RCE, XORQ_RBA_RCU, XORQ_RT1_RCA, XORQ_RT1_RCE, XORQ_RBA_RCU, XORQ_RT1_RCA, XORQ_RT1_RCE, XORQ_RBE_RCU, XORQ_RDU_RCU, XORQ_RDA_RCA, XORQ_RDE_RCE) - mKeccakRound(rpState, rpStack, $0x0000000080008009, MOVQ_RBI_RCE, XORQ_RT1_RCA, XORQ_RT1_RCE, XORQ_RBA_RCU, XORQ_RT1_RCA, XORQ_RT1_RCE, XORQ_RBA_RCU, XORQ_RT1_RCA, XORQ_RT1_RCE, XORQ_RBE_RCU, XORQ_RDU_RCU, XORQ_RDA_RCA, XORQ_RDE_RCE) - mKeccakRound(rpStack, rpState, $0x000000008000000a, MOVQ_RBI_RCE, XORQ_RT1_RCA, XORQ_RT1_RCE, XORQ_RBA_RCU, XORQ_RT1_RCA, XORQ_RT1_RCE, XORQ_RBA_RCU, XORQ_RT1_RCA, XORQ_RT1_RCE, XORQ_RBE_RCU, XORQ_RDU_RCU, XORQ_RDA_RCA, XORQ_RDE_RCE) - mKeccakRound(rpState, rpStack, $0x000000008000808b, MOVQ_RBI_RCE, XORQ_RT1_RCA, XORQ_RT1_RCE, XORQ_RBA_RCU, XORQ_RT1_RCA, XORQ_RT1_RCE, XORQ_RBA_RCU, XORQ_RT1_RCA, XORQ_RT1_RCE, XORQ_RBE_RCU, XORQ_RDU_RCU, XORQ_RDA_RCA, XORQ_RDE_RCE) - mKeccakRound(rpStack, rpState, $0x800000000000008b, MOVQ_RBI_RCE, XORQ_RT1_RCA, XORQ_RT1_RCE, XORQ_RBA_RCU, XORQ_RT1_RCA, XORQ_RT1_RCE, XORQ_RBA_RCU, XORQ_RT1_RCA, XORQ_RT1_RCE, XORQ_RBE_RCU, XORQ_RDU_RCU, XORQ_RDA_RCA, XORQ_RDE_RCE) - mKeccakRound(rpState, rpStack, $0x8000000000008089, MOVQ_RBI_RCE, XORQ_RT1_RCA, XORQ_RT1_RCE, XORQ_RBA_RCU, XORQ_RT1_RCA, XORQ_RT1_RCE, XORQ_RBA_RCU, XORQ_RT1_RCA, XORQ_RT1_RCE, XORQ_RBE_RCU, XORQ_RDU_RCU, XORQ_RDA_RCA, XORQ_RDE_RCE) - mKeccakRound(rpStack, rpState, $0x8000000000008003, MOVQ_RBI_RCE, XORQ_RT1_RCA, XORQ_RT1_RCE, XORQ_RBA_RCU, XORQ_RT1_RCA, XORQ_RT1_RCE, XORQ_RBA_RCU, XORQ_RT1_RCA, XORQ_RT1_RCE, XORQ_RBE_RCU, XORQ_RDU_RCU, XORQ_RDA_RCA, XORQ_RDE_RCE) - mKeccakRound(rpState, rpStack, $0x8000000000008002, MOVQ_RBI_RCE, XORQ_RT1_RCA, XORQ_RT1_RCE, XORQ_RBA_RCU, XORQ_RT1_RCA, XORQ_RT1_RCE, XORQ_RBA_RCU, XORQ_RT1_RCA, XORQ_RT1_RCE, XORQ_RBE_RCU, XORQ_RDU_RCU, XORQ_RDA_RCA, XORQ_RDE_RCE) - mKeccakRound(rpStack, rpState, $0x8000000000000080, MOVQ_RBI_RCE, XORQ_RT1_RCA, XORQ_RT1_RCE, XORQ_RBA_RCU, XORQ_RT1_RCA, XORQ_RT1_RCE, XORQ_RBA_RCU, XORQ_RT1_RCA, XORQ_RT1_RCE, XORQ_RBE_RCU, XORQ_RDU_RCU, XORQ_RDA_RCA, XORQ_RDE_RCE) - mKeccakRound(rpState, rpStack, $0x000000000000800a, MOVQ_RBI_RCE, XORQ_RT1_RCA, XORQ_RT1_RCE, XORQ_RBA_RCU, XORQ_RT1_RCA, XORQ_RT1_RCE, XORQ_RBA_RCU, XORQ_RT1_RCA, XORQ_RT1_RCE, XORQ_RBE_RCU, XORQ_RDU_RCU, XORQ_RDA_RCA, XORQ_RDE_RCE) - mKeccakRound(rpStack, rpState, $0x800000008000000a, MOVQ_RBI_RCE, XORQ_RT1_RCA, XORQ_RT1_RCE, XORQ_RBA_RCU, XORQ_RT1_RCA, XORQ_RT1_RCE, XORQ_RBA_RCU, XORQ_RT1_RCA, XORQ_RT1_RCE, XORQ_RBE_RCU, XORQ_RDU_RCU, XORQ_RDA_RCA, XORQ_RDE_RCE) - mKeccakRound(rpState, rpStack, $0x8000000080008081, MOVQ_RBI_RCE, XORQ_RT1_RCA, XORQ_RT1_RCE, XORQ_RBA_RCU, XORQ_RT1_RCA, XORQ_RT1_RCE, XORQ_RBA_RCU, XORQ_RT1_RCA, XORQ_RT1_RCE, XORQ_RBE_RCU, XORQ_RDU_RCU, XORQ_RDA_RCA, XORQ_RDE_RCE) - mKeccakRound(rpStack, rpState, $0x8000000000008080, MOVQ_RBI_RCE, XORQ_RT1_RCA, XORQ_RT1_RCE, XORQ_RBA_RCU, XORQ_RT1_RCA, XORQ_RT1_RCE, XORQ_RBA_RCU, XORQ_RT1_RCA, XORQ_RT1_RCE, XORQ_RBE_RCU, XORQ_RDU_RCU, XORQ_RDA_RCA, XORQ_RDE_RCE) - mKeccakRound(rpState, rpStack, $0x0000000080000001, MOVQ_RBI_RCE, XORQ_RT1_RCA, XORQ_RT1_RCE, XORQ_RBA_RCU, XORQ_RT1_RCA, XORQ_RT1_RCE, XORQ_RBA_RCU, XORQ_RT1_RCA, XORQ_RT1_RCE, XORQ_RBE_RCU, XORQ_RDU_RCU, XORQ_RDA_RCA, XORQ_RDE_RCE) - mKeccakRound(rpStack, rpState, $0x8000000080008008, NOP, NOP, NOP, NOP, NOP, NOP, NOP, NOP, NOP, NOP, NOP, NOP, NOP) + MOVQ (DI), SI + MOVQ 8(DI), BP + MOVQ 32(DI), R15 + XORQ 40(DI), SI + XORQ 48(DI), BP + XORQ 72(DI), R15 + XORQ 80(DI), SI + XORQ 88(DI), BP + XORQ 112(DI), R15 + XORQ 120(DI), SI + XORQ 128(DI), BP + XORQ 152(DI), R15 + XORQ 160(DI), SI + XORQ 168(DI), BP + MOVQ 176(DI), DX + MOVQ 184(DI), R8 + XORQ 192(DI), R15 - // Revert the internal state to the user state - NOTQ _be(rpState) - NOTQ _bi(rpState) - NOTQ _go(rpState) - NOTQ _ki(rpState) - NOTQ _mi(rpState) - NOTQ _sa(rpState) + // Prepare round + MOVQ BP, BX + ROLQ $0x01, BX + MOVQ 16(DI), R12 + XORQ 56(DI), DX + XORQ R15, BX + XORQ 96(DI), R12 + XORQ 136(DI), DX + XORQ DX, R12 + MOVQ R12, CX + ROLQ $0x01, CX + MOVQ 24(DI), R13 + XORQ 64(DI), R8 + XORQ SI, CX + XORQ 104(DI), R13 + XORQ 144(DI), R8 + XORQ R8, R13 + MOVQ R13, DX + ROLQ $0x01, DX + MOVQ R15, R8 + XORQ BP, DX + ROLQ $0x01, R8 + MOVQ SI, R9 + XORQ R12, R8 + ROLQ $0x01, R9 + + // Result b + MOVQ (DI), R10 + MOVQ 48(DI), R11 + XORQ R13, R9 + MOVQ 96(DI), R12 + MOVQ 144(DI), R13 + MOVQ 192(DI), R14 + XORQ CX, R11 + ROLQ $0x2c, R11 + XORQ DX, R12 + XORQ BX, R10 + ROLQ $0x2b, R12 + MOVQ R11, SI + MOVQ $0x0000000000000001, AX + ORQ R12, SI + XORQ R10, AX + XORQ AX, SI + MOVQ SI, (SP) + XORQ R9, R14 + ROLQ $0x0e, R14 + MOVQ R10, R15 + ANDQ R11, R15 + XORQ R14, R15 + MOVQ R15, 32(SP) + XORQ R8, R13 + ROLQ $0x15, R13 + MOVQ R13, AX + ANDQ R14, AX + XORQ R12, AX + MOVQ AX, 16(SP) + NOTQ R12 + ORQ R10, R14 + ORQ R13, R12 + XORQ R13, R14 + XORQ R11, R12 + MOVQ R14, 24(SP) + MOVQ R12, 8(SP) + MOVQ R12, BP + + // Result g + MOVQ 72(DI), R11 + XORQ R9, R11 + MOVQ 80(DI), R12 + ROLQ $0x14, R11 + XORQ BX, R12 + ROLQ $0x03, R12 + MOVQ 24(DI), R10 + MOVQ R11, AX + ORQ R12, AX + XORQ R8, R10 + MOVQ 128(DI), R13 + MOVQ 176(DI), R14 + ROLQ $0x1c, R10 + XORQ R10, AX + MOVQ AX, 40(SP) + XORQ AX, SI + XORQ CX, R13 + ROLQ $0x2d, R13 + MOVQ R12, AX + ANDQ R13, AX + XORQ R11, AX + MOVQ AX, 48(SP) + XORQ AX, BP + XORQ DX, R14 + ROLQ $0x3d, R14 + MOVQ R14, AX + ORQ R10, AX + XORQ R13, AX + MOVQ AX, 64(SP) + ANDQ R11, R10 + XORQ R14, R10 + MOVQ R10, 72(SP) + NOTQ R14 + XORQ R10, R15 + ORQ R14, R13 + XORQ R12, R13 + MOVQ R13, 56(SP) + + // Result k + MOVQ 8(DI), R10 + MOVQ 56(DI), R11 + MOVQ 104(DI), R12 + MOVQ 152(DI), R13 + MOVQ 160(DI), R14 + XORQ DX, R11 + ROLQ $0x06, R11 + XORQ R8, R12 + ROLQ $0x19, R12 + MOVQ R11, AX + ORQ R12, AX + XORQ CX, R10 + ROLQ $0x01, R10 + XORQ R10, AX + MOVQ AX, 80(SP) + XORQ AX, SI + XORQ R9, R13 + ROLQ $0x08, R13 + MOVQ R12, AX + ANDQ R13, AX + XORQ R11, AX + MOVQ AX, 88(SP) + XORQ AX, BP + XORQ BX, R14 + ROLQ $0x12, R14 + NOTQ R13 + MOVQ R13, AX + ANDQ R14, AX + XORQ R12, AX + MOVQ AX, 96(SP) + MOVQ R14, AX + ORQ R10, AX + XORQ R13, AX + MOVQ AX, 104(SP) + ANDQ R11, R10 + XORQ R14, R10 + MOVQ R10, 112(SP) + XORQ R10, R15 + + // Result m + MOVQ 40(DI), R11 + XORQ BX, R11 + MOVQ 88(DI), R12 + ROLQ $0x24, R11 + XORQ CX, R12 + MOVQ 32(DI), R10 + ROLQ $0x0a, R12 + MOVQ R11, AX + MOVQ 136(DI), R13 + ANDQ R12, AX + XORQ R9, R10 + MOVQ 184(DI), R14 + ROLQ $0x1b, R10 + XORQ R10, AX + MOVQ AX, 120(SP) + XORQ AX, SI + XORQ DX, R13 + ROLQ $0x0f, R13 + MOVQ R12, AX + ORQ R13, AX + XORQ R11, AX + MOVQ AX, 128(SP) + XORQ AX, BP + XORQ R8, R14 + ROLQ $0x38, R14 + NOTQ R13 + MOVQ R13, AX + ORQ R14, AX + XORQ R12, AX + MOVQ AX, 136(SP) + ORQ R10, R11 + XORQ R14, R11 + MOVQ R11, 152(SP) + ANDQ R10, R14 + XORQ R13, R14 + MOVQ R14, 144(SP) + XORQ R11, R15 + + // Result s + MOVQ 16(DI), R10 + MOVQ 64(DI), R11 + MOVQ 112(DI), R12 + XORQ DX, R10 + MOVQ 120(DI), R13 + ROLQ $0x3e, R10 + XORQ R8, R11 + MOVQ 168(DI), R14 + ROLQ $0x37, R11 + XORQ R9, R12 + MOVQ R10, R9 + XORQ CX, R14 + ROLQ $0x02, R14 + ANDQ R11, R9 + XORQ R14, R9 + MOVQ R9, 192(SP) + ROLQ $0x27, R12 + XORQ R9, R15 + NOTQ R11 + XORQ BX, R13 + MOVQ R11, BX + ANDQ R12, BX + XORQ R10, BX + MOVQ BX, 160(SP) + XORQ BX, SI + ROLQ $0x29, R13 + MOVQ R12, CX + ORQ R13, CX + XORQ R11, CX + MOVQ CX, 168(SP) + XORQ CX, BP + MOVQ R13, DX + MOVQ R14, R8 + ANDQ R14, DX + ORQ R10, R8 + XORQ R12, DX + XORQ R13, R8 + MOVQ DX, 176(SP) + MOVQ R8, 184(SP) + + // Prepare round + MOVQ BP, BX + ROLQ $0x01, BX + MOVQ 16(SP), R12 + XORQ 56(SP), DX + XORQ R15, BX + XORQ 96(SP), R12 + XORQ 136(SP), DX + XORQ DX, R12 + MOVQ R12, CX + ROLQ $0x01, CX + MOVQ 24(SP), R13 + XORQ 64(SP), R8 + XORQ SI, CX + XORQ 104(SP), R13 + XORQ 144(SP), R8 + XORQ R8, R13 + MOVQ R13, DX + ROLQ $0x01, DX + MOVQ R15, R8 + XORQ BP, DX + ROLQ $0x01, R8 + MOVQ SI, R9 + XORQ R12, R8 + ROLQ $0x01, R9 + + // Result b + MOVQ (SP), R10 + MOVQ 48(SP), R11 + XORQ R13, R9 + MOVQ 96(SP), R12 + MOVQ 144(SP), R13 + MOVQ 192(SP), R14 + XORQ CX, R11 + ROLQ $0x2c, R11 + XORQ DX, R12 + XORQ BX, R10 + ROLQ $0x2b, R12 + MOVQ R11, SI + MOVQ $0x0000000000008082, AX + ORQ R12, SI + XORQ R10, AX + XORQ AX, SI + MOVQ SI, (DI) + XORQ R9, R14 + ROLQ $0x0e, R14 + MOVQ R10, R15 + ANDQ R11, R15 + XORQ R14, R15 + MOVQ R15, 32(DI) + XORQ R8, R13 + ROLQ $0x15, R13 + MOVQ R13, AX + ANDQ R14, AX + XORQ R12, AX + MOVQ AX, 16(DI) + NOTQ R12 + ORQ R10, R14 + ORQ R13, R12 + XORQ R13, R14 + XORQ R11, R12 + MOVQ R14, 24(DI) + MOVQ R12, 8(DI) + MOVQ R12, BP + + // Result g + MOVQ 72(SP), R11 + XORQ R9, R11 + MOVQ 80(SP), R12 + ROLQ $0x14, R11 + XORQ BX, R12 + ROLQ $0x03, R12 + MOVQ 24(SP), R10 + MOVQ R11, AX + ORQ R12, AX + XORQ R8, R10 + MOVQ 128(SP), R13 + MOVQ 176(SP), R14 + ROLQ $0x1c, R10 + XORQ R10, AX + MOVQ AX, 40(DI) + XORQ AX, SI + XORQ CX, R13 + ROLQ $0x2d, R13 + MOVQ R12, AX + ANDQ R13, AX + XORQ R11, AX + MOVQ AX, 48(DI) + XORQ AX, BP + XORQ DX, R14 + ROLQ $0x3d, R14 + MOVQ R14, AX + ORQ R10, AX + XORQ R13, AX + MOVQ AX, 64(DI) + ANDQ R11, R10 + XORQ R14, R10 + MOVQ R10, 72(DI) + NOTQ R14 + XORQ R10, R15 + ORQ R14, R13 + XORQ R12, R13 + MOVQ R13, 56(DI) + + // Result k + MOVQ 8(SP), R10 + MOVQ 56(SP), R11 + MOVQ 104(SP), R12 + MOVQ 152(SP), R13 + MOVQ 160(SP), R14 + XORQ DX, R11 + ROLQ $0x06, R11 + XORQ R8, R12 + ROLQ $0x19, R12 + MOVQ R11, AX + ORQ R12, AX + XORQ CX, R10 + ROLQ $0x01, R10 + XORQ R10, AX + MOVQ AX, 80(DI) + XORQ AX, SI + XORQ R9, R13 + ROLQ $0x08, R13 + MOVQ R12, AX + ANDQ R13, AX + XORQ R11, AX + MOVQ AX, 88(DI) + XORQ AX, BP + XORQ BX, R14 + ROLQ $0x12, R14 + NOTQ R13 + MOVQ R13, AX + ANDQ R14, AX + XORQ R12, AX + MOVQ AX, 96(DI) + MOVQ R14, AX + ORQ R10, AX + XORQ R13, AX + MOVQ AX, 104(DI) + ANDQ R11, R10 + XORQ R14, R10 + MOVQ R10, 112(DI) + XORQ R10, R15 + + // Result m + MOVQ 40(SP), R11 + XORQ BX, R11 + MOVQ 88(SP), R12 + ROLQ $0x24, R11 + XORQ CX, R12 + MOVQ 32(SP), R10 + ROLQ $0x0a, R12 + MOVQ R11, AX + MOVQ 136(SP), R13 + ANDQ R12, AX + XORQ R9, R10 + MOVQ 184(SP), R14 + ROLQ $0x1b, R10 + XORQ R10, AX + MOVQ AX, 120(DI) + XORQ AX, SI + XORQ DX, R13 + ROLQ $0x0f, R13 + MOVQ R12, AX + ORQ R13, AX + XORQ R11, AX + MOVQ AX, 128(DI) + XORQ AX, BP + XORQ R8, R14 + ROLQ $0x38, R14 + NOTQ R13 + MOVQ R13, AX + ORQ R14, AX + XORQ R12, AX + MOVQ AX, 136(DI) + ORQ R10, R11 + XORQ R14, R11 + MOVQ R11, 152(DI) + ANDQ R10, R14 + XORQ R13, R14 + MOVQ R14, 144(DI) + XORQ R11, R15 + + // Result s + MOVQ 16(SP), R10 + MOVQ 64(SP), R11 + MOVQ 112(SP), R12 + XORQ DX, R10 + MOVQ 120(SP), R13 + ROLQ $0x3e, R10 + XORQ R8, R11 + MOVQ 168(SP), R14 + ROLQ $0x37, R11 + XORQ R9, R12 + MOVQ R10, R9 + XORQ CX, R14 + ROLQ $0x02, R14 + ANDQ R11, R9 + XORQ R14, R9 + MOVQ R9, 192(DI) + ROLQ $0x27, R12 + XORQ R9, R15 + NOTQ R11 + XORQ BX, R13 + MOVQ R11, BX + ANDQ R12, BX + XORQ R10, BX + MOVQ BX, 160(DI) + XORQ BX, SI + ROLQ $0x29, R13 + MOVQ R12, CX + ORQ R13, CX + XORQ R11, CX + MOVQ CX, 168(DI) + XORQ CX, BP + MOVQ R13, DX + MOVQ R14, R8 + ANDQ R14, DX + ORQ R10, R8 + XORQ R12, DX + XORQ R13, R8 + MOVQ DX, 176(DI) + MOVQ R8, 184(DI) + + // Prepare round + MOVQ BP, BX + ROLQ $0x01, BX + MOVQ 16(DI), R12 + XORQ 56(DI), DX + XORQ R15, BX + XORQ 96(DI), R12 + XORQ 136(DI), DX + XORQ DX, R12 + MOVQ R12, CX + ROLQ $0x01, CX + MOVQ 24(DI), R13 + XORQ 64(DI), R8 + XORQ SI, CX + XORQ 104(DI), R13 + XORQ 144(DI), R8 + XORQ R8, R13 + MOVQ R13, DX + ROLQ $0x01, DX + MOVQ R15, R8 + XORQ BP, DX + ROLQ $0x01, R8 + MOVQ SI, R9 + XORQ R12, R8 + ROLQ $0x01, R9 + + // Result b + MOVQ (DI), R10 + MOVQ 48(DI), R11 + XORQ R13, R9 + MOVQ 96(DI), R12 + MOVQ 144(DI), R13 + MOVQ 192(DI), R14 + XORQ CX, R11 + ROLQ $0x2c, R11 + XORQ DX, R12 + XORQ BX, R10 + ROLQ $0x2b, R12 + MOVQ R11, SI + MOVQ $0x800000000000808a, AX + ORQ R12, SI + XORQ R10, AX + XORQ AX, SI + MOVQ SI, (SP) + XORQ R9, R14 + ROLQ $0x0e, R14 + MOVQ R10, R15 + ANDQ R11, R15 + XORQ R14, R15 + MOVQ R15, 32(SP) + XORQ R8, R13 + ROLQ $0x15, R13 + MOVQ R13, AX + ANDQ R14, AX + XORQ R12, AX + MOVQ AX, 16(SP) + NOTQ R12 + ORQ R10, R14 + ORQ R13, R12 + XORQ R13, R14 + XORQ R11, R12 + MOVQ R14, 24(SP) + MOVQ R12, 8(SP) + MOVQ R12, BP + + // Result g + MOVQ 72(DI), R11 + XORQ R9, R11 + MOVQ 80(DI), R12 + ROLQ $0x14, R11 + XORQ BX, R12 + ROLQ $0x03, R12 + MOVQ 24(DI), R10 + MOVQ R11, AX + ORQ R12, AX + XORQ R8, R10 + MOVQ 128(DI), R13 + MOVQ 176(DI), R14 + ROLQ $0x1c, R10 + XORQ R10, AX + MOVQ AX, 40(SP) + XORQ AX, SI + XORQ CX, R13 + ROLQ $0x2d, R13 + MOVQ R12, AX + ANDQ R13, AX + XORQ R11, AX + MOVQ AX, 48(SP) + XORQ AX, BP + XORQ DX, R14 + ROLQ $0x3d, R14 + MOVQ R14, AX + ORQ R10, AX + XORQ R13, AX + MOVQ AX, 64(SP) + ANDQ R11, R10 + XORQ R14, R10 + MOVQ R10, 72(SP) + NOTQ R14 + XORQ R10, R15 + ORQ R14, R13 + XORQ R12, R13 + MOVQ R13, 56(SP) + + // Result k + MOVQ 8(DI), R10 + MOVQ 56(DI), R11 + MOVQ 104(DI), R12 + MOVQ 152(DI), R13 + MOVQ 160(DI), R14 + XORQ DX, R11 + ROLQ $0x06, R11 + XORQ R8, R12 + ROLQ $0x19, R12 + MOVQ R11, AX + ORQ R12, AX + XORQ CX, R10 + ROLQ $0x01, R10 + XORQ R10, AX + MOVQ AX, 80(SP) + XORQ AX, SI + XORQ R9, R13 + ROLQ $0x08, R13 + MOVQ R12, AX + ANDQ R13, AX + XORQ R11, AX + MOVQ AX, 88(SP) + XORQ AX, BP + XORQ BX, R14 + ROLQ $0x12, R14 + NOTQ R13 + MOVQ R13, AX + ANDQ R14, AX + XORQ R12, AX + MOVQ AX, 96(SP) + MOVQ R14, AX + ORQ R10, AX + XORQ R13, AX + MOVQ AX, 104(SP) + ANDQ R11, R10 + XORQ R14, R10 + MOVQ R10, 112(SP) + XORQ R10, R15 + + // Result m + MOVQ 40(DI), R11 + XORQ BX, R11 + MOVQ 88(DI), R12 + ROLQ $0x24, R11 + XORQ CX, R12 + MOVQ 32(DI), R10 + ROLQ $0x0a, R12 + MOVQ R11, AX + MOVQ 136(DI), R13 + ANDQ R12, AX + XORQ R9, R10 + MOVQ 184(DI), R14 + ROLQ $0x1b, R10 + XORQ R10, AX + MOVQ AX, 120(SP) + XORQ AX, SI + XORQ DX, R13 + ROLQ $0x0f, R13 + MOVQ R12, AX + ORQ R13, AX + XORQ R11, AX + MOVQ AX, 128(SP) + XORQ AX, BP + XORQ R8, R14 + ROLQ $0x38, R14 + NOTQ R13 + MOVQ R13, AX + ORQ R14, AX + XORQ R12, AX + MOVQ AX, 136(SP) + ORQ R10, R11 + XORQ R14, R11 + MOVQ R11, 152(SP) + ANDQ R10, R14 + XORQ R13, R14 + MOVQ R14, 144(SP) + XORQ R11, R15 + + // Result s + MOVQ 16(DI), R10 + MOVQ 64(DI), R11 + MOVQ 112(DI), R12 + XORQ DX, R10 + MOVQ 120(DI), R13 + ROLQ $0x3e, R10 + XORQ R8, R11 + MOVQ 168(DI), R14 + ROLQ $0x37, R11 + XORQ R9, R12 + MOVQ R10, R9 + XORQ CX, R14 + ROLQ $0x02, R14 + ANDQ R11, R9 + XORQ R14, R9 + MOVQ R9, 192(SP) + ROLQ $0x27, R12 + XORQ R9, R15 + NOTQ R11 + XORQ BX, R13 + MOVQ R11, BX + ANDQ R12, BX + XORQ R10, BX + MOVQ BX, 160(SP) + XORQ BX, SI + ROLQ $0x29, R13 + MOVQ R12, CX + ORQ R13, CX + XORQ R11, CX + MOVQ CX, 168(SP) + XORQ CX, BP + MOVQ R13, DX + MOVQ R14, R8 + ANDQ R14, DX + ORQ R10, R8 + XORQ R12, DX + XORQ R13, R8 + MOVQ DX, 176(SP) + MOVQ R8, 184(SP) + + // Prepare round + MOVQ BP, BX + ROLQ $0x01, BX + MOVQ 16(SP), R12 + XORQ 56(SP), DX + XORQ R15, BX + XORQ 96(SP), R12 + XORQ 136(SP), DX + XORQ DX, R12 + MOVQ R12, CX + ROLQ $0x01, CX + MOVQ 24(SP), R13 + XORQ 64(SP), R8 + XORQ SI, CX + XORQ 104(SP), R13 + XORQ 144(SP), R8 + XORQ R8, R13 + MOVQ R13, DX + ROLQ $0x01, DX + MOVQ R15, R8 + XORQ BP, DX + ROLQ $0x01, R8 + MOVQ SI, R9 + XORQ R12, R8 + ROLQ $0x01, R9 + + // Result b + MOVQ (SP), R10 + MOVQ 48(SP), R11 + XORQ R13, R9 + MOVQ 96(SP), R12 + MOVQ 144(SP), R13 + MOVQ 192(SP), R14 + XORQ CX, R11 + ROLQ $0x2c, R11 + XORQ DX, R12 + XORQ BX, R10 + ROLQ $0x2b, R12 + MOVQ R11, SI + MOVQ $0x8000000080008000, AX + ORQ R12, SI + XORQ R10, AX + XORQ AX, SI + MOVQ SI, (DI) + XORQ R9, R14 + ROLQ $0x0e, R14 + MOVQ R10, R15 + ANDQ R11, R15 + XORQ R14, R15 + MOVQ R15, 32(DI) + XORQ R8, R13 + ROLQ $0x15, R13 + MOVQ R13, AX + ANDQ R14, AX + XORQ R12, AX + MOVQ AX, 16(DI) + NOTQ R12 + ORQ R10, R14 + ORQ R13, R12 + XORQ R13, R14 + XORQ R11, R12 + MOVQ R14, 24(DI) + MOVQ R12, 8(DI) + MOVQ R12, BP + + // Result g + MOVQ 72(SP), R11 + XORQ R9, R11 + MOVQ 80(SP), R12 + ROLQ $0x14, R11 + XORQ BX, R12 + ROLQ $0x03, R12 + MOVQ 24(SP), R10 + MOVQ R11, AX + ORQ R12, AX + XORQ R8, R10 + MOVQ 128(SP), R13 + MOVQ 176(SP), R14 + ROLQ $0x1c, R10 + XORQ R10, AX + MOVQ AX, 40(DI) + XORQ AX, SI + XORQ CX, R13 + ROLQ $0x2d, R13 + MOVQ R12, AX + ANDQ R13, AX + XORQ R11, AX + MOVQ AX, 48(DI) + XORQ AX, BP + XORQ DX, R14 + ROLQ $0x3d, R14 + MOVQ R14, AX + ORQ R10, AX + XORQ R13, AX + MOVQ AX, 64(DI) + ANDQ R11, R10 + XORQ R14, R10 + MOVQ R10, 72(DI) + NOTQ R14 + XORQ R10, R15 + ORQ R14, R13 + XORQ R12, R13 + MOVQ R13, 56(DI) + + // Result k + MOVQ 8(SP), R10 + MOVQ 56(SP), R11 + MOVQ 104(SP), R12 + MOVQ 152(SP), R13 + MOVQ 160(SP), R14 + XORQ DX, R11 + ROLQ $0x06, R11 + XORQ R8, R12 + ROLQ $0x19, R12 + MOVQ R11, AX + ORQ R12, AX + XORQ CX, R10 + ROLQ $0x01, R10 + XORQ R10, AX + MOVQ AX, 80(DI) + XORQ AX, SI + XORQ R9, R13 + ROLQ $0x08, R13 + MOVQ R12, AX + ANDQ R13, AX + XORQ R11, AX + MOVQ AX, 88(DI) + XORQ AX, BP + XORQ BX, R14 + ROLQ $0x12, R14 + NOTQ R13 + MOVQ R13, AX + ANDQ R14, AX + XORQ R12, AX + MOVQ AX, 96(DI) + MOVQ R14, AX + ORQ R10, AX + XORQ R13, AX + MOVQ AX, 104(DI) + ANDQ R11, R10 + XORQ R14, R10 + MOVQ R10, 112(DI) + XORQ R10, R15 + + // Result m + MOVQ 40(SP), R11 + XORQ BX, R11 + MOVQ 88(SP), R12 + ROLQ $0x24, R11 + XORQ CX, R12 + MOVQ 32(SP), R10 + ROLQ $0x0a, R12 + MOVQ R11, AX + MOVQ 136(SP), R13 + ANDQ R12, AX + XORQ R9, R10 + MOVQ 184(SP), R14 + ROLQ $0x1b, R10 + XORQ R10, AX + MOVQ AX, 120(DI) + XORQ AX, SI + XORQ DX, R13 + ROLQ $0x0f, R13 + MOVQ R12, AX + ORQ R13, AX + XORQ R11, AX + MOVQ AX, 128(DI) + XORQ AX, BP + XORQ R8, R14 + ROLQ $0x38, R14 + NOTQ R13 + MOVQ R13, AX + ORQ R14, AX + XORQ R12, AX + MOVQ AX, 136(DI) + ORQ R10, R11 + XORQ R14, R11 + MOVQ R11, 152(DI) + ANDQ R10, R14 + XORQ R13, R14 + MOVQ R14, 144(DI) + XORQ R11, R15 + + // Result s + MOVQ 16(SP), R10 + MOVQ 64(SP), R11 + MOVQ 112(SP), R12 + XORQ DX, R10 + MOVQ 120(SP), R13 + ROLQ $0x3e, R10 + XORQ R8, R11 + MOVQ 168(SP), R14 + ROLQ $0x37, R11 + XORQ R9, R12 + MOVQ R10, R9 + XORQ CX, R14 + ROLQ $0x02, R14 + ANDQ R11, R9 + XORQ R14, R9 + MOVQ R9, 192(DI) + ROLQ $0x27, R12 + XORQ R9, R15 + NOTQ R11 + XORQ BX, R13 + MOVQ R11, BX + ANDQ R12, BX + XORQ R10, BX + MOVQ BX, 160(DI) + XORQ BX, SI + ROLQ $0x29, R13 + MOVQ R12, CX + ORQ R13, CX + XORQ R11, CX + MOVQ CX, 168(DI) + XORQ CX, BP + MOVQ R13, DX + MOVQ R14, R8 + ANDQ R14, DX + ORQ R10, R8 + XORQ R12, DX + XORQ R13, R8 + MOVQ DX, 176(DI) + MOVQ R8, 184(DI) + + // Prepare round + MOVQ BP, BX + ROLQ $0x01, BX + MOVQ 16(DI), R12 + XORQ 56(DI), DX + XORQ R15, BX + XORQ 96(DI), R12 + XORQ 136(DI), DX + XORQ DX, R12 + MOVQ R12, CX + ROLQ $0x01, CX + MOVQ 24(DI), R13 + XORQ 64(DI), R8 + XORQ SI, CX + XORQ 104(DI), R13 + XORQ 144(DI), R8 + XORQ R8, R13 + MOVQ R13, DX + ROLQ $0x01, DX + MOVQ R15, R8 + XORQ BP, DX + ROLQ $0x01, R8 + MOVQ SI, R9 + XORQ R12, R8 + ROLQ $0x01, R9 + + // Result b + MOVQ (DI), R10 + MOVQ 48(DI), R11 + XORQ R13, R9 + MOVQ 96(DI), R12 + MOVQ 144(DI), R13 + MOVQ 192(DI), R14 + XORQ CX, R11 + ROLQ $0x2c, R11 + XORQ DX, R12 + XORQ BX, R10 + ROLQ $0x2b, R12 + MOVQ R11, SI + MOVQ $0x000000000000808b, AX + ORQ R12, SI + XORQ R10, AX + XORQ AX, SI + MOVQ SI, (SP) + XORQ R9, R14 + ROLQ $0x0e, R14 + MOVQ R10, R15 + ANDQ R11, R15 + XORQ R14, R15 + MOVQ R15, 32(SP) + XORQ R8, R13 + ROLQ $0x15, R13 + MOVQ R13, AX + ANDQ R14, AX + XORQ R12, AX + MOVQ AX, 16(SP) + NOTQ R12 + ORQ R10, R14 + ORQ R13, R12 + XORQ R13, R14 + XORQ R11, R12 + MOVQ R14, 24(SP) + MOVQ R12, 8(SP) + MOVQ R12, BP + + // Result g + MOVQ 72(DI), R11 + XORQ R9, R11 + MOVQ 80(DI), R12 + ROLQ $0x14, R11 + XORQ BX, R12 + ROLQ $0x03, R12 + MOVQ 24(DI), R10 + MOVQ R11, AX + ORQ R12, AX + XORQ R8, R10 + MOVQ 128(DI), R13 + MOVQ 176(DI), R14 + ROLQ $0x1c, R10 + XORQ R10, AX + MOVQ AX, 40(SP) + XORQ AX, SI + XORQ CX, R13 + ROLQ $0x2d, R13 + MOVQ R12, AX + ANDQ R13, AX + XORQ R11, AX + MOVQ AX, 48(SP) + XORQ AX, BP + XORQ DX, R14 + ROLQ $0x3d, R14 + MOVQ R14, AX + ORQ R10, AX + XORQ R13, AX + MOVQ AX, 64(SP) + ANDQ R11, R10 + XORQ R14, R10 + MOVQ R10, 72(SP) + NOTQ R14 + XORQ R10, R15 + ORQ R14, R13 + XORQ R12, R13 + MOVQ R13, 56(SP) + + // Result k + MOVQ 8(DI), R10 + MOVQ 56(DI), R11 + MOVQ 104(DI), R12 + MOVQ 152(DI), R13 + MOVQ 160(DI), R14 + XORQ DX, R11 + ROLQ $0x06, R11 + XORQ R8, R12 + ROLQ $0x19, R12 + MOVQ R11, AX + ORQ R12, AX + XORQ CX, R10 + ROLQ $0x01, R10 + XORQ R10, AX + MOVQ AX, 80(SP) + XORQ AX, SI + XORQ R9, R13 + ROLQ $0x08, R13 + MOVQ R12, AX + ANDQ R13, AX + XORQ R11, AX + MOVQ AX, 88(SP) + XORQ AX, BP + XORQ BX, R14 + ROLQ $0x12, R14 + NOTQ R13 + MOVQ R13, AX + ANDQ R14, AX + XORQ R12, AX + MOVQ AX, 96(SP) + MOVQ R14, AX + ORQ R10, AX + XORQ R13, AX + MOVQ AX, 104(SP) + ANDQ R11, R10 + XORQ R14, R10 + MOVQ R10, 112(SP) + XORQ R10, R15 + + // Result m + MOVQ 40(DI), R11 + XORQ BX, R11 + MOVQ 88(DI), R12 + ROLQ $0x24, R11 + XORQ CX, R12 + MOVQ 32(DI), R10 + ROLQ $0x0a, R12 + MOVQ R11, AX + MOVQ 136(DI), R13 + ANDQ R12, AX + XORQ R9, R10 + MOVQ 184(DI), R14 + ROLQ $0x1b, R10 + XORQ R10, AX + MOVQ AX, 120(SP) + XORQ AX, SI + XORQ DX, R13 + ROLQ $0x0f, R13 + MOVQ R12, AX + ORQ R13, AX + XORQ R11, AX + MOVQ AX, 128(SP) + XORQ AX, BP + XORQ R8, R14 + ROLQ $0x38, R14 + NOTQ R13 + MOVQ R13, AX + ORQ R14, AX + XORQ R12, AX + MOVQ AX, 136(SP) + ORQ R10, R11 + XORQ R14, R11 + MOVQ R11, 152(SP) + ANDQ R10, R14 + XORQ R13, R14 + MOVQ R14, 144(SP) + XORQ R11, R15 + + // Result s + MOVQ 16(DI), R10 + MOVQ 64(DI), R11 + MOVQ 112(DI), R12 + XORQ DX, R10 + MOVQ 120(DI), R13 + ROLQ $0x3e, R10 + XORQ R8, R11 + MOVQ 168(DI), R14 + ROLQ $0x37, R11 + XORQ R9, R12 + MOVQ R10, R9 + XORQ CX, R14 + ROLQ $0x02, R14 + ANDQ R11, R9 + XORQ R14, R9 + MOVQ R9, 192(SP) + ROLQ $0x27, R12 + XORQ R9, R15 + NOTQ R11 + XORQ BX, R13 + MOVQ R11, BX + ANDQ R12, BX + XORQ R10, BX + MOVQ BX, 160(SP) + XORQ BX, SI + ROLQ $0x29, R13 + MOVQ R12, CX + ORQ R13, CX + XORQ R11, CX + MOVQ CX, 168(SP) + XORQ CX, BP + MOVQ R13, DX + MOVQ R14, R8 + ANDQ R14, DX + ORQ R10, R8 + XORQ R12, DX + XORQ R13, R8 + MOVQ DX, 176(SP) + MOVQ R8, 184(SP) + + // Prepare round + MOVQ BP, BX + ROLQ $0x01, BX + MOVQ 16(SP), R12 + XORQ 56(SP), DX + XORQ R15, BX + XORQ 96(SP), R12 + XORQ 136(SP), DX + XORQ DX, R12 + MOVQ R12, CX + ROLQ $0x01, CX + MOVQ 24(SP), R13 + XORQ 64(SP), R8 + XORQ SI, CX + XORQ 104(SP), R13 + XORQ 144(SP), R8 + XORQ R8, R13 + MOVQ R13, DX + ROLQ $0x01, DX + MOVQ R15, R8 + XORQ BP, DX + ROLQ $0x01, R8 + MOVQ SI, R9 + XORQ R12, R8 + ROLQ $0x01, R9 + + // Result b + MOVQ (SP), R10 + MOVQ 48(SP), R11 + XORQ R13, R9 + MOVQ 96(SP), R12 + MOVQ 144(SP), R13 + MOVQ 192(SP), R14 + XORQ CX, R11 + ROLQ $0x2c, R11 + XORQ DX, R12 + XORQ BX, R10 + ROLQ $0x2b, R12 + MOVQ R11, SI + MOVQ $0x0000000080000001, AX + ORQ R12, SI + XORQ R10, AX + XORQ AX, SI + MOVQ SI, (DI) + XORQ R9, R14 + ROLQ $0x0e, R14 + MOVQ R10, R15 + ANDQ R11, R15 + XORQ R14, R15 + MOVQ R15, 32(DI) + XORQ R8, R13 + ROLQ $0x15, R13 + MOVQ R13, AX + ANDQ R14, AX + XORQ R12, AX + MOVQ AX, 16(DI) + NOTQ R12 + ORQ R10, R14 + ORQ R13, R12 + XORQ R13, R14 + XORQ R11, R12 + MOVQ R14, 24(DI) + MOVQ R12, 8(DI) + MOVQ R12, BP + + // Result g + MOVQ 72(SP), R11 + XORQ R9, R11 + MOVQ 80(SP), R12 + ROLQ $0x14, R11 + XORQ BX, R12 + ROLQ $0x03, R12 + MOVQ 24(SP), R10 + MOVQ R11, AX + ORQ R12, AX + XORQ R8, R10 + MOVQ 128(SP), R13 + MOVQ 176(SP), R14 + ROLQ $0x1c, R10 + XORQ R10, AX + MOVQ AX, 40(DI) + XORQ AX, SI + XORQ CX, R13 + ROLQ $0x2d, R13 + MOVQ R12, AX + ANDQ R13, AX + XORQ R11, AX + MOVQ AX, 48(DI) + XORQ AX, BP + XORQ DX, R14 + ROLQ $0x3d, R14 + MOVQ R14, AX + ORQ R10, AX + XORQ R13, AX + MOVQ AX, 64(DI) + ANDQ R11, R10 + XORQ R14, R10 + MOVQ R10, 72(DI) + NOTQ R14 + XORQ R10, R15 + ORQ R14, R13 + XORQ R12, R13 + MOVQ R13, 56(DI) + + // Result k + MOVQ 8(SP), R10 + MOVQ 56(SP), R11 + MOVQ 104(SP), R12 + MOVQ 152(SP), R13 + MOVQ 160(SP), R14 + XORQ DX, R11 + ROLQ $0x06, R11 + XORQ R8, R12 + ROLQ $0x19, R12 + MOVQ R11, AX + ORQ R12, AX + XORQ CX, R10 + ROLQ $0x01, R10 + XORQ R10, AX + MOVQ AX, 80(DI) + XORQ AX, SI + XORQ R9, R13 + ROLQ $0x08, R13 + MOVQ R12, AX + ANDQ R13, AX + XORQ R11, AX + MOVQ AX, 88(DI) + XORQ AX, BP + XORQ BX, R14 + ROLQ $0x12, R14 + NOTQ R13 + MOVQ R13, AX + ANDQ R14, AX + XORQ R12, AX + MOVQ AX, 96(DI) + MOVQ R14, AX + ORQ R10, AX + XORQ R13, AX + MOVQ AX, 104(DI) + ANDQ R11, R10 + XORQ R14, R10 + MOVQ R10, 112(DI) + XORQ R10, R15 + + // Result m + MOVQ 40(SP), R11 + XORQ BX, R11 + MOVQ 88(SP), R12 + ROLQ $0x24, R11 + XORQ CX, R12 + MOVQ 32(SP), R10 + ROLQ $0x0a, R12 + MOVQ R11, AX + MOVQ 136(SP), R13 + ANDQ R12, AX + XORQ R9, R10 + MOVQ 184(SP), R14 + ROLQ $0x1b, R10 + XORQ R10, AX + MOVQ AX, 120(DI) + XORQ AX, SI + XORQ DX, R13 + ROLQ $0x0f, R13 + MOVQ R12, AX + ORQ R13, AX + XORQ R11, AX + MOVQ AX, 128(DI) + XORQ AX, BP + XORQ R8, R14 + ROLQ $0x38, R14 + NOTQ R13 + MOVQ R13, AX + ORQ R14, AX + XORQ R12, AX + MOVQ AX, 136(DI) + ORQ R10, R11 + XORQ R14, R11 + MOVQ R11, 152(DI) + ANDQ R10, R14 + XORQ R13, R14 + MOVQ R14, 144(DI) + XORQ R11, R15 + + // Result s + MOVQ 16(SP), R10 + MOVQ 64(SP), R11 + MOVQ 112(SP), R12 + XORQ DX, R10 + MOVQ 120(SP), R13 + ROLQ $0x3e, R10 + XORQ R8, R11 + MOVQ 168(SP), R14 + ROLQ $0x37, R11 + XORQ R9, R12 + MOVQ R10, R9 + XORQ CX, R14 + ROLQ $0x02, R14 + ANDQ R11, R9 + XORQ R14, R9 + MOVQ R9, 192(DI) + ROLQ $0x27, R12 + XORQ R9, R15 + NOTQ R11 + XORQ BX, R13 + MOVQ R11, BX + ANDQ R12, BX + XORQ R10, BX + MOVQ BX, 160(DI) + XORQ BX, SI + ROLQ $0x29, R13 + MOVQ R12, CX + ORQ R13, CX + XORQ R11, CX + MOVQ CX, 168(DI) + XORQ CX, BP + MOVQ R13, DX + MOVQ R14, R8 + ANDQ R14, DX + ORQ R10, R8 + XORQ R12, DX + XORQ R13, R8 + MOVQ DX, 176(DI) + MOVQ R8, 184(DI) + + // Prepare round + MOVQ BP, BX + ROLQ $0x01, BX + MOVQ 16(DI), R12 + XORQ 56(DI), DX + XORQ R15, BX + XORQ 96(DI), R12 + XORQ 136(DI), DX + XORQ DX, R12 + MOVQ R12, CX + ROLQ $0x01, CX + MOVQ 24(DI), R13 + XORQ 64(DI), R8 + XORQ SI, CX + XORQ 104(DI), R13 + XORQ 144(DI), R8 + XORQ R8, R13 + MOVQ R13, DX + ROLQ $0x01, DX + MOVQ R15, R8 + XORQ BP, DX + ROLQ $0x01, R8 + MOVQ SI, R9 + XORQ R12, R8 + ROLQ $0x01, R9 + + // Result b + MOVQ (DI), R10 + MOVQ 48(DI), R11 + XORQ R13, R9 + MOVQ 96(DI), R12 + MOVQ 144(DI), R13 + MOVQ 192(DI), R14 + XORQ CX, R11 + ROLQ $0x2c, R11 + XORQ DX, R12 + XORQ BX, R10 + ROLQ $0x2b, R12 + MOVQ R11, SI + MOVQ $0x8000000080008081, AX + ORQ R12, SI + XORQ R10, AX + XORQ AX, SI + MOVQ SI, (SP) + XORQ R9, R14 + ROLQ $0x0e, R14 + MOVQ R10, R15 + ANDQ R11, R15 + XORQ R14, R15 + MOVQ R15, 32(SP) + XORQ R8, R13 + ROLQ $0x15, R13 + MOVQ R13, AX + ANDQ R14, AX + XORQ R12, AX + MOVQ AX, 16(SP) + NOTQ R12 + ORQ R10, R14 + ORQ R13, R12 + XORQ R13, R14 + XORQ R11, R12 + MOVQ R14, 24(SP) + MOVQ R12, 8(SP) + MOVQ R12, BP + + // Result g + MOVQ 72(DI), R11 + XORQ R9, R11 + MOVQ 80(DI), R12 + ROLQ $0x14, R11 + XORQ BX, R12 + ROLQ $0x03, R12 + MOVQ 24(DI), R10 + MOVQ R11, AX + ORQ R12, AX + XORQ R8, R10 + MOVQ 128(DI), R13 + MOVQ 176(DI), R14 + ROLQ $0x1c, R10 + XORQ R10, AX + MOVQ AX, 40(SP) + XORQ AX, SI + XORQ CX, R13 + ROLQ $0x2d, R13 + MOVQ R12, AX + ANDQ R13, AX + XORQ R11, AX + MOVQ AX, 48(SP) + XORQ AX, BP + XORQ DX, R14 + ROLQ $0x3d, R14 + MOVQ R14, AX + ORQ R10, AX + XORQ R13, AX + MOVQ AX, 64(SP) + ANDQ R11, R10 + XORQ R14, R10 + MOVQ R10, 72(SP) + NOTQ R14 + XORQ R10, R15 + ORQ R14, R13 + XORQ R12, R13 + MOVQ R13, 56(SP) + + // Result k + MOVQ 8(DI), R10 + MOVQ 56(DI), R11 + MOVQ 104(DI), R12 + MOVQ 152(DI), R13 + MOVQ 160(DI), R14 + XORQ DX, R11 + ROLQ $0x06, R11 + XORQ R8, R12 + ROLQ $0x19, R12 + MOVQ R11, AX + ORQ R12, AX + XORQ CX, R10 + ROLQ $0x01, R10 + XORQ R10, AX + MOVQ AX, 80(SP) + XORQ AX, SI + XORQ R9, R13 + ROLQ $0x08, R13 + MOVQ R12, AX + ANDQ R13, AX + XORQ R11, AX + MOVQ AX, 88(SP) + XORQ AX, BP + XORQ BX, R14 + ROLQ $0x12, R14 + NOTQ R13 + MOVQ R13, AX + ANDQ R14, AX + XORQ R12, AX + MOVQ AX, 96(SP) + MOVQ R14, AX + ORQ R10, AX + XORQ R13, AX + MOVQ AX, 104(SP) + ANDQ R11, R10 + XORQ R14, R10 + MOVQ R10, 112(SP) + XORQ R10, R15 + + // Result m + MOVQ 40(DI), R11 + XORQ BX, R11 + MOVQ 88(DI), R12 + ROLQ $0x24, R11 + XORQ CX, R12 + MOVQ 32(DI), R10 + ROLQ $0x0a, R12 + MOVQ R11, AX + MOVQ 136(DI), R13 + ANDQ R12, AX + XORQ R9, R10 + MOVQ 184(DI), R14 + ROLQ $0x1b, R10 + XORQ R10, AX + MOVQ AX, 120(SP) + XORQ AX, SI + XORQ DX, R13 + ROLQ $0x0f, R13 + MOVQ R12, AX + ORQ R13, AX + XORQ R11, AX + MOVQ AX, 128(SP) + XORQ AX, BP + XORQ R8, R14 + ROLQ $0x38, R14 + NOTQ R13 + MOVQ R13, AX + ORQ R14, AX + XORQ R12, AX + MOVQ AX, 136(SP) + ORQ R10, R11 + XORQ R14, R11 + MOVQ R11, 152(SP) + ANDQ R10, R14 + XORQ R13, R14 + MOVQ R14, 144(SP) + XORQ R11, R15 + + // Result s + MOVQ 16(DI), R10 + MOVQ 64(DI), R11 + MOVQ 112(DI), R12 + XORQ DX, R10 + MOVQ 120(DI), R13 + ROLQ $0x3e, R10 + XORQ R8, R11 + MOVQ 168(DI), R14 + ROLQ $0x37, R11 + XORQ R9, R12 + MOVQ R10, R9 + XORQ CX, R14 + ROLQ $0x02, R14 + ANDQ R11, R9 + XORQ R14, R9 + MOVQ R9, 192(SP) + ROLQ $0x27, R12 + XORQ R9, R15 + NOTQ R11 + XORQ BX, R13 + MOVQ R11, BX + ANDQ R12, BX + XORQ R10, BX + MOVQ BX, 160(SP) + XORQ BX, SI + ROLQ $0x29, R13 + MOVQ R12, CX + ORQ R13, CX + XORQ R11, CX + MOVQ CX, 168(SP) + XORQ CX, BP + MOVQ R13, DX + MOVQ R14, R8 + ANDQ R14, DX + ORQ R10, R8 + XORQ R12, DX + XORQ R13, R8 + MOVQ DX, 176(SP) + MOVQ R8, 184(SP) + + // Prepare round + MOVQ BP, BX + ROLQ $0x01, BX + MOVQ 16(SP), R12 + XORQ 56(SP), DX + XORQ R15, BX + XORQ 96(SP), R12 + XORQ 136(SP), DX + XORQ DX, R12 + MOVQ R12, CX + ROLQ $0x01, CX + MOVQ 24(SP), R13 + XORQ 64(SP), R8 + XORQ SI, CX + XORQ 104(SP), R13 + XORQ 144(SP), R8 + XORQ R8, R13 + MOVQ R13, DX + ROLQ $0x01, DX + MOVQ R15, R8 + XORQ BP, DX + ROLQ $0x01, R8 + MOVQ SI, R9 + XORQ R12, R8 + ROLQ $0x01, R9 + + // Result b + MOVQ (SP), R10 + MOVQ 48(SP), R11 + XORQ R13, R9 + MOVQ 96(SP), R12 + MOVQ 144(SP), R13 + MOVQ 192(SP), R14 + XORQ CX, R11 + ROLQ $0x2c, R11 + XORQ DX, R12 + XORQ BX, R10 + ROLQ $0x2b, R12 + MOVQ R11, SI + MOVQ $0x8000000000008009, AX + ORQ R12, SI + XORQ R10, AX + XORQ AX, SI + MOVQ SI, (DI) + XORQ R9, R14 + ROLQ $0x0e, R14 + MOVQ R10, R15 + ANDQ R11, R15 + XORQ R14, R15 + MOVQ R15, 32(DI) + XORQ R8, R13 + ROLQ $0x15, R13 + MOVQ R13, AX + ANDQ R14, AX + XORQ R12, AX + MOVQ AX, 16(DI) + NOTQ R12 + ORQ R10, R14 + ORQ R13, R12 + XORQ R13, R14 + XORQ R11, R12 + MOVQ R14, 24(DI) + MOVQ R12, 8(DI) + MOVQ R12, BP + + // Result g + MOVQ 72(SP), R11 + XORQ R9, R11 + MOVQ 80(SP), R12 + ROLQ $0x14, R11 + XORQ BX, R12 + ROLQ $0x03, R12 + MOVQ 24(SP), R10 + MOVQ R11, AX + ORQ R12, AX + XORQ R8, R10 + MOVQ 128(SP), R13 + MOVQ 176(SP), R14 + ROLQ $0x1c, R10 + XORQ R10, AX + MOVQ AX, 40(DI) + XORQ AX, SI + XORQ CX, R13 + ROLQ $0x2d, R13 + MOVQ R12, AX + ANDQ R13, AX + XORQ R11, AX + MOVQ AX, 48(DI) + XORQ AX, BP + XORQ DX, R14 + ROLQ $0x3d, R14 + MOVQ R14, AX + ORQ R10, AX + XORQ R13, AX + MOVQ AX, 64(DI) + ANDQ R11, R10 + XORQ R14, R10 + MOVQ R10, 72(DI) + NOTQ R14 + XORQ R10, R15 + ORQ R14, R13 + XORQ R12, R13 + MOVQ R13, 56(DI) + + // Result k + MOVQ 8(SP), R10 + MOVQ 56(SP), R11 + MOVQ 104(SP), R12 + MOVQ 152(SP), R13 + MOVQ 160(SP), R14 + XORQ DX, R11 + ROLQ $0x06, R11 + XORQ R8, R12 + ROLQ $0x19, R12 + MOVQ R11, AX + ORQ R12, AX + XORQ CX, R10 + ROLQ $0x01, R10 + XORQ R10, AX + MOVQ AX, 80(DI) + XORQ AX, SI + XORQ R9, R13 + ROLQ $0x08, R13 + MOVQ R12, AX + ANDQ R13, AX + XORQ R11, AX + MOVQ AX, 88(DI) + XORQ AX, BP + XORQ BX, R14 + ROLQ $0x12, R14 + NOTQ R13 + MOVQ R13, AX + ANDQ R14, AX + XORQ R12, AX + MOVQ AX, 96(DI) + MOVQ R14, AX + ORQ R10, AX + XORQ R13, AX + MOVQ AX, 104(DI) + ANDQ R11, R10 + XORQ R14, R10 + MOVQ R10, 112(DI) + XORQ R10, R15 + + // Result m + MOVQ 40(SP), R11 + XORQ BX, R11 + MOVQ 88(SP), R12 + ROLQ $0x24, R11 + XORQ CX, R12 + MOVQ 32(SP), R10 + ROLQ $0x0a, R12 + MOVQ R11, AX + MOVQ 136(SP), R13 + ANDQ R12, AX + XORQ R9, R10 + MOVQ 184(SP), R14 + ROLQ $0x1b, R10 + XORQ R10, AX + MOVQ AX, 120(DI) + XORQ AX, SI + XORQ DX, R13 + ROLQ $0x0f, R13 + MOVQ R12, AX + ORQ R13, AX + XORQ R11, AX + MOVQ AX, 128(DI) + XORQ AX, BP + XORQ R8, R14 + ROLQ $0x38, R14 + NOTQ R13 + MOVQ R13, AX + ORQ R14, AX + XORQ R12, AX + MOVQ AX, 136(DI) + ORQ R10, R11 + XORQ R14, R11 + MOVQ R11, 152(DI) + ANDQ R10, R14 + XORQ R13, R14 + MOVQ R14, 144(DI) + XORQ R11, R15 + + // Result s + MOVQ 16(SP), R10 + MOVQ 64(SP), R11 + MOVQ 112(SP), R12 + XORQ DX, R10 + MOVQ 120(SP), R13 + ROLQ $0x3e, R10 + XORQ R8, R11 + MOVQ 168(SP), R14 + ROLQ $0x37, R11 + XORQ R9, R12 + MOVQ R10, R9 + XORQ CX, R14 + ROLQ $0x02, R14 + ANDQ R11, R9 + XORQ R14, R9 + MOVQ R9, 192(DI) + ROLQ $0x27, R12 + XORQ R9, R15 + NOTQ R11 + XORQ BX, R13 + MOVQ R11, BX + ANDQ R12, BX + XORQ R10, BX + MOVQ BX, 160(DI) + XORQ BX, SI + ROLQ $0x29, R13 + MOVQ R12, CX + ORQ R13, CX + XORQ R11, CX + MOVQ CX, 168(DI) + XORQ CX, BP + MOVQ R13, DX + MOVQ R14, R8 + ANDQ R14, DX + ORQ R10, R8 + XORQ R12, DX + XORQ R13, R8 + MOVQ DX, 176(DI) + MOVQ R8, 184(DI) + + // Prepare round + MOVQ BP, BX + ROLQ $0x01, BX + MOVQ 16(DI), R12 + XORQ 56(DI), DX + XORQ R15, BX + XORQ 96(DI), R12 + XORQ 136(DI), DX + XORQ DX, R12 + MOVQ R12, CX + ROLQ $0x01, CX + MOVQ 24(DI), R13 + XORQ 64(DI), R8 + XORQ SI, CX + XORQ 104(DI), R13 + XORQ 144(DI), R8 + XORQ R8, R13 + MOVQ R13, DX + ROLQ $0x01, DX + MOVQ R15, R8 + XORQ BP, DX + ROLQ $0x01, R8 + MOVQ SI, R9 + XORQ R12, R8 + ROLQ $0x01, R9 + + // Result b + MOVQ (DI), R10 + MOVQ 48(DI), R11 + XORQ R13, R9 + MOVQ 96(DI), R12 + MOVQ 144(DI), R13 + MOVQ 192(DI), R14 + XORQ CX, R11 + ROLQ $0x2c, R11 + XORQ DX, R12 + XORQ BX, R10 + ROLQ $0x2b, R12 + MOVQ R11, SI + MOVQ $0x000000000000008a, AX + ORQ R12, SI + XORQ R10, AX + XORQ AX, SI + MOVQ SI, (SP) + XORQ R9, R14 + ROLQ $0x0e, R14 + MOVQ R10, R15 + ANDQ R11, R15 + XORQ R14, R15 + MOVQ R15, 32(SP) + XORQ R8, R13 + ROLQ $0x15, R13 + MOVQ R13, AX + ANDQ R14, AX + XORQ R12, AX + MOVQ AX, 16(SP) + NOTQ R12 + ORQ R10, R14 + ORQ R13, R12 + XORQ R13, R14 + XORQ R11, R12 + MOVQ R14, 24(SP) + MOVQ R12, 8(SP) + MOVQ R12, BP + + // Result g + MOVQ 72(DI), R11 + XORQ R9, R11 + MOVQ 80(DI), R12 + ROLQ $0x14, R11 + XORQ BX, R12 + ROLQ $0x03, R12 + MOVQ 24(DI), R10 + MOVQ R11, AX + ORQ R12, AX + XORQ R8, R10 + MOVQ 128(DI), R13 + MOVQ 176(DI), R14 + ROLQ $0x1c, R10 + XORQ R10, AX + MOVQ AX, 40(SP) + XORQ AX, SI + XORQ CX, R13 + ROLQ $0x2d, R13 + MOVQ R12, AX + ANDQ R13, AX + XORQ R11, AX + MOVQ AX, 48(SP) + XORQ AX, BP + XORQ DX, R14 + ROLQ $0x3d, R14 + MOVQ R14, AX + ORQ R10, AX + XORQ R13, AX + MOVQ AX, 64(SP) + ANDQ R11, R10 + XORQ R14, R10 + MOVQ R10, 72(SP) + NOTQ R14 + XORQ R10, R15 + ORQ R14, R13 + XORQ R12, R13 + MOVQ R13, 56(SP) + + // Result k + MOVQ 8(DI), R10 + MOVQ 56(DI), R11 + MOVQ 104(DI), R12 + MOVQ 152(DI), R13 + MOVQ 160(DI), R14 + XORQ DX, R11 + ROLQ $0x06, R11 + XORQ R8, R12 + ROLQ $0x19, R12 + MOVQ R11, AX + ORQ R12, AX + XORQ CX, R10 + ROLQ $0x01, R10 + XORQ R10, AX + MOVQ AX, 80(SP) + XORQ AX, SI + XORQ R9, R13 + ROLQ $0x08, R13 + MOVQ R12, AX + ANDQ R13, AX + XORQ R11, AX + MOVQ AX, 88(SP) + XORQ AX, BP + XORQ BX, R14 + ROLQ $0x12, R14 + NOTQ R13 + MOVQ R13, AX + ANDQ R14, AX + XORQ R12, AX + MOVQ AX, 96(SP) + MOVQ R14, AX + ORQ R10, AX + XORQ R13, AX + MOVQ AX, 104(SP) + ANDQ R11, R10 + XORQ R14, R10 + MOVQ R10, 112(SP) + XORQ R10, R15 + + // Result m + MOVQ 40(DI), R11 + XORQ BX, R11 + MOVQ 88(DI), R12 + ROLQ $0x24, R11 + XORQ CX, R12 + MOVQ 32(DI), R10 + ROLQ $0x0a, R12 + MOVQ R11, AX + MOVQ 136(DI), R13 + ANDQ R12, AX + XORQ R9, R10 + MOVQ 184(DI), R14 + ROLQ $0x1b, R10 + XORQ R10, AX + MOVQ AX, 120(SP) + XORQ AX, SI + XORQ DX, R13 + ROLQ $0x0f, R13 + MOVQ R12, AX + ORQ R13, AX + XORQ R11, AX + MOVQ AX, 128(SP) + XORQ AX, BP + XORQ R8, R14 + ROLQ $0x38, R14 + NOTQ R13 + MOVQ R13, AX + ORQ R14, AX + XORQ R12, AX + MOVQ AX, 136(SP) + ORQ R10, R11 + XORQ R14, R11 + MOVQ R11, 152(SP) + ANDQ R10, R14 + XORQ R13, R14 + MOVQ R14, 144(SP) + XORQ R11, R15 + + // Result s + MOVQ 16(DI), R10 + MOVQ 64(DI), R11 + MOVQ 112(DI), R12 + XORQ DX, R10 + MOVQ 120(DI), R13 + ROLQ $0x3e, R10 + XORQ R8, R11 + MOVQ 168(DI), R14 + ROLQ $0x37, R11 + XORQ R9, R12 + MOVQ R10, R9 + XORQ CX, R14 + ROLQ $0x02, R14 + ANDQ R11, R9 + XORQ R14, R9 + MOVQ R9, 192(SP) + ROLQ $0x27, R12 + XORQ R9, R15 + NOTQ R11 + XORQ BX, R13 + MOVQ R11, BX + ANDQ R12, BX + XORQ R10, BX + MOVQ BX, 160(SP) + XORQ BX, SI + ROLQ $0x29, R13 + MOVQ R12, CX + ORQ R13, CX + XORQ R11, CX + MOVQ CX, 168(SP) + XORQ CX, BP + MOVQ R13, DX + MOVQ R14, R8 + ANDQ R14, DX + ORQ R10, R8 + XORQ R12, DX + XORQ R13, R8 + MOVQ DX, 176(SP) + MOVQ R8, 184(SP) + + // Prepare round + MOVQ BP, BX + ROLQ $0x01, BX + MOVQ 16(SP), R12 + XORQ 56(SP), DX + XORQ R15, BX + XORQ 96(SP), R12 + XORQ 136(SP), DX + XORQ DX, R12 + MOVQ R12, CX + ROLQ $0x01, CX + MOVQ 24(SP), R13 + XORQ 64(SP), R8 + XORQ SI, CX + XORQ 104(SP), R13 + XORQ 144(SP), R8 + XORQ R8, R13 + MOVQ R13, DX + ROLQ $0x01, DX + MOVQ R15, R8 + XORQ BP, DX + ROLQ $0x01, R8 + MOVQ SI, R9 + XORQ R12, R8 + ROLQ $0x01, R9 + + // Result b + MOVQ (SP), R10 + MOVQ 48(SP), R11 + XORQ R13, R9 + MOVQ 96(SP), R12 + MOVQ 144(SP), R13 + MOVQ 192(SP), R14 + XORQ CX, R11 + ROLQ $0x2c, R11 + XORQ DX, R12 + XORQ BX, R10 + ROLQ $0x2b, R12 + MOVQ R11, SI + MOVQ $0x0000000000000088, AX + ORQ R12, SI + XORQ R10, AX + XORQ AX, SI + MOVQ SI, (DI) + XORQ R9, R14 + ROLQ $0x0e, R14 + MOVQ R10, R15 + ANDQ R11, R15 + XORQ R14, R15 + MOVQ R15, 32(DI) + XORQ R8, R13 + ROLQ $0x15, R13 + MOVQ R13, AX + ANDQ R14, AX + XORQ R12, AX + MOVQ AX, 16(DI) + NOTQ R12 + ORQ R10, R14 + ORQ R13, R12 + XORQ R13, R14 + XORQ R11, R12 + MOVQ R14, 24(DI) + MOVQ R12, 8(DI) + MOVQ R12, BP + + // Result g + MOVQ 72(SP), R11 + XORQ R9, R11 + MOVQ 80(SP), R12 + ROLQ $0x14, R11 + XORQ BX, R12 + ROLQ $0x03, R12 + MOVQ 24(SP), R10 + MOVQ R11, AX + ORQ R12, AX + XORQ R8, R10 + MOVQ 128(SP), R13 + MOVQ 176(SP), R14 + ROLQ $0x1c, R10 + XORQ R10, AX + MOVQ AX, 40(DI) + XORQ AX, SI + XORQ CX, R13 + ROLQ $0x2d, R13 + MOVQ R12, AX + ANDQ R13, AX + XORQ R11, AX + MOVQ AX, 48(DI) + XORQ AX, BP + XORQ DX, R14 + ROLQ $0x3d, R14 + MOVQ R14, AX + ORQ R10, AX + XORQ R13, AX + MOVQ AX, 64(DI) + ANDQ R11, R10 + XORQ R14, R10 + MOVQ R10, 72(DI) + NOTQ R14 + XORQ R10, R15 + ORQ R14, R13 + XORQ R12, R13 + MOVQ R13, 56(DI) + + // Result k + MOVQ 8(SP), R10 + MOVQ 56(SP), R11 + MOVQ 104(SP), R12 + MOVQ 152(SP), R13 + MOVQ 160(SP), R14 + XORQ DX, R11 + ROLQ $0x06, R11 + XORQ R8, R12 + ROLQ $0x19, R12 + MOVQ R11, AX + ORQ R12, AX + XORQ CX, R10 + ROLQ $0x01, R10 + XORQ R10, AX + MOVQ AX, 80(DI) + XORQ AX, SI + XORQ R9, R13 + ROLQ $0x08, R13 + MOVQ R12, AX + ANDQ R13, AX + XORQ R11, AX + MOVQ AX, 88(DI) + XORQ AX, BP + XORQ BX, R14 + ROLQ $0x12, R14 + NOTQ R13 + MOVQ R13, AX + ANDQ R14, AX + XORQ R12, AX + MOVQ AX, 96(DI) + MOVQ R14, AX + ORQ R10, AX + XORQ R13, AX + MOVQ AX, 104(DI) + ANDQ R11, R10 + XORQ R14, R10 + MOVQ R10, 112(DI) + XORQ R10, R15 + + // Result m + MOVQ 40(SP), R11 + XORQ BX, R11 + MOVQ 88(SP), R12 + ROLQ $0x24, R11 + XORQ CX, R12 + MOVQ 32(SP), R10 + ROLQ $0x0a, R12 + MOVQ R11, AX + MOVQ 136(SP), R13 + ANDQ R12, AX + XORQ R9, R10 + MOVQ 184(SP), R14 + ROLQ $0x1b, R10 + XORQ R10, AX + MOVQ AX, 120(DI) + XORQ AX, SI + XORQ DX, R13 + ROLQ $0x0f, R13 + MOVQ R12, AX + ORQ R13, AX + XORQ R11, AX + MOVQ AX, 128(DI) + XORQ AX, BP + XORQ R8, R14 + ROLQ $0x38, R14 + NOTQ R13 + MOVQ R13, AX + ORQ R14, AX + XORQ R12, AX + MOVQ AX, 136(DI) + ORQ R10, R11 + XORQ R14, R11 + MOVQ R11, 152(DI) + ANDQ R10, R14 + XORQ R13, R14 + MOVQ R14, 144(DI) + XORQ R11, R15 + + // Result s + MOVQ 16(SP), R10 + MOVQ 64(SP), R11 + MOVQ 112(SP), R12 + XORQ DX, R10 + MOVQ 120(SP), R13 + ROLQ $0x3e, R10 + XORQ R8, R11 + MOVQ 168(SP), R14 + ROLQ $0x37, R11 + XORQ R9, R12 + MOVQ R10, R9 + XORQ CX, R14 + ROLQ $0x02, R14 + ANDQ R11, R9 + XORQ R14, R9 + MOVQ R9, 192(DI) + ROLQ $0x27, R12 + XORQ R9, R15 + NOTQ R11 + XORQ BX, R13 + MOVQ R11, BX + ANDQ R12, BX + XORQ R10, BX + MOVQ BX, 160(DI) + XORQ BX, SI + ROLQ $0x29, R13 + MOVQ R12, CX + ORQ R13, CX + XORQ R11, CX + MOVQ CX, 168(DI) + XORQ CX, BP + MOVQ R13, DX + MOVQ R14, R8 + ANDQ R14, DX + ORQ R10, R8 + XORQ R12, DX + XORQ R13, R8 + MOVQ DX, 176(DI) + MOVQ R8, 184(DI) + + // Prepare round + MOVQ BP, BX + ROLQ $0x01, BX + MOVQ 16(DI), R12 + XORQ 56(DI), DX + XORQ R15, BX + XORQ 96(DI), R12 + XORQ 136(DI), DX + XORQ DX, R12 + MOVQ R12, CX + ROLQ $0x01, CX + MOVQ 24(DI), R13 + XORQ 64(DI), R8 + XORQ SI, CX + XORQ 104(DI), R13 + XORQ 144(DI), R8 + XORQ R8, R13 + MOVQ R13, DX + ROLQ $0x01, DX + MOVQ R15, R8 + XORQ BP, DX + ROLQ $0x01, R8 + MOVQ SI, R9 + XORQ R12, R8 + ROLQ $0x01, R9 + + // Result b + MOVQ (DI), R10 + MOVQ 48(DI), R11 + XORQ R13, R9 + MOVQ 96(DI), R12 + MOVQ 144(DI), R13 + MOVQ 192(DI), R14 + XORQ CX, R11 + ROLQ $0x2c, R11 + XORQ DX, R12 + XORQ BX, R10 + ROLQ $0x2b, R12 + MOVQ R11, SI + MOVQ $0x0000000080008009, AX + ORQ R12, SI + XORQ R10, AX + XORQ AX, SI + MOVQ SI, (SP) + XORQ R9, R14 + ROLQ $0x0e, R14 + MOVQ R10, R15 + ANDQ R11, R15 + XORQ R14, R15 + MOVQ R15, 32(SP) + XORQ R8, R13 + ROLQ $0x15, R13 + MOVQ R13, AX + ANDQ R14, AX + XORQ R12, AX + MOVQ AX, 16(SP) + NOTQ R12 + ORQ R10, R14 + ORQ R13, R12 + XORQ R13, R14 + XORQ R11, R12 + MOVQ R14, 24(SP) + MOVQ R12, 8(SP) + MOVQ R12, BP + + // Result g + MOVQ 72(DI), R11 + XORQ R9, R11 + MOVQ 80(DI), R12 + ROLQ $0x14, R11 + XORQ BX, R12 + ROLQ $0x03, R12 + MOVQ 24(DI), R10 + MOVQ R11, AX + ORQ R12, AX + XORQ R8, R10 + MOVQ 128(DI), R13 + MOVQ 176(DI), R14 + ROLQ $0x1c, R10 + XORQ R10, AX + MOVQ AX, 40(SP) + XORQ AX, SI + XORQ CX, R13 + ROLQ $0x2d, R13 + MOVQ R12, AX + ANDQ R13, AX + XORQ R11, AX + MOVQ AX, 48(SP) + XORQ AX, BP + XORQ DX, R14 + ROLQ $0x3d, R14 + MOVQ R14, AX + ORQ R10, AX + XORQ R13, AX + MOVQ AX, 64(SP) + ANDQ R11, R10 + XORQ R14, R10 + MOVQ R10, 72(SP) + NOTQ R14 + XORQ R10, R15 + ORQ R14, R13 + XORQ R12, R13 + MOVQ R13, 56(SP) + + // Result k + MOVQ 8(DI), R10 + MOVQ 56(DI), R11 + MOVQ 104(DI), R12 + MOVQ 152(DI), R13 + MOVQ 160(DI), R14 + XORQ DX, R11 + ROLQ $0x06, R11 + XORQ R8, R12 + ROLQ $0x19, R12 + MOVQ R11, AX + ORQ R12, AX + XORQ CX, R10 + ROLQ $0x01, R10 + XORQ R10, AX + MOVQ AX, 80(SP) + XORQ AX, SI + XORQ R9, R13 + ROLQ $0x08, R13 + MOVQ R12, AX + ANDQ R13, AX + XORQ R11, AX + MOVQ AX, 88(SP) + XORQ AX, BP + XORQ BX, R14 + ROLQ $0x12, R14 + NOTQ R13 + MOVQ R13, AX + ANDQ R14, AX + XORQ R12, AX + MOVQ AX, 96(SP) + MOVQ R14, AX + ORQ R10, AX + XORQ R13, AX + MOVQ AX, 104(SP) + ANDQ R11, R10 + XORQ R14, R10 + MOVQ R10, 112(SP) + XORQ R10, R15 + + // Result m + MOVQ 40(DI), R11 + XORQ BX, R11 + MOVQ 88(DI), R12 + ROLQ $0x24, R11 + XORQ CX, R12 + MOVQ 32(DI), R10 + ROLQ $0x0a, R12 + MOVQ R11, AX + MOVQ 136(DI), R13 + ANDQ R12, AX + XORQ R9, R10 + MOVQ 184(DI), R14 + ROLQ $0x1b, R10 + XORQ R10, AX + MOVQ AX, 120(SP) + XORQ AX, SI + XORQ DX, R13 + ROLQ $0x0f, R13 + MOVQ R12, AX + ORQ R13, AX + XORQ R11, AX + MOVQ AX, 128(SP) + XORQ AX, BP + XORQ R8, R14 + ROLQ $0x38, R14 + NOTQ R13 + MOVQ R13, AX + ORQ R14, AX + XORQ R12, AX + MOVQ AX, 136(SP) + ORQ R10, R11 + XORQ R14, R11 + MOVQ R11, 152(SP) + ANDQ R10, R14 + XORQ R13, R14 + MOVQ R14, 144(SP) + XORQ R11, R15 + + // Result s + MOVQ 16(DI), R10 + MOVQ 64(DI), R11 + MOVQ 112(DI), R12 + XORQ DX, R10 + MOVQ 120(DI), R13 + ROLQ $0x3e, R10 + XORQ R8, R11 + MOVQ 168(DI), R14 + ROLQ $0x37, R11 + XORQ R9, R12 + MOVQ R10, R9 + XORQ CX, R14 + ROLQ $0x02, R14 + ANDQ R11, R9 + XORQ R14, R9 + MOVQ R9, 192(SP) + ROLQ $0x27, R12 + XORQ R9, R15 + NOTQ R11 + XORQ BX, R13 + MOVQ R11, BX + ANDQ R12, BX + XORQ R10, BX + MOVQ BX, 160(SP) + XORQ BX, SI + ROLQ $0x29, R13 + MOVQ R12, CX + ORQ R13, CX + XORQ R11, CX + MOVQ CX, 168(SP) + XORQ CX, BP + MOVQ R13, DX + MOVQ R14, R8 + ANDQ R14, DX + ORQ R10, R8 + XORQ R12, DX + XORQ R13, R8 + MOVQ DX, 176(SP) + MOVQ R8, 184(SP) + + // Prepare round + MOVQ BP, BX + ROLQ $0x01, BX + MOVQ 16(SP), R12 + XORQ 56(SP), DX + XORQ R15, BX + XORQ 96(SP), R12 + XORQ 136(SP), DX + XORQ DX, R12 + MOVQ R12, CX + ROLQ $0x01, CX + MOVQ 24(SP), R13 + XORQ 64(SP), R8 + XORQ SI, CX + XORQ 104(SP), R13 + XORQ 144(SP), R8 + XORQ R8, R13 + MOVQ R13, DX + ROLQ $0x01, DX + MOVQ R15, R8 + XORQ BP, DX + ROLQ $0x01, R8 + MOVQ SI, R9 + XORQ R12, R8 + ROLQ $0x01, R9 + + // Result b + MOVQ (SP), R10 + MOVQ 48(SP), R11 + XORQ R13, R9 + MOVQ 96(SP), R12 + MOVQ 144(SP), R13 + MOVQ 192(SP), R14 + XORQ CX, R11 + ROLQ $0x2c, R11 + XORQ DX, R12 + XORQ BX, R10 + ROLQ $0x2b, R12 + MOVQ R11, SI + MOVQ $0x000000008000000a, AX + ORQ R12, SI + XORQ R10, AX + XORQ AX, SI + MOVQ SI, (DI) + XORQ R9, R14 + ROLQ $0x0e, R14 + MOVQ R10, R15 + ANDQ R11, R15 + XORQ R14, R15 + MOVQ R15, 32(DI) + XORQ R8, R13 + ROLQ $0x15, R13 + MOVQ R13, AX + ANDQ R14, AX + XORQ R12, AX + MOVQ AX, 16(DI) + NOTQ R12 + ORQ R10, R14 + ORQ R13, R12 + XORQ R13, R14 + XORQ R11, R12 + MOVQ R14, 24(DI) + MOVQ R12, 8(DI) + MOVQ R12, BP + + // Result g + MOVQ 72(SP), R11 + XORQ R9, R11 + MOVQ 80(SP), R12 + ROLQ $0x14, R11 + XORQ BX, R12 + ROLQ $0x03, R12 + MOVQ 24(SP), R10 + MOVQ R11, AX + ORQ R12, AX + XORQ R8, R10 + MOVQ 128(SP), R13 + MOVQ 176(SP), R14 + ROLQ $0x1c, R10 + XORQ R10, AX + MOVQ AX, 40(DI) + XORQ AX, SI + XORQ CX, R13 + ROLQ $0x2d, R13 + MOVQ R12, AX + ANDQ R13, AX + XORQ R11, AX + MOVQ AX, 48(DI) + XORQ AX, BP + XORQ DX, R14 + ROLQ $0x3d, R14 + MOVQ R14, AX + ORQ R10, AX + XORQ R13, AX + MOVQ AX, 64(DI) + ANDQ R11, R10 + XORQ R14, R10 + MOVQ R10, 72(DI) + NOTQ R14 + XORQ R10, R15 + ORQ R14, R13 + XORQ R12, R13 + MOVQ R13, 56(DI) + + // Result k + MOVQ 8(SP), R10 + MOVQ 56(SP), R11 + MOVQ 104(SP), R12 + MOVQ 152(SP), R13 + MOVQ 160(SP), R14 + XORQ DX, R11 + ROLQ $0x06, R11 + XORQ R8, R12 + ROLQ $0x19, R12 + MOVQ R11, AX + ORQ R12, AX + XORQ CX, R10 + ROLQ $0x01, R10 + XORQ R10, AX + MOVQ AX, 80(DI) + XORQ AX, SI + XORQ R9, R13 + ROLQ $0x08, R13 + MOVQ R12, AX + ANDQ R13, AX + XORQ R11, AX + MOVQ AX, 88(DI) + XORQ AX, BP + XORQ BX, R14 + ROLQ $0x12, R14 + NOTQ R13 + MOVQ R13, AX + ANDQ R14, AX + XORQ R12, AX + MOVQ AX, 96(DI) + MOVQ R14, AX + ORQ R10, AX + XORQ R13, AX + MOVQ AX, 104(DI) + ANDQ R11, R10 + XORQ R14, R10 + MOVQ R10, 112(DI) + XORQ R10, R15 + + // Result m + MOVQ 40(SP), R11 + XORQ BX, R11 + MOVQ 88(SP), R12 + ROLQ $0x24, R11 + XORQ CX, R12 + MOVQ 32(SP), R10 + ROLQ $0x0a, R12 + MOVQ R11, AX + MOVQ 136(SP), R13 + ANDQ R12, AX + XORQ R9, R10 + MOVQ 184(SP), R14 + ROLQ $0x1b, R10 + XORQ R10, AX + MOVQ AX, 120(DI) + XORQ AX, SI + XORQ DX, R13 + ROLQ $0x0f, R13 + MOVQ R12, AX + ORQ R13, AX + XORQ R11, AX + MOVQ AX, 128(DI) + XORQ AX, BP + XORQ R8, R14 + ROLQ $0x38, R14 + NOTQ R13 + MOVQ R13, AX + ORQ R14, AX + XORQ R12, AX + MOVQ AX, 136(DI) + ORQ R10, R11 + XORQ R14, R11 + MOVQ R11, 152(DI) + ANDQ R10, R14 + XORQ R13, R14 + MOVQ R14, 144(DI) + XORQ R11, R15 + + // Result s + MOVQ 16(SP), R10 + MOVQ 64(SP), R11 + MOVQ 112(SP), R12 + XORQ DX, R10 + MOVQ 120(SP), R13 + ROLQ $0x3e, R10 + XORQ R8, R11 + MOVQ 168(SP), R14 + ROLQ $0x37, R11 + XORQ R9, R12 + MOVQ R10, R9 + XORQ CX, R14 + ROLQ $0x02, R14 + ANDQ R11, R9 + XORQ R14, R9 + MOVQ R9, 192(DI) + ROLQ $0x27, R12 + XORQ R9, R15 + NOTQ R11 + XORQ BX, R13 + MOVQ R11, BX + ANDQ R12, BX + XORQ R10, BX + MOVQ BX, 160(DI) + XORQ BX, SI + ROLQ $0x29, R13 + MOVQ R12, CX + ORQ R13, CX + XORQ R11, CX + MOVQ CX, 168(DI) + XORQ CX, BP + MOVQ R13, DX + MOVQ R14, R8 + ANDQ R14, DX + ORQ R10, R8 + XORQ R12, DX + XORQ R13, R8 + MOVQ DX, 176(DI) + MOVQ R8, 184(DI) + // Prepare round + MOVQ BP, BX + ROLQ $0x01, BX + MOVQ 16(DI), R12 + XORQ 56(DI), DX + XORQ R15, BX + XORQ 96(DI), R12 + XORQ 136(DI), DX + XORQ DX, R12 + MOVQ R12, CX + ROLQ $0x01, CX + MOVQ 24(DI), R13 + XORQ 64(DI), R8 + XORQ SI, CX + XORQ 104(DI), R13 + XORQ 144(DI), R8 + XORQ R8, R13 + MOVQ R13, DX + ROLQ $0x01, DX + MOVQ R15, R8 + XORQ BP, DX + ROLQ $0x01, R8 + MOVQ SI, R9 + XORQ R12, R8 + ROLQ $0x01, R9 + + // Result b + MOVQ (DI), R10 + MOVQ 48(DI), R11 + XORQ R13, R9 + MOVQ 96(DI), R12 + MOVQ 144(DI), R13 + MOVQ 192(DI), R14 + XORQ CX, R11 + ROLQ $0x2c, R11 + XORQ DX, R12 + XORQ BX, R10 + ROLQ $0x2b, R12 + MOVQ R11, SI + MOVQ $0x000000008000808b, AX + ORQ R12, SI + XORQ R10, AX + XORQ AX, SI + MOVQ SI, (SP) + XORQ R9, R14 + ROLQ $0x0e, R14 + MOVQ R10, R15 + ANDQ R11, R15 + XORQ R14, R15 + MOVQ R15, 32(SP) + XORQ R8, R13 + ROLQ $0x15, R13 + MOVQ R13, AX + ANDQ R14, AX + XORQ R12, AX + MOVQ AX, 16(SP) + NOTQ R12 + ORQ R10, R14 + ORQ R13, R12 + XORQ R13, R14 + XORQ R11, R12 + MOVQ R14, 24(SP) + MOVQ R12, 8(SP) + MOVQ R12, BP + + // Result g + MOVQ 72(DI), R11 + XORQ R9, R11 + MOVQ 80(DI), R12 + ROLQ $0x14, R11 + XORQ BX, R12 + ROLQ $0x03, R12 + MOVQ 24(DI), R10 + MOVQ R11, AX + ORQ R12, AX + XORQ R8, R10 + MOVQ 128(DI), R13 + MOVQ 176(DI), R14 + ROLQ $0x1c, R10 + XORQ R10, AX + MOVQ AX, 40(SP) + XORQ AX, SI + XORQ CX, R13 + ROLQ $0x2d, R13 + MOVQ R12, AX + ANDQ R13, AX + XORQ R11, AX + MOVQ AX, 48(SP) + XORQ AX, BP + XORQ DX, R14 + ROLQ $0x3d, R14 + MOVQ R14, AX + ORQ R10, AX + XORQ R13, AX + MOVQ AX, 64(SP) + ANDQ R11, R10 + XORQ R14, R10 + MOVQ R10, 72(SP) + NOTQ R14 + XORQ R10, R15 + ORQ R14, R13 + XORQ R12, R13 + MOVQ R13, 56(SP) + + // Result k + MOVQ 8(DI), R10 + MOVQ 56(DI), R11 + MOVQ 104(DI), R12 + MOVQ 152(DI), R13 + MOVQ 160(DI), R14 + XORQ DX, R11 + ROLQ $0x06, R11 + XORQ R8, R12 + ROLQ $0x19, R12 + MOVQ R11, AX + ORQ R12, AX + XORQ CX, R10 + ROLQ $0x01, R10 + XORQ R10, AX + MOVQ AX, 80(SP) + XORQ AX, SI + XORQ R9, R13 + ROLQ $0x08, R13 + MOVQ R12, AX + ANDQ R13, AX + XORQ R11, AX + MOVQ AX, 88(SP) + XORQ AX, BP + XORQ BX, R14 + ROLQ $0x12, R14 + NOTQ R13 + MOVQ R13, AX + ANDQ R14, AX + XORQ R12, AX + MOVQ AX, 96(SP) + MOVQ R14, AX + ORQ R10, AX + XORQ R13, AX + MOVQ AX, 104(SP) + ANDQ R11, R10 + XORQ R14, R10 + MOVQ R10, 112(SP) + XORQ R10, R15 + + // Result m + MOVQ 40(DI), R11 + XORQ BX, R11 + MOVQ 88(DI), R12 + ROLQ $0x24, R11 + XORQ CX, R12 + MOVQ 32(DI), R10 + ROLQ $0x0a, R12 + MOVQ R11, AX + MOVQ 136(DI), R13 + ANDQ R12, AX + XORQ R9, R10 + MOVQ 184(DI), R14 + ROLQ $0x1b, R10 + XORQ R10, AX + MOVQ AX, 120(SP) + XORQ AX, SI + XORQ DX, R13 + ROLQ $0x0f, R13 + MOVQ R12, AX + ORQ R13, AX + XORQ R11, AX + MOVQ AX, 128(SP) + XORQ AX, BP + XORQ R8, R14 + ROLQ $0x38, R14 + NOTQ R13 + MOVQ R13, AX + ORQ R14, AX + XORQ R12, AX + MOVQ AX, 136(SP) + ORQ R10, R11 + XORQ R14, R11 + MOVQ R11, 152(SP) + ANDQ R10, R14 + XORQ R13, R14 + MOVQ R14, 144(SP) + XORQ R11, R15 + + // Result s + MOVQ 16(DI), R10 + MOVQ 64(DI), R11 + MOVQ 112(DI), R12 + XORQ DX, R10 + MOVQ 120(DI), R13 + ROLQ $0x3e, R10 + XORQ R8, R11 + MOVQ 168(DI), R14 + ROLQ $0x37, R11 + XORQ R9, R12 + MOVQ R10, R9 + XORQ CX, R14 + ROLQ $0x02, R14 + ANDQ R11, R9 + XORQ R14, R9 + MOVQ R9, 192(SP) + ROLQ $0x27, R12 + XORQ R9, R15 + NOTQ R11 + XORQ BX, R13 + MOVQ R11, BX + ANDQ R12, BX + XORQ R10, BX + MOVQ BX, 160(SP) + XORQ BX, SI + ROLQ $0x29, R13 + MOVQ R12, CX + ORQ R13, CX + XORQ R11, CX + MOVQ CX, 168(SP) + XORQ CX, BP + MOVQ R13, DX + MOVQ R14, R8 + ANDQ R14, DX + ORQ R10, R8 + XORQ R12, DX + XORQ R13, R8 + MOVQ DX, 176(SP) + MOVQ R8, 184(SP) + + // Prepare round + MOVQ BP, BX + ROLQ $0x01, BX + MOVQ 16(SP), R12 + XORQ 56(SP), DX + XORQ R15, BX + XORQ 96(SP), R12 + XORQ 136(SP), DX + XORQ DX, R12 + MOVQ R12, CX + ROLQ $0x01, CX + MOVQ 24(SP), R13 + XORQ 64(SP), R8 + XORQ SI, CX + XORQ 104(SP), R13 + XORQ 144(SP), R8 + XORQ R8, R13 + MOVQ R13, DX + ROLQ $0x01, DX + MOVQ R15, R8 + XORQ BP, DX + ROLQ $0x01, R8 + MOVQ SI, R9 + XORQ R12, R8 + ROLQ $0x01, R9 + + // Result b + MOVQ (SP), R10 + MOVQ 48(SP), R11 + XORQ R13, R9 + MOVQ 96(SP), R12 + MOVQ 144(SP), R13 + MOVQ 192(SP), R14 + XORQ CX, R11 + ROLQ $0x2c, R11 + XORQ DX, R12 + XORQ BX, R10 + ROLQ $0x2b, R12 + MOVQ R11, SI + MOVQ $0x800000000000008b, AX + ORQ R12, SI + XORQ R10, AX + XORQ AX, SI + MOVQ SI, (DI) + XORQ R9, R14 + ROLQ $0x0e, R14 + MOVQ R10, R15 + ANDQ R11, R15 + XORQ R14, R15 + MOVQ R15, 32(DI) + XORQ R8, R13 + ROLQ $0x15, R13 + MOVQ R13, AX + ANDQ R14, AX + XORQ R12, AX + MOVQ AX, 16(DI) + NOTQ R12 + ORQ R10, R14 + ORQ R13, R12 + XORQ R13, R14 + XORQ R11, R12 + MOVQ R14, 24(DI) + MOVQ R12, 8(DI) + MOVQ R12, BP + + // Result g + MOVQ 72(SP), R11 + XORQ R9, R11 + MOVQ 80(SP), R12 + ROLQ $0x14, R11 + XORQ BX, R12 + ROLQ $0x03, R12 + MOVQ 24(SP), R10 + MOVQ R11, AX + ORQ R12, AX + XORQ R8, R10 + MOVQ 128(SP), R13 + MOVQ 176(SP), R14 + ROLQ $0x1c, R10 + XORQ R10, AX + MOVQ AX, 40(DI) + XORQ AX, SI + XORQ CX, R13 + ROLQ $0x2d, R13 + MOVQ R12, AX + ANDQ R13, AX + XORQ R11, AX + MOVQ AX, 48(DI) + XORQ AX, BP + XORQ DX, R14 + ROLQ $0x3d, R14 + MOVQ R14, AX + ORQ R10, AX + XORQ R13, AX + MOVQ AX, 64(DI) + ANDQ R11, R10 + XORQ R14, R10 + MOVQ R10, 72(DI) + NOTQ R14 + XORQ R10, R15 + ORQ R14, R13 + XORQ R12, R13 + MOVQ R13, 56(DI) + + // Result k + MOVQ 8(SP), R10 + MOVQ 56(SP), R11 + MOVQ 104(SP), R12 + MOVQ 152(SP), R13 + MOVQ 160(SP), R14 + XORQ DX, R11 + ROLQ $0x06, R11 + XORQ R8, R12 + ROLQ $0x19, R12 + MOVQ R11, AX + ORQ R12, AX + XORQ CX, R10 + ROLQ $0x01, R10 + XORQ R10, AX + MOVQ AX, 80(DI) + XORQ AX, SI + XORQ R9, R13 + ROLQ $0x08, R13 + MOVQ R12, AX + ANDQ R13, AX + XORQ R11, AX + MOVQ AX, 88(DI) + XORQ AX, BP + XORQ BX, R14 + ROLQ $0x12, R14 + NOTQ R13 + MOVQ R13, AX + ANDQ R14, AX + XORQ R12, AX + MOVQ AX, 96(DI) + MOVQ R14, AX + ORQ R10, AX + XORQ R13, AX + MOVQ AX, 104(DI) + ANDQ R11, R10 + XORQ R14, R10 + MOVQ R10, 112(DI) + XORQ R10, R15 + + // Result m + MOVQ 40(SP), R11 + XORQ BX, R11 + MOVQ 88(SP), R12 + ROLQ $0x24, R11 + XORQ CX, R12 + MOVQ 32(SP), R10 + ROLQ $0x0a, R12 + MOVQ R11, AX + MOVQ 136(SP), R13 + ANDQ R12, AX + XORQ R9, R10 + MOVQ 184(SP), R14 + ROLQ $0x1b, R10 + XORQ R10, AX + MOVQ AX, 120(DI) + XORQ AX, SI + XORQ DX, R13 + ROLQ $0x0f, R13 + MOVQ R12, AX + ORQ R13, AX + XORQ R11, AX + MOVQ AX, 128(DI) + XORQ AX, BP + XORQ R8, R14 + ROLQ $0x38, R14 + NOTQ R13 + MOVQ R13, AX + ORQ R14, AX + XORQ R12, AX + MOVQ AX, 136(DI) + ORQ R10, R11 + XORQ R14, R11 + MOVQ R11, 152(DI) + ANDQ R10, R14 + XORQ R13, R14 + MOVQ R14, 144(DI) + XORQ R11, R15 + + // Result s + MOVQ 16(SP), R10 + MOVQ 64(SP), R11 + MOVQ 112(SP), R12 + XORQ DX, R10 + MOVQ 120(SP), R13 + ROLQ $0x3e, R10 + XORQ R8, R11 + MOVQ 168(SP), R14 + ROLQ $0x37, R11 + XORQ R9, R12 + MOVQ R10, R9 + XORQ CX, R14 + ROLQ $0x02, R14 + ANDQ R11, R9 + XORQ R14, R9 + MOVQ R9, 192(DI) + ROLQ $0x27, R12 + XORQ R9, R15 + NOTQ R11 + XORQ BX, R13 + MOVQ R11, BX + ANDQ R12, BX + XORQ R10, BX + MOVQ BX, 160(DI) + XORQ BX, SI + ROLQ $0x29, R13 + MOVQ R12, CX + ORQ R13, CX + XORQ R11, CX + MOVQ CX, 168(DI) + XORQ CX, BP + MOVQ R13, DX + MOVQ R14, R8 + ANDQ R14, DX + ORQ R10, R8 + XORQ R12, DX + XORQ R13, R8 + MOVQ DX, 176(DI) + MOVQ R8, 184(DI) + + // Prepare round + MOVQ BP, BX + ROLQ $0x01, BX + MOVQ 16(DI), R12 + XORQ 56(DI), DX + XORQ R15, BX + XORQ 96(DI), R12 + XORQ 136(DI), DX + XORQ DX, R12 + MOVQ R12, CX + ROLQ $0x01, CX + MOVQ 24(DI), R13 + XORQ 64(DI), R8 + XORQ SI, CX + XORQ 104(DI), R13 + XORQ 144(DI), R8 + XORQ R8, R13 + MOVQ R13, DX + ROLQ $0x01, DX + MOVQ R15, R8 + XORQ BP, DX + ROLQ $0x01, R8 + MOVQ SI, R9 + XORQ R12, R8 + ROLQ $0x01, R9 + + // Result b + MOVQ (DI), R10 + MOVQ 48(DI), R11 + XORQ R13, R9 + MOVQ 96(DI), R12 + MOVQ 144(DI), R13 + MOVQ 192(DI), R14 + XORQ CX, R11 + ROLQ $0x2c, R11 + XORQ DX, R12 + XORQ BX, R10 + ROLQ $0x2b, R12 + MOVQ R11, SI + MOVQ $0x8000000000008089, AX + ORQ R12, SI + XORQ R10, AX + XORQ AX, SI + MOVQ SI, (SP) + XORQ R9, R14 + ROLQ $0x0e, R14 + MOVQ R10, R15 + ANDQ R11, R15 + XORQ R14, R15 + MOVQ R15, 32(SP) + XORQ R8, R13 + ROLQ $0x15, R13 + MOVQ R13, AX + ANDQ R14, AX + XORQ R12, AX + MOVQ AX, 16(SP) + NOTQ R12 + ORQ R10, R14 + ORQ R13, R12 + XORQ R13, R14 + XORQ R11, R12 + MOVQ R14, 24(SP) + MOVQ R12, 8(SP) + MOVQ R12, BP + + // Result g + MOVQ 72(DI), R11 + XORQ R9, R11 + MOVQ 80(DI), R12 + ROLQ $0x14, R11 + XORQ BX, R12 + ROLQ $0x03, R12 + MOVQ 24(DI), R10 + MOVQ R11, AX + ORQ R12, AX + XORQ R8, R10 + MOVQ 128(DI), R13 + MOVQ 176(DI), R14 + ROLQ $0x1c, R10 + XORQ R10, AX + MOVQ AX, 40(SP) + XORQ AX, SI + XORQ CX, R13 + ROLQ $0x2d, R13 + MOVQ R12, AX + ANDQ R13, AX + XORQ R11, AX + MOVQ AX, 48(SP) + XORQ AX, BP + XORQ DX, R14 + ROLQ $0x3d, R14 + MOVQ R14, AX + ORQ R10, AX + XORQ R13, AX + MOVQ AX, 64(SP) + ANDQ R11, R10 + XORQ R14, R10 + MOVQ R10, 72(SP) + NOTQ R14 + XORQ R10, R15 + ORQ R14, R13 + XORQ R12, R13 + MOVQ R13, 56(SP) + + // Result k + MOVQ 8(DI), R10 + MOVQ 56(DI), R11 + MOVQ 104(DI), R12 + MOVQ 152(DI), R13 + MOVQ 160(DI), R14 + XORQ DX, R11 + ROLQ $0x06, R11 + XORQ R8, R12 + ROLQ $0x19, R12 + MOVQ R11, AX + ORQ R12, AX + XORQ CX, R10 + ROLQ $0x01, R10 + XORQ R10, AX + MOVQ AX, 80(SP) + XORQ AX, SI + XORQ R9, R13 + ROLQ $0x08, R13 + MOVQ R12, AX + ANDQ R13, AX + XORQ R11, AX + MOVQ AX, 88(SP) + XORQ AX, BP + XORQ BX, R14 + ROLQ $0x12, R14 + NOTQ R13 + MOVQ R13, AX + ANDQ R14, AX + XORQ R12, AX + MOVQ AX, 96(SP) + MOVQ R14, AX + ORQ R10, AX + XORQ R13, AX + MOVQ AX, 104(SP) + ANDQ R11, R10 + XORQ R14, R10 + MOVQ R10, 112(SP) + XORQ R10, R15 + + // Result m + MOVQ 40(DI), R11 + XORQ BX, R11 + MOVQ 88(DI), R12 + ROLQ $0x24, R11 + XORQ CX, R12 + MOVQ 32(DI), R10 + ROLQ $0x0a, R12 + MOVQ R11, AX + MOVQ 136(DI), R13 + ANDQ R12, AX + XORQ R9, R10 + MOVQ 184(DI), R14 + ROLQ $0x1b, R10 + XORQ R10, AX + MOVQ AX, 120(SP) + XORQ AX, SI + XORQ DX, R13 + ROLQ $0x0f, R13 + MOVQ R12, AX + ORQ R13, AX + XORQ R11, AX + MOVQ AX, 128(SP) + XORQ AX, BP + XORQ R8, R14 + ROLQ $0x38, R14 + NOTQ R13 + MOVQ R13, AX + ORQ R14, AX + XORQ R12, AX + MOVQ AX, 136(SP) + ORQ R10, R11 + XORQ R14, R11 + MOVQ R11, 152(SP) + ANDQ R10, R14 + XORQ R13, R14 + MOVQ R14, 144(SP) + XORQ R11, R15 + + // Result s + MOVQ 16(DI), R10 + MOVQ 64(DI), R11 + MOVQ 112(DI), R12 + XORQ DX, R10 + MOVQ 120(DI), R13 + ROLQ $0x3e, R10 + XORQ R8, R11 + MOVQ 168(DI), R14 + ROLQ $0x37, R11 + XORQ R9, R12 + MOVQ R10, R9 + XORQ CX, R14 + ROLQ $0x02, R14 + ANDQ R11, R9 + XORQ R14, R9 + MOVQ R9, 192(SP) + ROLQ $0x27, R12 + XORQ R9, R15 + NOTQ R11 + XORQ BX, R13 + MOVQ R11, BX + ANDQ R12, BX + XORQ R10, BX + MOVQ BX, 160(SP) + XORQ BX, SI + ROLQ $0x29, R13 + MOVQ R12, CX + ORQ R13, CX + XORQ R11, CX + MOVQ CX, 168(SP) + XORQ CX, BP + MOVQ R13, DX + MOVQ R14, R8 + ANDQ R14, DX + ORQ R10, R8 + XORQ R12, DX + XORQ R13, R8 + MOVQ DX, 176(SP) + MOVQ R8, 184(SP) + + // Prepare round + MOVQ BP, BX + ROLQ $0x01, BX + MOVQ 16(SP), R12 + XORQ 56(SP), DX + XORQ R15, BX + XORQ 96(SP), R12 + XORQ 136(SP), DX + XORQ DX, R12 + MOVQ R12, CX + ROLQ $0x01, CX + MOVQ 24(SP), R13 + XORQ 64(SP), R8 + XORQ SI, CX + XORQ 104(SP), R13 + XORQ 144(SP), R8 + XORQ R8, R13 + MOVQ R13, DX + ROLQ $0x01, DX + MOVQ R15, R8 + XORQ BP, DX + ROLQ $0x01, R8 + MOVQ SI, R9 + XORQ R12, R8 + ROLQ $0x01, R9 + + // Result b + MOVQ (SP), R10 + MOVQ 48(SP), R11 + XORQ R13, R9 + MOVQ 96(SP), R12 + MOVQ 144(SP), R13 + MOVQ 192(SP), R14 + XORQ CX, R11 + ROLQ $0x2c, R11 + XORQ DX, R12 + XORQ BX, R10 + ROLQ $0x2b, R12 + MOVQ R11, SI + MOVQ $0x8000000000008003, AX + ORQ R12, SI + XORQ R10, AX + XORQ AX, SI + MOVQ SI, (DI) + XORQ R9, R14 + ROLQ $0x0e, R14 + MOVQ R10, R15 + ANDQ R11, R15 + XORQ R14, R15 + MOVQ R15, 32(DI) + XORQ R8, R13 + ROLQ $0x15, R13 + MOVQ R13, AX + ANDQ R14, AX + XORQ R12, AX + MOVQ AX, 16(DI) + NOTQ R12 + ORQ R10, R14 + ORQ R13, R12 + XORQ R13, R14 + XORQ R11, R12 + MOVQ R14, 24(DI) + MOVQ R12, 8(DI) + MOVQ R12, BP + + // Result g + MOVQ 72(SP), R11 + XORQ R9, R11 + MOVQ 80(SP), R12 + ROLQ $0x14, R11 + XORQ BX, R12 + ROLQ $0x03, R12 + MOVQ 24(SP), R10 + MOVQ R11, AX + ORQ R12, AX + XORQ R8, R10 + MOVQ 128(SP), R13 + MOVQ 176(SP), R14 + ROLQ $0x1c, R10 + XORQ R10, AX + MOVQ AX, 40(DI) + XORQ AX, SI + XORQ CX, R13 + ROLQ $0x2d, R13 + MOVQ R12, AX + ANDQ R13, AX + XORQ R11, AX + MOVQ AX, 48(DI) + XORQ AX, BP + XORQ DX, R14 + ROLQ $0x3d, R14 + MOVQ R14, AX + ORQ R10, AX + XORQ R13, AX + MOVQ AX, 64(DI) + ANDQ R11, R10 + XORQ R14, R10 + MOVQ R10, 72(DI) + NOTQ R14 + XORQ R10, R15 + ORQ R14, R13 + XORQ R12, R13 + MOVQ R13, 56(DI) + + // Result k + MOVQ 8(SP), R10 + MOVQ 56(SP), R11 + MOVQ 104(SP), R12 + MOVQ 152(SP), R13 + MOVQ 160(SP), R14 + XORQ DX, R11 + ROLQ $0x06, R11 + XORQ R8, R12 + ROLQ $0x19, R12 + MOVQ R11, AX + ORQ R12, AX + XORQ CX, R10 + ROLQ $0x01, R10 + XORQ R10, AX + MOVQ AX, 80(DI) + XORQ AX, SI + XORQ R9, R13 + ROLQ $0x08, R13 + MOVQ R12, AX + ANDQ R13, AX + XORQ R11, AX + MOVQ AX, 88(DI) + XORQ AX, BP + XORQ BX, R14 + ROLQ $0x12, R14 + NOTQ R13 + MOVQ R13, AX + ANDQ R14, AX + XORQ R12, AX + MOVQ AX, 96(DI) + MOVQ R14, AX + ORQ R10, AX + XORQ R13, AX + MOVQ AX, 104(DI) + ANDQ R11, R10 + XORQ R14, R10 + MOVQ R10, 112(DI) + XORQ R10, R15 + + // Result m + MOVQ 40(SP), R11 + XORQ BX, R11 + MOVQ 88(SP), R12 + ROLQ $0x24, R11 + XORQ CX, R12 + MOVQ 32(SP), R10 + ROLQ $0x0a, R12 + MOVQ R11, AX + MOVQ 136(SP), R13 + ANDQ R12, AX + XORQ R9, R10 + MOVQ 184(SP), R14 + ROLQ $0x1b, R10 + XORQ R10, AX + MOVQ AX, 120(DI) + XORQ AX, SI + XORQ DX, R13 + ROLQ $0x0f, R13 + MOVQ R12, AX + ORQ R13, AX + XORQ R11, AX + MOVQ AX, 128(DI) + XORQ AX, BP + XORQ R8, R14 + ROLQ $0x38, R14 + NOTQ R13 + MOVQ R13, AX + ORQ R14, AX + XORQ R12, AX + MOVQ AX, 136(DI) + ORQ R10, R11 + XORQ R14, R11 + MOVQ R11, 152(DI) + ANDQ R10, R14 + XORQ R13, R14 + MOVQ R14, 144(DI) + XORQ R11, R15 + + // Result s + MOVQ 16(SP), R10 + MOVQ 64(SP), R11 + MOVQ 112(SP), R12 + XORQ DX, R10 + MOVQ 120(SP), R13 + ROLQ $0x3e, R10 + XORQ R8, R11 + MOVQ 168(SP), R14 + ROLQ $0x37, R11 + XORQ R9, R12 + MOVQ R10, R9 + XORQ CX, R14 + ROLQ $0x02, R14 + ANDQ R11, R9 + XORQ R14, R9 + MOVQ R9, 192(DI) + ROLQ $0x27, R12 + XORQ R9, R15 + NOTQ R11 + XORQ BX, R13 + MOVQ R11, BX + ANDQ R12, BX + XORQ R10, BX + MOVQ BX, 160(DI) + XORQ BX, SI + ROLQ $0x29, R13 + MOVQ R12, CX + ORQ R13, CX + XORQ R11, CX + MOVQ CX, 168(DI) + XORQ CX, BP + MOVQ R13, DX + MOVQ R14, R8 + ANDQ R14, DX + ORQ R10, R8 + XORQ R12, DX + XORQ R13, R8 + MOVQ DX, 176(DI) + MOVQ R8, 184(DI) + + // Prepare round + MOVQ BP, BX + ROLQ $0x01, BX + MOVQ 16(DI), R12 + XORQ 56(DI), DX + XORQ R15, BX + XORQ 96(DI), R12 + XORQ 136(DI), DX + XORQ DX, R12 + MOVQ R12, CX + ROLQ $0x01, CX + MOVQ 24(DI), R13 + XORQ 64(DI), R8 + XORQ SI, CX + XORQ 104(DI), R13 + XORQ 144(DI), R8 + XORQ R8, R13 + MOVQ R13, DX + ROLQ $0x01, DX + MOVQ R15, R8 + XORQ BP, DX + ROLQ $0x01, R8 + MOVQ SI, R9 + XORQ R12, R8 + ROLQ $0x01, R9 + + // Result b + MOVQ (DI), R10 + MOVQ 48(DI), R11 + XORQ R13, R9 + MOVQ 96(DI), R12 + MOVQ 144(DI), R13 + MOVQ 192(DI), R14 + XORQ CX, R11 + ROLQ $0x2c, R11 + XORQ DX, R12 + XORQ BX, R10 + ROLQ $0x2b, R12 + MOVQ R11, SI + MOVQ $0x8000000000008002, AX + ORQ R12, SI + XORQ R10, AX + XORQ AX, SI + MOVQ SI, (SP) + XORQ R9, R14 + ROLQ $0x0e, R14 + MOVQ R10, R15 + ANDQ R11, R15 + XORQ R14, R15 + MOVQ R15, 32(SP) + XORQ R8, R13 + ROLQ $0x15, R13 + MOVQ R13, AX + ANDQ R14, AX + XORQ R12, AX + MOVQ AX, 16(SP) + NOTQ R12 + ORQ R10, R14 + ORQ R13, R12 + XORQ R13, R14 + XORQ R11, R12 + MOVQ R14, 24(SP) + MOVQ R12, 8(SP) + MOVQ R12, BP + + // Result g + MOVQ 72(DI), R11 + XORQ R9, R11 + MOVQ 80(DI), R12 + ROLQ $0x14, R11 + XORQ BX, R12 + ROLQ $0x03, R12 + MOVQ 24(DI), R10 + MOVQ R11, AX + ORQ R12, AX + XORQ R8, R10 + MOVQ 128(DI), R13 + MOVQ 176(DI), R14 + ROLQ $0x1c, R10 + XORQ R10, AX + MOVQ AX, 40(SP) + XORQ AX, SI + XORQ CX, R13 + ROLQ $0x2d, R13 + MOVQ R12, AX + ANDQ R13, AX + XORQ R11, AX + MOVQ AX, 48(SP) + XORQ AX, BP + XORQ DX, R14 + ROLQ $0x3d, R14 + MOVQ R14, AX + ORQ R10, AX + XORQ R13, AX + MOVQ AX, 64(SP) + ANDQ R11, R10 + XORQ R14, R10 + MOVQ R10, 72(SP) + NOTQ R14 + XORQ R10, R15 + ORQ R14, R13 + XORQ R12, R13 + MOVQ R13, 56(SP) + + // Result k + MOVQ 8(DI), R10 + MOVQ 56(DI), R11 + MOVQ 104(DI), R12 + MOVQ 152(DI), R13 + MOVQ 160(DI), R14 + XORQ DX, R11 + ROLQ $0x06, R11 + XORQ R8, R12 + ROLQ $0x19, R12 + MOVQ R11, AX + ORQ R12, AX + XORQ CX, R10 + ROLQ $0x01, R10 + XORQ R10, AX + MOVQ AX, 80(SP) + XORQ AX, SI + XORQ R9, R13 + ROLQ $0x08, R13 + MOVQ R12, AX + ANDQ R13, AX + XORQ R11, AX + MOVQ AX, 88(SP) + XORQ AX, BP + XORQ BX, R14 + ROLQ $0x12, R14 + NOTQ R13 + MOVQ R13, AX + ANDQ R14, AX + XORQ R12, AX + MOVQ AX, 96(SP) + MOVQ R14, AX + ORQ R10, AX + XORQ R13, AX + MOVQ AX, 104(SP) + ANDQ R11, R10 + XORQ R14, R10 + MOVQ R10, 112(SP) + XORQ R10, R15 + + // Result m + MOVQ 40(DI), R11 + XORQ BX, R11 + MOVQ 88(DI), R12 + ROLQ $0x24, R11 + XORQ CX, R12 + MOVQ 32(DI), R10 + ROLQ $0x0a, R12 + MOVQ R11, AX + MOVQ 136(DI), R13 + ANDQ R12, AX + XORQ R9, R10 + MOVQ 184(DI), R14 + ROLQ $0x1b, R10 + XORQ R10, AX + MOVQ AX, 120(SP) + XORQ AX, SI + XORQ DX, R13 + ROLQ $0x0f, R13 + MOVQ R12, AX + ORQ R13, AX + XORQ R11, AX + MOVQ AX, 128(SP) + XORQ AX, BP + XORQ R8, R14 + ROLQ $0x38, R14 + NOTQ R13 + MOVQ R13, AX + ORQ R14, AX + XORQ R12, AX + MOVQ AX, 136(SP) + ORQ R10, R11 + XORQ R14, R11 + MOVQ R11, 152(SP) + ANDQ R10, R14 + XORQ R13, R14 + MOVQ R14, 144(SP) + XORQ R11, R15 + + // Result s + MOVQ 16(DI), R10 + MOVQ 64(DI), R11 + MOVQ 112(DI), R12 + XORQ DX, R10 + MOVQ 120(DI), R13 + ROLQ $0x3e, R10 + XORQ R8, R11 + MOVQ 168(DI), R14 + ROLQ $0x37, R11 + XORQ R9, R12 + MOVQ R10, R9 + XORQ CX, R14 + ROLQ $0x02, R14 + ANDQ R11, R9 + XORQ R14, R9 + MOVQ R9, 192(SP) + ROLQ $0x27, R12 + XORQ R9, R15 + NOTQ R11 + XORQ BX, R13 + MOVQ R11, BX + ANDQ R12, BX + XORQ R10, BX + MOVQ BX, 160(SP) + XORQ BX, SI + ROLQ $0x29, R13 + MOVQ R12, CX + ORQ R13, CX + XORQ R11, CX + MOVQ CX, 168(SP) + XORQ CX, BP + MOVQ R13, DX + MOVQ R14, R8 + ANDQ R14, DX + ORQ R10, R8 + XORQ R12, DX + XORQ R13, R8 + MOVQ DX, 176(SP) + MOVQ R8, 184(SP) + + // Prepare round + MOVQ BP, BX + ROLQ $0x01, BX + MOVQ 16(SP), R12 + XORQ 56(SP), DX + XORQ R15, BX + XORQ 96(SP), R12 + XORQ 136(SP), DX + XORQ DX, R12 + MOVQ R12, CX + ROLQ $0x01, CX + MOVQ 24(SP), R13 + XORQ 64(SP), R8 + XORQ SI, CX + XORQ 104(SP), R13 + XORQ 144(SP), R8 + XORQ R8, R13 + MOVQ R13, DX + ROLQ $0x01, DX + MOVQ R15, R8 + XORQ BP, DX + ROLQ $0x01, R8 + MOVQ SI, R9 + XORQ R12, R8 + ROLQ $0x01, R9 + + // Result b + MOVQ (SP), R10 + MOVQ 48(SP), R11 + XORQ R13, R9 + MOVQ 96(SP), R12 + MOVQ 144(SP), R13 + MOVQ 192(SP), R14 + XORQ CX, R11 + ROLQ $0x2c, R11 + XORQ DX, R12 + XORQ BX, R10 + ROLQ $0x2b, R12 + MOVQ R11, SI + MOVQ $0x8000000000000080, AX + ORQ R12, SI + XORQ R10, AX + XORQ AX, SI + MOVQ SI, (DI) + XORQ R9, R14 + ROLQ $0x0e, R14 + MOVQ R10, R15 + ANDQ R11, R15 + XORQ R14, R15 + MOVQ R15, 32(DI) + XORQ R8, R13 + ROLQ $0x15, R13 + MOVQ R13, AX + ANDQ R14, AX + XORQ R12, AX + MOVQ AX, 16(DI) + NOTQ R12 + ORQ R10, R14 + ORQ R13, R12 + XORQ R13, R14 + XORQ R11, R12 + MOVQ R14, 24(DI) + MOVQ R12, 8(DI) + MOVQ R12, BP + + // Result g + MOVQ 72(SP), R11 + XORQ R9, R11 + MOVQ 80(SP), R12 + ROLQ $0x14, R11 + XORQ BX, R12 + ROLQ $0x03, R12 + MOVQ 24(SP), R10 + MOVQ R11, AX + ORQ R12, AX + XORQ R8, R10 + MOVQ 128(SP), R13 + MOVQ 176(SP), R14 + ROLQ $0x1c, R10 + XORQ R10, AX + MOVQ AX, 40(DI) + XORQ AX, SI + XORQ CX, R13 + ROLQ $0x2d, R13 + MOVQ R12, AX + ANDQ R13, AX + XORQ R11, AX + MOVQ AX, 48(DI) + XORQ AX, BP + XORQ DX, R14 + ROLQ $0x3d, R14 + MOVQ R14, AX + ORQ R10, AX + XORQ R13, AX + MOVQ AX, 64(DI) + ANDQ R11, R10 + XORQ R14, R10 + MOVQ R10, 72(DI) + NOTQ R14 + XORQ R10, R15 + ORQ R14, R13 + XORQ R12, R13 + MOVQ R13, 56(DI) + + // Result k + MOVQ 8(SP), R10 + MOVQ 56(SP), R11 + MOVQ 104(SP), R12 + MOVQ 152(SP), R13 + MOVQ 160(SP), R14 + XORQ DX, R11 + ROLQ $0x06, R11 + XORQ R8, R12 + ROLQ $0x19, R12 + MOVQ R11, AX + ORQ R12, AX + XORQ CX, R10 + ROLQ $0x01, R10 + XORQ R10, AX + MOVQ AX, 80(DI) + XORQ AX, SI + XORQ R9, R13 + ROLQ $0x08, R13 + MOVQ R12, AX + ANDQ R13, AX + XORQ R11, AX + MOVQ AX, 88(DI) + XORQ AX, BP + XORQ BX, R14 + ROLQ $0x12, R14 + NOTQ R13 + MOVQ R13, AX + ANDQ R14, AX + XORQ R12, AX + MOVQ AX, 96(DI) + MOVQ R14, AX + ORQ R10, AX + XORQ R13, AX + MOVQ AX, 104(DI) + ANDQ R11, R10 + XORQ R14, R10 + MOVQ R10, 112(DI) + XORQ R10, R15 + + // Result m + MOVQ 40(SP), R11 + XORQ BX, R11 + MOVQ 88(SP), R12 + ROLQ $0x24, R11 + XORQ CX, R12 + MOVQ 32(SP), R10 + ROLQ $0x0a, R12 + MOVQ R11, AX + MOVQ 136(SP), R13 + ANDQ R12, AX + XORQ R9, R10 + MOVQ 184(SP), R14 + ROLQ $0x1b, R10 + XORQ R10, AX + MOVQ AX, 120(DI) + XORQ AX, SI + XORQ DX, R13 + ROLQ $0x0f, R13 + MOVQ R12, AX + ORQ R13, AX + XORQ R11, AX + MOVQ AX, 128(DI) + XORQ AX, BP + XORQ R8, R14 + ROLQ $0x38, R14 + NOTQ R13 + MOVQ R13, AX + ORQ R14, AX + XORQ R12, AX + MOVQ AX, 136(DI) + ORQ R10, R11 + XORQ R14, R11 + MOVQ R11, 152(DI) + ANDQ R10, R14 + XORQ R13, R14 + MOVQ R14, 144(DI) + XORQ R11, R15 + + // Result s + MOVQ 16(SP), R10 + MOVQ 64(SP), R11 + MOVQ 112(SP), R12 + XORQ DX, R10 + MOVQ 120(SP), R13 + ROLQ $0x3e, R10 + XORQ R8, R11 + MOVQ 168(SP), R14 + ROLQ $0x37, R11 + XORQ R9, R12 + MOVQ R10, R9 + XORQ CX, R14 + ROLQ $0x02, R14 + ANDQ R11, R9 + XORQ R14, R9 + MOVQ R9, 192(DI) + ROLQ $0x27, R12 + XORQ R9, R15 + NOTQ R11 + XORQ BX, R13 + MOVQ R11, BX + ANDQ R12, BX + XORQ R10, BX + MOVQ BX, 160(DI) + XORQ BX, SI + ROLQ $0x29, R13 + MOVQ R12, CX + ORQ R13, CX + XORQ R11, CX + MOVQ CX, 168(DI) + XORQ CX, BP + MOVQ R13, DX + MOVQ R14, R8 + ANDQ R14, DX + ORQ R10, R8 + XORQ R12, DX + XORQ R13, R8 + MOVQ DX, 176(DI) + MOVQ R8, 184(DI) + + // Prepare round + MOVQ BP, BX + ROLQ $0x01, BX + MOVQ 16(DI), R12 + XORQ 56(DI), DX + XORQ R15, BX + XORQ 96(DI), R12 + XORQ 136(DI), DX + XORQ DX, R12 + MOVQ R12, CX + ROLQ $0x01, CX + MOVQ 24(DI), R13 + XORQ 64(DI), R8 + XORQ SI, CX + XORQ 104(DI), R13 + XORQ 144(DI), R8 + XORQ R8, R13 + MOVQ R13, DX + ROLQ $0x01, DX + MOVQ R15, R8 + XORQ BP, DX + ROLQ $0x01, R8 + MOVQ SI, R9 + XORQ R12, R8 + ROLQ $0x01, R9 + + // Result b + MOVQ (DI), R10 + MOVQ 48(DI), R11 + XORQ R13, R9 + MOVQ 96(DI), R12 + MOVQ 144(DI), R13 + MOVQ 192(DI), R14 + XORQ CX, R11 + ROLQ $0x2c, R11 + XORQ DX, R12 + XORQ BX, R10 + ROLQ $0x2b, R12 + MOVQ R11, SI + MOVQ $0x000000000000800a, AX + ORQ R12, SI + XORQ R10, AX + XORQ AX, SI + MOVQ SI, (SP) + XORQ R9, R14 + ROLQ $0x0e, R14 + MOVQ R10, R15 + ANDQ R11, R15 + XORQ R14, R15 + MOVQ R15, 32(SP) + XORQ R8, R13 + ROLQ $0x15, R13 + MOVQ R13, AX + ANDQ R14, AX + XORQ R12, AX + MOVQ AX, 16(SP) + NOTQ R12 + ORQ R10, R14 + ORQ R13, R12 + XORQ R13, R14 + XORQ R11, R12 + MOVQ R14, 24(SP) + MOVQ R12, 8(SP) + MOVQ R12, BP + + // Result g + MOVQ 72(DI), R11 + XORQ R9, R11 + MOVQ 80(DI), R12 + ROLQ $0x14, R11 + XORQ BX, R12 + ROLQ $0x03, R12 + MOVQ 24(DI), R10 + MOVQ R11, AX + ORQ R12, AX + XORQ R8, R10 + MOVQ 128(DI), R13 + MOVQ 176(DI), R14 + ROLQ $0x1c, R10 + XORQ R10, AX + MOVQ AX, 40(SP) + XORQ AX, SI + XORQ CX, R13 + ROLQ $0x2d, R13 + MOVQ R12, AX + ANDQ R13, AX + XORQ R11, AX + MOVQ AX, 48(SP) + XORQ AX, BP + XORQ DX, R14 + ROLQ $0x3d, R14 + MOVQ R14, AX + ORQ R10, AX + XORQ R13, AX + MOVQ AX, 64(SP) + ANDQ R11, R10 + XORQ R14, R10 + MOVQ R10, 72(SP) + NOTQ R14 + XORQ R10, R15 + ORQ R14, R13 + XORQ R12, R13 + MOVQ R13, 56(SP) + + // Result k + MOVQ 8(DI), R10 + MOVQ 56(DI), R11 + MOVQ 104(DI), R12 + MOVQ 152(DI), R13 + MOVQ 160(DI), R14 + XORQ DX, R11 + ROLQ $0x06, R11 + XORQ R8, R12 + ROLQ $0x19, R12 + MOVQ R11, AX + ORQ R12, AX + XORQ CX, R10 + ROLQ $0x01, R10 + XORQ R10, AX + MOVQ AX, 80(SP) + XORQ AX, SI + XORQ R9, R13 + ROLQ $0x08, R13 + MOVQ R12, AX + ANDQ R13, AX + XORQ R11, AX + MOVQ AX, 88(SP) + XORQ AX, BP + XORQ BX, R14 + ROLQ $0x12, R14 + NOTQ R13 + MOVQ R13, AX + ANDQ R14, AX + XORQ R12, AX + MOVQ AX, 96(SP) + MOVQ R14, AX + ORQ R10, AX + XORQ R13, AX + MOVQ AX, 104(SP) + ANDQ R11, R10 + XORQ R14, R10 + MOVQ R10, 112(SP) + XORQ R10, R15 + + // Result m + MOVQ 40(DI), R11 + XORQ BX, R11 + MOVQ 88(DI), R12 + ROLQ $0x24, R11 + XORQ CX, R12 + MOVQ 32(DI), R10 + ROLQ $0x0a, R12 + MOVQ R11, AX + MOVQ 136(DI), R13 + ANDQ R12, AX + XORQ R9, R10 + MOVQ 184(DI), R14 + ROLQ $0x1b, R10 + XORQ R10, AX + MOVQ AX, 120(SP) + XORQ AX, SI + XORQ DX, R13 + ROLQ $0x0f, R13 + MOVQ R12, AX + ORQ R13, AX + XORQ R11, AX + MOVQ AX, 128(SP) + XORQ AX, BP + XORQ R8, R14 + ROLQ $0x38, R14 + NOTQ R13 + MOVQ R13, AX + ORQ R14, AX + XORQ R12, AX + MOVQ AX, 136(SP) + ORQ R10, R11 + XORQ R14, R11 + MOVQ R11, 152(SP) + ANDQ R10, R14 + XORQ R13, R14 + MOVQ R14, 144(SP) + XORQ R11, R15 + + // Result s + MOVQ 16(DI), R10 + MOVQ 64(DI), R11 + MOVQ 112(DI), R12 + XORQ DX, R10 + MOVQ 120(DI), R13 + ROLQ $0x3e, R10 + XORQ R8, R11 + MOVQ 168(DI), R14 + ROLQ $0x37, R11 + XORQ R9, R12 + MOVQ R10, R9 + XORQ CX, R14 + ROLQ $0x02, R14 + ANDQ R11, R9 + XORQ R14, R9 + MOVQ R9, 192(SP) + ROLQ $0x27, R12 + XORQ R9, R15 + NOTQ R11 + XORQ BX, R13 + MOVQ R11, BX + ANDQ R12, BX + XORQ R10, BX + MOVQ BX, 160(SP) + XORQ BX, SI + ROLQ $0x29, R13 + MOVQ R12, CX + ORQ R13, CX + XORQ R11, CX + MOVQ CX, 168(SP) + XORQ CX, BP + MOVQ R13, DX + MOVQ R14, R8 + ANDQ R14, DX + ORQ R10, R8 + XORQ R12, DX + XORQ R13, R8 + MOVQ DX, 176(SP) + MOVQ R8, 184(SP) + + // Prepare round + MOVQ BP, BX + ROLQ $0x01, BX + MOVQ 16(SP), R12 + XORQ 56(SP), DX + XORQ R15, BX + XORQ 96(SP), R12 + XORQ 136(SP), DX + XORQ DX, R12 + MOVQ R12, CX + ROLQ $0x01, CX + MOVQ 24(SP), R13 + XORQ 64(SP), R8 + XORQ SI, CX + XORQ 104(SP), R13 + XORQ 144(SP), R8 + XORQ R8, R13 + MOVQ R13, DX + ROLQ $0x01, DX + MOVQ R15, R8 + XORQ BP, DX + ROLQ $0x01, R8 + MOVQ SI, R9 + XORQ R12, R8 + ROLQ $0x01, R9 + + // Result b + MOVQ (SP), R10 + MOVQ 48(SP), R11 + XORQ R13, R9 + MOVQ 96(SP), R12 + MOVQ 144(SP), R13 + MOVQ 192(SP), R14 + XORQ CX, R11 + ROLQ $0x2c, R11 + XORQ DX, R12 + XORQ BX, R10 + ROLQ $0x2b, R12 + MOVQ R11, SI + MOVQ $0x800000008000000a, AX + ORQ R12, SI + XORQ R10, AX + XORQ AX, SI + MOVQ SI, (DI) + XORQ R9, R14 + ROLQ $0x0e, R14 + MOVQ R10, R15 + ANDQ R11, R15 + XORQ R14, R15 + MOVQ R15, 32(DI) + XORQ R8, R13 + ROLQ $0x15, R13 + MOVQ R13, AX + ANDQ R14, AX + XORQ R12, AX + MOVQ AX, 16(DI) + NOTQ R12 + ORQ R10, R14 + ORQ R13, R12 + XORQ R13, R14 + XORQ R11, R12 + MOVQ R14, 24(DI) + MOVQ R12, 8(DI) + MOVQ R12, BP + + // Result g + MOVQ 72(SP), R11 + XORQ R9, R11 + MOVQ 80(SP), R12 + ROLQ $0x14, R11 + XORQ BX, R12 + ROLQ $0x03, R12 + MOVQ 24(SP), R10 + MOVQ R11, AX + ORQ R12, AX + XORQ R8, R10 + MOVQ 128(SP), R13 + MOVQ 176(SP), R14 + ROLQ $0x1c, R10 + XORQ R10, AX + MOVQ AX, 40(DI) + XORQ AX, SI + XORQ CX, R13 + ROLQ $0x2d, R13 + MOVQ R12, AX + ANDQ R13, AX + XORQ R11, AX + MOVQ AX, 48(DI) + XORQ AX, BP + XORQ DX, R14 + ROLQ $0x3d, R14 + MOVQ R14, AX + ORQ R10, AX + XORQ R13, AX + MOVQ AX, 64(DI) + ANDQ R11, R10 + XORQ R14, R10 + MOVQ R10, 72(DI) + NOTQ R14 + XORQ R10, R15 + ORQ R14, R13 + XORQ R12, R13 + MOVQ R13, 56(DI) + + // Result k + MOVQ 8(SP), R10 + MOVQ 56(SP), R11 + MOVQ 104(SP), R12 + MOVQ 152(SP), R13 + MOVQ 160(SP), R14 + XORQ DX, R11 + ROLQ $0x06, R11 + XORQ R8, R12 + ROLQ $0x19, R12 + MOVQ R11, AX + ORQ R12, AX + XORQ CX, R10 + ROLQ $0x01, R10 + XORQ R10, AX + MOVQ AX, 80(DI) + XORQ AX, SI + XORQ R9, R13 + ROLQ $0x08, R13 + MOVQ R12, AX + ANDQ R13, AX + XORQ R11, AX + MOVQ AX, 88(DI) + XORQ AX, BP + XORQ BX, R14 + ROLQ $0x12, R14 + NOTQ R13 + MOVQ R13, AX + ANDQ R14, AX + XORQ R12, AX + MOVQ AX, 96(DI) + MOVQ R14, AX + ORQ R10, AX + XORQ R13, AX + MOVQ AX, 104(DI) + ANDQ R11, R10 + XORQ R14, R10 + MOVQ R10, 112(DI) + XORQ R10, R15 + + // Result m + MOVQ 40(SP), R11 + XORQ BX, R11 + MOVQ 88(SP), R12 + ROLQ $0x24, R11 + XORQ CX, R12 + MOVQ 32(SP), R10 + ROLQ $0x0a, R12 + MOVQ R11, AX + MOVQ 136(SP), R13 + ANDQ R12, AX + XORQ R9, R10 + MOVQ 184(SP), R14 + ROLQ $0x1b, R10 + XORQ R10, AX + MOVQ AX, 120(DI) + XORQ AX, SI + XORQ DX, R13 + ROLQ $0x0f, R13 + MOVQ R12, AX + ORQ R13, AX + XORQ R11, AX + MOVQ AX, 128(DI) + XORQ AX, BP + XORQ R8, R14 + ROLQ $0x38, R14 + NOTQ R13 + MOVQ R13, AX + ORQ R14, AX + XORQ R12, AX + MOVQ AX, 136(DI) + ORQ R10, R11 + XORQ R14, R11 + MOVQ R11, 152(DI) + ANDQ R10, R14 + XORQ R13, R14 + MOVQ R14, 144(DI) + XORQ R11, R15 + + // Result s + MOVQ 16(SP), R10 + MOVQ 64(SP), R11 + MOVQ 112(SP), R12 + XORQ DX, R10 + MOVQ 120(SP), R13 + ROLQ $0x3e, R10 + XORQ R8, R11 + MOVQ 168(SP), R14 + ROLQ $0x37, R11 + XORQ R9, R12 + MOVQ R10, R9 + XORQ CX, R14 + ROLQ $0x02, R14 + ANDQ R11, R9 + XORQ R14, R9 + MOVQ R9, 192(DI) + ROLQ $0x27, R12 + XORQ R9, R15 + NOTQ R11 + XORQ BX, R13 + MOVQ R11, BX + ANDQ R12, BX + XORQ R10, BX + MOVQ BX, 160(DI) + XORQ BX, SI + ROLQ $0x29, R13 + MOVQ R12, CX + ORQ R13, CX + XORQ R11, CX + MOVQ CX, 168(DI) + XORQ CX, BP + MOVQ R13, DX + MOVQ R14, R8 + ANDQ R14, DX + ORQ R10, R8 + XORQ R12, DX + XORQ R13, R8 + MOVQ DX, 176(DI) + MOVQ R8, 184(DI) + + // Prepare round + MOVQ BP, BX + ROLQ $0x01, BX + MOVQ 16(DI), R12 + XORQ 56(DI), DX + XORQ R15, BX + XORQ 96(DI), R12 + XORQ 136(DI), DX + XORQ DX, R12 + MOVQ R12, CX + ROLQ $0x01, CX + MOVQ 24(DI), R13 + XORQ 64(DI), R8 + XORQ SI, CX + XORQ 104(DI), R13 + XORQ 144(DI), R8 + XORQ R8, R13 + MOVQ R13, DX + ROLQ $0x01, DX + MOVQ R15, R8 + XORQ BP, DX + ROLQ $0x01, R8 + MOVQ SI, R9 + XORQ R12, R8 + ROLQ $0x01, R9 + + // Result b + MOVQ (DI), R10 + MOVQ 48(DI), R11 + XORQ R13, R9 + MOVQ 96(DI), R12 + MOVQ 144(DI), R13 + MOVQ 192(DI), R14 + XORQ CX, R11 + ROLQ $0x2c, R11 + XORQ DX, R12 + XORQ BX, R10 + ROLQ $0x2b, R12 + MOVQ R11, SI + MOVQ $0x8000000080008081, AX + ORQ R12, SI + XORQ R10, AX + XORQ AX, SI + MOVQ SI, (SP) + XORQ R9, R14 + ROLQ $0x0e, R14 + MOVQ R10, R15 + ANDQ R11, R15 + XORQ R14, R15 + MOVQ R15, 32(SP) + XORQ R8, R13 + ROLQ $0x15, R13 + MOVQ R13, AX + ANDQ R14, AX + XORQ R12, AX + MOVQ AX, 16(SP) + NOTQ R12 + ORQ R10, R14 + ORQ R13, R12 + XORQ R13, R14 + XORQ R11, R12 + MOVQ R14, 24(SP) + MOVQ R12, 8(SP) + MOVQ R12, BP + + // Result g + MOVQ 72(DI), R11 + XORQ R9, R11 + MOVQ 80(DI), R12 + ROLQ $0x14, R11 + XORQ BX, R12 + ROLQ $0x03, R12 + MOVQ 24(DI), R10 + MOVQ R11, AX + ORQ R12, AX + XORQ R8, R10 + MOVQ 128(DI), R13 + MOVQ 176(DI), R14 + ROLQ $0x1c, R10 + XORQ R10, AX + MOVQ AX, 40(SP) + XORQ AX, SI + XORQ CX, R13 + ROLQ $0x2d, R13 + MOVQ R12, AX + ANDQ R13, AX + XORQ R11, AX + MOVQ AX, 48(SP) + XORQ AX, BP + XORQ DX, R14 + ROLQ $0x3d, R14 + MOVQ R14, AX + ORQ R10, AX + XORQ R13, AX + MOVQ AX, 64(SP) + ANDQ R11, R10 + XORQ R14, R10 + MOVQ R10, 72(SP) + NOTQ R14 + XORQ R10, R15 + ORQ R14, R13 + XORQ R12, R13 + MOVQ R13, 56(SP) + + // Result k + MOVQ 8(DI), R10 + MOVQ 56(DI), R11 + MOVQ 104(DI), R12 + MOVQ 152(DI), R13 + MOVQ 160(DI), R14 + XORQ DX, R11 + ROLQ $0x06, R11 + XORQ R8, R12 + ROLQ $0x19, R12 + MOVQ R11, AX + ORQ R12, AX + XORQ CX, R10 + ROLQ $0x01, R10 + XORQ R10, AX + MOVQ AX, 80(SP) + XORQ AX, SI + XORQ R9, R13 + ROLQ $0x08, R13 + MOVQ R12, AX + ANDQ R13, AX + XORQ R11, AX + MOVQ AX, 88(SP) + XORQ AX, BP + XORQ BX, R14 + ROLQ $0x12, R14 + NOTQ R13 + MOVQ R13, AX + ANDQ R14, AX + XORQ R12, AX + MOVQ AX, 96(SP) + MOVQ R14, AX + ORQ R10, AX + XORQ R13, AX + MOVQ AX, 104(SP) + ANDQ R11, R10 + XORQ R14, R10 + MOVQ R10, 112(SP) + XORQ R10, R15 + + // Result m + MOVQ 40(DI), R11 + XORQ BX, R11 + MOVQ 88(DI), R12 + ROLQ $0x24, R11 + XORQ CX, R12 + MOVQ 32(DI), R10 + ROLQ $0x0a, R12 + MOVQ R11, AX + MOVQ 136(DI), R13 + ANDQ R12, AX + XORQ R9, R10 + MOVQ 184(DI), R14 + ROLQ $0x1b, R10 + XORQ R10, AX + MOVQ AX, 120(SP) + XORQ AX, SI + XORQ DX, R13 + ROLQ $0x0f, R13 + MOVQ R12, AX + ORQ R13, AX + XORQ R11, AX + MOVQ AX, 128(SP) + XORQ AX, BP + XORQ R8, R14 + ROLQ $0x38, R14 + NOTQ R13 + MOVQ R13, AX + ORQ R14, AX + XORQ R12, AX + MOVQ AX, 136(SP) + ORQ R10, R11 + XORQ R14, R11 + MOVQ R11, 152(SP) + ANDQ R10, R14 + XORQ R13, R14 + MOVQ R14, 144(SP) + XORQ R11, R15 + + // Result s + MOVQ 16(DI), R10 + MOVQ 64(DI), R11 + MOVQ 112(DI), R12 + XORQ DX, R10 + MOVQ 120(DI), R13 + ROLQ $0x3e, R10 + XORQ R8, R11 + MOVQ 168(DI), R14 + ROLQ $0x37, R11 + XORQ R9, R12 + MOVQ R10, R9 + XORQ CX, R14 + ROLQ $0x02, R14 + ANDQ R11, R9 + XORQ R14, R9 + MOVQ R9, 192(SP) + ROLQ $0x27, R12 + XORQ R9, R15 + NOTQ R11 + XORQ BX, R13 + MOVQ R11, BX + ANDQ R12, BX + XORQ R10, BX + MOVQ BX, 160(SP) + XORQ BX, SI + ROLQ $0x29, R13 + MOVQ R12, CX + ORQ R13, CX + XORQ R11, CX + MOVQ CX, 168(SP) + XORQ CX, BP + MOVQ R13, DX + MOVQ R14, R8 + ANDQ R14, DX + ORQ R10, R8 + XORQ R12, DX + XORQ R13, R8 + MOVQ DX, 176(SP) + MOVQ R8, 184(SP) + + // Prepare round + MOVQ BP, BX + ROLQ $0x01, BX + MOVQ 16(SP), R12 + XORQ 56(SP), DX + XORQ R15, BX + XORQ 96(SP), R12 + XORQ 136(SP), DX + XORQ DX, R12 + MOVQ R12, CX + ROLQ $0x01, CX + MOVQ 24(SP), R13 + XORQ 64(SP), R8 + XORQ SI, CX + XORQ 104(SP), R13 + XORQ 144(SP), R8 + XORQ R8, R13 + MOVQ R13, DX + ROLQ $0x01, DX + MOVQ R15, R8 + XORQ BP, DX + ROLQ $0x01, R8 + MOVQ SI, R9 + XORQ R12, R8 + ROLQ $0x01, R9 + + // Result b + MOVQ (SP), R10 + MOVQ 48(SP), R11 + XORQ R13, R9 + MOVQ 96(SP), R12 + MOVQ 144(SP), R13 + MOVQ 192(SP), R14 + XORQ CX, R11 + ROLQ $0x2c, R11 + XORQ DX, R12 + XORQ BX, R10 + ROLQ $0x2b, R12 + MOVQ R11, SI + MOVQ $0x8000000000008080, AX + ORQ R12, SI + XORQ R10, AX + XORQ AX, SI + MOVQ SI, (DI) + XORQ R9, R14 + ROLQ $0x0e, R14 + MOVQ R10, R15 + ANDQ R11, R15 + XORQ R14, R15 + MOVQ R15, 32(DI) + XORQ R8, R13 + ROLQ $0x15, R13 + MOVQ R13, AX + ANDQ R14, AX + XORQ R12, AX + MOVQ AX, 16(DI) + NOTQ R12 + ORQ R10, R14 + ORQ R13, R12 + XORQ R13, R14 + XORQ R11, R12 + MOVQ R14, 24(DI) + MOVQ R12, 8(DI) + MOVQ R12, BP + + // Result g + MOVQ 72(SP), R11 + XORQ R9, R11 + MOVQ 80(SP), R12 + ROLQ $0x14, R11 + XORQ BX, R12 + ROLQ $0x03, R12 + MOVQ 24(SP), R10 + MOVQ R11, AX + ORQ R12, AX + XORQ R8, R10 + MOVQ 128(SP), R13 + MOVQ 176(SP), R14 + ROLQ $0x1c, R10 + XORQ R10, AX + MOVQ AX, 40(DI) + XORQ AX, SI + XORQ CX, R13 + ROLQ $0x2d, R13 + MOVQ R12, AX + ANDQ R13, AX + XORQ R11, AX + MOVQ AX, 48(DI) + XORQ AX, BP + XORQ DX, R14 + ROLQ $0x3d, R14 + MOVQ R14, AX + ORQ R10, AX + XORQ R13, AX + MOVQ AX, 64(DI) + ANDQ R11, R10 + XORQ R14, R10 + MOVQ R10, 72(DI) + NOTQ R14 + XORQ R10, R15 + ORQ R14, R13 + XORQ R12, R13 + MOVQ R13, 56(DI) + + // Result k + MOVQ 8(SP), R10 + MOVQ 56(SP), R11 + MOVQ 104(SP), R12 + MOVQ 152(SP), R13 + MOVQ 160(SP), R14 + XORQ DX, R11 + ROLQ $0x06, R11 + XORQ R8, R12 + ROLQ $0x19, R12 + MOVQ R11, AX + ORQ R12, AX + XORQ CX, R10 + ROLQ $0x01, R10 + XORQ R10, AX + MOVQ AX, 80(DI) + XORQ AX, SI + XORQ R9, R13 + ROLQ $0x08, R13 + MOVQ R12, AX + ANDQ R13, AX + XORQ R11, AX + MOVQ AX, 88(DI) + XORQ AX, BP + XORQ BX, R14 + ROLQ $0x12, R14 + NOTQ R13 + MOVQ R13, AX + ANDQ R14, AX + XORQ R12, AX + MOVQ AX, 96(DI) + MOVQ R14, AX + ORQ R10, AX + XORQ R13, AX + MOVQ AX, 104(DI) + ANDQ R11, R10 + XORQ R14, R10 + MOVQ R10, 112(DI) + XORQ R10, R15 + + // Result m + MOVQ 40(SP), R11 + XORQ BX, R11 + MOVQ 88(SP), R12 + ROLQ $0x24, R11 + XORQ CX, R12 + MOVQ 32(SP), R10 + ROLQ $0x0a, R12 + MOVQ R11, AX + MOVQ 136(SP), R13 + ANDQ R12, AX + XORQ R9, R10 + MOVQ 184(SP), R14 + ROLQ $0x1b, R10 + XORQ R10, AX + MOVQ AX, 120(DI) + XORQ AX, SI + XORQ DX, R13 + ROLQ $0x0f, R13 + MOVQ R12, AX + ORQ R13, AX + XORQ R11, AX + MOVQ AX, 128(DI) + XORQ AX, BP + XORQ R8, R14 + ROLQ $0x38, R14 + NOTQ R13 + MOVQ R13, AX + ORQ R14, AX + XORQ R12, AX + MOVQ AX, 136(DI) + ORQ R10, R11 + XORQ R14, R11 + MOVQ R11, 152(DI) + ANDQ R10, R14 + XORQ R13, R14 + MOVQ R14, 144(DI) + XORQ R11, R15 + + // Result s + MOVQ 16(SP), R10 + MOVQ 64(SP), R11 + MOVQ 112(SP), R12 + XORQ DX, R10 + MOVQ 120(SP), R13 + ROLQ $0x3e, R10 + XORQ R8, R11 + MOVQ 168(SP), R14 + ROLQ $0x37, R11 + XORQ R9, R12 + MOVQ R10, R9 + XORQ CX, R14 + ROLQ $0x02, R14 + ANDQ R11, R9 + XORQ R14, R9 + MOVQ R9, 192(DI) + ROLQ $0x27, R12 + XORQ R9, R15 + NOTQ R11 + XORQ BX, R13 + MOVQ R11, BX + ANDQ R12, BX + XORQ R10, BX + MOVQ BX, 160(DI) + XORQ BX, SI + ROLQ $0x29, R13 + MOVQ R12, CX + ORQ R13, CX + XORQ R11, CX + MOVQ CX, 168(DI) + XORQ CX, BP + MOVQ R13, DX + MOVQ R14, R8 + ANDQ R14, DX + ORQ R10, R8 + XORQ R12, DX + XORQ R13, R8 + MOVQ DX, 176(DI) + MOVQ R8, 184(DI) + + // Prepare round + MOVQ BP, BX + ROLQ $0x01, BX + MOVQ 16(DI), R12 + XORQ 56(DI), DX + XORQ R15, BX + XORQ 96(DI), R12 + XORQ 136(DI), DX + XORQ DX, R12 + MOVQ R12, CX + ROLQ $0x01, CX + MOVQ 24(DI), R13 + XORQ 64(DI), R8 + XORQ SI, CX + XORQ 104(DI), R13 + XORQ 144(DI), R8 + XORQ R8, R13 + MOVQ R13, DX + ROLQ $0x01, DX + MOVQ R15, R8 + XORQ BP, DX + ROLQ $0x01, R8 + MOVQ SI, R9 + XORQ R12, R8 + ROLQ $0x01, R9 + + // Result b + MOVQ (DI), R10 + MOVQ 48(DI), R11 + XORQ R13, R9 + MOVQ 96(DI), R12 + MOVQ 144(DI), R13 + MOVQ 192(DI), R14 + XORQ CX, R11 + ROLQ $0x2c, R11 + XORQ DX, R12 + XORQ BX, R10 + ROLQ $0x2b, R12 + MOVQ R11, SI + MOVQ $0x0000000080000001, AX + ORQ R12, SI + XORQ R10, AX + XORQ AX, SI + MOVQ SI, (SP) + XORQ R9, R14 + ROLQ $0x0e, R14 + MOVQ R10, R15 + ANDQ R11, R15 + XORQ R14, R15 + MOVQ R15, 32(SP) + XORQ R8, R13 + ROLQ $0x15, R13 + MOVQ R13, AX + ANDQ R14, AX + XORQ R12, AX + MOVQ AX, 16(SP) + NOTQ R12 + ORQ R10, R14 + ORQ R13, R12 + XORQ R13, R14 + XORQ R11, R12 + MOVQ R14, 24(SP) + MOVQ R12, 8(SP) + MOVQ R12, BP + + // Result g + MOVQ 72(DI), R11 + XORQ R9, R11 + MOVQ 80(DI), R12 + ROLQ $0x14, R11 + XORQ BX, R12 + ROLQ $0x03, R12 + MOVQ 24(DI), R10 + MOVQ R11, AX + ORQ R12, AX + XORQ R8, R10 + MOVQ 128(DI), R13 + MOVQ 176(DI), R14 + ROLQ $0x1c, R10 + XORQ R10, AX + MOVQ AX, 40(SP) + XORQ AX, SI + XORQ CX, R13 + ROLQ $0x2d, R13 + MOVQ R12, AX + ANDQ R13, AX + XORQ R11, AX + MOVQ AX, 48(SP) + XORQ AX, BP + XORQ DX, R14 + ROLQ $0x3d, R14 + MOVQ R14, AX + ORQ R10, AX + XORQ R13, AX + MOVQ AX, 64(SP) + ANDQ R11, R10 + XORQ R14, R10 + MOVQ R10, 72(SP) + NOTQ R14 + XORQ R10, R15 + ORQ R14, R13 + XORQ R12, R13 + MOVQ R13, 56(SP) + + // Result k + MOVQ 8(DI), R10 + MOVQ 56(DI), R11 + MOVQ 104(DI), R12 + MOVQ 152(DI), R13 + MOVQ 160(DI), R14 + XORQ DX, R11 + ROLQ $0x06, R11 + XORQ R8, R12 + ROLQ $0x19, R12 + MOVQ R11, AX + ORQ R12, AX + XORQ CX, R10 + ROLQ $0x01, R10 + XORQ R10, AX + MOVQ AX, 80(SP) + XORQ AX, SI + XORQ R9, R13 + ROLQ $0x08, R13 + MOVQ R12, AX + ANDQ R13, AX + XORQ R11, AX + MOVQ AX, 88(SP) + XORQ AX, BP + XORQ BX, R14 + ROLQ $0x12, R14 + NOTQ R13 + MOVQ R13, AX + ANDQ R14, AX + XORQ R12, AX + MOVQ AX, 96(SP) + MOVQ R14, AX + ORQ R10, AX + XORQ R13, AX + MOVQ AX, 104(SP) + ANDQ R11, R10 + XORQ R14, R10 + MOVQ R10, 112(SP) + XORQ R10, R15 + + // Result m + MOVQ 40(DI), R11 + XORQ BX, R11 + MOVQ 88(DI), R12 + ROLQ $0x24, R11 + XORQ CX, R12 + MOVQ 32(DI), R10 + ROLQ $0x0a, R12 + MOVQ R11, AX + MOVQ 136(DI), R13 + ANDQ R12, AX + XORQ R9, R10 + MOVQ 184(DI), R14 + ROLQ $0x1b, R10 + XORQ R10, AX + MOVQ AX, 120(SP) + XORQ AX, SI + XORQ DX, R13 + ROLQ $0x0f, R13 + MOVQ R12, AX + ORQ R13, AX + XORQ R11, AX + MOVQ AX, 128(SP) + XORQ AX, BP + XORQ R8, R14 + ROLQ $0x38, R14 + NOTQ R13 + MOVQ R13, AX + ORQ R14, AX + XORQ R12, AX + MOVQ AX, 136(SP) + ORQ R10, R11 + XORQ R14, R11 + MOVQ R11, 152(SP) + ANDQ R10, R14 + XORQ R13, R14 + MOVQ R14, 144(SP) + XORQ R11, R15 + + // Result s + MOVQ 16(DI), R10 + MOVQ 64(DI), R11 + MOVQ 112(DI), R12 + XORQ DX, R10 + MOVQ 120(DI), R13 + ROLQ $0x3e, R10 + XORQ R8, R11 + MOVQ 168(DI), R14 + ROLQ $0x37, R11 + XORQ R9, R12 + MOVQ R10, R9 + XORQ CX, R14 + ROLQ $0x02, R14 + ANDQ R11, R9 + XORQ R14, R9 + MOVQ R9, 192(SP) + ROLQ $0x27, R12 + XORQ R9, R15 + NOTQ R11 + XORQ BX, R13 + MOVQ R11, BX + ANDQ R12, BX + XORQ R10, BX + MOVQ BX, 160(SP) + XORQ BX, SI + ROLQ $0x29, R13 + MOVQ R12, CX + ORQ R13, CX + XORQ R11, CX + MOVQ CX, 168(SP) + XORQ CX, BP + MOVQ R13, DX + MOVQ R14, R8 + ANDQ R14, DX + ORQ R10, R8 + XORQ R12, DX + XORQ R13, R8 + MOVQ DX, 176(SP) + MOVQ R8, 184(SP) + + // Prepare round + MOVQ BP, BX + ROLQ $0x01, BX + MOVQ 16(SP), R12 + XORQ 56(SP), DX + XORQ R15, BX + XORQ 96(SP), R12 + XORQ 136(SP), DX + XORQ DX, R12 + MOVQ R12, CX + ROLQ $0x01, CX + MOVQ 24(SP), R13 + XORQ 64(SP), R8 + XORQ SI, CX + XORQ 104(SP), R13 + XORQ 144(SP), R8 + XORQ R8, R13 + MOVQ R13, DX + ROLQ $0x01, DX + MOVQ R15, R8 + XORQ BP, DX + ROLQ $0x01, R8 + MOVQ SI, R9 + XORQ R12, R8 + ROLQ $0x01, R9 + + // Result b + MOVQ (SP), R10 + MOVQ 48(SP), R11 + XORQ R13, R9 + MOVQ 96(SP), R12 + MOVQ 144(SP), R13 + MOVQ 192(SP), R14 + XORQ CX, R11 + ROLQ $0x2c, R11 + XORQ DX, R12 + XORQ BX, R10 + ROLQ $0x2b, R12 + MOVQ R11, SI + MOVQ $0x8000000080008008, AX + ORQ R12, SI + XORQ R10, AX + XORQ AX, SI + MOVQ SI, (DI) + XORQ R9, R14 + ROLQ $0x0e, R14 + MOVQ R10, R15 + ANDQ R11, R15 + XORQ R14, R15 + MOVQ R15, 32(DI) + XORQ R8, R13 + ROLQ $0x15, R13 + MOVQ R13, AX + ANDQ R14, AX + XORQ R12, AX + MOVQ AX, 16(DI) + NOTQ R12 + ORQ R10, R14 + ORQ R13, R12 + XORQ R13, R14 + XORQ R11, R12 + MOVQ R14, 24(DI) + MOVQ R12, 8(DI) + NOP + + // Result g + MOVQ 72(SP), R11 + XORQ R9, R11 + MOVQ 80(SP), R12 + ROLQ $0x14, R11 + XORQ BX, R12 + ROLQ $0x03, R12 + MOVQ 24(SP), R10 + MOVQ R11, AX + ORQ R12, AX + XORQ R8, R10 + MOVQ 128(SP), R13 + MOVQ 176(SP), R14 + ROLQ $0x1c, R10 + XORQ R10, AX + MOVQ AX, 40(DI) + NOP + XORQ CX, R13 + ROLQ $0x2d, R13 + MOVQ R12, AX + ANDQ R13, AX + XORQ R11, AX + MOVQ AX, 48(DI) + NOP + XORQ DX, R14 + ROLQ $0x3d, R14 + MOVQ R14, AX + ORQ R10, AX + XORQ R13, AX + MOVQ AX, 64(DI) + ANDQ R11, R10 + XORQ R14, R10 + MOVQ R10, 72(DI) + NOTQ R14 + NOP + ORQ R14, R13 + XORQ R12, R13 + MOVQ R13, 56(DI) + + // Result k + MOVQ 8(SP), R10 + MOVQ 56(SP), R11 + MOVQ 104(SP), R12 + MOVQ 152(SP), R13 + MOVQ 160(SP), R14 + XORQ DX, R11 + ROLQ $0x06, R11 + XORQ R8, R12 + ROLQ $0x19, R12 + MOVQ R11, AX + ORQ R12, AX + XORQ CX, R10 + ROLQ $0x01, R10 + XORQ R10, AX + MOVQ AX, 80(DI) + NOP + XORQ R9, R13 + ROLQ $0x08, R13 + MOVQ R12, AX + ANDQ R13, AX + XORQ R11, AX + MOVQ AX, 88(DI) + NOP + XORQ BX, R14 + ROLQ $0x12, R14 + NOTQ R13 + MOVQ R13, AX + ANDQ R14, AX + XORQ R12, AX + MOVQ AX, 96(DI) + MOVQ R14, AX + ORQ R10, AX + XORQ R13, AX + MOVQ AX, 104(DI) + ANDQ R11, R10 + XORQ R14, R10 + MOVQ R10, 112(DI) + NOP + + // Result m + MOVQ 40(SP), R11 + XORQ BX, R11 + MOVQ 88(SP), R12 + ROLQ $0x24, R11 + XORQ CX, R12 + MOVQ 32(SP), R10 + ROLQ $0x0a, R12 + MOVQ R11, AX + MOVQ 136(SP), R13 + ANDQ R12, AX + XORQ R9, R10 + MOVQ 184(SP), R14 + ROLQ $0x1b, R10 + XORQ R10, AX + MOVQ AX, 120(DI) + NOP + XORQ DX, R13 + ROLQ $0x0f, R13 + MOVQ R12, AX + ORQ R13, AX + XORQ R11, AX + MOVQ AX, 128(DI) + NOP + XORQ R8, R14 + ROLQ $0x38, R14 + NOTQ R13 + MOVQ R13, AX + ORQ R14, AX + XORQ R12, AX + MOVQ AX, 136(DI) + ORQ R10, R11 + XORQ R14, R11 + MOVQ R11, 152(DI) + ANDQ R10, R14 + XORQ R13, R14 + MOVQ R14, 144(DI) + NOP + + // Result s + MOVQ 16(SP), R10 + MOVQ 64(SP), R11 + MOVQ 112(SP), R12 + XORQ DX, R10 + MOVQ 120(SP), R13 + ROLQ $0x3e, R10 + XORQ R8, R11 + MOVQ 168(SP), R14 + ROLQ $0x37, R11 + XORQ R9, R12 + MOVQ R10, R9 + XORQ CX, R14 + ROLQ $0x02, R14 + ANDQ R11, R9 + XORQ R14, R9 + MOVQ R9, 192(DI) + ROLQ $0x27, R12 + NOP + NOTQ R11 + XORQ BX, R13 + MOVQ R11, BX + ANDQ R12, BX + XORQ R10, BX + MOVQ BX, 160(DI) + NOP + ROLQ $0x29, R13 + MOVQ R12, CX + ORQ R13, CX + XORQ R11, CX + MOVQ CX, 168(DI) + NOP + MOVQ R13, DX + MOVQ R14, R8 + ANDQ R14, DX + ORQ R10, R8 + XORQ R12, DX + XORQ R13, R8 + MOVQ DX, 176(DI) + MOVQ R8, 184(DI) + + // Revert the internal state to the user state + NOTQ 8(DI) + NOTQ 16(DI) + NOTQ 64(DI) + NOTQ 96(DI) + NOTQ 136(DI) + NOTQ 160(DI) RET diff --git a/vendor/golang.org/x/crypto/sha3/register.go b/vendor/golang.org/x/crypto/sha3/register.go deleted file mode 100644 index addfd5049bb..00000000000 --- a/vendor/golang.org/x/crypto/sha3/register.go +++ /dev/null @@ -1,18 +0,0 @@ -// Copyright 2014 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -//go:build go1.4 - -package sha3 - -import ( - "crypto" -) - -func init() { - crypto.RegisterHash(crypto.SHA3_224, New224) - crypto.RegisterHash(crypto.SHA3_256, New256) - crypto.RegisterHash(crypto.SHA3_384, New384) - crypto.RegisterHash(crypto.SHA3_512, New512) -} diff --git a/vendor/golang.org/x/crypto/sha3/sha3.go b/vendor/golang.org/x/crypto/sha3/sha3.go index afedde5abf1..6658c44479b 100644 --- a/vendor/golang.org/x/crypto/sha3/sha3.go +++ b/vendor/golang.org/x/crypto/sha3/sha3.go @@ -4,6 +4,15 @@ package sha3 +import ( + "crypto/subtle" + "encoding/binary" + "errors" + "unsafe" + + "golang.org/x/sys/cpu" +) + // spongeDirection indicates the direction bytes are flowing through the sponge. type spongeDirection int @@ -14,16 +23,13 @@ const ( spongeSqueezing ) -const ( - // maxRate is the maximum size of the internal buffer. SHAKE-256 - // currently needs the largest buffer. - maxRate = 168 -) - type state struct { - // Generic sponge components. - a [25]uint64 // main state of the hash - rate int // the number of bytes of state to use + a [1600 / 8]byte // main state of the hash + + // a[n:rate] is the buffer. If absorbing, it's the remaining space to XOR + // into before running the permutation. If squeezing, it's the remaining + // output to produce before running the permutation. + n, rate int // dsbyte contains the "domain separation" bits and the first bit of // the padding. Sections 6.1 and 6.2 of [1] separate the outputs of the @@ -39,10 +45,6 @@ type state struct { // Extendable-Output Functions (May 2014)" dsbyte byte - i, n int // storage[i:n] is the buffer, i is only used while squeezing - storage [maxRate]byte - - // Specific to SHA-3 and SHAKE. outputLen int // the default output size in bytes state spongeDirection // whether the sponge is absorbing or squeezing } @@ -61,7 +63,7 @@ func (d *state) Reset() { d.a[i] = 0 } d.state = spongeAbsorbing - d.i, d.n = 0, 0 + d.n = 0 } func (d *state) clone() *state { @@ -69,22 +71,25 @@ func (d *state) clone() *state { return &ret } -// permute applies the KeccakF-1600 permutation. It handles -// any input-output buffering. +// permute applies the KeccakF-1600 permutation. func (d *state) permute() { - switch d.state { - case spongeAbsorbing: - // If we're absorbing, we need to xor the input into the state - // before applying the permutation. - xorIn(d, d.storage[:d.rate]) - d.n = 0 - keccakF1600(&d.a) - case spongeSqueezing: - // If we're squeezing, we need to apply the permutation before - // copying more output. - keccakF1600(&d.a) - d.i = 0 - copyOut(d, d.storage[:d.rate]) + var a *[25]uint64 + if cpu.IsBigEndian { + a = new([25]uint64) + for i := range a { + a[i] = binary.LittleEndian.Uint64(d.a[i*8:]) + } + } else { + a = (*[25]uint64)(unsafe.Pointer(&d.a)) + } + + keccakF1600(a) + d.n = 0 + + if cpu.IsBigEndian { + for i := range a { + binary.LittleEndian.PutUint64(d.a[i*8:], a[i]) + } } } @@ -92,53 +97,36 @@ func (d *state) permute() { // the multi-bitrate 10..1 padding rule, and permutes the state. func (d *state) padAndPermute() { // Pad with this instance's domain-separator bits. We know that there's - // at least one byte of space in d.buf because, if it were full, + // at least one byte of space in the sponge because, if it were full, // permute would have been called to empty it. dsbyte also contains the // first one bit for the padding. See the comment in the state struct. - d.storage[d.n] = d.dsbyte - d.n++ - for d.n < d.rate { - d.storage[d.n] = 0 - d.n++ - } + d.a[d.n] ^= d.dsbyte // This adds the final one bit for the padding. Because of the way that // bits are numbered from the LSB upwards, the final bit is the MSB of // the last byte. - d.storage[d.rate-1] ^= 0x80 + d.a[d.rate-1] ^= 0x80 // Apply the permutation d.permute() d.state = spongeSqueezing - d.n = d.rate - copyOut(d, d.storage[:d.rate]) } // Write absorbs more data into the hash's state. It panics if any // output has already been read. -func (d *state) Write(p []byte) (written int, err error) { +func (d *state) Write(p []byte) (n int, err error) { if d.state != spongeAbsorbing { panic("sha3: Write after Read") } - written = len(p) + + n = len(p) for len(p) > 0 { - if d.n == 0 && len(p) >= d.rate { - // The fast path; absorb a full "rate" bytes of input and apply the permutation. - xorIn(d, p[:d.rate]) - p = p[d.rate:] - keccakF1600(&d.a) - } else { - // The slow path; buffer the input until we can fill the sponge, and then xor it in. - todo := d.rate - d.n - if todo > len(p) { - todo = len(p) - } - d.n += copy(d.storage[d.n:], p[:todo]) - p = p[todo:] - - // If the sponge is full, apply the permutation. - if d.n == d.rate { - d.permute() - } + x := subtle.XORBytes(d.a[d.n:d.rate], d.a[d.n:d.rate], p) + d.n += x + p = p[x:] + + // If the sponge is full, apply the permutation. + if d.n == d.rate { + d.permute() } } @@ -156,14 +144,14 @@ func (d *state) Read(out []byte) (n int, err error) { // Now, do the squeezing. for len(out) > 0 { - n := copy(out, d.storage[d.i:d.n]) - d.i += n - out = out[n:] - // Apply the permutation if we've squeezed the sponge dry. - if d.i == d.rate { + if d.n == d.rate { d.permute() } + + x := copy(out, d.a[d.n:d.rate]) + d.n += x + out = out[x:] } return @@ -183,3 +171,74 @@ func (d *state) Sum(in []byte) []byte { dup.Read(hash) return append(in, hash...) } + +const ( + magicSHA3 = "sha\x08" + magicShake = "sha\x09" + magicCShake = "sha\x0a" + magicKeccak = "sha\x0b" + // magic || rate || main state || n || sponge direction + marshaledSize = len(magicSHA3) + 1 + 200 + 1 + 1 +) + +func (d *state) MarshalBinary() ([]byte, error) { + return d.AppendBinary(make([]byte, 0, marshaledSize)) +} + +func (d *state) AppendBinary(b []byte) ([]byte, error) { + switch d.dsbyte { + case dsbyteSHA3: + b = append(b, magicSHA3...) + case dsbyteShake: + b = append(b, magicShake...) + case dsbyteCShake: + b = append(b, magicCShake...) + case dsbyteKeccak: + b = append(b, magicKeccak...) + default: + panic("unknown dsbyte") + } + // rate is at most 168, and n is at most rate. + b = append(b, byte(d.rate)) + b = append(b, d.a[:]...) + b = append(b, byte(d.n), byte(d.state)) + return b, nil +} + +func (d *state) UnmarshalBinary(b []byte) error { + if len(b) != marshaledSize { + return errors.New("sha3: invalid hash state") + } + + magic := string(b[:len(magicSHA3)]) + b = b[len(magicSHA3):] + switch { + case magic == magicSHA3 && d.dsbyte == dsbyteSHA3: + case magic == magicShake && d.dsbyte == dsbyteShake: + case magic == magicCShake && d.dsbyte == dsbyteCShake: + case magic == magicKeccak && d.dsbyte == dsbyteKeccak: + default: + return errors.New("sha3: invalid hash state identifier") + } + + rate := int(b[0]) + b = b[1:] + if rate != d.rate { + return errors.New("sha3: invalid hash state function") + } + + copy(d.a[:], b) + b = b[len(d.a):] + + n, state := int(b[0]), spongeDirection(b[1]) + if n > d.rate { + return errors.New("sha3: invalid hash state") + } + d.n = n + if state != spongeAbsorbing && state != spongeSqueezing { + return errors.New("sha3: invalid hash state") + } + d.state = state + + return nil +} diff --git a/vendor/golang.org/x/crypto/sha3/shake.go b/vendor/golang.org/x/crypto/sha3/shake.go index 1ea9275b8b7..a6b3a4281f5 100644 --- a/vendor/golang.org/x/crypto/sha3/shake.go +++ b/vendor/golang.org/x/crypto/sha3/shake.go @@ -16,9 +16,12 @@ package sha3 // [2] https://doi.org/10.6028/NIST.SP.800-185 import ( + "bytes" "encoding/binary" + "errors" "hash" "io" + "math/bits" ) // ShakeHash defines the interface to hash functions that support @@ -50,44 +53,36 @@ type cshakeState struct { initBlock []byte } -// Consts for configuring initial SHA-3 state -const ( - dsbyteShake = 0x1f - dsbyteCShake = 0x04 - rate128 = 168 - rate256 = 136 -) +func bytepad(data []byte, rate int) []byte { + out := make([]byte, 0, 9+len(data)+rate-1) + out = append(out, leftEncode(uint64(rate))...) + out = append(out, data...) + if padlen := rate - len(out)%rate; padlen < rate { + out = append(out, make([]byte, padlen)...) + } + return out +} -func bytepad(input []byte, w int) []byte { - // leftEncode always returns max 9 bytes - buf := make([]byte, 0, 9+len(input)+w) - buf = append(buf, leftEncode(uint64(w))...) - buf = append(buf, input...) - padlen := w - (len(buf) % w) - return append(buf, make([]byte, padlen)...) -} - -func leftEncode(value uint64) []byte { - var b [9]byte - binary.BigEndian.PutUint64(b[1:], value) - // Trim all but last leading zero bytes - i := byte(1) - for i < 8 && b[i] == 0 { - i++ +func leftEncode(x uint64) []byte { + // Let n be the smallest positive integer for which 2^(8n) > x. + n := (bits.Len64(x) + 7) / 8 + if n == 0 { + n = 1 } - // Prepend number of encoded bytes - b[i-1] = 9 - i - return b[i-1:] + // Return n || x with n as a byte and x an n bytes in big-endian order. + b := make([]byte, 9) + binary.BigEndian.PutUint64(b[1:], x) + b = b[9-n-1:] + b[0] = byte(n) + return b } func newCShake(N, S []byte, rate, outputLen int, dsbyte byte) ShakeHash { c := cshakeState{state: &state{rate: rate, outputLen: outputLen, dsbyte: dsbyte}} - - // leftEncode returns max 9 bytes - c.initBlock = make([]byte, 0, 9*2+len(N)+len(S)) - c.initBlock = append(c.initBlock, leftEncode(uint64(len(N)*8))...) + c.initBlock = make([]byte, 0, 9+len(N)+9+len(S)) // leftEncode returns max 9 bytes + c.initBlock = append(c.initBlock, leftEncode(uint64(len(N))*8)...) c.initBlock = append(c.initBlock, N...) - c.initBlock = append(c.initBlock, leftEncode(uint64(len(S)*8))...) + c.initBlock = append(c.initBlock, leftEncode(uint64(len(S))*8)...) c.initBlock = append(c.initBlock, S...) c.Write(bytepad(c.initBlock, c.rate)) return &c @@ -111,6 +106,30 @@ func (c *state) Clone() ShakeHash { return c.clone() } +func (c *cshakeState) MarshalBinary() ([]byte, error) { + return c.AppendBinary(make([]byte, 0, marshaledSize+len(c.initBlock))) +} + +func (c *cshakeState) AppendBinary(b []byte) ([]byte, error) { + b, err := c.state.AppendBinary(b) + if err != nil { + return nil, err + } + b = append(b, c.initBlock...) + return b, nil +} + +func (c *cshakeState) UnmarshalBinary(b []byte) error { + if len(b) <= marshaledSize { + return errors.New("sha3: invalid hash state") + } + if err := c.state.UnmarshalBinary(b[:marshaledSize]); err != nil { + return err + } + c.initBlock = bytes.Clone(b[marshaledSize:]) + return nil +} + // NewShake128 creates a new SHAKE128 variable-output-length ShakeHash. // Its generic security strength is 128 bits against all attacks if at // least 32 bytes of its output are used. @@ -126,11 +145,11 @@ func NewShake256() ShakeHash { } func newShake128Generic() *state { - return &state{rate: rate128, outputLen: 32, dsbyte: dsbyteShake} + return &state{rate: rateK256, outputLen: 32, dsbyte: dsbyteShake} } func newShake256Generic() *state { - return &state{rate: rate256, outputLen: 64, dsbyte: dsbyteShake} + return &state{rate: rateK512, outputLen: 64, dsbyte: dsbyteShake} } // NewCShake128 creates a new instance of cSHAKE128 variable-output-length ShakeHash, @@ -143,7 +162,7 @@ func NewCShake128(N, S []byte) ShakeHash { if len(N) == 0 && len(S) == 0 { return NewShake128() } - return newCShake(N, S, rate128, 32, dsbyteCShake) + return newCShake(N, S, rateK256, 32, dsbyteCShake) } // NewCShake256 creates a new instance of cSHAKE256 variable-output-length ShakeHash, @@ -156,7 +175,7 @@ func NewCShake256(N, S []byte) ShakeHash { if len(N) == 0 && len(S) == 0 { return NewShake256() } - return newCShake(N, S, rate256, 64, dsbyteCShake) + return newCShake(N, S, rateK512, 64, dsbyteCShake) } // ShakeSum128 writes an arbitrary-length digest of data into hash. diff --git a/vendor/golang.org/x/crypto/sha3/xor.go b/vendor/golang.org/x/crypto/sha3/xor.go deleted file mode 100644 index 6ada5c9574e..00000000000 --- a/vendor/golang.org/x/crypto/sha3/xor.go +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright 2015 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package sha3 - -import ( - "crypto/subtle" - "encoding/binary" - "unsafe" - - "golang.org/x/sys/cpu" -) - -// xorIn xors the bytes in buf into the state. -func xorIn(d *state, buf []byte) { - if cpu.IsBigEndian { - for i := 0; len(buf) >= 8; i++ { - a := binary.LittleEndian.Uint64(buf) - d.a[i] ^= a - buf = buf[8:] - } - } else { - ab := (*[25 * 64 / 8]byte)(unsafe.Pointer(&d.a)) - subtle.XORBytes(ab[:], ab[:], buf) - } -} - -// copyOut copies uint64s to a byte buffer. -func copyOut(d *state, b []byte) { - if cpu.IsBigEndian { - for i := 0; len(b) >= 8; i++ { - binary.LittleEndian.PutUint64(b, d.a[i]) - b = b[8:] - } - } else { - ab := (*[25 * 64 / 8]byte)(unsafe.Pointer(&d.a)) - copy(b, ab[:]) - } -} diff --git a/vendor/golang.org/x/crypto/ssh/agent/client.go b/vendor/golang.org/x/crypto/ssh/agent/client.go index fecba8eb384..106708d289e 100644 --- a/vendor/golang.org/x/crypto/ssh/agent/client.go +++ b/vendor/golang.org/x/crypto/ssh/agent/client.go @@ -10,7 +10,7 @@ // References: // // [PROTOCOL.agent]: https://tools.ietf.org/html/draft-miller-ssh-agent-00 -package agent // import "golang.org/x/crypto/ssh/agent" +package agent import ( "bytes" diff --git a/vendor/golang.org/x/crypto/ssh/agent/keyring.go b/vendor/golang.org/x/crypto/ssh/agent/keyring.go index 21bfa870fa4..c1b43610873 100644 --- a/vendor/golang.org/x/crypto/ssh/agent/keyring.go +++ b/vendor/golang.org/x/crypto/ssh/agent/keyring.go @@ -175,6 +175,15 @@ func (r *keyring) Add(key AddedKey) error { p.expire = &t } + // If we already have a Signer with the same public key, replace it with the + // new one. + for idx, k := range r.keys { + if bytes.Equal(k.signer.PublicKey().Marshal(), p.signer.PublicKey().Marshal()) { + r.keys[idx] = p + return nil + } + } + r.keys = append(r.keys, p) return nil diff --git a/vendor/golang.org/x/crypto/ssh/client_auth.go b/vendor/golang.org/x/crypto/ssh/client_auth.go index 9486c598623..b86dde151d7 100644 --- a/vendor/golang.org/x/crypto/ssh/client_auth.go +++ b/vendor/golang.org/x/crypto/ssh/client_auth.go @@ -71,6 +71,10 @@ func (c *connection) clientAuthenticate(config *ClientConfig) error { for auth := AuthMethod(new(noneAuth)); auth != nil; { ok, methods, err := auth.auth(sessionID, config.User, c.transport, config.Rand, extensions) if err != nil { + // On disconnect, return error immediately + if _, ok := err.(*disconnectMsg); ok { + return err + } // We return the error later if there is no other method left to // try. ok = authFailure @@ -551,6 +555,7 @@ func (cb KeyboardInteractiveChallenge) auth(session []byte, user string, c packe } gotMsgExtInfo := false + gotUserAuthInfoRequest := false for { packet, err := c.readPacket() if err != nil { @@ -581,6 +586,9 @@ func (cb KeyboardInteractiveChallenge) auth(session []byte, user string, c packe if msg.PartialSuccess { return authPartialSuccess, msg.Methods, nil } + if !gotUserAuthInfoRequest { + return authFailure, msg.Methods, unexpectedMessageError(msgUserAuthInfoRequest, packet[0]) + } return authFailure, msg.Methods, nil case msgUserAuthSuccess: return authSuccess, nil, nil @@ -592,6 +600,7 @@ func (cb KeyboardInteractiveChallenge) auth(session []byte, user string, c packe if err := Unmarshal(packet, &msg); err != nil { return authFailure, nil, err } + gotUserAuthInfoRequest = true // Manually unpack the prompt/echo pairs. rest := msg.Prompts diff --git a/vendor/golang.org/x/crypto/ssh/doc.go b/vendor/golang.org/x/crypto/ssh/doc.go index edbe63340d3..f5d352fe3a0 100644 --- a/vendor/golang.org/x/crypto/ssh/doc.go +++ b/vendor/golang.org/x/crypto/ssh/doc.go @@ -20,4 +20,4 @@ References: This package does not fall under the stability promise of the Go language itself, so its API may be changed when pressing needs arise. */ -package ssh // import "golang.org/x/crypto/ssh" +package ssh diff --git a/vendor/golang.org/x/crypto/ssh/keys.go b/vendor/golang.org/x/crypto/ssh/keys.go index 7967665f174..98e6706d5d7 100644 --- a/vendor/golang.org/x/crypto/ssh/keys.go +++ b/vendor/golang.org/x/crypto/ssh/keys.go @@ -488,7 +488,49 @@ func (r *rsaPublicKey) Verify(data []byte, sig *Signature) error { h := hash.New() h.Write(data) digest := h.Sum(nil) - return rsa.VerifyPKCS1v15((*rsa.PublicKey)(r), hash, digest, sig.Blob) + + // Signatures in PKCS1v15 must match the key's modulus in + // length. However with SSH, some signers provide RSA + // signatures which are missing the MSB 0's of the bignum + // represented. With ssh-rsa signatures, this is encouraged by + // the spec (even though e.g. OpenSSH will give the full + // length unconditionally). With rsa-sha2-* signatures, the + // verifier is allowed to support these, even though they are + // out of spec. See RFC 4253 Section 6.6 for ssh-rsa and RFC + // 8332 Section 3 for rsa-sha2-* details. + // + // In practice: + // * OpenSSH always allows "short" signatures: + // https://github.com/openssh/openssh-portable/blob/V_9_8_P1/ssh-rsa.c#L526 + // but always generates padded signatures: + // https://github.com/openssh/openssh-portable/blob/V_9_8_P1/ssh-rsa.c#L439 + // + // * PuTTY versions 0.81 and earlier will generate short + // signatures for all RSA signature variants. Note that + // PuTTY is embedded in other software, such as WinSCP and + // FileZilla. At the time of writing, a patch has been + // applied to PuTTY to generate padded signatures for + // rsa-sha2-*, but not yet released: + // https://git.tartarus.org/?p=simon/putty.git;a=commitdiff;h=a5bcf3d384e1bf15a51a6923c3724cbbee022d8e + // + // * SSH.NET versions 2024.0.0 and earlier will generate short + // signatures for all RSA signature variants, fixed in 2024.1.0: + // https://github.com/sshnet/SSH.NET/releases/tag/2024.1.0 + // + // As a result, we pad these up to the key size by inserting + // leading 0's. + // + // Note that support for short signatures with rsa-sha2-* may + // be removed in the future due to such signatures not being + // allowed by the spec. + blob := sig.Blob + keySize := (*rsa.PublicKey)(r).Size() + if len(blob) < keySize { + padded := make([]byte, keySize) + copy(padded[keySize-len(blob):], blob) + blob = padded + } + return rsa.VerifyPKCS1v15((*rsa.PublicKey)(r), hash, digest, blob) } func (r *rsaPublicKey) CryptoPublicKey() crypto.PublicKey { diff --git a/vendor/golang.org/x/crypto/ssh/server.go b/vendor/golang.org/x/crypto/ssh/server.go index 3ca9e89e22e..5b5ccd96f45 100644 --- a/vendor/golang.org/x/crypto/ssh/server.go +++ b/vendor/golang.org/x/crypto/ssh/server.go @@ -149,7 +149,7 @@ func (s *ServerConfig) AddHostKey(key Signer) { } // cachedPubKey contains the results of querying whether a public key is -// acceptable for a user. +// acceptable for a user. This is a FIFO cache. type cachedPubKey struct { user string pubKeyData []byte @@ -157,7 +157,13 @@ type cachedPubKey struct { perms *Permissions } -const maxCachedPubKeys = 16 +// maxCachedPubKeys is the number of cache entries we store. +// +// Due to consistent misuse of the PublicKeyCallback API, we have reduced this +// to 1, such that the only key in the cache is the most recently seen one. This +// forces the behavior that the last call to PublicKeyCallback will always be +// with the key that is used for authentication. +const maxCachedPubKeys = 1 // pubKeyCache caches tests for public keys. Since SSH clients // will query whether a public key is acceptable before attempting to @@ -179,9 +185,10 @@ func (c *pubKeyCache) get(user string, pubKeyData []byte) (cachedPubKey, bool) { // add adds the given tuple to the cache. func (c *pubKeyCache) add(candidate cachedPubKey) { - if len(c.keys) < maxCachedPubKeys { - c.keys = append(c.keys, candidate) + if len(c.keys) >= maxCachedPubKeys { + c.keys = c.keys[1:] } + c.keys = append(c.keys, candidate) } // ServerConn is an authenticated SSH connection, as seen from the @@ -510,8 +517,8 @@ userAuthLoop: if err := s.transport.writePacket(Marshal(discMsg)); err != nil { return nil, err } - - return nil, discMsg + authErrs = append(authErrs, discMsg) + return nil, &ServerAuthError{Errors: authErrs} } var userAuthReq userAuthRequestMsg diff --git a/vendor/golang.org/x/sync/LICENSE b/vendor/golang.org/x/sync/LICENSE index 6a66aea5eaf..2a7cf70da6e 100644 --- a/vendor/golang.org/x/sync/LICENSE +++ b/vendor/golang.org/x/sync/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2009 The Go Authors. All rights reserved. +Copyright 2009 The Go Authors. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are @@ -10,7 +10,7 @@ notice, this list of conditions and the following disclaimer. copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. - * Neither the name of Google Inc. nor the names of its + * Neither the name of Google LLC nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. diff --git a/vendor/golang.org/x/sys/LICENSE b/vendor/golang.org/x/sys/LICENSE index 6a66aea5eaf..2a7cf70da6e 100644 --- a/vendor/golang.org/x/sys/LICENSE +++ b/vendor/golang.org/x/sys/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2009 The Go Authors. All rights reserved. +Copyright 2009 The Go Authors. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are @@ -10,7 +10,7 @@ notice, this list of conditions and the following disclaimer. copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. - * Neither the name of Google Inc. nor the names of its + * Neither the name of Google LLC nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. diff --git a/vendor/golang.org/x/sys/cpu/asm_darwin_x86_gc.s b/vendor/golang.org/x/sys/cpu/asm_darwin_x86_gc.s new file mode 100644 index 00000000000..ec2acfe540e --- /dev/null +++ b/vendor/golang.org/x/sys/cpu/asm_darwin_x86_gc.s @@ -0,0 +1,17 @@ +// Copyright 2024 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +//go:build darwin && amd64 && gc + +#include "textflag.h" + +TEXT libc_sysctl_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_sysctl(SB) +GLOBL ·libc_sysctl_trampoline_addr(SB), RODATA, $8 +DATA ·libc_sysctl_trampoline_addr(SB)/8, $libc_sysctl_trampoline<>(SB) + +TEXT libc_sysctlbyname_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_sysctlbyname(SB) +GLOBL ·libc_sysctlbyname_trampoline_addr(SB), RODATA, $8 +DATA ·libc_sysctlbyname_trampoline_addr(SB)/8, $libc_sysctlbyname_trampoline<>(SB) diff --git a/vendor/golang.org/x/sys/cpu/cpu.go b/vendor/golang.org/x/sys/cpu/cpu.go index 8fa707aa4ba..02609d5b21d 100644 --- a/vendor/golang.org/x/sys/cpu/cpu.go +++ b/vendor/golang.org/x/sys/cpu/cpu.go @@ -105,6 +105,8 @@ var ARM64 struct { HasSVE bool // Scalable Vector Extensions HasSVE2 bool // Scalable Vector Extensions 2 HasASIMDFHM bool // Advanced SIMD multiplication FP16 to FP32 + HasDIT bool // Data Independent Timing support + HasI8MM bool // Advanced SIMD Int8 matrix multiplication instructions _ CacheLinePad } @@ -199,6 +201,25 @@ var S390X struct { _ CacheLinePad } +// RISCV64 contains the supported CPU features and performance characteristics for riscv64 +// platforms. The booleans in RISCV64, with the exception of HasFastMisaligned, indicate +// the presence of RISC-V extensions. +// +// It is safe to assume that all the RV64G extensions are supported and so they are omitted from +// this structure. As riscv64 Go programs require at least RV64G, the code that populates +// this structure cannot run successfully if some of the RV64G extensions are missing. +// The struct is padded to avoid false sharing. +var RISCV64 struct { + _ CacheLinePad + HasFastMisaligned bool // Fast misaligned accesses + HasC bool // Compressed instruction-set extension + HasV bool // Vector extension compatible with RVV 1.0 + HasZba bool // Address generation instructions extension + HasZbb bool // Basic bit-manipulation extension + HasZbs bool // Single-bit instructions extension + _ CacheLinePad +} + func init() { archInit() initOptions() diff --git a/vendor/golang.org/x/sys/cpu/cpu_arm64.go b/vendor/golang.org/x/sys/cpu/cpu_arm64.go index 0e27a21e1f8..af2aa99f9f0 100644 --- a/vendor/golang.org/x/sys/cpu/cpu_arm64.go +++ b/vendor/golang.org/x/sys/cpu/cpu_arm64.go @@ -38,6 +38,8 @@ func initOptions() { {Name: "dcpop", Feature: &ARM64.HasDCPOP}, {Name: "asimddp", Feature: &ARM64.HasASIMDDP}, {Name: "asimdfhm", Feature: &ARM64.HasASIMDFHM}, + {Name: "dit", Feature: &ARM64.HasDIT}, + {Name: "i8mm", Feature: &ARM64.HasI8MM}, } } @@ -145,6 +147,11 @@ func parseARM64SystemRegisters(isar0, isar1, pfr0 uint64) { ARM64.HasLRCPC = true } + switch extractBits(isar1, 52, 55) { + case 1: + ARM64.HasI8MM = true + } + // ID_AA64PFR0_EL1 switch extractBits(pfr0, 16, 19) { case 0: @@ -168,6 +175,11 @@ func parseARM64SystemRegisters(isar0, isar1, pfr0 uint64) { parseARM64SVERegister(getzfr0()) } + + switch extractBits(pfr0, 48, 51) { + case 1: + ARM64.HasDIT = true + } } func parseARM64SVERegister(zfr0 uint64) { diff --git a/vendor/golang.org/x/sys/cpu/cpu_darwin_x86.go b/vendor/golang.org/x/sys/cpu/cpu_darwin_x86.go new file mode 100644 index 00000000000..b838cb9e956 --- /dev/null +++ b/vendor/golang.org/x/sys/cpu/cpu_darwin_x86.go @@ -0,0 +1,61 @@ +// Copyright 2024 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +//go:build darwin && amd64 && gc + +package cpu + +// darwinSupportsAVX512 checks Darwin kernel for AVX512 support via sysctl +// call (see issue 43089). It also restricts AVX512 support for Darwin to +// kernel version 21.3.0 (MacOS 12.2.0) or later (see issue 49233). +// +// Background: +// Darwin implements a special mechanism to economize on thread state when +// AVX512 specific registers are not in use. This scheme minimizes state when +// preempting threads that haven't yet used any AVX512 instructions, but adds +// special requirements to check for AVX512 hardware support at runtime (e.g. +// via sysctl call or commpage inspection). See issue 43089 and link below for +// full background: +// https://github.com/apple-oss-distributions/xnu/blob/xnu-11215.1.10/osfmk/i386/fpu.c#L214-L240 +// +// Additionally, all versions of the Darwin kernel from 19.6.0 through 21.2.0 +// (corresponding to MacOS 10.15.6 - 12.1) have a bug that can cause corruption +// of the AVX512 mask registers (K0-K7) upon signal return. For this reason +// AVX512 is considered unsafe to use on Darwin for kernel versions prior to +// 21.3.0, where a fix has been confirmed. See issue 49233 for full background. +func darwinSupportsAVX512() bool { + return darwinSysctlEnabled([]byte("hw.optional.avx512f\x00")) && darwinKernelVersionCheck(21, 3, 0) +} + +// Ensure Darwin kernel version is at least major.minor.patch, avoiding dependencies +func darwinKernelVersionCheck(major, minor, patch int) bool { + var release [256]byte + err := darwinOSRelease(&release) + if err != nil { + return false + } + + var mmp [3]int + c := 0 +Loop: + for _, b := range release[:] { + switch { + case b >= '0' && b <= '9': + mmp[c] = 10*mmp[c] + int(b-'0') + case b == '.': + c++ + if c > 2 { + return false + } + case b == 0: + break Loop + default: + return false + } + } + if c != 2 { + return false + } + return mmp[0] > major || mmp[0] == major && (mmp[1] > minor || mmp[1] == minor && mmp[2] >= patch) +} diff --git a/vendor/golang.org/x/sys/cpu/cpu_gc_x86.go b/vendor/golang.org/x/sys/cpu/cpu_gc_x86.go index 910728fb163..32a44514e24 100644 --- a/vendor/golang.org/x/sys/cpu/cpu_gc_x86.go +++ b/vendor/golang.org/x/sys/cpu/cpu_gc_x86.go @@ -6,10 +6,10 @@ package cpu -// cpuid is implemented in cpu_x86.s for gc compiler +// cpuid is implemented in cpu_gc_x86.s for gc compiler // and in cpu_gccgo.c for gccgo. func cpuid(eaxArg, ecxArg uint32) (eax, ebx, ecx, edx uint32) -// xgetbv with ecx = 0 is implemented in cpu_x86.s for gc compiler +// xgetbv with ecx = 0 is implemented in cpu_gc_x86.s for gc compiler // and in cpu_gccgo.c for gccgo. func xgetbv() (eax, edx uint32) diff --git a/vendor/golang.org/x/sys/cpu/cpu_x86.s b/vendor/golang.org/x/sys/cpu/cpu_gc_x86.s similarity index 94% rename from vendor/golang.org/x/sys/cpu/cpu_x86.s rename to vendor/golang.org/x/sys/cpu/cpu_gc_x86.s index 7d7ba33efb8..ce208ce6d6a 100644 --- a/vendor/golang.org/x/sys/cpu/cpu_x86.s +++ b/vendor/golang.org/x/sys/cpu/cpu_gc_x86.s @@ -18,7 +18,7 @@ TEXT ·cpuid(SB), NOSPLIT, $0-24 RET // func xgetbv() (eax, edx uint32) -TEXT ·xgetbv(SB),NOSPLIT,$0-8 +TEXT ·xgetbv(SB), NOSPLIT, $0-8 MOVL $0, CX XGETBV MOVL AX, eax+0(FP) diff --git a/vendor/golang.org/x/sys/cpu/cpu_gccgo_x86.go b/vendor/golang.org/x/sys/cpu/cpu_gccgo_x86.go index 99c60fe9f9c..170d21ddfda 100644 --- a/vendor/golang.org/x/sys/cpu/cpu_gccgo_x86.go +++ b/vendor/golang.org/x/sys/cpu/cpu_gccgo_x86.go @@ -23,9 +23,3 @@ func xgetbv() (eax, edx uint32) { gccgoXgetbv(&a, &d) return a, d } - -// gccgo doesn't build on Darwin, per: -// https://github.com/Homebrew/homebrew-core/blob/HEAD/Formula/gcc.rb#L76 -func darwinSupportsAVX512() bool { - return false -} diff --git a/vendor/golang.org/x/sys/cpu/cpu_linux_arm64.go b/vendor/golang.org/x/sys/cpu/cpu_linux_arm64.go index 3d386d0fc21..f1caf0f78e2 100644 --- a/vendor/golang.org/x/sys/cpu/cpu_linux_arm64.go +++ b/vendor/golang.org/x/sys/cpu/cpu_linux_arm64.go @@ -35,8 +35,10 @@ const ( hwcap_SHA512 = 1 << 21 hwcap_SVE = 1 << 22 hwcap_ASIMDFHM = 1 << 23 + hwcap_DIT = 1 << 24 hwcap2_SVE2 = 1 << 1 + hwcap2_I8MM = 1 << 13 ) // linuxKernelCanEmulateCPUID reports whether we're running @@ -106,9 +108,11 @@ func doinit() { ARM64.HasSHA512 = isSet(hwCap, hwcap_SHA512) ARM64.HasSVE = isSet(hwCap, hwcap_SVE) ARM64.HasASIMDFHM = isSet(hwCap, hwcap_ASIMDFHM) + ARM64.HasDIT = isSet(hwCap, hwcap_DIT) // HWCAP2 feature bits ARM64.HasSVE2 = isSet(hwCap2, hwcap2_SVE2) + ARM64.HasI8MM = isSet(hwCap2, hwcap2_I8MM) } func isSet(hwc uint, value uint) bool { diff --git a/vendor/golang.org/x/sys/cpu/cpu_linux_noinit.go b/vendor/golang.org/x/sys/cpu/cpu_linux_noinit.go index cd63e733557..7d902b6847b 100644 --- a/vendor/golang.org/x/sys/cpu/cpu_linux_noinit.go +++ b/vendor/golang.org/x/sys/cpu/cpu_linux_noinit.go @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -//go:build linux && !arm && !arm64 && !mips64 && !mips64le && !ppc64 && !ppc64le && !s390x +//go:build linux && !arm && !arm64 && !mips64 && !mips64le && !ppc64 && !ppc64le && !s390x && !riscv64 package cpu diff --git a/vendor/golang.org/x/sys/cpu/cpu_linux_riscv64.go b/vendor/golang.org/x/sys/cpu/cpu_linux_riscv64.go new file mode 100644 index 00000000000..cb4a0c57280 --- /dev/null +++ b/vendor/golang.org/x/sys/cpu/cpu_linux_riscv64.go @@ -0,0 +1,137 @@ +// Copyright 2024 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package cpu + +import ( + "syscall" + "unsafe" +) + +// RISC-V extension discovery code for Linux. The approach here is to first try the riscv_hwprobe +// syscall falling back to HWCAP to check for the C extension if riscv_hwprobe is not available. +// +// A note on detection of the Vector extension using HWCAP. +// +// Support for the Vector extension version 1.0 was added to the Linux kernel in release 6.5. +// Support for the riscv_hwprobe syscall was added in 6.4. It follows that if the riscv_hwprobe +// syscall is not available then neither is the Vector extension (which needs kernel support). +// The riscv_hwprobe syscall should then be all we need to detect the Vector extension. +// However, some RISC-V board manufacturers ship boards with an older kernel on top of which +// they have back-ported various versions of the Vector extension patches but not the riscv_hwprobe +// patches. These kernels advertise support for the Vector extension using HWCAP. Falling +// back to HWCAP to detect the Vector extension, if riscv_hwprobe is not available, or simply not +// bothering with riscv_hwprobe at all and just using HWCAP may then seem like an attractive option. +// +// Unfortunately, simply checking the 'V' bit in AT_HWCAP will not work as this bit is used by +// RISC-V board and cloud instance providers to mean different things. The Lichee Pi 4A board +// and the Scaleway RV1 cloud instances use the 'V' bit to advertise their support for the unratified +// 0.7.1 version of the Vector Specification. The Banana Pi BPI-F3 and the CanMV-K230 board use +// it to advertise support for 1.0 of the Vector extension. Versions 0.7.1 and 1.0 of the Vector +// extension are binary incompatible. HWCAP can then not be used in isolation to populate the +// HasV field as this field indicates that the underlying CPU is compatible with RVV 1.0. +// +// There is a way at runtime to distinguish between versions 0.7.1 and 1.0 of the Vector +// specification by issuing a RVV 1.0 vsetvli instruction and checking the vill bit of the vtype +// register. This check would allow us to safely detect version 1.0 of the Vector extension +// with HWCAP, if riscv_hwprobe were not available. However, the check cannot +// be added until the assembler supports the Vector instructions. +// +// Note the riscv_hwprobe syscall does not suffer from these ambiguities by design as all of the +// extensions it advertises support for are explicitly versioned. It's also worth noting that +// the riscv_hwprobe syscall is the only way to detect multi-letter RISC-V extensions, e.g., Zba. +// These cannot be detected using HWCAP and so riscv_hwprobe must be used to detect the majority +// of RISC-V extensions. +// +// Please see https://docs.kernel.org/arch/riscv/hwprobe.html for more information. + +// golang.org/x/sys/cpu is not allowed to depend on golang.org/x/sys/unix so we must +// reproduce the constants, types and functions needed to make the riscv_hwprobe syscall +// here. + +const ( + // Copied from golang.org/x/sys/unix/ztypes_linux_riscv64.go. + riscv_HWPROBE_KEY_IMA_EXT_0 = 0x4 + riscv_HWPROBE_IMA_C = 0x2 + riscv_HWPROBE_IMA_V = 0x4 + riscv_HWPROBE_EXT_ZBA = 0x8 + riscv_HWPROBE_EXT_ZBB = 0x10 + riscv_HWPROBE_EXT_ZBS = 0x20 + riscv_HWPROBE_KEY_CPUPERF_0 = 0x5 + riscv_HWPROBE_MISALIGNED_FAST = 0x3 + riscv_HWPROBE_MISALIGNED_MASK = 0x7 +) + +const ( + // sys_RISCV_HWPROBE is copied from golang.org/x/sys/unix/zsysnum_linux_riscv64.go. + sys_RISCV_HWPROBE = 258 +) + +// riscvHWProbePairs is copied from golang.org/x/sys/unix/ztypes_linux_riscv64.go. +type riscvHWProbePairs struct { + key int64 + value uint64 +} + +const ( + // CPU features + hwcap_RISCV_ISA_C = 1 << ('C' - 'A') +) + +func doinit() { + // A slice of key/value pair structures is passed to the RISCVHWProbe syscall. The key + // field should be initialised with one of the key constants defined above, e.g., + // RISCV_HWPROBE_KEY_IMA_EXT_0. The syscall will set the value field to the appropriate value. + // If the kernel does not recognise a key it will set the key field to -1 and the value field to 0. + + pairs := []riscvHWProbePairs{ + {riscv_HWPROBE_KEY_IMA_EXT_0, 0}, + {riscv_HWPROBE_KEY_CPUPERF_0, 0}, + } + + // This call only indicates that extensions are supported if they are implemented on all cores. + if riscvHWProbe(pairs, 0) { + if pairs[0].key != -1 { + v := uint(pairs[0].value) + RISCV64.HasC = isSet(v, riscv_HWPROBE_IMA_C) + RISCV64.HasV = isSet(v, riscv_HWPROBE_IMA_V) + RISCV64.HasZba = isSet(v, riscv_HWPROBE_EXT_ZBA) + RISCV64.HasZbb = isSet(v, riscv_HWPROBE_EXT_ZBB) + RISCV64.HasZbs = isSet(v, riscv_HWPROBE_EXT_ZBS) + } + if pairs[1].key != -1 { + v := pairs[1].value & riscv_HWPROBE_MISALIGNED_MASK + RISCV64.HasFastMisaligned = v == riscv_HWPROBE_MISALIGNED_FAST + } + } + + // Let's double check with HWCAP if the C extension does not appear to be supported. + // This may happen if we're running on a kernel older than 6.4. + + if !RISCV64.HasC { + RISCV64.HasC = isSet(hwCap, hwcap_RISCV_ISA_C) + } +} + +func isSet(hwc uint, value uint) bool { + return hwc&value != 0 +} + +// riscvHWProbe is a simplified version of the generated wrapper function found in +// golang.org/x/sys/unix/zsyscall_linux_riscv64.go. We simplify it by removing the +// cpuCount and cpus parameters which we do not need. We always want to pass 0 for +// these parameters here so the kernel only reports the extensions that are present +// on all cores. +func riscvHWProbe(pairs []riscvHWProbePairs, flags uint) bool { + var _zero uintptr + var p0 unsafe.Pointer + if len(pairs) > 0 { + p0 = unsafe.Pointer(&pairs[0]) + } else { + p0 = unsafe.Pointer(&_zero) + } + + _, _, e1 := syscall.Syscall6(sys_RISCV_HWPROBE, uintptr(p0), uintptr(len(pairs)), uintptr(0), uintptr(0), uintptr(flags), 0) + return e1 == 0 +} diff --git a/vendor/golang.org/x/sys/cpu/cpu_other_x86.go b/vendor/golang.org/x/sys/cpu/cpu_other_x86.go new file mode 100644 index 00000000000..a0fd7e2f75d --- /dev/null +++ b/vendor/golang.org/x/sys/cpu/cpu_other_x86.go @@ -0,0 +1,11 @@ +// Copyright 2024 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +//go:build 386 || amd64p32 || (amd64 && (!darwin || !gc)) + +package cpu + +func darwinSupportsAVX512() bool { + panic("only implemented for gc && amd64 && darwin") +} diff --git a/vendor/golang.org/x/sys/cpu/cpu_riscv64.go b/vendor/golang.org/x/sys/cpu/cpu_riscv64.go index 7f0c79c004b..aca3199c911 100644 --- a/vendor/golang.org/x/sys/cpu/cpu_riscv64.go +++ b/vendor/golang.org/x/sys/cpu/cpu_riscv64.go @@ -8,4 +8,13 @@ package cpu const cacheLineSize = 64 -func initOptions() {} +func initOptions() { + options = []option{ + {Name: "fastmisaligned", Feature: &RISCV64.HasFastMisaligned}, + {Name: "c", Feature: &RISCV64.HasC}, + {Name: "v", Feature: &RISCV64.HasV}, + {Name: "zba", Feature: &RISCV64.HasZba}, + {Name: "zbb", Feature: &RISCV64.HasZbb}, + {Name: "zbs", Feature: &RISCV64.HasZbs}, + } +} diff --git a/vendor/golang.org/x/sys/cpu/cpu_x86.go b/vendor/golang.org/x/sys/cpu/cpu_x86.go index c29f5e4c5a6..600a6807861 100644 --- a/vendor/golang.org/x/sys/cpu/cpu_x86.go +++ b/vendor/golang.org/x/sys/cpu/cpu_x86.go @@ -92,10 +92,8 @@ func archInit() { osSupportsAVX = isSet(1, eax) && isSet(2, eax) if runtime.GOOS == "darwin" { - // Darwin doesn't save/restore AVX-512 mask registers correctly across signal handlers. - // Since users can't rely on mask register contents, let's not advertise AVX-512 support. - // See issue 49233. - osSupportsAVX512 = false + // Darwin requires special AVX512 checks, see cpu_darwin_x86.go + osSupportsAVX512 = osSupportsAVX && darwinSupportsAVX512() } else { // Check if OPMASK and ZMM registers have OS support. osSupportsAVX512 = osSupportsAVX && isSet(5, eax) && isSet(6, eax) && isSet(7, eax) diff --git a/vendor/golang.org/x/sys/cpu/syscall_darwin_x86_gc.go b/vendor/golang.org/x/sys/cpu/syscall_darwin_x86_gc.go new file mode 100644 index 00000000000..4d0888b0c01 --- /dev/null +++ b/vendor/golang.org/x/sys/cpu/syscall_darwin_x86_gc.go @@ -0,0 +1,98 @@ +// Copyright 2024 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// Minimal copy of x/sys/unix so the cpu package can make a +// system call on Darwin without depending on x/sys/unix. + +//go:build darwin && amd64 && gc + +package cpu + +import ( + "syscall" + "unsafe" +) + +type _C_int int32 + +// adapted from unix.Uname() at x/sys/unix/syscall_darwin.go L419 +func darwinOSRelease(release *[256]byte) error { + // from x/sys/unix/zerrors_openbsd_amd64.go + const ( + CTL_KERN = 0x1 + KERN_OSRELEASE = 0x2 + ) + + mib := []_C_int{CTL_KERN, KERN_OSRELEASE} + n := unsafe.Sizeof(*release) + + return sysctl(mib, &release[0], &n, nil, 0) +} + +type Errno = syscall.Errno + +var _zero uintptr // Single-word zero for use when we need a valid pointer to 0 bytes. + +// from x/sys/unix/zsyscall_darwin_amd64.go L791-807 +func sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) error { + var _p0 unsafe.Pointer + if len(mib) > 0 { + _p0 = unsafe.Pointer(&mib[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + if _, _, err := syscall_syscall6( + libc_sysctl_trampoline_addr, + uintptr(_p0), + uintptr(len(mib)), + uintptr(unsafe.Pointer(old)), + uintptr(unsafe.Pointer(oldlen)), + uintptr(unsafe.Pointer(new)), + uintptr(newlen), + ); err != 0 { + return err + } + + return nil +} + +var libc_sysctl_trampoline_addr uintptr + +// adapted from internal/cpu/cpu_arm64_darwin.go +func darwinSysctlEnabled(name []byte) bool { + out := int32(0) + nout := unsafe.Sizeof(out) + if ret := sysctlbyname(&name[0], (*byte)(unsafe.Pointer(&out)), &nout, nil, 0); ret != nil { + return false + } + return out > 0 +} + +//go:cgo_import_dynamic libc_sysctl sysctl "/usr/lib/libSystem.B.dylib" + +var libc_sysctlbyname_trampoline_addr uintptr + +// adapted from runtime/sys_darwin.go in the pattern of sysctl() above, as defined in x/sys/unix +func sysctlbyname(name *byte, old *byte, oldlen *uintptr, new *byte, newlen uintptr) error { + if _, _, err := syscall_syscall6( + libc_sysctlbyname_trampoline_addr, + uintptr(unsafe.Pointer(name)), + uintptr(unsafe.Pointer(old)), + uintptr(unsafe.Pointer(oldlen)), + uintptr(unsafe.Pointer(new)), + uintptr(newlen), + 0, + ); err != 0 { + return err + } + + return nil +} + +//go:cgo_import_dynamic libc_sysctlbyname sysctlbyname "/usr/lib/libSystem.B.dylib" + +// Implemented in the runtime package (runtime/sys_darwin.go) +func syscall_syscall6(fn, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err Errno) + +//go:linkname syscall_syscall6 syscall.syscall6 diff --git a/vendor/golang.org/x/sys/unix/README.md b/vendor/golang.org/x/sys/unix/README.md index 7d3c060e122..6e08a76a716 100644 --- a/vendor/golang.org/x/sys/unix/README.md +++ b/vendor/golang.org/x/sys/unix/README.md @@ -156,7 +156,7 @@ from the generated architecture-specific files listed below, and merge these into a common file for each OS. The merge is performed in the following steps: -1. Construct the set of common code that is idential in all architecture-specific files. +1. Construct the set of common code that is identical in all architecture-specific files. 2. Write this common code to the merged file. 3. Remove the common code from all architecture-specific files. diff --git a/vendor/golang.org/x/sys/unix/ioctl_linux.go b/vendor/golang.org/x/sys/unix/ioctl_linux.go index dbe680eab88..7ca4fa12aa6 100644 --- a/vendor/golang.org/x/sys/unix/ioctl_linux.go +++ b/vendor/golang.org/x/sys/unix/ioctl_linux.go @@ -58,6 +58,102 @@ func IoctlGetEthtoolDrvinfo(fd int, ifname string) (*EthtoolDrvinfo, error) { return &value, err } +// IoctlGetEthtoolTsInfo fetches ethtool timestamping and PHC +// association for the network device specified by ifname. +func IoctlGetEthtoolTsInfo(fd int, ifname string) (*EthtoolTsInfo, error) { + ifr, err := NewIfreq(ifname) + if err != nil { + return nil, err + } + + value := EthtoolTsInfo{Cmd: ETHTOOL_GET_TS_INFO} + ifrd := ifr.withData(unsafe.Pointer(&value)) + + err = ioctlIfreqData(fd, SIOCETHTOOL, &ifrd) + return &value, err +} + +// IoctlGetHwTstamp retrieves the hardware timestamping configuration +// for the network device specified by ifname. +func IoctlGetHwTstamp(fd int, ifname string) (*HwTstampConfig, error) { + ifr, err := NewIfreq(ifname) + if err != nil { + return nil, err + } + + value := HwTstampConfig{} + ifrd := ifr.withData(unsafe.Pointer(&value)) + + err = ioctlIfreqData(fd, SIOCGHWTSTAMP, &ifrd) + return &value, err +} + +// IoctlSetHwTstamp updates the hardware timestamping configuration for +// the network device specified by ifname. +func IoctlSetHwTstamp(fd int, ifname string, cfg *HwTstampConfig) error { + ifr, err := NewIfreq(ifname) + if err != nil { + return err + } + ifrd := ifr.withData(unsafe.Pointer(cfg)) + return ioctlIfreqData(fd, SIOCSHWTSTAMP, &ifrd) +} + +// FdToClockID derives the clock ID from the file descriptor number +// - see clock_gettime(3), FD_TO_CLOCKID macros. The resulting ID is +// suitable for system calls like ClockGettime. +func FdToClockID(fd int) int32 { return int32((int(^fd) << 3) | 3) } + +// IoctlPtpClockGetcaps returns the description of a given PTP device. +func IoctlPtpClockGetcaps(fd int) (*PtpClockCaps, error) { + var value PtpClockCaps + err := ioctlPtr(fd, PTP_CLOCK_GETCAPS2, unsafe.Pointer(&value)) + return &value, err +} + +// IoctlPtpSysOffsetPrecise returns a description of the clock +// offset compared to the system clock. +func IoctlPtpSysOffsetPrecise(fd int) (*PtpSysOffsetPrecise, error) { + var value PtpSysOffsetPrecise + err := ioctlPtr(fd, PTP_SYS_OFFSET_PRECISE2, unsafe.Pointer(&value)) + return &value, err +} + +// IoctlPtpSysOffsetExtended returns an extended description of the +// clock offset compared to the system clock. The samples parameter +// specifies the desired number of measurements. +func IoctlPtpSysOffsetExtended(fd int, samples uint) (*PtpSysOffsetExtended, error) { + value := PtpSysOffsetExtended{Samples: uint32(samples)} + err := ioctlPtr(fd, PTP_SYS_OFFSET_EXTENDED2, unsafe.Pointer(&value)) + return &value, err +} + +// IoctlPtpPinGetfunc returns the configuration of the specified +// I/O pin on given PTP device. +func IoctlPtpPinGetfunc(fd int, index uint) (*PtpPinDesc, error) { + value := PtpPinDesc{Index: uint32(index)} + err := ioctlPtr(fd, PTP_PIN_GETFUNC2, unsafe.Pointer(&value)) + return &value, err +} + +// IoctlPtpPinSetfunc updates configuration of the specified PTP +// I/O pin. +func IoctlPtpPinSetfunc(fd int, pd *PtpPinDesc) error { + return ioctlPtr(fd, PTP_PIN_SETFUNC2, unsafe.Pointer(pd)) +} + +// IoctlPtpPeroutRequest configures the periodic output mode of the +// PTP I/O pins. +func IoctlPtpPeroutRequest(fd int, r *PtpPeroutRequest) error { + return ioctlPtr(fd, PTP_PEROUT_REQUEST2, unsafe.Pointer(r)) +} + +// IoctlPtpExttsRequest configures the external timestamping mode +// of the PTP I/O pins. +func IoctlPtpExttsRequest(fd int, r *PtpExttsRequest) error { + return ioctlPtr(fd, PTP_EXTTS_REQUEST2, unsafe.Pointer(r)) +} + // IoctlGetWatchdogInfo fetches information about a watchdog device from the // Linux watchdog API. For more information, see: // https://www.kernel.org/doc/html/latest/watchdog/watchdog-api.html. diff --git a/vendor/golang.org/x/sys/unix/mkerrors.sh b/vendor/golang.org/x/sys/unix/mkerrors.sh index 4ed2e488b61..6ab02b6c312 100644 --- a/vendor/golang.org/x/sys/unix/mkerrors.sh +++ b/vendor/golang.org/x/sys/unix/mkerrors.sh @@ -58,6 +58,7 @@ includes_Darwin=' #define _DARWIN_USE_64_BIT_INODE #define __APPLE_USE_RFC_3542 #include +#include #include #include #include @@ -157,6 +158,16 @@ includes_Linux=' #endif #define _GNU_SOURCE +// See the description in unix/linux/types.go +#if defined(__ARM_EABI__) || \ + (defined(__mips__) && (_MIPS_SIM == _ABIO32)) || \ + (defined(__powerpc__) && (!defined(__powerpc64__))) +# ifdef _TIME_BITS +# undef _TIME_BITS +# endif +# define _TIME_BITS 32 +#endif + // is broken on powerpc64, as it fails to include definitions of // these structures. We just include them copied from . #if defined(__powerpc__) @@ -255,6 +266,7 @@ struct ltchars { #include #include #include +#include #include #include #include @@ -526,6 +538,7 @@ ccflags="$@" $2 ~ /^(AF|SOCK|SO|SOL|IPPROTO|IP|IPV6|TCP|MCAST|EVFILT|NOTE|SHUT|PROT|MAP|MREMAP|MFD|T?PACKET|MSG|SCM|MCL|DT|MADV|PR|LOCAL|TCPOPT|UDP)_/ || $2 ~ /^NFC_(GENL|PROTO|COMM|RF|SE|DIRECTION|LLCP|SOCKPROTO)_/ || $2 ~ /^NFC_.*_(MAX)?SIZE$/ || + $2 ~ /^PTP_/ || $2 ~ /^RAW_PAYLOAD_/ || $2 ~ /^[US]F_/ || $2 ~ /^TP_STATUS_/ || @@ -551,6 +564,7 @@ ccflags="$@" $2 !~ /^RTC_VL_(ACCURACY|BACKUP|DATA)/ && $2 ~ /^(NETLINK|NLM|NLMSG|NLA|IFA|IFAN|RT|RTC|RTCF|RTN|RTPROT|RTNH|ARPHRD|ETH_P|NETNSA)_/ || $2 ~ /^SOCK_|SK_DIAG_|SKNLGRP_$/ || + $2 ~ /^(CONNECT|SAE)_/ || $2 ~ /^FIORDCHK$/ || $2 ~ /^SIOC/ || $2 ~ /^TIOC/ || @@ -654,7 +668,7 @@ errors=$( signals=$( echo '#include ' | $CC -x c - -E -dM $ccflags | awk '$1=="#define" && $2 ~ /^SIG[A-Z0-9]+$/ { print $2 }' | - grep -v 'SIGSTKSIZE\|SIGSTKSZ\|SIGRT\|SIGMAX64' | + grep -E -v '(SIGSTKSIZE|SIGSTKSZ|SIGRT|SIGMAX64)' | sort ) @@ -664,7 +678,7 @@ echo '#include ' | $CC -x c - -E -dM $ccflags | sort >_error.grep echo '#include ' | $CC -x c - -E -dM $ccflags | awk '$1=="#define" && $2 ~ /^SIG[A-Z0-9]+$/ { print "^\t" $2 "[ \t]*=" }' | - grep -v 'SIGSTKSIZE\|SIGSTKSZ\|SIGRT\|SIGMAX64' | + grep -E -v '(SIGSTKSIZE|SIGSTKSZ|SIGRT|SIGMAX64)' | sort >_signal.grep echo '// mkerrors.sh' "$@" diff --git a/vendor/golang.org/x/sys/unix/mremap.go b/vendor/golang.org/x/sys/unix/mremap.go index fd45fe529da..3a5e776f895 100644 --- a/vendor/golang.org/x/sys/unix/mremap.go +++ b/vendor/golang.org/x/sys/unix/mremap.go @@ -50,3 +50,8 @@ func (m *mremapMmapper) Mremap(oldData []byte, newLength int, flags int) (data [ func Mremap(oldData []byte, newLength int, flags int) (data []byte, err error) { return mapper.Mremap(oldData, newLength, flags) } + +func MremapPtr(oldAddr unsafe.Pointer, oldSize uintptr, newAddr unsafe.Pointer, newSize uintptr, flags int) (ret unsafe.Pointer, err error) { + xaddr, err := mapper.mremap(uintptr(oldAddr), oldSize, newSize, flags, uintptr(newAddr)) + return unsafe.Pointer(xaddr), err +} diff --git a/vendor/golang.org/x/sys/unix/syscall_aix.go b/vendor/golang.org/x/sys/unix/syscall_aix.go index 67ce6cef2d5..6f15ba1eaff 100644 --- a/vendor/golang.org/x/sys/unix/syscall_aix.go +++ b/vendor/golang.org/x/sys/unix/syscall_aix.go @@ -360,7 +360,7 @@ func Wait4(pid int, wstatus *WaitStatus, options int, rusage *Rusage) (wpid int, var status _C_int var r Pid_t err = ERESTART - // AIX wait4 may return with ERESTART errno, while the processus is still + // AIX wait4 may return with ERESTART errno, while the process is still // active. for err == ERESTART { r, err = wait4(Pid_t(pid), &status, options, rusage) diff --git a/vendor/golang.org/x/sys/unix/syscall_darwin.go b/vendor/golang.org/x/sys/unix/syscall_darwin.go index 59542a897d2..099867deede 100644 --- a/vendor/golang.org/x/sys/unix/syscall_darwin.go +++ b/vendor/golang.org/x/sys/unix/syscall_darwin.go @@ -402,6 +402,18 @@ func IoctlSetIfreqMTU(fd int, ifreq *IfreqMTU) error { return ioctlPtr(fd, SIOCSIFMTU, unsafe.Pointer(ifreq)) } +//sys renamexNp(from string, to string, flag uint32) (err error) + +func RenamexNp(from string, to string, flag uint32) (err error) { + return renamexNp(from, to, flag) +} + +//sys renameatxNp(fromfd int, from string, tofd int, to string, flag uint32) (err error) + +func RenameatxNp(fromfd int, from string, tofd int, to string, flag uint32) (err error) { + return renameatxNp(fromfd, from, tofd, to, flag) +} + //sys sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) = SYS_SYSCTL func Uname(uname *Utsname) error { @@ -542,6 +554,55 @@ func SysctlKinfoProcSlice(name string, args ...int) ([]KinfoProc, error) { } } +//sys pthread_chdir_np(path string) (err error) + +func PthreadChdir(path string) (err error) { + return pthread_chdir_np(path) +} + +//sys pthread_fchdir_np(fd int) (err error) + +func PthreadFchdir(fd int) (err error) { + return pthread_fchdir_np(fd) +} + +// Connectx calls connectx(2) to initiate a connection on a socket. +// +// srcIf, srcAddr, and dstAddr are filled into a [SaEndpoints] struct and passed as the endpoints argument. +// +// - srcIf is the optional source interface index. 0 means unspecified. +// - srcAddr is the optional source address. nil means unspecified. +// - dstAddr is the destination address. +// +// On success, Connectx returns the number of bytes enqueued for transmission. +func Connectx(fd int, srcIf uint32, srcAddr, dstAddr Sockaddr, associd SaeAssocID, flags uint32, iov []Iovec, connid *SaeConnID) (n uintptr, err error) { + endpoints := SaEndpoints{ + Srcif: srcIf, + } + + if srcAddr != nil { + addrp, addrlen, err := srcAddr.sockaddr() + if err != nil { + return 0, err + } + endpoints.Srcaddr = (*RawSockaddr)(addrp) + endpoints.Srcaddrlen = uint32(addrlen) + } + + if dstAddr != nil { + addrp, addrlen, err := dstAddr.sockaddr() + if err != nil { + return 0, err + } + endpoints.Dstaddr = (*RawSockaddr)(addrp) + endpoints.Dstaddrlen = uint32(addrlen) + } + + err = connectx(fd, &endpoints, associd, flags, iov, &n, connid) + return +} + +//sys connectx(fd int, endpoints *SaEndpoints, associd SaeAssocID, flags uint32, iov []Iovec, n *uintptr, connid *SaeConnID) (err error) //sys sendfile(infd int, outfd int, offset int64, len *int64, hdtr unsafe.Pointer, flags int) (err error) //sys shmat(id int, addr uintptr, flag int) (ret uintptr, err error) diff --git a/vendor/golang.org/x/sys/unix/syscall_hurd.go b/vendor/golang.org/x/sys/unix/syscall_hurd.go index ba46651f8e3..a6a2d2fc2b9 100644 --- a/vendor/golang.org/x/sys/unix/syscall_hurd.go +++ b/vendor/golang.org/x/sys/unix/syscall_hurd.go @@ -11,6 +11,7 @@ package unix int ioctl(int, unsigned long int, uintptr_t); */ import "C" +import "unsafe" func ioctl(fd int, req uint, arg uintptr) (err error) { r0, er := C.ioctl(C.int(fd), C.ulong(req), C.uintptr_t(arg)) diff --git a/vendor/golang.org/x/sys/unix/syscall_linux.go b/vendor/golang.org/x/sys/unix/syscall_linux.go index 5682e2628ad..230a94549a7 100644 --- a/vendor/golang.org/x/sys/unix/syscall_linux.go +++ b/vendor/golang.org/x/sys/unix/syscall_linux.go @@ -1295,6 +1295,48 @@ func GetsockoptTCPInfo(fd, level, opt int) (*TCPInfo, error) { return &value, err } +// GetsockoptTCPCCVegasInfo returns algorithm specific congestion control information for a socket using the "vegas" +// algorithm. +// +// The socket's congestion control algorighm can be retrieved via [GetsockoptString] with the [TCP_CONGESTION] option: +// +// algo, err := unix.GetsockoptString(fd, unix.IPPROTO_TCP, unix.TCP_CONGESTION) +func GetsockoptTCPCCVegasInfo(fd, level, opt int) (*TCPVegasInfo, error) { + var value [SizeofTCPCCInfo / 4]uint32 // ensure proper alignment + vallen := _Socklen(SizeofTCPCCInfo) + err := getsockopt(fd, level, opt, unsafe.Pointer(&value[0]), &vallen) + out := (*TCPVegasInfo)(unsafe.Pointer(&value[0])) + return out, err +} + +// GetsockoptTCPCCDCTCPInfo returns algorithm specific congestion control information for a socket using the "dctp" +// algorithm. +// +// The socket's congestion control algorighm can be retrieved via [GetsockoptString] with the [TCP_CONGESTION] option: +// +// algo, err := unix.GetsockoptString(fd, unix.IPPROTO_TCP, unix.TCP_CONGESTION) +func GetsockoptTCPCCDCTCPInfo(fd, level, opt int) (*TCPDCTCPInfo, error) { + var value [SizeofTCPCCInfo / 4]uint32 // ensure proper alignment + vallen := _Socklen(SizeofTCPCCInfo) + err := getsockopt(fd, level, opt, unsafe.Pointer(&value[0]), &vallen) + out := (*TCPDCTCPInfo)(unsafe.Pointer(&value[0])) + return out, err +} + +// GetsockoptTCPCCBBRInfo returns algorithm specific congestion control information for a socket using the "bbr" +// algorithm. +// +// The socket's congestion control algorighm can be retrieved via [GetsockoptString] with the [TCP_CONGESTION] option: +// +// algo, err := unix.GetsockoptString(fd, unix.IPPROTO_TCP, unix.TCP_CONGESTION) +func GetsockoptTCPCCBBRInfo(fd, level, opt int) (*TCPBBRInfo, error) { + var value [SizeofTCPCCInfo / 4]uint32 // ensure proper alignment + vallen := _Socklen(SizeofTCPCCInfo) + err := getsockopt(fd, level, opt, unsafe.Pointer(&value[0]), &vallen) + out := (*TCPBBRInfo)(unsafe.Pointer(&value[0])) + return out, err +} + // GetsockoptString returns the string value of the socket option opt for the // socket associated with fd at the given socket level. func GetsockoptString(fd, level, opt int) (string, error) { @@ -1818,6 +1860,7 @@ func Sendfile(outfd int, infd int, offset *int64, count int) (written int, err e //sys ClockAdjtime(clockid int32, buf *Timex) (state int, err error) //sys ClockGetres(clockid int32, res *Timespec) (err error) //sys ClockGettime(clockid int32, time *Timespec) (err error) +//sys ClockSettime(clockid int32, time *Timespec) (err error) //sys ClockNanosleep(clockid int32, flags int, request *Timespec, remain *Timespec) (err error) //sys Close(fd int) (err error) //sys CloseRange(first uint, last uint, flags uint) (err error) @@ -1959,7 +2002,26 @@ func Getpgrp() (pid int) { //sysnb Getpid() (pid int) //sysnb Getppid() (ppid int) //sys Getpriority(which int, who int) (prio int, err error) -//sys Getrandom(buf []byte, flags int) (n int, err error) + +func Getrandom(buf []byte, flags int) (n int, err error) { + vdsoRet, supported := vgetrandom(buf, uint32(flags)) + if supported { + if vdsoRet < 0 { + return 0, errnoErr(syscall.Errno(-vdsoRet)) + } + return vdsoRet, nil + } + var p *byte + if len(buf) > 0 { + p = &buf[0] + } + r, _, e := Syscall(SYS_GETRANDOM, uintptr(unsafe.Pointer(p)), uintptr(len(buf)), uintptr(flags)) + if e != 0 { + return 0, errnoErr(e) + } + return int(r), nil +} + //sysnb Getrusage(who int, rusage *Rusage) (err error) //sysnb Getsid(pid int) (sid int, err error) //sysnb Gettid() (tid int) @@ -2592,3 +2654,4 @@ func SchedGetAttr(pid int, flags uint) (*SchedAttr, error) { } //sys Cachestat(fd uint, crange *CachestatRange, cstat *Cachestat_t, flags uint) (err error) +//sys Mseal(b []byte, flags uint) (err error) diff --git a/vendor/golang.org/x/sys/unix/syscall_linux_arm64.go b/vendor/golang.org/x/sys/unix/syscall_linux_arm64.go index cf2ee6c75ef..745e5c7e6c0 100644 --- a/vendor/golang.org/x/sys/unix/syscall_linux_arm64.go +++ b/vendor/golang.org/x/sys/unix/syscall_linux_arm64.go @@ -182,3 +182,5 @@ func KexecFileLoad(kernelFd int, initrdFd int, cmdline string, flags int) error } return kexecFileLoad(kernelFd, initrdFd, cmdlineLen, cmdline, flags) } + +const SYS_FSTATAT = SYS_NEWFSTATAT diff --git a/vendor/golang.org/x/sys/unix/syscall_linux_loong64.go b/vendor/golang.org/x/sys/unix/syscall_linux_loong64.go index 3d0e98451f8..dd2262a4079 100644 --- a/vendor/golang.org/x/sys/unix/syscall_linux_loong64.go +++ b/vendor/golang.org/x/sys/unix/syscall_linux_loong64.go @@ -214,3 +214,5 @@ func KexecFileLoad(kernelFd int, initrdFd int, cmdline string, flags int) error } return kexecFileLoad(kernelFd, initrdFd, cmdlineLen, cmdline, flags) } + +const SYS_FSTATAT = SYS_NEWFSTATAT diff --git a/vendor/golang.org/x/sys/unix/syscall_linux_riscv64.go b/vendor/golang.org/x/sys/unix/syscall_linux_riscv64.go index 6f5a288944d..8cf3670bda6 100644 --- a/vendor/golang.org/x/sys/unix/syscall_linux_riscv64.go +++ b/vendor/golang.org/x/sys/unix/syscall_linux_riscv64.go @@ -187,3 +187,5 @@ func RISCVHWProbe(pairs []RISCVHWProbePairs, set *CPUSet, flags uint) (err error } return riscvHWProbe(pairs, setSize, set, flags) } + +const SYS_FSTATAT = SYS_NEWFSTATAT diff --git a/vendor/golang.org/x/sys/unix/syscall_openbsd.go b/vendor/golang.org/x/sys/unix/syscall_openbsd.go index b25343c71a4..b86ded549c6 100644 --- a/vendor/golang.org/x/sys/unix/syscall_openbsd.go +++ b/vendor/golang.org/x/sys/unix/syscall_openbsd.go @@ -293,6 +293,7 @@ func Uname(uname *Utsname) error { //sys Mkfifoat(dirfd int, path string, mode uint32) (err error) //sys Mknod(path string, mode uint32, dev int) (err error) //sys Mknodat(dirfd int, path string, mode uint32, dev int) (err error) +//sys Mount(fsType string, dir string, flags int, data unsafe.Pointer) (err error) //sys Nanosleep(time *Timespec, leftover *Timespec) (err error) //sys Open(path string, mode int, perm uint32) (fd int, err error) //sys Openat(dirfd int, path string, mode int, perm uint32) (fd int, err error) diff --git a/vendor/golang.org/x/sys/unix/syscall_unix.go b/vendor/golang.org/x/sys/unix/syscall_unix.go index 77081de8c7d..4e92e5aa406 100644 --- a/vendor/golang.org/x/sys/unix/syscall_unix.go +++ b/vendor/golang.org/x/sys/unix/syscall_unix.go @@ -154,6 +154,15 @@ func Munmap(b []byte) (err error) { return mapper.Munmap(b) } +func MmapPtr(fd int, offset int64, addr unsafe.Pointer, length uintptr, prot int, flags int) (ret unsafe.Pointer, err error) { + xaddr, err := mapper.mmap(uintptr(addr), length, prot, flags, fd, offset) + return unsafe.Pointer(xaddr), err +} + +func MunmapPtr(addr unsafe.Pointer, length uintptr) (err error) { + return mapper.munmap(uintptr(addr), length) +} + func Read(fd int, p []byte) (n int, err error) { n, err = read(fd, p) if raceenabled { diff --git a/vendor/golang.org/x/sys/unix/syscall_zos_s390x.go b/vendor/golang.org/x/sys/unix/syscall_zos_s390x.go index 312ae6ac1d2..7bf5c04bb0a 100644 --- a/vendor/golang.org/x/sys/unix/syscall_zos_s390x.go +++ b/vendor/golang.org/x/sys/unix/syscall_zos_s390x.go @@ -768,6 +768,15 @@ func Munmap(b []byte) (err error) { return mapper.Munmap(b) } +func MmapPtr(fd int, offset int64, addr unsafe.Pointer, length uintptr, prot int, flags int) (ret unsafe.Pointer, err error) { + xaddr, err := mapper.mmap(uintptr(addr), length, prot, flags, fd, offset) + return unsafe.Pointer(xaddr), err +} + +func MunmapPtr(addr unsafe.Pointer, length uintptr) (err error) { + return mapper.munmap(uintptr(addr), length) +} + //sys Gethostname(buf []byte) (err error) = SYS___GETHOSTNAME_A //sysnb Getgid() (gid int) //sysnb Getpid() (pid int) @@ -816,10 +825,10 @@ func Lstat(path string, stat *Stat_t) (err error) { // for checking symlinks begins with $VERSION/ $SYSNAME/ $SYSSYMR/ $SYSSYMA/ func isSpecialPath(path []byte) (v bool) { var special = [4][8]byte{ - [8]byte{'V', 'E', 'R', 'S', 'I', 'O', 'N', '/'}, - [8]byte{'S', 'Y', 'S', 'N', 'A', 'M', 'E', '/'}, - [8]byte{'S', 'Y', 'S', 'S', 'Y', 'M', 'R', '/'}, - [8]byte{'S', 'Y', 'S', 'S', 'Y', 'M', 'A', '/'}} + {'V', 'E', 'R', 'S', 'I', 'O', 'N', '/'}, + {'S', 'Y', 'S', 'N', 'A', 'M', 'E', '/'}, + {'S', 'Y', 'S', 'S', 'Y', 'M', 'R', '/'}, + {'S', 'Y', 'S', 'S', 'Y', 'M', 'A', '/'}} var i, j int for i = 0; i < len(special); i++ { @@ -3115,3 +3124,90 @@ func legacy_Mkfifoat(dirfd int, path string, mode uint32) (err error) { //sys Posix_openpt(oflag int) (fd int, err error) = SYS_POSIX_OPENPT //sys Grantpt(fildes int) (rc int, err error) = SYS_GRANTPT //sys Unlockpt(fildes int) (rc int, err error) = SYS_UNLOCKPT + +func fcntlAsIs(fd uintptr, cmd int, arg uintptr) (val int, err error) { + runtime.EnterSyscall() + r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS_FCNTL<<4, uintptr(fd), uintptr(cmd), arg) + runtime.ExitSyscall() + val = int(r0) + if int64(r0) == -1 { + err = errnoErr2(e1, e2) + } + return +} + +func Fcntl(fd uintptr, cmd int, op interface{}) (ret int, err error) { + switch op.(type) { + case *Flock_t: + err = FcntlFlock(fd, cmd, op.(*Flock_t)) + if err != nil { + ret = -1 + } + return + case int: + return FcntlInt(fd, cmd, op.(int)) + case *F_cnvrt: + return fcntlAsIs(fd, cmd, uintptr(unsafe.Pointer(op.(*F_cnvrt)))) + case unsafe.Pointer: + return fcntlAsIs(fd, cmd, uintptr(op.(unsafe.Pointer))) + default: + return -1, EINVAL + } + return +} + +func Sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) { + if raceenabled { + raceReleaseMerge(unsafe.Pointer(&ioSync)) + } + return sendfile(outfd, infd, offset, count) +} + +func sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) { + // TODO: use LE call instead if the call is implemented + originalOffset, err := Seek(infd, 0, SEEK_CUR) + if err != nil { + return -1, err + } + //start reading data from in_fd + if offset != nil { + _, err := Seek(infd, *offset, SEEK_SET) + if err != nil { + return -1, err + } + } + + buf := make([]byte, count) + readBuf := make([]byte, 0) + var n int = 0 + for i := 0; i < count; i += n { + n, err := Read(infd, buf) + if n == 0 { + if err != nil { + return -1, err + } else { // EOF + break + } + } + readBuf = append(readBuf, buf...) + buf = buf[0:0] + } + + n2, err := Write(outfd, readBuf) + if err != nil { + return -1, err + } + + //When sendfile() returns, this variable will be set to the + // offset of the byte following the last byte that was read. + if offset != nil { + *offset = *offset + int64(n) + // If offset is not NULL, then sendfile() does not modify the file + // offset of in_fd + _, err := Seek(infd, originalOffset, SEEK_SET) + if err != nil { + return -1, err + } + } + return n2, nil +} diff --git a/vendor/golang.org/x/sys/unix/vgetrandom_linux.go b/vendor/golang.org/x/sys/unix/vgetrandom_linux.go new file mode 100644 index 00000000000..07ac8e09d1b --- /dev/null +++ b/vendor/golang.org/x/sys/unix/vgetrandom_linux.go @@ -0,0 +1,13 @@ +// Copyright 2024 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +//go:build linux && go1.24 + +package unix + +import _ "unsafe" + +//go:linkname vgetrandom runtime.vgetrandom +//go:noescape +func vgetrandom(p []byte, flags uint32) (ret int, supported bool) diff --git a/vendor/golang.org/x/sys/unix/vgetrandom_unsupported.go b/vendor/golang.org/x/sys/unix/vgetrandom_unsupported.go new file mode 100644 index 00000000000..297e97bce92 --- /dev/null +++ b/vendor/golang.org/x/sys/unix/vgetrandom_unsupported.go @@ -0,0 +1,11 @@ +// Copyright 2024 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +//go:build !linux || !go1.24 + +package unix + +func vgetrandom(p []byte, flags uint32) (ret int, supported bool) { + return -1, false +} diff --git a/vendor/golang.org/x/sys/unix/zerrors_darwin_amd64.go b/vendor/golang.org/x/sys/unix/zerrors_darwin_amd64.go index e40fa85245f..d73c4652e6c 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_darwin_amd64.go +++ b/vendor/golang.org/x/sys/unix/zerrors_darwin_amd64.go @@ -237,6 +237,9 @@ const ( CLOCK_UPTIME_RAW_APPROX = 0x9 CLONE_NOFOLLOW = 0x1 CLONE_NOOWNERCOPY = 0x2 + CONNECT_DATA_AUTHENTICATED = 0x4 + CONNECT_DATA_IDEMPOTENT = 0x2 + CONNECT_RESUME_ON_READ_WRITE = 0x1 CR0 = 0x0 CR1 = 0x1000 CR2 = 0x2000 @@ -1169,6 +1172,11 @@ const ( PT_WRITE_D = 0x5 PT_WRITE_I = 0x4 PT_WRITE_U = 0x6 + RENAME_EXCL = 0x4 + RENAME_NOFOLLOW_ANY = 0x10 + RENAME_RESERVED1 = 0x8 + RENAME_SECLUDE = 0x1 + RENAME_SWAP = 0x2 RLIMIT_AS = 0x5 RLIMIT_CORE = 0x4 RLIMIT_CPU = 0x0 @@ -1260,6 +1268,10 @@ const ( RTV_SSTHRESH = 0x20 RUSAGE_CHILDREN = -0x1 RUSAGE_SELF = 0x0 + SAE_ASSOCID_ALL = 0xffffffff + SAE_ASSOCID_ANY = 0x0 + SAE_CONNID_ALL = 0xffffffff + SAE_CONNID_ANY = 0x0 SCM_CREDS = 0x3 SCM_RIGHTS = 0x1 SCM_TIMESTAMP = 0x2 diff --git a/vendor/golang.org/x/sys/unix/zerrors_darwin_arm64.go b/vendor/golang.org/x/sys/unix/zerrors_darwin_arm64.go index bb02aa6c056..4a55a400588 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_darwin_arm64.go +++ b/vendor/golang.org/x/sys/unix/zerrors_darwin_arm64.go @@ -237,6 +237,9 @@ const ( CLOCK_UPTIME_RAW_APPROX = 0x9 CLONE_NOFOLLOW = 0x1 CLONE_NOOWNERCOPY = 0x2 + CONNECT_DATA_AUTHENTICATED = 0x4 + CONNECT_DATA_IDEMPOTENT = 0x2 + CONNECT_RESUME_ON_READ_WRITE = 0x1 CR0 = 0x0 CR1 = 0x1000 CR2 = 0x2000 @@ -1169,6 +1172,11 @@ const ( PT_WRITE_D = 0x5 PT_WRITE_I = 0x4 PT_WRITE_U = 0x6 + RENAME_EXCL = 0x4 + RENAME_NOFOLLOW_ANY = 0x10 + RENAME_RESERVED1 = 0x8 + RENAME_SECLUDE = 0x1 + RENAME_SWAP = 0x2 RLIMIT_AS = 0x5 RLIMIT_CORE = 0x4 RLIMIT_CPU = 0x0 @@ -1260,6 +1268,10 @@ const ( RTV_SSTHRESH = 0x20 RUSAGE_CHILDREN = -0x1 RUSAGE_SELF = 0x0 + SAE_ASSOCID_ALL = 0xffffffff + SAE_ASSOCID_ANY = 0x0 + SAE_CONNID_ALL = 0xffffffff + SAE_CONNID_ANY = 0x0 SCM_CREDS = 0x3 SCM_RIGHTS = 0x1 SCM_TIMESTAMP = 0x2 diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux.go b/vendor/golang.org/x/sys/unix/zerrors_linux.go index 877a62b479a..6ebc48b3fec 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_linux.go +++ b/vendor/golang.org/x/sys/unix/zerrors_linux.go @@ -321,6 +321,9 @@ const ( AUDIT_INTEGRITY_STATUS = 0x70a AUDIT_IPC = 0x517 AUDIT_IPC_SET_PERM = 0x51f + AUDIT_IPE_ACCESS = 0x58c + AUDIT_IPE_CONFIG_CHANGE = 0x58d + AUDIT_IPE_POLICY_LOAD = 0x58e AUDIT_KERNEL = 0x7d0 AUDIT_KERNEL_OTHER = 0x524 AUDIT_KERN_MODULE = 0x532 @@ -457,6 +460,7 @@ const ( B600 = 0x8 B75 = 0x2 B9600 = 0xd + BCACHEFS_SUPER_MAGIC = 0xca451a4e BDEVFS_MAGIC = 0x62646576 BINDERFS_SUPER_MAGIC = 0x6c6f6f70 BINFMTFS_MAGIC = 0x42494e4d @@ -488,12 +492,14 @@ const ( BPF_F_ID = 0x20 BPF_F_NETFILTER_IP_DEFRAG = 0x1 BPF_F_QUERY_EFFECTIVE = 0x1 + BPF_F_REDIRECT_FLAGS = 0x19 BPF_F_REPLACE = 0x4 BPF_F_SLEEPABLE = 0x10 BPF_F_STRICT_ALIGNMENT = 0x1 BPF_F_TEST_REG_INVARIANTS = 0x80 BPF_F_TEST_RND_HI32 = 0x4 BPF_F_TEST_RUN_ON_CPU = 0x1 + BPF_F_TEST_SKB_CHECKSUM_COMPLETE = 0x4 BPF_F_TEST_STATE_FREQ = 0x8 BPF_F_TEST_XDP_LIVE_FRAMES = 0x2 BPF_F_XDP_DEV_BOUND_ONLY = 0x40 @@ -928,6 +934,7 @@ const ( EPOLL_CTL_ADD = 0x1 EPOLL_CTL_DEL = 0x2 EPOLL_CTL_MOD = 0x3 + EPOLL_IOC_TYPE = 0x8a EROFS_SUPER_MAGIC_V1 = 0xe0f5e1e2 ESP_V4_FLOW = 0xa ESP_V6_FLOW = 0xc @@ -941,9 +948,6 @@ const ( ETHTOOL_FEC_OFF = 0x4 ETHTOOL_FEC_RS = 0x8 ETHTOOL_FLAG_ALL = 0x7 - ETHTOOL_FLAG_COMPACT_BITSETS = 0x1 - ETHTOOL_FLAG_OMIT_REPLY = 0x2 - ETHTOOL_FLAG_STATS = 0x4 ETHTOOL_FLASHDEV = 0x33 ETHTOOL_FLASH_MAX_FILENAME = 0x80 ETHTOOL_FWVERS_LEN = 0x20 @@ -1166,6 +1170,7 @@ const ( EXTA = 0xe EXTB = 0xf F2FS_SUPER_MAGIC = 0xf2f52010 + FALLOC_FL_ALLOCATE_RANGE = 0x0 FALLOC_FL_COLLAPSE_RANGE = 0x8 FALLOC_FL_INSERT_RANGE = 0x20 FALLOC_FL_KEEP_SIZE = 0x1 @@ -1705,6 +1710,7 @@ const ( KEXEC_ARCH_S390 = 0x160000 KEXEC_ARCH_SH = 0x2a0000 KEXEC_ARCH_X86_64 = 0x3e0000 + KEXEC_CRASH_HOTPLUG_SUPPORT = 0x8 KEXEC_FILE_DEBUG = 0x8 KEXEC_FILE_NO_INITRAMFS = 0x4 KEXEC_FILE_ON_CRASH = 0x2 @@ -1780,6 +1786,7 @@ const ( KEY_SPEC_USER_KEYRING = -0x4 KEY_SPEC_USER_SESSION_KEYRING = -0x5 LANDLOCK_ACCESS_FS_EXECUTE = 0x1 + LANDLOCK_ACCESS_FS_IOCTL_DEV = 0x8000 LANDLOCK_ACCESS_FS_MAKE_BLOCK = 0x800 LANDLOCK_ACCESS_FS_MAKE_CHAR = 0x40 LANDLOCK_ACCESS_FS_MAKE_DIR = 0x80 @@ -1797,6 +1804,8 @@ const ( LANDLOCK_ACCESS_NET_BIND_TCP = 0x1 LANDLOCK_ACCESS_NET_CONNECT_TCP = 0x2 LANDLOCK_CREATE_RULESET_VERSION = 0x1 + LANDLOCK_SCOPE_ABSTRACT_UNIX_SOCKET = 0x1 + LANDLOCK_SCOPE_SIGNAL = 0x2 LINUX_REBOOT_CMD_CAD_OFF = 0x0 LINUX_REBOOT_CMD_CAD_ON = 0x89abcdef LINUX_REBOOT_CMD_HALT = 0xcdef0123 @@ -1861,6 +1870,19 @@ const ( MAP_FILE = 0x0 MAP_FIXED = 0x10 MAP_FIXED_NOREPLACE = 0x100000 + MAP_HUGE_16GB = 0x88000000 + MAP_HUGE_16KB = 0x38000000 + MAP_HUGE_16MB = 0x60000000 + MAP_HUGE_1GB = 0x78000000 + MAP_HUGE_1MB = 0x50000000 + MAP_HUGE_256MB = 0x70000000 + MAP_HUGE_2GB = 0x7c000000 + MAP_HUGE_2MB = 0x54000000 + MAP_HUGE_32MB = 0x64000000 + MAP_HUGE_512KB = 0x4c000000 + MAP_HUGE_512MB = 0x74000000 + MAP_HUGE_64KB = 0x40000000 + MAP_HUGE_8MB = 0x5c000000 MAP_HUGE_MASK = 0x3f MAP_HUGE_SHIFT = 0x1a MAP_PRIVATE = 0x2 @@ -1908,6 +1930,8 @@ const ( MNT_EXPIRE = 0x4 MNT_FORCE = 0x1 MNT_ID_REQ_SIZE_VER0 = 0x18 + MNT_ID_REQ_SIZE_VER1 = 0x20 + MNT_NS_INFO_SIZE_VER0 = 0x10 MODULE_INIT_COMPRESSED_FILE = 0x4 MODULE_INIT_IGNORE_MODVERSIONS = 0x1 MODULE_INIT_IGNORE_VERMAGIC = 0x2 @@ -2173,7 +2197,7 @@ const ( NFT_REG_SIZE = 0x10 NFT_REJECT_ICMPX_MAX = 0x3 NFT_RT_MAX = 0x4 - NFT_SECMARK_CTX_MAXLEN = 0x100 + NFT_SECMARK_CTX_MAXLEN = 0x1000 NFT_SET_MAXNAMELEN = 0x100 NFT_SOCKET_MAX = 0x3 NFT_TABLE_F_MASK = 0x7 @@ -2342,9 +2366,11 @@ const ( PERF_MEM_LVLNUM_IO = 0xa PERF_MEM_LVLNUM_L1 = 0x1 PERF_MEM_LVLNUM_L2 = 0x2 + PERF_MEM_LVLNUM_L2_MHB = 0x5 PERF_MEM_LVLNUM_L3 = 0x3 PERF_MEM_LVLNUM_L4 = 0x4 PERF_MEM_LVLNUM_LFB = 0xc + PERF_MEM_LVLNUM_MSC = 0x6 PERF_MEM_LVLNUM_NA = 0xf PERF_MEM_LVLNUM_PMEM = 0xe PERF_MEM_LVLNUM_RAM = 0xd @@ -2417,6 +2443,7 @@ const ( PRIO_PGRP = 0x1 PRIO_PROCESS = 0x0 PRIO_USER = 0x2 + PROCFS_IOCTL_MAGIC = 'f' PROC_SUPER_MAGIC = 0x9fa0 PROT_EXEC = 0x4 PROT_GROWSDOWN = 0x1000000 @@ -2498,6 +2525,23 @@ const ( PR_PAC_GET_ENABLED_KEYS = 0x3d PR_PAC_RESET_KEYS = 0x36 PR_PAC_SET_ENABLED_KEYS = 0x3c + PR_PPC_DEXCR_CTRL_CLEAR = 0x4 + PR_PPC_DEXCR_CTRL_CLEAR_ONEXEC = 0x10 + PR_PPC_DEXCR_CTRL_EDITABLE = 0x1 + PR_PPC_DEXCR_CTRL_MASK = 0x1f + PR_PPC_DEXCR_CTRL_SET = 0x2 + PR_PPC_DEXCR_CTRL_SET_ONEXEC = 0x8 + PR_PPC_DEXCR_IBRTPD = 0x1 + PR_PPC_DEXCR_NPHIE = 0x3 + PR_PPC_DEXCR_SBHE = 0x0 + PR_PPC_DEXCR_SRAPD = 0x2 + PR_PPC_GET_DEXCR = 0x48 + PR_PPC_SET_DEXCR = 0x49 + PR_RISCV_CTX_SW_FENCEI_OFF = 0x1 + PR_RISCV_CTX_SW_FENCEI_ON = 0x0 + PR_RISCV_SCOPE_PER_PROCESS = 0x0 + PR_RISCV_SCOPE_PER_THREAD = 0x1 + PR_RISCV_SET_ICACHE_FLUSH_CTX = 0x47 PR_RISCV_V_GET_CONTROL = 0x46 PR_RISCV_V_SET_CONTROL = 0x45 PR_RISCV_V_VSTATE_CTRL_CUR_MASK = 0x3 @@ -2589,6 +2633,28 @@ const ( PR_UNALIGN_NOPRINT = 0x1 PR_UNALIGN_SIGBUS = 0x2 PSTOREFS_MAGIC = 0x6165676c + PTP_CLK_MAGIC = '=' + PTP_ENABLE_FEATURE = 0x1 + PTP_EXTTS_EDGES = 0x6 + PTP_EXTTS_EVENT_VALID = 0x1 + PTP_EXTTS_V1_VALID_FLAGS = 0x7 + PTP_EXTTS_VALID_FLAGS = 0x1f + PTP_EXT_OFFSET = 0x10 + PTP_FALLING_EDGE = 0x4 + PTP_MAX_SAMPLES = 0x19 + PTP_PEROUT_DUTY_CYCLE = 0x2 + PTP_PEROUT_ONE_SHOT = 0x1 + PTP_PEROUT_PHASE = 0x4 + PTP_PEROUT_V1_VALID_FLAGS = 0x0 + PTP_PEROUT_VALID_FLAGS = 0x7 + PTP_PIN_GETFUNC = 0xc0603d06 + PTP_PIN_GETFUNC2 = 0xc0603d0f + PTP_RISING_EDGE = 0x2 + PTP_STRICT_FLAGS = 0x8 + PTP_SYS_OFFSET_EXTENDED = 0xc4c03d09 + PTP_SYS_OFFSET_EXTENDED2 = 0xc4c03d12 + PTP_SYS_OFFSET_PRECISE = 0xc0403d08 + PTP_SYS_OFFSET_PRECISE2 = 0xc0403d11 PTRACE_ATTACH = 0x10 PTRACE_CONT = 0x7 PTRACE_DETACH = 0x11 @@ -2902,15 +2968,17 @@ const ( RUSAGE_SELF = 0x0 RUSAGE_THREAD = 0x1 RWF_APPEND = 0x10 + RWF_ATOMIC = 0x40 RWF_DSYNC = 0x2 RWF_HIPRI = 0x1 RWF_NOAPPEND = 0x20 RWF_NOWAIT = 0x8 - RWF_SUPPORTED = 0x3f + RWF_SUPPORTED = 0x7f RWF_SYNC = 0x4 RWF_WRITE_LIFE_NOT_SET = 0x0 SCHED_BATCH = 0x3 SCHED_DEADLINE = 0x6 + SCHED_EXT = 0x7 SCHED_FIFO = 0x1 SCHED_FLAG_ALL = 0x7f SCHED_FLAG_DL_OVERRUN = 0x4 @@ -3179,6 +3247,7 @@ const ( STATX_ATTR_MOUNT_ROOT = 0x2000 STATX_ATTR_NODUMP = 0x40 STATX_ATTR_VERITY = 0x100000 + STATX_ATTR_WRITE_ATOMIC = 0x400000 STATX_BASIC_STATS = 0x7ff STATX_BLOCKS = 0x400 STATX_BTIME = 0x800 @@ -3192,8 +3261,10 @@ const ( STATX_MTIME = 0x40 STATX_NLINK = 0x4 STATX_SIZE = 0x200 + STATX_SUBVOL = 0x8000 STATX_TYPE = 0x1 STATX_UID = 0x8 + STATX_WRITE_ATOMIC = 0x10000 STATX__RESERVED = 0x80000000 SYNC_FILE_RANGE_WAIT_AFTER = 0x4 SYNC_FILE_RANGE_WAIT_BEFORE = 0x1 @@ -3592,6 +3663,7 @@ const ( XDP_UMEM_PGOFF_COMPLETION_RING = 0x180000000 XDP_UMEM_PGOFF_FILL_RING = 0x100000000 XDP_UMEM_REG = 0x4 + XDP_UMEM_TX_METADATA_LEN = 0x4 XDP_UMEM_TX_SW_CSUM = 0x2 XDP_UMEM_UNALIGNED_CHUNK_FLAG = 0x1 XDP_USE_NEED_WAKEUP = 0x8 diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_386.go b/vendor/golang.org/x/sys/unix/zerrors_linux_386.go index e4bc0bd57c7..c0d45e32050 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_linux_386.go +++ b/vendor/golang.org/x/sys/unix/zerrors_linux_386.go @@ -78,6 +78,8 @@ const ( ECHOPRT = 0x400 EFD_CLOEXEC = 0x80000 EFD_NONBLOCK = 0x800 + EPIOCGPARAMS = 0x80088a02 + EPIOCSPARAMS = 0x40088a01 EPOLL_CLOEXEC = 0x80000 EXTPROC = 0x10000 FF1 = 0x8000 @@ -107,6 +109,7 @@ const ( HIDIOCGRAWINFO = 0x80084803 HIDIOCGRDESC = 0x90044802 HIDIOCGRDESCSIZE = 0x80044801 + HIDIOCREVOKE = 0x4004480d HUPCL = 0x400 ICANON = 0x2 IEXTEN = 0x8000 @@ -151,9 +154,14 @@ const ( NFDBITS = 0x20 NLDLY = 0x100 NOFLSH = 0x80 + NS_GET_MNTNS_ID = 0x8008b705 NS_GET_NSTYPE = 0xb703 NS_GET_OWNER_UID = 0xb704 NS_GET_PARENT = 0xb702 + NS_GET_PID_FROM_PIDNS = 0x8004b706 + NS_GET_PID_IN_PIDNS = 0x8004b708 + NS_GET_TGID_FROM_PIDNS = 0x8004b707 + NS_GET_TGID_IN_PIDNS = 0x8004b709 NS_GET_USERNS = 0xb701 OLCUC = 0x2 ONLCR = 0x4 @@ -230,6 +238,20 @@ const ( PPPIOCUNBRIDGECHAN = 0x7434 PPPIOCXFERUNIT = 0x744e PR_SET_PTRACER_ANY = 0xffffffff + PTP_CLOCK_GETCAPS = 0x80503d01 + PTP_CLOCK_GETCAPS2 = 0x80503d0a + PTP_ENABLE_PPS = 0x40043d04 + PTP_ENABLE_PPS2 = 0x40043d0d + PTP_EXTTS_REQUEST = 0x40103d02 + PTP_EXTTS_REQUEST2 = 0x40103d0b + PTP_MASK_CLEAR_ALL = 0x3d13 + PTP_MASK_EN_SINGLE = 0x40043d14 + PTP_PEROUT_REQUEST = 0x40383d03 + PTP_PEROUT_REQUEST2 = 0x40383d0c + PTP_PIN_SETFUNC = 0x40603d07 + PTP_PIN_SETFUNC2 = 0x40603d10 + PTP_SYS_OFFSET = 0x43403d05 + PTP_SYS_OFFSET2 = 0x43403d0e PTRACE_GETFPREGS = 0xe PTRACE_GETFPXREGS = 0x12 PTRACE_GET_THREAD_AREA = 0x19 @@ -276,6 +298,8 @@ const ( RTC_WIE_ON = 0x700f RTC_WKALM_RD = 0x80287010 RTC_WKALM_SET = 0x4028700f + SCM_DEVMEM_DMABUF = 0x4f + SCM_DEVMEM_LINEAR = 0x4e SCM_TIMESTAMPING = 0x25 SCM_TIMESTAMPING_OPT_STATS = 0x36 SCM_TIMESTAMPING_PKTINFO = 0x3a @@ -314,6 +338,9 @@ const ( SO_CNX_ADVICE = 0x35 SO_COOKIE = 0x39 SO_DETACH_REUSEPORT_BPF = 0x44 + SO_DEVMEM_DMABUF = 0x4f + SO_DEVMEM_DONTNEED = 0x50 + SO_DEVMEM_LINEAR = 0x4e SO_DOMAIN = 0x27 SO_DONTROUTE = 0x5 SO_ERROR = 0x4 diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_amd64.go b/vendor/golang.org/x/sys/unix/zerrors_linux_amd64.go index 689317afdbf..c731d24f025 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_linux_amd64.go +++ b/vendor/golang.org/x/sys/unix/zerrors_linux_amd64.go @@ -78,6 +78,8 @@ const ( ECHOPRT = 0x400 EFD_CLOEXEC = 0x80000 EFD_NONBLOCK = 0x800 + EPIOCGPARAMS = 0x80088a02 + EPIOCSPARAMS = 0x40088a01 EPOLL_CLOEXEC = 0x80000 EXTPROC = 0x10000 FF1 = 0x8000 @@ -107,6 +109,7 @@ const ( HIDIOCGRAWINFO = 0x80084803 HIDIOCGRDESC = 0x90044802 HIDIOCGRDESCSIZE = 0x80044801 + HIDIOCREVOKE = 0x4004480d HUPCL = 0x400 ICANON = 0x2 IEXTEN = 0x8000 @@ -151,9 +154,14 @@ const ( NFDBITS = 0x40 NLDLY = 0x100 NOFLSH = 0x80 + NS_GET_MNTNS_ID = 0x8008b705 NS_GET_NSTYPE = 0xb703 NS_GET_OWNER_UID = 0xb704 NS_GET_PARENT = 0xb702 + NS_GET_PID_FROM_PIDNS = 0x8004b706 + NS_GET_PID_IN_PIDNS = 0x8004b708 + NS_GET_TGID_FROM_PIDNS = 0x8004b707 + NS_GET_TGID_IN_PIDNS = 0x8004b709 NS_GET_USERNS = 0xb701 OLCUC = 0x2 ONLCR = 0x4 @@ -230,6 +238,20 @@ const ( PPPIOCUNBRIDGECHAN = 0x7434 PPPIOCXFERUNIT = 0x744e PR_SET_PTRACER_ANY = 0xffffffffffffffff + PTP_CLOCK_GETCAPS = 0x80503d01 + PTP_CLOCK_GETCAPS2 = 0x80503d0a + PTP_ENABLE_PPS = 0x40043d04 + PTP_ENABLE_PPS2 = 0x40043d0d + PTP_EXTTS_REQUEST = 0x40103d02 + PTP_EXTTS_REQUEST2 = 0x40103d0b + PTP_MASK_CLEAR_ALL = 0x3d13 + PTP_MASK_EN_SINGLE = 0x40043d14 + PTP_PEROUT_REQUEST = 0x40383d03 + PTP_PEROUT_REQUEST2 = 0x40383d0c + PTP_PIN_SETFUNC = 0x40603d07 + PTP_PIN_SETFUNC2 = 0x40603d10 + PTP_SYS_OFFSET = 0x43403d05 + PTP_SYS_OFFSET2 = 0x43403d0e PTRACE_ARCH_PRCTL = 0x1e PTRACE_GETFPREGS = 0xe PTRACE_GETFPXREGS = 0x12 @@ -277,6 +299,8 @@ const ( RTC_WIE_ON = 0x700f RTC_WKALM_RD = 0x80287010 RTC_WKALM_SET = 0x4028700f + SCM_DEVMEM_DMABUF = 0x4f + SCM_DEVMEM_LINEAR = 0x4e SCM_TIMESTAMPING = 0x25 SCM_TIMESTAMPING_OPT_STATS = 0x36 SCM_TIMESTAMPING_PKTINFO = 0x3a @@ -315,6 +339,9 @@ const ( SO_CNX_ADVICE = 0x35 SO_COOKIE = 0x39 SO_DETACH_REUSEPORT_BPF = 0x44 + SO_DEVMEM_DMABUF = 0x4f + SO_DEVMEM_DONTNEED = 0x50 + SO_DEVMEM_LINEAR = 0x4e SO_DOMAIN = 0x27 SO_DONTROUTE = 0x5 SO_ERROR = 0x4 diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_arm.go b/vendor/golang.org/x/sys/unix/zerrors_linux_arm.go index 5cca668ac30..680018a4a7c 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_linux_arm.go +++ b/vendor/golang.org/x/sys/unix/zerrors_linux_arm.go @@ -78,6 +78,8 @@ const ( ECHOPRT = 0x400 EFD_CLOEXEC = 0x80000 EFD_NONBLOCK = 0x800 + EPIOCGPARAMS = 0x80088a02 + EPIOCSPARAMS = 0x40088a01 EPOLL_CLOEXEC = 0x80000 EXTPROC = 0x10000 FF1 = 0x8000 @@ -106,6 +108,7 @@ const ( HIDIOCGRAWINFO = 0x80084803 HIDIOCGRDESC = 0x90044802 HIDIOCGRDESCSIZE = 0x80044801 + HIDIOCREVOKE = 0x4004480d HUPCL = 0x400 ICANON = 0x2 IEXTEN = 0x8000 @@ -148,9 +151,14 @@ const ( NFDBITS = 0x20 NLDLY = 0x100 NOFLSH = 0x80 + NS_GET_MNTNS_ID = 0x8008b705 NS_GET_NSTYPE = 0xb703 NS_GET_OWNER_UID = 0xb704 NS_GET_PARENT = 0xb702 + NS_GET_PID_FROM_PIDNS = 0x8004b706 + NS_GET_PID_IN_PIDNS = 0x8004b708 + NS_GET_TGID_FROM_PIDNS = 0x8004b707 + NS_GET_TGID_IN_PIDNS = 0x8004b709 NS_GET_USERNS = 0xb701 OLCUC = 0x2 ONLCR = 0x4 @@ -227,6 +235,20 @@ const ( PPPIOCUNBRIDGECHAN = 0x7434 PPPIOCXFERUNIT = 0x744e PR_SET_PTRACER_ANY = 0xffffffff + PTP_CLOCK_GETCAPS = 0x80503d01 + PTP_CLOCK_GETCAPS2 = 0x80503d0a + PTP_ENABLE_PPS = 0x40043d04 + PTP_ENABLE_PPS2 = 0x40043d0d + PTP_EXTTS_REQUEST = 0x40103d02 + PTP_EXTTS_REQUEST2 = 0x40103d0b + PTP_MASK_CLEAR_ALL = 0x3d13 + PTP_MASK_EN_SINGLE = 0x40043d14 + PTP_PEROUT_REQUEST = 0x40383d03 + PTP_PEROUT_REQUEST2 = 0x40383d0c + PTP_PIN_SETFUNC = 0x40603d07 + PTP_PIN_SETFUNC2 = 0x40603d10 + PTP_SYS_OFFSET = 0x43403d05 + PTP_SYS_OFFSET2 = 0x43403d0e PTRACE_GETCRUNCHREGS = 0x19 PTRACE_GETFDPIC = 0x1f PTRACE_GETFDPIC_EXEC = 0x0 @@ -282,6 +304,8 @@ const ( RTC_WIE_ON = 0x700f RTC_WKALM_RD = 0x80287010 RTC_WKALM_SET = 0x4028700f + SCM_DEVMEM_DMABUF = 0x4f + SCM_DEVMEM_LINEAR = 0x4e SCM_TIMESTAMPING = 0x25 SCM_TIMESTAMPING_OPT_STATS = 0x36 SCM_TIMESTAMPING_PKTINFO = 0x3a @@ -320,6 +344,9 @@ const ( SO_CNX_ADVICE = 0x35 SO_COOKIE = 0x39 SO_DETACH_REUSEPORT_BPF = 0x44 + SO_DEVMEM_DMABUF = 0x4f + SO_DEVMEM_DONTNEED = 0x50 + SO_DEVMEM_LINEAR = 0x4e SO_DOMAIN = 0x27 SO_DONTROUTE = 0x5 SO_ERROR = 0x4 diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_arm64.go b/vendor/golang.org/x/sys/unix/zerrors_linux_arm64.go index 14270508b04..a63909f308d 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_linux_arm64.go +++ b/vendor/golang.org/x/sys/unix/zerrors_linux_arm64.go @@ -78,6 +78,8 @@ const ( ECHOPRT = 0x400 EFD_CLOEXEC = 0x80000 EFD_NONBLOCK = 0x800 + EPIOCGPARAMS = 0x80088a02 + EPIOCSPARAMS = 0x40088a01 EPOLL_CLOEXEC = 0x80000 ESR_MAGIC = 0x45535201 EXTPROC = 0x10000 @@ -110,6 +112,7 @@ const ( HIDIOCGRAWINFO = 0x80084803 HIDIOCGRDESC = 0x90044802 HIDIOCGRDESCSIZE = 0x80044801 + HIDIOCREVOKE = 0x4004480d HUPCL = 0x400 ICANON = 0x2 IEXTEN = 0x8000 @@ -152,9 +155,14 @@ const ( NFDBITS = 0x40 NLDLY = 0x100 NOFLSH = 0x80 + NS_GET_MNTNS_ID = 0x8008b705 NS_GET_NSTYPE = 0xb703 NS_GET_OWNER_UID = 0xb704 NS_GET_PARENT = 0xb702 + NS_GET_PID_FROM_PIDNS = 0x8004b706 + NS_GET_PID_IN_PIDNS = 0x8004b708 + NS_GET_TGID_FROM_PIDNS = 0x8004b707 + NS_GET_TGID_IN_PIDNS = 0x8004b709 NS_GET_USERNS = 0xb701 OLCUC = 0x2 ONLCR = 0x4 @@ -198,6 +206,7 @@ const ( PERF_EVENT_IOC_SET_BPF = 0x40042408 PERF_EVENT_IOC_SET_FILTER = 0x40082406 PERF_EVENT_IOC_SET_OUTPUT = 0x2405 + POE_MAGIC = 0x504f4530 PPPIOCATTACH = 0x4004743d PPPIOCATTCHAN = 0x40047438 PPPIOCBRIDGECHAN = 0x40047435 @@ -233,6 +242,20 @@ const ( PROT_BTI = 0x10 PROT_MTE = 0x20 PR_SET_PTRACER_ANY = 0xffffffffffffffff + PTP_CLOCK_GETCAPS = 0x80503d01 + PTP_CLOCK_GETCAPS2 = 0x80503d0a + PTP_ENABLE_PPS = 0x40043d04 + PTP_ENABLE_PPS2 = 0x40043d0d + PTP_EXTTS_REQUEST = 0x40103d02 + PTP_EXTTS_REQUEST2 = 0x40103d0b + PTP_MASK_CLEAR_ALL = 0x3d13 + PTP_MASK_EN_SINGLE = 0x40043d14 + PTP_PEROUT_REQUEST = 0x40383d03 + PTP_PEROUT_REQUEST2 = 0x40383d0c + PTP_PIN_SETFUNC = 0x40603d07 + PTP_PIN_SETFUNC2 = 0x40603d10 + PTP_SYS_OFFSET = 0x43403d05 + PTP_SYS_OFFSET2 = 0x43403d0e PTRACE_PEEKMTETAGS = 0x21 PTRACE_POKEMTETAGS = 0x22 PTRACE_SYSEMU = 0x1f @@ -273,6 +296,8 @@ const ( RTC_WIE_ON = 0x700f RTC_WKALM_RD = 0x80287010 RTC_WKALM_SET = 0x4028700f + SCM_DEVMEM_DMABUF = 0x4f + SCM_DEVMEM_LINEAR = 0x4e SCM_TIMESTAMPING = 0x25 SCM_TIMESTAMPING_OPT_STATS = 0x36 SCM_TIMESTAMPING_PKTINFO = 0x3a @@ -311,6 +336,9 @@ const ( SO_CNX_ADVICE = 0x35 SO_COOKIE = 0x39 SO_DETACH_REUSEPORT_BPF = 0x44 + SO_DEVMEM_DMABUF = 0x4f + SO_DEVMEM_DONTNEED = 0x50 + SO_DEVMEM_LINEAR = 0x4e SO_DOMAIN = 0x27 SO_DONTROUTE = 0x5 SO_ERROR = 0x4 diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_loong64.go b/vendor/golang.org/x/sys/unix/zerrors_linux_loong64.go index 28e39afdcb4..9b0a2573fe3 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_linux_loong64.go +++ b/vendor/golang.org/x/sys/unix/zerrors_linux_loong64.go @@ -78,6 +78,8 @@ const ( ECHOPRT = 0x400 EFD_CLOEXEC = 0x80000 EFD_NONBLOCK = 0x800 + EPIOCGPARAMS = 0x80088a02 + EPIOCSPARAMS = 0x40088a01 EPOLL_CLOEXEC = 0x80000 EXTPROC = 0x10000 FF1 = 0x8000 @@ -107,6 +109,7 @@ const ( HIDIOCGRAWINFO = 0x80084803 HIDIOCGRDESC = 0x90044802 HIDIOCGRDESCSIZE = 0x80044801 + HIDIOCREVOKE = 0x4004480d HUPCL = 0x400 ICANON = 0x2 IEXTEN = 0x8000 @@ -152,9 +155,14 @@ const ( NFDBITS = 0x40 NLDLY = 0x100 NOFLSH = 0x80 + NS_GET_MNTNS_ID = 0x8008b705 NS_GET_NSTYPE = 0xb703 NS_GET_OWNER_UID = 0xb704 NS_GET_PARENT = 0xb702 + NS_GET_PID_FROM_PIDNS = 0x8004b706 + NS_GET_PID_IN_PIDNS = 0x8004b708 + NS_GET_TGID_FROM_PIDNS = 0x8004b707 + NS_GET_TGID_IN_PIDNS = 0x8004b709 NS_GET_USERNS = 0xb701 OLCUC = 0x2 ONLCR = 0x4 @@ -231,6 +239,20 @@ const ( PPPIOCUNBRIDGECHAN = 0x7434 PPPIOCXFERUNIT = 0x744e PR_SET_PTRACER_ANY = 0xffffffffffffffff + PTP_CLOCK_GETCAPS = 0x80503d01 + PTP_CLOCK_GETCAPS2 = 0x80503d0a + PTP_ENABLE_PPS = 0x40043d04 + PTP_ENABLE_PPS2 = 0x40043d0d + PTP_EXTTS_REQUEST = 0x40103d02 + PTP_EXTTS_REQUEST2 = 0x40103d0b + PTP_MASK_CLEAR_ALL = 0x3d13 + PTP_MASK_EN_SINGLE = 0x40043d14 + PTP_PEROUT_REQUEST = 0x40383d03 + PTP_PEROUT_REQUEST2 = 0x40383d0c + PTP_PIN_SETFUNC = 0x40603d07 + PTP_PIN_SETFUNC2 = 0x40603d10 + PTP_SYS_OFFSET = 0x43403d05 + PTP_SYS_OFFSET2 = 0x43403d0e PTRACE_SYSEMU = 0x1f PTRACE_SYSEMU_SINGLESTEP = 0x20 RLIMIT_AS = 0x9 @@ -269,6 +291,8 @@ const ( RTC_WIE_ON = 0x700f RTC_WKALM_RD = 0x80287010 RTC_WKALM_SET = 0x4028700f + SCM_DEVMEM_DMABUF = 0x4f + SCM_DEVMEM_LINEAR = 0x4e SCM_TIMESTAMPING = 0x25 SCM_TIMESTAMPING_OPT_STATS = 0x36 SCM_TIMESTAMPING_PKTINFO = 0x3a @@ -307,6 +331,9 @@ const ( SO_CNX_ADVICE = 0x35 SO_COOKIE = 0x39 SO_DETACH_REUSEPORT_BPF = 0x44 + SO_DEVMEM_DMABUF = 0x4f + SO_DEVMEM_DONTNEED = 0x50 + SO_DEVMEM_LINEAR = 0x4e SO_DOMAIN = 0x27 SO_DONTROUTE = 0x5 SO_ERROR = 0x4 diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_mips.go b/vendor/golang.org/x/sys/unix/zerrors_linux_mips.go index cd66e92cb42..958e6e0645a 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_linux_mips.go +++ b/vendor/golang.org/x/sys/unix/zerrors_linux_mips.go @@ -78,6 +78,8 @@ const ( ECHOPRT = 0x400 EFD_CLOEXEC = 0x80000 EFD_NONBLOCK = 0x80 + EPIOCGPARAMS = 0x40088a02 + EPIOCSPARAMS = 0x80088a01 EPOLL_CLOEXEC = 0x80000 EXTPROC = 0x10000 FF1 = 0x8000 @@ -106,6 +108,7 @@ const ( HIDIOCGRAWINFO = 0x40084803 HIDIOCGRDESC = 0x50044802 HIDIOCGRDESCSIZE = 0x40044801 + HIDIOCREVOKE = 0x8004480d HUPCL = 0x400 ICANON = 0x2 IEXTEN = 0x100 @@ -148,9 +151,14 @@ const ( NFDBITS = 0x20 NLDLY = 0x100 NOFLSH = 0x80 + NS_GET_MNTNS_ID = 0x4008b705 NS_GET_NSTYPE = 0x2000b703 NS_GET_OWNER_UID = 0x2000b704 NS_GET_PARENT = 0x2000b702 + NS_GET_PID_FROM_PIDNS = 0x4004b706 + NS_GET_PID_IN_PIDNS = 0x4004b708 + NS_GET_TGID_FROM_PIDNS = 0x4004b707 + NS_GET_TGID_IN_PIDNS = 0x4004b709 NS_GET_USERNS = 0x2000b701 OLCUC = 0x2 ONLCR = 0x4 @@ -227,6 +235,20 @@ const ( PPPIOCUNBRIDGECHAN = 0x20007434 PPPIOCXFERUNIT = 0x2000744e PR_SET_PTRACER_ANY = 0xffffffff + PTP_CLOCK_GETCAPS = 0x40503d01 + PTP_CLOCK_GETCAPS2 = 0x40503d0a + PTP_ENABLE_PPS = 0x80043d04 + PTP_ENABLE_PPS2 = 0x80043d0d + PTP_EXTTS_REQUEST = 0x80103d02 + PTP_EXTTS_REQUEST2 = 0x80103d0b + PTP_MASK_CLEAR_ALL = 0x20003d13 + PTP_MASK_EN_SINGLE = 0x80043d14 + PTP_PEROUT_REQUEST = 0x80383d03 + PTP_PEROUT_REQUEST2 = 0x80383d0c + PTP_PIN_SETFUNC = 0x80603d07 + PTP_PIN_SETFUNC2 = 0x80603d10 + PTP_SYS_OFFSET = 0x83403d05 + PTP_SYS_OFFSET2 = 0x83403d0e PTRACE_GETFPREGS = 0xe PTRACE_GET_THREAD_AREA = 0x19 PTRACE_GET_THREAD_AREA_3264 = 0xc4 @@ -275,6 +297,8 @@ const ( RTC_WIE_ON = 0x2000700f RTC_WKALM_RD = 0x40287010 RTC_WKALM_SET = 0x8028700f + SCM_DEVMEM_DMABUF = 0x4f + SCM_DEVMEM_LINEAR = 0x4e SCM_TIMESTAMPING = 0x25 SCM_TIMESTAMPING_OPT_STATS = 0x36 SCM_TIMESTAMPING_PKTINFO = 0x3a @@ -313,6 +337,9 @@ const ( SO_CNX_ADVICE = 0x35 SO_COOKIE = 0x39 SO_DETACH_REUSEPORT_BPF = 0x44 + SO_DEVMEM_DMABUF = 0x4f + SO_DEVMEM_DONTNEED = 0x50 + SO_DEVMEM_LINEAR = 0x4e SO_DOMAIN = 0x1029 SO_DONTROUTE = 0x10 SO_ERROR = 0x1007 diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_mips64.go b/vendor/golang.org/x/sys/unix/zerrors_linux_mips64.go index c1595eba78e..50c7f25bd16 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_linux_mips64.go +++ b/vendor/golang.org/x/sys/unix/zerrors_linux_mips64.go @@ -78,6 +78,8 @@ const ( ECHOPRT = 0x400 EFD_CLOEXEC = 0x80000 EFD_NONBLOCK = 0x80 + EPIOCGPARAMS = 0x40088a02 + EPIOCSPARAMS = 0x80088a01 EPOLL_CLOEXEC = 0x80000 EXTPROC = 0x10000 FF1 = 0x8000 @@ -106,6 +108,7 @@ const ( HIDIOCGRAWINFO = 0x40084803 HIDIOCGRDESC = 0x50044802 HIDIOCGRDESCSIZE = 0x40044801 + HIDIOCREVOKE = 0x8004480d HUPCL = 0x400 ICANON = 0x2 IEXTEN = 0x100 @@ -148,9 +151,14 @@ const ( NFDBITS = 0x40 NLDLY = 0x100 NOFLSH = 0x80 + NS_GET_MNTNS_ID = 0x4008b705 NS_GET_NSTYPE = 0x2000b703 NS_GET_OWNER_UID = 0x2000b704 NS_GET_PARENT = 0x2000b702 + NS_GET_PID_FROM_PIDNS = 0x4004b706 + NS_GET_PID_IN_PIDNS = 0x4004b708 + NS_GET_TGID_FROM_PIDNS = 0x4004b707 + NS_GET_TGID_IN_PIDNS = 0x4004b709 NS_GET_USERNS = 0x2000b701 OLCUC = 0x2 ONLCR = 0x4 @@ -227,6 +235,20 @@ const ( PPPIOCUNBRIDGECHAN = 0x20007434 PPPIOCXFERUNIT = 0x2000744e PR_SET_PTRACER_ANY = 0xffffffffffffffff + PTP_CLOCK_GETCAPS = 0x40503d01 + PTP_CLOCK_GETCAPS2 = 0x40503d0a + PTP_ENABLE_PPS = 0x80043d04 + PTP_ENABLE_PPS2 = 0x80043d0d + PTP_EXTTS_REQUEST = 0x80103d02 + PTP_EXTTS_REQUEST2 = 0x80103d0b + PTP_MASK_CLEAR_ALL = 0x20003d13 + PTP_MASK_EN_SINGLE = 0x80043d14 + PTP_PEROUT_REQUEST = 0x80383d03 + PTP_PEROUT_REQUEST2 = 0x80383d0c + PTP_PIN_SETFUNC = 0x80603d07 + PTP_PIN_SETFUNC2 = 0x80603d10 + PTP_SYS_OFFSET = 0x83403d05 + PTP_SYS_OFFSET2 = 0x83403d0e PTRACE_GETFPREGS = 0xe PTRACE_GET_THREAD_AREA = 0x19 PTRACE_GET_THREAD_AREA_3264 = 0xc4 @@ -275,6 +297,8 @@ const ( RTC_WIE_ON = 0x2000700f RTC_WKALM_RD = 0x40287010 RTC_WKALM_SET = 0x8028700f + SCM_DEVMEM_DMABUF = 0x4f + SCM_DEVMEM_LINEAR = 0x4e SCM_TIMESTAMPING = 0x25 SCM_TIMESTAMPING_OPT_STATS = 0x36 SCM_TIMESTAMPING_PKTINFO = 0x3a @@ -313,6 +337,9 @@ const ( SO_CNX_ADVICE = 0x35 SO_COOKIE = 0x39 SO_DETACH_REUSEPORT_BPF = 0x44 + SO_DEVMEM_DMABUF = 0x4f + SO_DEVMEM_DONTNEED = 0x50 + SO_DEVMEM_LINEAR = 0x4e SO_DOMAIN = 0x1029 SO_DONTROUTE = 0x10 SO_ERROR = 0x1007 diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_mips64le.go b/vendor/golang.org/x/sys/unix/zerrors_linux_mips64le.go index ee9456b0da7..ced21d66d95 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_linux_mips64le.go +++ b/vendor/golang.org/x/sys/unix/zerrors_linux_mips64le.go @@ -78,6 +78,8 @@ const ( ECHOPRT = 0x400 EFD_CLOEXEC = 0x80000 EFD_NONBLOCK = 0x80 + EPIOCGPARAMS = 0x40088a02 + EPIOCSPARAMS = 0x80088a01 EPOLL_CLOEXEC = 0x80000 EXTPROC = 0x10000 FF1 = 0x8000 @@ -106,6 +108,7 @@ const ( HIDIOCGRAWINFO = 0x40084803 HIDIOCGRDESC = 0x50044802 HIDIOCGRDESCSIZE = 0x40044801 + HIDIOCREVOKE = 0x8004480d HUPCL = 0x400 ICANON = 0x2 IEXTEN = 0x100 @@ -148,9 +151,14 @@ const ( NFDBITS = 0x40 NLDLY = 0x100 NOFLSH = 0x80 + NS_GET_MNTNS_ID = 0x4008b705 NS_GET_NSTYPE = 0x2000b703 NS_GET_OWNER_UID = 0x2000b704 NS_GET_PARENT = 0x2000b702 + NS_GET_PID_FROM_PIDNS = 0x4004b706 + NS_GET_PID_IN_PIDNS = 0x4004b708 + NS_GET_TGID_FROM_PIDNS = 0x4004b707 + NS_GET_TGID_IN_PIDNS = 0x4004b709 NS_GET_USERNS = 0x2000b701 OLCUC = 0x2 ONLCR = 0x4 @@ -227,6 +235,20 @@ const ( PPPIOCUNBRIDGECHAN = 0x20007434 PPPIOCXFERUNIT = 0x2000744e PR_SET_PTRACER_ANY = 0xffffffffffffffff + PTP_CLOCK_GETCAPS = 0x40503d01 + PTP_CLOCK_GETCAPS2 = 0x40503d0a + PTP_ENABLE_PPS = 0x80043d04 + PTP_ENABLE_PPS2 = 0x80043d0d + PTP_EXTTS_REQUEST = 0x80103d02 + PTP_EXTTS_REQUEST2 = 0x80103d0b + PTP_MASK_CLEAR_ALL = 0x20003d13 + PTP_MASK_EN_SINGLE = 0x80043d14 + PTP_PEROUT_REQUEST = 0x80383d03 + PTP_PEROUT_REQUEST2 = 0x80383d0c + PTP_PIN_SETFUNC = 0x80603d07 + PTP_PIN_SETFUNC2 = 0x80603d10 + PTP_SYS_OFFSET = 0x83403d05 + PTP_SYS_OFFSET2 = 0x83403d0e PTRACE_GETFPREGS = 0xe PTRACE_GET_THREAD_AREA = 0x19 PTRACE_GET_THREAD_AREA_3264 = 0xc4 @@ -275,6 +297,8 @@ const ( RTC_WIE_ON = 0x2000700f RTC_WKALM_RD = 0x40287010 RTC_WKALM_SET = 0x8028700f + SCM_DEVMEM_DMABUF = 0x4f + SCM_DEVMEM_LINEAR = 0x4e SCM_TIMESTAMPING = 0x25 SCM_TIMESTAMPING_OPT_STATS = 0x36 SCM_TIMESTAMPING_PKTINFO = 0x3a @@ -313,6 +337,9 @@ const ( SO_CNX_ADVICE = 0x35 SO_COOKIE = 0x39 SO_DETACH_REUSEPORT_BPF = 0x44 + SO_DEVMEM_DMABUF = 0x4f + SO_DEVMEM_DONTNEED = 0x50 + SO_DEVMEM_LINEAR = 0x4e SO_DOMAIN = 0x1029 SO_DONTROUTE = 0x10 SO_ERROR = 0x1007 diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_mipsle.go b/vendor/golang.org/x/sys/unix/zerrors_linux_mipsle.go index 8cfca81e1b5..226c0441902 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_linux_mipsle.go +++ b/vendor/golang.org/x/sys/unix/zerrors_linux_mipsle.go @@ -78,6 +78,8 @@ const ( ECHOPRT = 0x400 EFD_CLOEXEC = 0x80000 EFD_NONBLOCK = 0x80 + EPIOCGPARAMS = 0x40088a02 + EPIOCSPARAMS = 0x80088a01 EPOLL_CLOEXEC = 0x80000 EXTPROC = 0x10000 FF1 = 0x8000 @@ -106,6 +108,7 @@ const ( HIDIOCGRAWINFO = 0x40084803 HIDIOCGRDESC = 0x50044802 HIDIOCGRDESCSIZE = 0x40044801 + HIDIOCREVOKE = 0x8004480d HUPCL = 0x400 ICANON = 0x2 IEXTEN = 0x100 @@ -148,9 +151,14 @@ const ( NFDBITS = 0x20 NLDLY = 0x100 NOFLSH = 0x80 + NS_GET_MNTNS_ID = 0x4008b705 NS_GET_NSTYPE = 0x2000b703 NS_GET_OWNER_UID = 0x2000b704 NS_GET_PARENT = 0x2000b702 + NS_GET_PID_FROM_PIDNS = 0x4004b706 + NS_GET_PID_IN_PIDNS = 0x4004b708 + NS_GET_TGID_FROM_PIDNS = 0x4004b707 + NS_GET_TGID_IN_PIDNS = 0x4004b709 NS_GET_USERNS = 0x2000b701 OLCUC = 0x2 ONLCR = 0x4 @@ -227,6 +235,20 @@ const ( PPPIOCUNBRIDGECHAN = 0x20007434 PPPIOCXFERUNIT = 0x2000744e PR_SET_PTRACER_ANY = 0xffffffff + PTP_CLOCK_GETCAPS = 0x40503d01 + PTP_CLOCK_GETCAPS2 = 0x40503d0a + PTP_ENABLE_PPS = 0x80043d04 + PTP_ENABLE_PPS2 = 0x80043d0d + PTP_EXTTS_REQUEST = 0x80103d02 + PTP_EXTTS_REQUEST2 = 0x80103d0b + PTP_MASK_CLEAR_ALL = 0x20003d13 + PTP_MASK_EN_SINGLE = 0x80043d14 + PTP_PEROUT_REQUEST = 0x80383d03 + PTP_PEROUT_REQUEST2 = 0x80383d0c + PTP_PIN_SETFUNC = 0x80603d07 + PTP_PIN_SETFUNC2 = 0x80603d10 + PTP_SYS_OFFSET = 0x83403d05 + PTP_SYS_OFFSET2 = 0x83403d0e PTRACE_GETFPREGS = 0xe PTRACE_GET_THREAD_AREA = 0x19 PTRACE_GET_THREAD_AREA_3264 = 0xc4 @@ -275,6 +297,8 @@ const ( RTC_WIE_ON = 0x2000700f RTC_WKALM_RD = 0x40287010 RTC_WKALM_SET = 0x8028700f + SCM_DEVMEM_DMABUF = 0x4f + SCM_DEVMEM_LINEAR = 0x4e SCM_TIMESTAMPING = 0x25 SCM_TIMESTAMPING_OPT_STATS = 0x36 SCM_TIMESTAMPING_PKTINFO = 0x3a @@ -313,6 +337,9 @@ const ( SO_CNX_ADVICE = 0x35 SO_COOKIE = 0x39 SO_DETACH_REUSEPORT_BPF = 0x44 + SO_DEVMEM_DMABUF = 0x4f + SO_DEVMEM_DONTNEED = 0x50 + SO_DEVMEM_LINEAR = 0x4e SO_DOMAIN = 0x1029 SO_DONTROUTE = 0x10 SO_ERROR = 0x1007 diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_ppc.go b/vendor/golang.org/x/sys/unix/zerrors_linux_ppc.go index 60b0deb3af7..3122737cd46 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_linux_ppc.go +++ b/vendor/golang.org/x/sys/unix/zerrors_linux_ppc.go @@ -78,6 +78,8 @@ const ( ECHOPRT = 0x20 EFD_CLOEXEC = 0x80000 EFD_NONBLOCK = 0x800 + EPIOCGPARAMS = 0x40088a02 + EPIOCSPARAMS = 0x80088a01 EPOLL_CLOEXEC = 0x80000 EXTPROC = 0x10000000 FF1 = 0x4000 @@ -106,6 +108,7 @@ const ( HIDIOCGRAWINFO = 0x40084803 HIDIOCGRDESC = 0x50044802 HIDIOCGRDESCSIZE = 0x40044801 + HIDIOCREVOKE = 0x8004480d HUPCL = 0x4000 ICANON = 0x100 IEXTEN = 0x400 @@ -150,9 +153,14 @@ const ( NL3 = 0x300 NLDLY = 0x300 NOFLSH = 0x80000000 + NS_GET_MNTNS_ID = 0x4008b705 NS_GET_NSTYPE = 0x2000b703 NS_GET_OWNER_UID = 0x2000b704 NS_GET_PARENT = 0x2000b702 + NS_GET_PID_FROM_PIDNS = 0x4004b706 + NS_GET_PID_IN_PIDNS = 0x4004b708 + NS_GET_TGID_FROM_PIDNS = 0x4004b707 + NS_GET_TGID_IN_PIDNS = 0x4004b709 NS_GET_USERNS = 0x2000b701 OLCUC = 0x4 ONLCR = 0x2 @@ -230,6 +238,20 @@ const ( PPPIOCXFERUNIT = 0x2000744e PROT_SAO = 0x10 PR_SET_PTRACER_ANY = 0xffffffff + PTP_CLOCK_GETCAPS = 0x40503d01 + PTP_CLOCK_GETCAPS2 = 0x40503d0a + PTP_ENABLE_PPS = 0x80043d04 + PTP_ENABLE_PPS2 = 0x80043d0d + PTP_EXTTS_REQUEST = 0x80103d02 + PTP_EXTTS_REQUEST2 = 0x80103d0b + PTP_MASK_CLEAR_ALL = 0x20003d13 + PTP_MASK_EN_SINGLE = 0x80043d14 + PTP_PEROUT_REQUEST = 0x80383d03 + PTP_PEROUT_REQUEST2 = 0x80383d0c + PTP_PIN_SETFUNC = 0x80603d07 + PTP_PIN_SETFUNC2 = 0x80603d10 + PTP_SYS_OFFSET = 0x83403d05 + PTP_SYS_OFFSET2 = 0x83403d0e PTRACE_GETEVRREGS = 0x14 PTRACE_GETFPREGS = 0xe PTRACE_GETREGS64 = 0x16 @@ -330,6 +352,8 @@ const ( RTC_WIE_ON = 0x2000700f RTC_WKALM_RD = 0x40287010 RTC_WKALM_SET = 0x8028700f + SCM_DEVMEM_DMABUF = 0x4f + SCM_DEVMEM_LINEAR = 0x4e SCM_TIMESTAMPING = 0x25 SCM_TIMESTAMPING_OPT_STATS = 0x36 SCM_TIMESTAMPING_PKTINFO = 0x3a @@ -368,6 +392,9 @@ const ( SO_CNX_ADVICE = 0x35 SO_COOKIE = 0x39 SO_DETACH_REUSEPORT_BPF = 0x44 + SO_DEVMEM_DMABUF = 0x4f + SO_DEVMEM_DONTNEED = 0x50 + SO_DEVMEM_LINEAR = 0x4e SO_DOMAIN = 0x27 SO_DONTROUTE = 0x5 SO_ERROR = 0x4 diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_ppc64.go b/vendor/golang.org/x/sys/unix/zerrors_linux_ppc64.go index f90aa7281bf..eb5d3467edf 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_linux_ppc64.go +++ b/vendor/golang.org/x/sys/unix/zerrors_linux_ppc64.go @@ -78,6 +78,8 @@ const ( ECHOPRT = 0x20 EFD_CLOEXEC = 0x80000 EFD_NONBLOCK = 0x800 + EPIOCGPARAMS = 0x40088a02 + EPIOCSPARAMS = 0x80088a01 EPOLL_CLOEXEC = 0x80000 EXTPROC = 0x10000000 FF1 = 0x4000 @@ -106,6 +108,7 @@ const ( HIDIOCGRAWINFO = 0x40084803 HIDIOCGRDESC = 0x50044802 HIDIOCGRDESCSIZE = 0x40044801 + HIDIOCREVOKE = 0x8004480d HUPCL = 0x4000 ICANON = 0x100 IEXTEN = 0x400 @@ -150,9 +153,14 @@ const ( NL3 = 0x300 NLDLY = 0x300 NOFLSH = 0x80000000 + NS_GET_MNTNS_ID = 0x4008b705 NS_GET_NSTYPE = 0x2000b703 NS_GET_OWNER_UID = 0x2000b704 NS_GET_PARENT = 0x2000b702 + NS_GET_PID_FROM_PIDNS = 0x4004b706 + NS_GET_PID_IN_PIDNS = 0x4004b708 + NS_GET_TGID_FROM_PIDNS = 0x4004b707 + NS_GET_TGID_IN_PIDNS = 0x4004b709 NS_GET_USERNS = 0x2000b701 OLCUC = 0x4 ONLCR = 0x2 @@ -230,6 +238,20 @@ const ( PPPIOCXFERUNIT = 0x2000744e PROT_SAO = 0x10 PR_SET_PTRACER_ANY = 0xffffffffffffffff + PTP_CLOCK_GETCAPS = 0x40503d01 + PTP_CLOCK_GETCAPS2 = 0x40503d0a + PTP_ENABLE_PPS = 0x80043d04 + PTP_ENABLE_PPS2 = 0x80043d0d + PTP_EXTTS_REQUEST = 0x80103d02 + PTP_EXTTS_REQUEST2 = 0x80103d0b + PTP_MASK_CLEAR_ALL = 0x20003d13 + PTP_MASK_EN_SINGLE = 0x80043d14 + PTP_PEROUT_REQUEST = 0x80383d03 + PTP_PEROUT_REQUEST2 = 0x80383d0c + PTP_PIN_SETFUNC = 0x80603d07 + PTP_PIN_SETFUNC2 = 0x80603d10 + PTP_SYS_OFFSET = 0x83403d05 + PTP_SYS_OFFSET2 = 0x83403d0e PTRACE_GETEVRREGS = 0x14 PTRACE_GETFPREGS = 0xe PTRACE_GETREGS64 = 0x16 @@ -334,6 +356,8 @@ const ( RTC_WIE_ON = 0x2000700f RTC_WKALM_RD = 0x40287010 RTC_WKALM_SET = 0x8028700f + SCM_DEVMEM_DMABUF = 0x4f + SCM_DEVMEM_LINEAR = 0x4e SCM_TIMESTAMPING = 0x25 SCM_TIMESTAMPING_OPT_STATS = 0x36 SCM_TIMESTAMPING_PKTINFO = 0x3a @@ -372,6 +396,9 @@ const ( SO_CNX_ADVICE = 0x35 SO_COOKIE = 0x39 SO_DETACH_REUSEPORT_BPF = 0x44 + SO_DEVMEM_DMABUF = 0x4f + SO_DEVMEM_DONTNEED = 0x50 + SO_DEVMEM_LINEAR = 0x4e SO_DOMAIN = 0x27 SO_DONTROUTE = 0x5 SO_ERROR = 0x4 diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_ppc64le.go b/vendor/golang.org/x/sys/unix/zerrors_linux_ppc64le.go index ba9e0150338..e921ebc60b7 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_linux_ppc64le.go +++ b/vendor/golang.org/x/sys/unix/zerrors_linux_ppc64le.go @@ -78,6 +78,8 @@ const ( ECHOPRT = 0x20 EFD_CLOEXEC = 0x80000 EFD_NONBLOCK = 0x800 + EPIOCGPARAMS = 0x40088a02 + EPIOCSPARAMS = 0x80088a01 EPOLL_CLOEXEC = 0x80000 EXTPROC = 0x10000000 FF1 = 0x4000 @@ -106,6 +108,7 @@ const ( HIDIOCGRAWINFO = 0x40084803 HIDIOCGRDESC = 0x50044802 HIDIOCGRDESCSIZE = 0x40044801 + HIDIOCREVOKE = 0x8004480d HUPCL = 0x4000 ICANON = 0x100 IEXTEN = 0x400 @@ -150,9 +153,14 @@ const ( NL3 = 0x300 NLDLY = 0x300 NOFLSH = 0x80000000 + NS_GET_MNTNS_ID = 0x4008b705 NS_GET_NSTYPE = 0x2000b703 NS_GET_OWNER_UID = 0x2000b704 NS_GET_PARENT = 0x2000b702 + NS_GET_PID_FROM_PIDNS = 0x4004b706 + NS_GET_PID_IN_PIDNS = 0x4004b708 + NS_GET_TGID_FROM_PIDNS = 0x4004b707 + NS_GET_TGID_IN_PIDNS = 0x4004b709 NS_GET_USERNS = 0x2000b701 OLCUC = 0x4 ONLCR = 0x2 @@ -230,6 +238,20 @@ const ( PPPIOCXFERUNIT = 0x2000744e PROT_SAO = 0x10 PR_SET_PTRACER_ANY = 0xffffffffffffffff + PTP_CLOCK_GETCAPS = 0x40503d01 + PTP_CLOCK_GETCAPS2 = 0x40503d0a + PTP_ENABLE_PPS = 0x80043d04 + PTP_ENABLE_PPS2 = 0x80043d0d + PTP_EXTTS_REQUEST = 0x80103d02 + PTP_EXTTS_REQUEST2 = 0x80103d0b + PTP_MASK_CLEAR_ALL = 0x20003d13 + PTP_MASK_EN_SINGLE = 0x80043d14 + PTP_PEROUT_REQUEST = 0x80383d03 + PTP_PEROUT_REQUEST2 = 0x80383d0c + PTP_PIN_SETFUNC = 0x80603d07 + PTP_PIN_SETFUNC2 = 0x80603d10 + PTP_SYS_OFFSET = 0x83403d05 + PTP_SYS_OFFSET2 = 0x83403d0e PTRACE_GETEVRREGS = 0x14 PTRACE_GETFPREGS = 0xe PTRACE_GETREGS64 = 0x16 @@ -334,6 +356,8 @@ const ( RTC_WIE_ON = 0x2000700f RTC_WKALM_RD = 0x40287010 RTC_WKALM_SET = 0x8028700f + SCM_DEVMEM_DMABUF = 0x4f + SCM_DEVMEM_LINEAR = 0x4e SCM_TIMESTAMPING = 0x25 SCM_TIMESTAMPING_OPT_STATS = 0x36 SCM_TIMESTAMPING_PKTINFO = 0x3a @@ -372,6 +396,9 @@ const ( SO_CNX_ADVICE = 0x35 SO_COOKIE = 0x39 SO_DETACH_REUSEPORT_BPF = 0x44 + SO_DEVMEM_DMABUF = 0x4f + SO_DEVMEM_DONTNEED = 0x50 + SO_DEVMEM_LINEAR = 0x4e SO_DOMAIN = 0x27 SO_DONTROUTE = 0x5 SO_ERROR = 0x4 diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_riscv64.go b/vendor/golang.org/x/sys/unix/zerrors_linux_riscv64.go index 07cdfd6e9fd..38ba81c55c1 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_linux_riscv64.go +++ b/vendor/golang.org/x/sys/unix/zerrors_linux_riscv64.go @@ -78,6 +78,8 @@ const ( ECHOPRT = 0x400 EFD_CLOEXEC = 0x80000 EFD_NONBLOCK = 0x800 + EPIOCGPARAMS = 0x80088a02 + EPIOCSPARAMS = 0x40088a01 EPOLL_CLOEXEC = 0x80000 EXTPROC = 0x10000 FF1 = 0x8000 @@ -106,6 +108,7 @@ const ( HIDIOCGRAWINFO = 0x80084803 HIDIOCGRDESC = 0x90044802 HIDIOCGRDESCSIZE = 0x80044801 + HIDIOCREVOKE = 0x4004480d HUPCL = 0x400 ICANON = 0x2 IEXTEN = 0x8000 @@ -148,9 +151,14 @@ const ( NFDBITS = 0x40 NLDLY = 0x100 NOFLSH = 0x80 + NS_GET_MNTNS_ID = 0x8008b705 NS_GET_NSTYPE = 0xb703 NS_GET_OWNER_UID = 0xb704 NS_GET_PARENT = 0xb702 + NS_GET_PID_FROM_PIDNS = 0x8004b706 + NS_GET_PID_IN_PIDNS = 0x8004b708 + NS_GET_TGID_FROM_PIDNS = 0x8004b707 + NS_GET_TGID_IN_PIDNS = 0x8004b709 NS_GET_USERNS = 0xb701 OLCUC = 0x2 ONLCR = 0x4 @@ -227,6 +235,20 @@ const ( PPPIOCUNBRIDGECHAN = 0x7434 PPPIOCXFERUNIT = 0x744e PR_SET_PTRACER_ANY = 0xffffffffffffffff + PTP_CLOCK_GETCAPS = 0x80503d01 + PTP_CLOCK_GETCAPS2 = 0x80503d0a + PTP_ENABLE_PPS = 0x40043d04 + PTP_ENABLE_PPS2 = 0x40043d0d + PTP_EXTTS_REQUEST = 0x40103d02 + PTP_EXTTS_REQUEST2 = 0x40103d0b + PTP_MASK_CLEAR_ALL = 0x3d13 + PTP_MASK_EN_SINGLE = 0x40043d14 + PTP_PEROUT_REQUEST = 0x40383d03 + PTP_PEROUT_REQUEST2 = 0x40383d0c + PTP_PIN_SETFUNC = 0x40603d07 + PTP_PIN_SETFUNC2 = 0x40603d10 + PTP_SYS_OFFSET = 0x43403d05 + PTP_SYS_OFFSET2 = 0x43403d0e PTRACE_GETFDPIC = 0x21 PTRACE_GETFDPIC_EXEC = 0x0 PTRACE_GETFDPIC_INTERP = 0x1 @@ -266,6 +288,8 @@ const ( RTC_WIE_ON = 0x700f RTC_WKALM_RD = 0x80287010 RTC_WKALM_SET = 0x4028700f + SCM_DEVMEM_DMABUF = 0x4f + SCM_DEVMEM_LINEAR = 0x4e SCM_TIMESTAMPING = 0x25 SCM_TIMESTAMPING_OPT_STATS = 0x36 SCM_TIMESTAMPING_PKTINFO = 0x3a @@ -304,6 +328,9 @@ const ( SO_CNX_ADVICE = 0x35 SO_COOKIE = 0x39 SO_DETACH_REUSEPORT_BPF = 0x44 + SO_DEVMEM_DMABUF = 0x4f + SO_DEVMEM_DONTNEED = 0x50 + SO_DEVMEM_LINEAR = 0x4e SO_DOMAIN = 0x27 SO_DONTROUTE = 0x5 SO_ERROR = 0x4 diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_s390x.go b/vendor/golang.org/x/sys/unix/zerrors_linux_s390x.go index 2f1dd214a74..71f0400977b 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_linux_s390x.go +++ b/vendor/golang.org/x/sys/unix/zerrors_linux_s390x.go @@ -78,6 +78,8 @@ const ( ECHOPRT = 0x400 EFD_CLOEXEC = 0x80000 EFD_NONBLOCK = 0x800 + EPIOCGPARAMS = 0x80088a02 + EPIOCSPARAMS = 0x40088a01 EPOLL_CLOEXEC = 0x80000 EXTPROC = 0x10000 FF1 = 0x8000 @@ -106,6 +108,7 @@ const ( HIDIOCGRAWINFO = 0x80084803 HIDIOCGRDESC = 0x90044802 HIDIOCGRDESCSIZE = 0x80044801 + HIDIOCREVOKE = 0x4004480d HUPCL = 0x400 ICANON = 0x2 IEXTEN = 0x8000 @@ -148,9 +151,14 @@ const ( NFDBITS = 0x40 NLDLY = 0x100 NOFLSH = 0x80 + NS_GET_MNTNS_ID = 0x8008b705 NS_GET_NSTYPE = 0xb703 NS_GET_OWNER_UID = 0xb704 NS_GET_PARENT = 0xb702 + NS_GET_PID_FROM_PIDNS = 0x8004b706 + NS_GET_PID_IN_PIDNS = 0x8004b708 + NS_GET_TGID_FROM_PIDNS = 0x8004b707 + NS_GET_TGID_IN_PIDNS = 0x8004b709 NS_GET_USERNS = 0xb701 OLCUC = 0x2 ONLCR = 0x4 @@ -227,6 +235,20 @@ const ( PPPIOCUNBRIDGECHAN = 0x7434 PPPIOCXFERUNIT = 0x744e PR_SET_PTRACER_ANY = 0xffffffffffffffff + PTP_CLOCK_GETCAPS = 0x80503d01 + PTP_CLOCK_GETCAPS2 = 0x80503d0a + PTP_ENABLE_PPS = 0x40043d04 + PTP_ENABLE_PPS2 = 0x40043d0d + PTP_EXTTS_REQUEST = 0x40103d02 + PTP_EXTTS_REQUEST2 = 0x40103d0b + PTP_MASK_CLEAR_ALL = 0x3d13 + PTP_MASK_EN_SINGLE = 0x40043d14 + PTP_PEROUT_REQUEST = 0x40383d03 + PTP_PEROUT_REQUEST2 = 0x40383d0c + PTP_PIN_SETFUNC = 0x40603d07 + PTP_PIN_SETFUNC2 = 0x40603d10 + PTP_SYS_OFFSET = 0x43403d05 + PTP_SYS_OFFSET2 = 0x43403d0e PTRACE_DISABLE_TE = 0x5010 PTRACE_ENABLE_TE = 0x5009 PTRACE_GET_LAST_BREAK = 0x5006 @@ -338,6 +360,8 @@ const ( RTC_WIE_ON = 0x700f RTC_WKALM_RD = 0x80287010 RTC_WKALM_SET = 0x4028700f + SCM_DEVMEM_DMABUF = 0x4f + SCM_DEVMEM_LINEAR = 0x4e SCM_TIMESTAMPING = 0x25 SCM_TIMESTAMPING_OPT_STATS = 0x36 SCM_TIMESTAMPING_PKTINFO = 0x3a @@ -376,6 +400,9 @@ const ( SO_CNX_ADVICE = 0x35 SO_COOKIE = 0x39 SO_DETACH_REUSEPORT_BPF = 0x44 + SO_DEVMEM_DMABUF = 0x4f + SO_DEVMEM_DONTNEED = 0x50 + SO_DEVMEM_LINEAR = 0x4e SO_DOMAIN = 0x27 SO_DONTROUTE = 0x5 SO_ERROR = 0x4 diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_sparc64.go b/vendor/golang.org/x/sys/unix/zerrors_linux_sparc64.go index f40519d9018..c44a313322c 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_linux_sparc64.go +++ b/vendor/golang.org/x/sys/unix/zerrors_linux_sparc64.go @@ -82,6 +82,8 @@ const ( EFD_CLOEXEC = 0x400000 EFD_NONBLOCK = 0x4000 EMT_TAGOVF = 0x1 + EPIOCGPARAMS = 0x40088a02 + EPIOCSPARAMS = 0x80088a01 EPOLL_CLOEXEC = 0x400000 EXTPROC = 0x10000 FF1 = 0x8000 @@ -110,6 +112,7 @@ const ( HIDIOCGRAWINFO = 0x40084803 HIDIOCGRDESC = 0x50044802 HIDIOCGRDESCSIZE = 0x40044801 + HIDIOCREVOKE = 0x8004480d HUPCL = 0x400 ICANON = 0x2 IEXTEN = 0x8000 @@ -153,9 +156,14 @@ const ( NFDBITS = 0x40 NLDLY = 0x100 NOFLSH = 0x80 + NS_GET_MNTNS_ID = 0x4008b705 NS_GET_NSTYPE = 0x2000b703 NS_GET_OWNER_UID = 0x2000b704 NS_GET_PARENT = 0x2000b702 + NS_GET_PID_FROM_PIDNS = 0x4004b706 + NS_GET_PID_IN_PIDNS = 0x4004b708 + NS_GET_TGID_FROM_PIDNS = 0x4004b707 + NS_GET_TGID_IN_PIDNS = 0x4004b709 NS_GET_USERNS = 0x2000b701 OLCUC = 0x2 ONLCR = 0x4 @@ -232,6 +240,20 @@ const ( PPPIOCUNBRIDGECHAN = 0x20007434 PPPIOCXFERUNIT = 0x2000744e PR_SET_PTRACER_ANY = 0xffffffffffffffff + PTP_CLOCK_GETCAPS = 0x40503d01 + PTP_CLOCK_GETCAPS2 = 0x40503d0a + PTP_ENABLE_PPS = 0x80043d04 + PTP_ENABLE_PPS2 = 0x80043d0d + PTP_EXTTS_REQUEST = 0x80103d02 + PTP_EXTTS_REQUEST2 = 0x80103d0b + PTP_MASK_CLEAR_ALL = 0x20003d13 + PTP_MASK_EN_SINGLE = 0x80043d14 + PTP_PEROUT_REQUEST = 0x80383d03 + PTP_PEROUT_REQUEST2 = 0x80383d0c + PTP_PIN_SETFUNC = 0x80603d07 + PTP_PIN_SETFUNC2 = 0x80603d10 + PTP_SYS_OFFSET = 0x83403d05 + PTP_SYS_OFFSET2 = 0x83403d0e PTRACE_GETFPAREGS = 0x14 PTRACE_GETFPREGS = 0xe PTRACE_GETFPREGS64 = 0x19 @@ -329,6 +351,8 @@ const ( RTC_WIE_ON = 0x2000700f RTC_WKALM_RD = 0x40287010 RTC_WKALM_SET = 0x8028700f + SCM_DEVMEM_DMABUF = 0x58 + SCM_DEVMEM_LINEAR = 0x57 SCM_TIMESTAMPING = 0x23 SCM_TIMESTAMPING_OPT_STATS = 0x38 SCM_TIMESTAMPING_PKTINFO = 0x3c @@ -415,6 +439,9 @@ const ( SO_CNX_ADVICE = 0x37 SO_COOKIE = 0x3b SO_DETACH_REUSEPORT_BPF = 0x47 + SO_DEVMEM_DMABUF = 0x58 + SO_DEVMEM_DONTNEED = 0x59 + SO_DEVMEM_LINEAR = 0x57 SO_DOMAIN = 0x1029 SO_DONTROUTE = 0x10 SO_ERROR = 0x1007 diff --git a/vendor/golang.org/x/sys/unix/zerrors_zos_s390x.go b/vendor/golang.org/x/sys/unix/zerrors_zos_s390x.go index da08b2ab3d9..1ec2b1407b1 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_zos_s390x.go +++ b/vendor/golang.org/x/sys/unix/zerrors_zos_s390x.go @@ -581,6 +581,8 @@ const ( AT_EMPTY_PATH = 0x1000 AT_REMOVEDIR = 0x200 RENAME_NOREPLACE = 1 << 0 + ST_RDONLY = 1 + ST_NOSUID = 2 ) const ( diff --git a/vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.go b/vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.go index ccb02f240a4..24b346e1a35 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.go @@ -740,6 +740,54 @@ func ioctlPtr(fd int, req uint, arg unsafe.Pointer) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func renamexNp(from string, to string, flag uint32) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(from) + if err != nil { + return + } + var _p1 *byte + _p1, err = BytePtrFromString(to) + if err != nil { + return + } + _, _, e1 := syscall_syscall(libc_renamex_np_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(flag)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +var libc_renamex_np_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_renamex_np renamex_np "/usr/lib/libSystem.B.dylib" + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func renameatxNp(fromfd int, from string, tofd int, to string, flag uint32) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(from) + if err != nil { + return + } + var _p1 *byte + _p1, err = BytePtrFromString(to) + if err != nil { + return + } + _, _, e1 := syscall_syscall6(libc_renameatx_np_trampoline_addr, uintptr(fromfd), uintptr(unsafe.Pointer(_p0)), uintptr(tofd), uintptr(unsafe.Pointer(_p1)), uintptr(flag), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +var libc_renameatx_np_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_renameatx_np renameatx_np "/usr/lib/libSystem.B.dylib" + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) { var _p0 unsafe.Pointer if len(mib) > 0 { @@ -760,6 +808,59 @@ var libc_sysctl_trampoline_addr uintptr // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func pthread_chdir_np(path string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := syscall_syscall(libc_pthread_chdir_np_trampoline_addr, uintptr(unsafe.Pointer(_p0)), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +var libc_pthread_chdir_np_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_pthread_chdir_np pthread_chdir_np "/usr/lib/libSystem.B.dylib" + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func pthread_fchdir_np(fd int) (err error) { + _, _, e1 := syscall_syscall(libc_pthread_fchdir_np_trampoline_addr, uintptr(fd), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +var libc_pthread_fchdir_np_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_pthread_fchdir_np pthread_fchdir_np "/usr/lib/libSystem.B.dylib" + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func connectx(fd int, endpoints *SaEndpoints, associd SaeAssocID, flags uint32, iov []Iovec, n *uintptr, connid *SaeConnID) (err error) { + var _p0 unsafe.Pointer + if len(iov) > 0 { + _p0 = unsafe.Pointer(&iov[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := syscall_syscall9(libc_connectx_trampoline_addr, uintptr(fd), uintptr(unsafe.Pointer(endpoints)), uintptr(associd), uintptr(flags), uintptr(_p0), uintptr(len(iov)), uintptr(unsafe.Pointer(n)), uintptr(unsafe.Pointer(connid)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +var libc_connectx_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_connectx connectx "/usr/lib/libSystem.B.dylib" + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func sendfile(infd int, outfd int, offset int64, len *int64, hdtr unsafe.Pointer, flags int) (err error) { _, _, e1 := syscall_syscall6(libc_sendfile_trampoline_addr, uintptr(infd), uintptr(outfd), uintptr(offset), uintptr(unsafe.Pointer(len)), uintptr(hdtr), uintptr(flags)) if e1 != 0 { diff --git a/vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.s b/vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.s index 8b8bb284028..ebd213100b3 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.s +++ b/vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.s @@ -223,11 +223,36 @@ TEXT libc_ioctl_trampoline<>(SB),NOSPLIT,$0-0 GLOBL ·libc_ioctl_trampoline_addr(SB), RODATA, $8 DATA ·libc_ioctl_trampoline_addr(SB)/8, $libc_ioctl_trampoline<>(SB) +TEXT libc_renamex_np_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_renamex_np(SB) +GLOBL ·libc_renamex_np_trampoline_addr(SB), RODATA, $8 +DATA ·libc_renamex_np_trampoline_addr(SB)/8, $libc_renamex_np_trampoline<>(SB) + +TEXT libc_renameatx_np_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_renameatx_np(SB) +GLOBL ·libc_renameatx_np_trampoline_addr(SB), RODATA, $8 +DATA ·libc_renameatx_np_trampoline_addr(SB)/8, $libc_renameatx_np_trampoline<>(SB) + TEXT libc_sysctl_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_sysctl(SB) GLOBL ·libc_sysctl_trampoline_addr(SB), RODATA, $8 DATA ·libc_sysctl_trampoline_addr(SB)/8, $libc_sysctl_trampoline<>(SB) +TEXT libc_pthread_chdir_np_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_pthread_chdir_np(SB) +GLOBL ·libc_pthread_chdir_np_trampoline_addr(SB), RODATA, $8 +DATA ·libc_pthread_chdir_np_trampoline_addr(SB)/8, $libc_pthread_chdir_np_trampoline<>(SB) + +TEXT libc_pthread_fchdir_np_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_pthread_fchdir_np(SB) +GLOBL ·libc_pthread_fchdir_np_trampoline_addr(SB), RODATA, $8 +DATA ·libc_pthread_fchdir_np_trampoline_addr(SB)/8, $libc_pthread_fchdir_np_trampoline<>(SB) + +TEXT libc_connectx_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_connectx(SB) +GLOBL ·libc_connectx_trampoline_addr(SB), RODATA, $8 +DATA ·libc_connectx_trampoline_addr(SB)/8, $libc_connectx_trampoline<>(SB) + TEXT libc_sendfile_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_sendfile(SB) GLOBL ·libc_sendfile_trampoline_addr(SB), RODATA, $8 diff --git a/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm64.go b/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm64.go index 1b40b997b52..824b9c2d5e0 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm64.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm64.go @@ -740,6 +740,54 @@ func ioctlPtr(fd int, req uint, arg unsafe.Pointer) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func renamexNp(from string, to string, flag uint32) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(from) + if err != nil { + return + } + var _p1 *byte + _p1, err = BytePtrFromString(to) + if err != nil { + return + } + _, _, e1 := syscall_syscall(libc_renamex_np_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(flag)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +var libc_renamex_np_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_renamex_np renamex_np "/usr/lib/libSystem.B.dylib" + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func renameatxNp(fromfd int, from string, tofd int, to string, flag uint32) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(from) + if err != nil { + return + } + var _p1 *byte + _p1, err = BytePtrFromString(to) + if err != nil { + return + } + _, _, e1 := syscall_syscall6(libc_renameatx_np_trampoline_addr, uintptr(fromfd), uintptr(unsafe.Pointer(_p0)), uintptr(tofd), uintptr(unsafe.Pointer(_p1)), uintptr(flag), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +var libc_renameatx_np_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_renameatx_np renameatx_np "/usr/lib/libSystem.B.dylib" + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) { var _p0 unsafe.Pointer if len(mib) > 0 { @@ -760,6 +808,59 @@ var libc_sysctl_trampoline_addr uintptr // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func pthread_chdir_np(path string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := syscall_syscall(libc_pthread_chdir_np_trampoline_addr, uintptr(unsafe.Pointer(_p0)), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +var libc_pthread_chdir_np_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_pthread_chdir_np pthread_chdir_np "/usr/lib/libSystem.B.dylib" + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func pthread_fchdir_np(fd int) (err error) { + _, _, e1 := syscall_syscall(libc_pthread_fchdir_np_trampoline_addr, uintptr(fd), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +var libc_pthread_fchdir_np_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_pthread_fchdir_np pthread_fchdir_np "/usr/lib/libSystem.B.dylib" + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func connectx(fd int, endpoints *SaEndpoints, associd SaeAssocID, flags uint32, iov []Iovec, n *uintptr, connid *SaeConnID) (err error) { + var _p0 unsafe.Pointer + if len(iov) > 0 { + _p0 = unsafe.Pointer(&iov[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := syscall_syscall9(libc_connectx_trampoline_addr, uintptr(fd), uintptr(unsafe.Pointer(endpoints)), uintptr(associd), uintptr(flags), uintptr(_p0), uintptr(len(iov)), uintptr(unsafe.Pointer(n)), uintptr(unsafe.Pointer(connid)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +var libc_connectx_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_connectx connectx "/usr/lib/libSystem.B.dylib" + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func sendfile(infd int, outfd int, offset int64, len *int64, hdtr unsafe.Pointer, flags int) (err error) { _, _, e1 := syscall_syscall6(libc_sendfile_trampoline_addr, uintptr(infd), uintptr(outfd), uintptr(offset), uintptr(unsafe.Pointer(len)), uintptr(hdtr), uintptr(flags)) if e1 != 0 { diff --git a/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm64.s b/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm64.s index 08362c1ab74..4f178a22934 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm64.s +++ b/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm64.s @@ -223,11 +223,36 @@ TEXT libc_ioctl_trampoline<>(SB),NOSPLIT,$0-0 GLOBL ·libc_ioctl_trampoline_addr(SB), RODATA, $8 DATA ·libc_ioctl_trampoline_addr(SB)/8, $libc_ioctl_trampoline<>(SB) +TEXT libc_renamex_np_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_renamex_np(SB) +GLOBL ·libc_renamex_np_trampoline_addr(SB), RODATA, $8 +DATA ·libc_renamex_np_trampoline_addr(SB)/8, $libc_renamex_np_trampoline<>(SB) + +TEXT libc_renameatx_np_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_renameatx_np(SB) +GLOBL ·libc_renameatx_np_trampoline_addr(SB), RODATA, $8 +DATA ·libc_renameatx_np_trampoline_addr(SB)/8, $libc_renameatx_np_trampoline<>(SB) + TEXT libc_sysctl_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_sysctl(SB) GLOBL ·libc_sysctl_trampoline_addr(SB), RODATA, $8 DATA ·libc_sysctl_trampoline_addr(SB)/8, $libc_sysctl_trampoline<>(SB) +TEXT libc_pthread_chdir_np_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_pthread_chdir_np(SB) +GLOBL ·libc_pthread_chdir_np_trampoline_addr(SB), RODATA, $8 +DATA ·libc_pthread_chdir_np_trampoline_addr(SB)/8, $libc_pthread_chdir_np_trampoline<>(SB) + +TEXT libc_pthread_fchdir_np_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_pthread_fchdir_np(SB) +GLOBL ·libc_pthread_fchdir_np_trampoline_addr(SB), RODATA, $8 +DATA ·libc_pthread_fchdir_np_trampoline_addr(SB)/8, $libc_pthread_fchdir_np_trampoline<>(SB) + +TEXT libc_connectx_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_connectx(SB) +GLOBL ·libc_connectx_trampoline_addr(SB), RODATA, $8 +DATA ·libc_connectx_trampoline_addr(SB)/8, $libc_connectx_trampoline<>(SB) + TEXT libc_sendfile_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_sendfile(SB) GLOBL ·libc_sendfile_trampoline_addr(SB), RODATA, $8 diff --git a/vendor/golang.org/x/sys/unix/zsyscall_linux.go b/vendor/golang.org/x/sys/unix/zsyscall_linux.go index 87d8612a1dc..5cc1e8eb2f3 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_linux.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_linux.go @@ -592,6 +592,16 @@ func ClockGettime(clockid int32, time *Timespec) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func ClockSettime(clockid int32, time *Timespec) (err error) { + _, _, e1 := Syscall(SYS_CLOCK_SETTIME, uintptr(clockid), uintptr(unsafe.Pointer(time)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func ClockNanosleep(clockid int32, flags int, request *Timespec, remain *Timespec) (err error) { _, _, e1 := Syscall6(SYS_CLOCK_NANOSLEEP, uintptr(clockid), uintptr(flags), uintptr(unsafe.Pointer(request)), uintptr(unsafe.Pointer(remain)), 0, 0) if e1 != 0 { @@ -971,23 +981,6 @@ func Getpriority(which int, who int) (prio int, err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT -func Getrandom(buf []byte, flags int) (n int, err error) { - var _p0 unsafe.Pointer - if len(buf) > 0 { - _p0 = unsafe.Pointer(&buf[0]) - } else { - _p0 = unsafe.Pointer(&_zero) - } - r0, _, e1 := Syscall(SYS_GETRANDOM, uintptr(_p0), uintptr(len(buf)), uintptr(flags)) - n = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - func Getrusage(who int, rusage *Rusage) (err error) { _, _, e1 := RawSyscall(SYS_GETRUSAGE, uintptr(who), uintptr(unsafe.Pointer(rusage)), 0) if e1 != 0 { @@ -2229,3 +2222,19 @@ func Cachestat(fd uint, crange *CachestatRange, cstat *Cachestat_t, flags uint) } return } + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Mseal(b []byte, flags uint) (err error) { + var _p0 unsafe.Pointer + if len(b) > 0 { + _p0 = unsafe.Pointer(&b[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall(SYS_MSEAL, uintptr(_p0), uintptr(len(b)), uintptr(flags)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} diff --git a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_386.go b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_386.go index 9dc42410b78..1851df14e87 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_386.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_386.go @@ -1493,6 +1493,30 @@ var libc_mknodat_trampoline_addr uintptr // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func Mount(fsType string, dir string, flags int, data unsafe.Pointer) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(fsType) + if err != nil { + return + } + var _p1 *byte + _p1, err = BytePtrFromString(dir) + if err != nil { + return + } + _, _, e1 := syscall_syscall6(libc_mount_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(flags), uintptr(data), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +var libc_mount_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_mount mount "libc.so" + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func Nanosleep(time *Timespec, leftover *Timespec) (err error) { _, _, e1 := syscall_syscall(libc_nanosleep_trampoline_addr, uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover)), 0) if e1 != 0 { diff --git a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_386.s b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_386.s index 41b5617316c..0b43c693656 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_386.s +++ b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_386.s @@ -463,6 +463,11 @@ TEXT libc_mknodat_trampoline<>(SB),NOSPLIT,$0-0 GLOBL ·libc_mknodat_trampoline_addr(SB), RODATA, $4 DATA ·libc_mknodat_trampoline_addr(SB)/4, $libc_mknodat_trampoline<>(SB) +TEXT libc_mount_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_mount(SB) +GLOBL ·libc_mount_trampoline_addr(SB), RODATA, $4 +DATA ·libc_mount_trampoline_addr(SB)/4, $libc_mount_trampoline<>(SB) + TEXT libc_nanosleep_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_nanosleep(SB) GLOBL ·libc_nanosleep_trampoline_addr(SB), RODATA, $4 diff --git a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_amd64.go b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_amd64.go index 0d3a0751cd4..e1ec0dbe4ec 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_amd64.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_amd64.go @@ -1493,6 +1493,30 @@ var libc_mknodat_trampoline_addr uintptr // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func Mount(fsType string, dir string, flags int, data unsafe.Pointer) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(fsType) + if err != nil { + return + } + var _p1 *byte + _p1, err = BytePtrFromString(dir) + if err != nil { + return + } + _, _, e1 := syscall_syscall6(libc_mount_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(flags), uintptr(data), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +var libc_mount_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_mount mount "libc.so" + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func Nanosleep(time *Timespec, leftover *Timespec) (err error) { _, _, e1 := syscall_syscall(libc_nanosleep_trampoline_addr, uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover)), 0) if e1 != 0 { diff --git a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_amd64.s b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_amd64.s index 4019a656f6d..880c6d6e316 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_amd64.s +++ b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_amd64.s @@ -463,6 +463,11 @@ TEXT libc_mknodat_trampoline<>(SB),NOSPLIT,$0-0 GLOBL ·libc_mknodat_trampoline_addr(SB), RODATA, $8 DATA ·libc_mknodat_trampoline_addr(SB)/8, $libc_mknodat_trampoline<>(SB) +TEXT libc_mount_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_mount(SB) +GLOBL ·libc_mount_trampoline_addr(SB), RODATA, $8 +DATA ·libc_mount_trampoline_addr(SB)/8, $libc_mount_trampoline<>(SB) + TEXT libc_nanosleep_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_nanosleep(SB) GLOBL ·libc_nanosleep_trampoline_addr(SB), RODATA, $8 diff --git a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm.go b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm.go index c39f7776db3..7c8452a63e9 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm.go @@ -1493,6 +1493,30 @@ var libc_mknodat_trampoline_addr uintptr // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func Mount(fsType string, dir string, flags int, data unsafe.Pointer) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(fsType) + if err != nil { + return + } + var _p1 *byte + _p1, err = BytePtrFromString(dir) + if err != nil { + return + } + _, _, e1 := syscall_syscall6(libc_mount_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(flags), uintptr(data), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +var libc_mount_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_mount mount "libc.so" + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func Nanosleep(time *Timespec, leftover *Timespec) (err error) { _, _, e1 := syscall_syscall(libc_nanosleep_trampoline_addr, uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover)), 0) if e1 != 0 { diff --git a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm.s b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm.s index ac4af24f908..b8ef95b0fa1 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm.s +++ b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm.s @@ -463,6 +463,11 @@ TEXT libc_mknodat_trampoline<>(SB),NOSPLIT,$0-0 GLOBL ·libc_mknodat_trampoline_addr(SB), RODATA, $4 DATA ·libc_mknodat_trampoline_addr(SB)/4, $libc_mknodat_trampoline<>(SB) +TEXT libc_mount_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_mount(SB) +GLOBL ·libc_mount_trampoline_addr(SB), RODATA, $4 +DATA ·libc_mount_trampoline_addr(SB)/4, $libc_mount_trampoline<>(SB) + TEXT libc_nanosleep_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_nanosleep(SB) GLOBL ·libc_nanosleep_trampoline_addr(SB), RODATA, $4 diff --git a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm64.go b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm64.go index 57571d072fe..2ffdf861f75 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm64.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm64.go @@ -1493,6 +1493,30 @@ var libc_mknodat_trampoline_addr uintptr // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func Mount(fsType string, dir string, flags int, data unsafe.Pointer) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(fsType) + if err != nil { + return + } + var _p1 *byte + _p1, err = BytePtrFromString(dir) + if err != nil { + return + } + _, _, e1 := syscall_syscall6(libc_mount_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(flags), uintptr(data), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +var libc_mount_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_mount mount "libc.so" + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func Nanosleep(time *Timespec, leftover *Timespec) (err error) { _, _, e1 := syscall_syscall(libc_nanosleep_trampoline_addr, uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover)), 0) if e1 != 0 { diff --git a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm64.s b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm64.s index f77d532121b..2af3b5c762f 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm64.s +++ b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm64.s @@ -463,6 +463,11 @@ TEXT libc_mknodat_trampoline<>(SB),NOSPLIT,$0-0 GLOBL ·libc_mknodat_trampoline_addr(SB), RODATA, $8 DATA ·libc_mknodat_trampoline_addr(SB)/8, $libc_mknodat_trampoline<>(SB) +TEXT libc_mount_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_mount(SB) +GLOBL ·libc_mount_trampoline_addr(SB), RODATA, $8 +DATA ·libc_mount_trampoline_addr(SB)/8, $libc_mount_trampoline<>(SB) + TEXT libc_nanosleep_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_nanosleep(SB) GLOBL ·libc_nanosleep_trampoline_addr(SB), RODATA, $8 diff --git a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_mips64.go b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_mips64.go index e62963e67e2..1da08d52675 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_mips64.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_mips64.go @@ -1493,6 +1493,30 @@ var libc_mknodat_trampoline_addr uintptr // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func Mount(fsType string, dir string, flags int, data unsafe.Pointer) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(fsType) + if err != nil { + return + } + var _p1 *byte + _p1, err = BytePtrFromString(dir) + if err != nil { + return + } + _, _, e1 := syscall_syscall6(libc_mount_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(flags), uintptr(data), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +var libc_mount_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_mount mount "libc.so" + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func Nanosleep(time *Timespec, leftover *Timespec) (err error) { _, _, e1 := syscall_syscall(libc_nanosleep_trampoline_addr, uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover)), 0) if e1 != 0 { diff --git a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_mips64.s b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_mips64.s index fae140b62c9..b7a251353b0 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_mips64.s +++ b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_mips64.s @@ -463,6 +463,11 @@ TEXT libc_mknodat_trampoline<>(SB),NOSPLIT,$0-0 GLOBL ·libc_mknodat_trampoline_addr(SB), RODATA, $8 DATA ·libc_mknodat_trampoline_addr(SB)/8, $libc_mknodat_trampoline<>(SB) +TEXT libc_mount_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_mount(SB) +GLOBL ·libc_mount_trampoline_addr(SB), RODATA, $8 +DATA ·libc_mount_trampoline_addr(SB)/8, $libc_mount_trampoline<>(SB) + TEXT libc_nanosleep_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_nanosleep(SB) GLOBL ·libc_nanosleep_trampoline_addr(SB), RODATA, $8 diff --git a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_ppc64.go b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_ppc64.go index 00831354c82..6e85b0aac95 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_ppc64.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_ppc64.go @@ -1493,6 +1493,30 @@ var libc_mknodat_trampoline_addr uintptr // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func Mount(fsType string, dir string, flags int, data unsafe.Pointer) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(fsType) + if err != nil { + return + } + var _p1 *byte + _p1, err = BytePtrFromString(dir) + if err != nil { + return + } + _, _, e1 := syscall_syscall6(libc_mount_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(flags), uintptr(data), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +var libc_mount_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_mount mount "libc.so" + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func Nanosleep(time *Timespec, leftover *Timespec) (err error) { _, _, e1 := syscall_syscall(libc_nanosleep_trampoline_addr, uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover)), 0) if e1 != 0 { diff --git a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_ppc64.s b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_ppc64.s index 9d1e0ff06d0..f15dadf0552 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_ppc64.s +++ b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_ppc64.s @@ -555,6 +555,12 @@ TEXT libc_mknodat_trampoline<>(SB),NOSPLIT,$0-0 GLOBL ·libc_mknodat_trampoline_addr(SB), RODATA, $8 DATA ·libc_mknodat_trampoline_addr(SB)/8, $libc_mknodat_trampoline<>(SB) +TEXT libc_mount_trampoline<>(SB),NOSPLIT,$0-0 + CALL libc_mount(SB) + RET +GLOBL ·libc_mount_trampoline_addr(SB), RODATA, $8 +DATA ·libc_mount_trampoline_addr(SB)/8, $libc_mount_trampoline<>(SB) + TEXT libc_nanosleep_trampoline<>(SB),NOSPLIT,$0-0 CALL libc_nanosleep(SB) RET diff --git a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_riscv64.go b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_riscv64.go index 79029ed5848..28b487df251 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_riscv64.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_riscv64.go @@ -1493,6 +1493,30 @@ var libc_mknodat_trampoline_addr uintptr // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func Mount(fsType string, dir string, flags int, data unsafe.Pointer) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(fsType) + if err != nil { + return + } + var _p1 *byte + _p1, err = BytePtrFromString(dir) + if err != nil { + return + } + _, _, e1 := syscall_syscall6(libc_mount_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(flags), uintptr(data), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +var libc_mount_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_mount mount "libc.so" + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func Nanosleep(time *Timespec, leftover *Timespec) (err error) { _, _, e1 := syscall_syscall(libc_nanosleep_trampoline_addr, uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover)), 0) if e1 != 0 { diff --git a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_riscv64.s b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_riscv64.s index da115f9a4b6..1e7f321e436 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_riscv64.s +++ b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_riscv64.s @@ -463,6 +463,11 @@ TEXT libc_mknodat_trampoline<>(SB),NOSPLIT,$0-0 GLOBL ·libc_mknodat_trampoline_addr(SB), RODATA, $8 DATA ·libc_mknodat_trampoline_addr(SB)/8, $libc_mknodat_trampoline<>(SB) +TEXT libc_mount_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_mount(SB) +GLOBL ·libc_mount_trampoline_addr(SB), RODATA, $8 +DATA ·libc_mount_trampoline_addr(SB)/8, $libc_mount_trampoline<>(SB) + TEXT libc_nanosleep_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_nanosleep(SB) GLOBL ·libc_nanosleep_trampoline_addr(SB), RODATA, $8 diff --git a/vendor/golang.org/x/sys/unix/zsysnum_linux_386.go b/vendor/golang.org/x/sys/unix/zsysnum_linux_386.go index 53aef5dc58d..524b0820cbc 100644 --- a/vendor/golang.org/x/sys/unix/zsysnum_linux_386.go +++ b/vendor/golang.org/x/sys/unix/zsysnum_linux_386.go @@ -457,4 +457,5 @@ const ( SYS_LSM_GET_SELF_ATTR = 459 SYS_LSM_SET_SELF_ATTR = 460 SYS_LSM_LIST_MODULES = 461 + SYS_MSEAL = 462 ) diff --git a/vendor/golang.org/x/sys/unix/zsysnum_linux_amd64.go b/vendor/golang.org/x/sys/unix/zsysnum_linux_amd64.go index 71d524763d3..f485dbf4565 100644 --- a/vendor/golang.org/x/sys/unix/zsysnum_linux_amd64.go +++ b/vendor/golang.org/x/sys/unix/zsysnum_linux_amd64.go @@ -341,6 +341,7 @@ const ( SYS_STATX = 332 SYS_IO_PGETEVENTS = 333 SYS_RSEQ = 334 + SYS_URETPROBE = 335 SYS_PIDFD_SEND_SIGNAL = 424 SYS_IO_URING_SETUP = 425 SYS_IO_URING_ENTER = 426 @@ -379,4 +380,5 @@ const ( SYS_LSM_GET_SELF_ATTR = 459 SYS_LSM_SET_SELF_ATTR = 460 SYS_LSM_LIST_MODULES = 461 + SYS_MSEAL = 462 ) diff --git a/vendor/golang.org/x/sys/unix/zsysnum_linux_arm.go b/vendor/golang.org/x/sys/unix/zsysnum_linux_arm.go index c747706131c..70b35bf3b09 100644 --- a/vendor/golang.org/x/sys/unix/zsysnum_linux_arm.go +++ b/vendor/golang.org/x/sys/unix/zsysnum_linux_arm.go @@ -421,4 +421,5 @@ const ( SYS_LSM_GET_SELF_ATTR = 459 SYS_LSM_SET_SELF_ATTR = 460 SYS_LSM_LIST_MODULES = 461 + SYS_MSEAL = 462 ) diff --git a/vendor/golang.org/x/sys/unix/zsysnum_linux_arm64.go b/vendor/golang.org/x/sys/unix/zsysnum_linux_arm64.go index f96e214f6d4..1893e2fe884 100644 --- a/vendor/golang.org/x/sys/unix/zsysnum_linux_arm64.go +++ b/vendor/golang.org/x/sys/unix/zsysnum_linux_arm64.go @@ -85,7 +85,7 @@ const ( SYS_SPLICE = 76 SYS_TEE = 77 SYS_READLINKAT = 78 - SYS_FSTATAT = 79 + SYS_NEWFSTATAT = 79 SYS_FSTAT = 80 SYS_SYNC = 81 SYS_FSYNC = 82 @@ -324,4 +324,5 @@ const ( SYS_LSM_GET_SELF_ATTR = 459 SYS_LSM_SET_SELF_ATTR = 460 SYS_LSM_LIST_MODULES = 461 + SYS_MSEAL = 462 ) diff --git a/vendor/golang.org/x/sys/unix/zsysnum_linux_loong64.go b/vendor/golang.org/x/sys/unix/zsysnum_linux_loong64.go index 28425346cf1..16a4017da0a 100644 --- a/vendor/golang.org/x/sys/unix/zsysnum_linux_loong64.go +++ b/vendor/golang.org/x/sys/unix/zsysnum_linux_loong64.go @@ -84,6 +84,8 @@ const ( SYS_SPLICE = 76 SYS_TEE = 77 SYS_READLINKAT = 78 + SYS_NEWFSTATAT = 79 + SYS_FSTAT = 80 SYS_SYNC = 81 SYS_FSYNC = 82 SYS_FDATASYNC = 83 @@ -318,4 +320,5 @@ const ( SYS_LSM_GET_SELF_ATTR = 459 SYS_LSM_SET_SELF_ATTR = 460 SYS_LSM_LIST_MODULES = 461 + SYS_MSEAL = 462 ) diff --git a/vendor/golang.org/x/sys/unix/zsysnum_linux_mips.go b/vendor/golang.org/x/sys/unix/zsysnum_linux_mips.go index d0953018dae..7e567f1efff 100644 --- a/vendor/golang.org/x/sys/unix/zsysnum_linux_mips.go +++ b/vendor/golang.org/x/sys/unix/zsysnum_linux_mips.go @@ -441,4 +441,5 @@ const ( SYS_LSM_GET_SELF_ATTR = 4459 SYS_LSM_SET_SELF_ATTR = 4460 SYS_LSM_LIST_MODULES = 4461 + SYS_MSEAL = 4462 ) diff --git a/vendor/golang.org/x/sys/unix/zsysnum_linux_mips64.go b/vendor/golang.org/x/sys/unix/zsysnum_linux_mips64.go index 295c7f4b818..38ae55e5ef8 100644 --- a/vendor/golang.org/x/sys/unix/zsysnum_linux_mips64.go +++ b/vendor/golang.org/x/sys/unix/zsysnum_linux_mips64.go @@ -371,4 +371,5 @@ const ( SYS_LSM_GET_SELF_ATTR = 5459 SYS_LSM_SET_SELF_ATTR = 5460 SYS_LSM_LIST_MODULES = 5461 + SYS_MSEAL = 5462 ) diff --git a/vendor/golang.org/x/sys/unix/zsysnum_linux_mips64le.go b/vendor/golang.org/x/sys/unix/zsysnum_linux_mips64le.go index d1a9eaca7a4..55e92e60a82 100644 --- a/vendor/golang.org/x/sys/unix/zsysnum_linux_mips64le.go +++ b/vendor/golang.org/x/sys/unix/zsysnum_linux_mips64le.go @@ -371,4 +371,5 @@ const ( SYS_LSM_GET_SELF_ATTR = 5459 SYS_LSM_SET_SELF_ATTR = 5460 SYS_LSM_LIST_MODULES = 5461 + SYS_MSEAL = 5462 ) diff --git a/vendor/golang.org/x/sys/unix/zsysnum_linux_mipsle.go b/vendor/golang.org/x/sys/unix/zsysnum_linux_mipsle.go index bec157c39fd..60658d6a021 100644 --- a/vendor/golang.org/x/sys/unix/zsysnum_linux_mipsle.go +++ b/vendor/golang.org/x/sys/unix/zsysnum_linux_mipsle.go @@ -441,4 +441,5 @@ const ( SYS_LSM_GET_SELF_ATTR = 4459 SYS_LSM_SET_SELF_ATTR = 4460 SYS_LSM_LIST_MODULES = 4461 + SYS_MSEAL = 4462 ) diff --git a/vendor/golang.org/x/sys/unix/zsysnum_linux_ppc.go b/vendor/golang.org/x/sys/unix/zsysnum_linux_ppc.go index 7ee7bdc435c..e203e8a7ed4 100644 --- a/vendor/golang.org/x/sys/unix/zsysnum_linux_ppc.go +++ b/vendor/golang.org/x/sys/unix/zsysnum_linux_ppc.go @@ -448,4 +448,5 @@ const ( SYS_LSM_GET_SELF_ATTR = 459 SYS_LSM_SET_SELF_ATTR = 460 SYS_LSM_LIST_MODULES = 461 + SYS_MSEAL = 462 ) diff --git a/vendor/golang.org/x/sys/unix/zsysnum_linux_ppc64.go b/vendor/golang.org/x/sys/unix/zsysnum_linux_ppc64.go index fad1f25b449..5944b97d546 100644 --- a/vendor/golang.org/x/sys/unix/zsysnum_linux_ppc64.go +++ b/vendor/golang.org/x/sys/unix/zsysnum_linux_ppc64.go @@ -420,4 +420,5 @@ const ( SYS_LSM_GET_SELF_ATTR = 459 SYS_LSM_SET_SELF_ATTR = 460 SYS_LSM_LIST_MODULES = 461 + SYS_MSEAL = 462 ) diff --git a/vendor/golang.org/x/sys/unix/zsysnum_linux_ppc64le.go b/vendor/golang.org/x/sys/unix/zsysnum_linux_ppc64le.go index 7d3e16357d6..c66d416dad1 100644 --- a/vendor/golang.org/x/sys/unix/zsysnum_linux_ppc64le.go +++ b/vendor/golang.org/x/sys/unix/zsysnum_linux_ppc64le.go @@ -420,4 +420,5 @@ const ( SYS_LSM_GET_SELF_ATTR = 459 SYS_LSM_SET_SELF_ATTR = 460 SYS_LSM_LIST_MODULES = 461 + SYS_MSEAL = 462 ) diff --git a/vendor/golang.org/x/sys/unix/zsysnum_linux_riscv64.go b/vendor/golang.org/x/sys/unix/zsysnum_linux_riscv64.go index 0ed53ad9f7e..a5459e766f5 100644 --- a/vendor/golang.org/x/sys/unix/zsysnum_linux_riscv64.go +++ b/vendor/golang.org/x/sys/unix/zsysnum_linux_riscv64.go @@ -84,7 +84,7 @@ const ( SYS_SPLICE = 76 SYS_TEE = 77 SYS_READLINKAT = 78 - SYS_FSTATAT = 79 + SYS_NEWFSTATAT = 79 SYS_FSTAT = 80 SYS_SYNC = 81 SYS_FSYNC = 82 @@ -325,4 +325,5 @@ const ( SYS_LSM_GET_SELF_ATTR = 459 SYS_LSM_SET_SELF_ATTR = 460 SYS_LSM_LIST_MODULES = 461 + SYS_MSEAL = 462 ) diff --git a/vendor/golang.org/x/sys/unix/zsysnum_linux_s390x.go b/vendor/golang.org/x/sys/unix/zsysnum_linux_s390x.go index 2fba04ad500..01d86825bb9 100644 --- a/vendor/golang.org/x/sys/unix/zsysnum_linux_s390x.go +++ b/vendor/golang.org/x/sys/unix/zsysnum_linux_s390x.go @@ -386,4 +386,5 @@ const ( SYS_LSM_GET_SELF_ATTR = 459 SYS_LSM_SET_SELF_ATTR = 460 SYS_LSM_LIST_MODULES = 461 + SYS_MSEAL = 462 ) diff --git a/vendor/golang.org/x/sys/unix/zsysnum_linux_sparc64.go b/vendor/golang.org/x/sys/unix/zsysnum_linux_sparc64.go index 621d00d741b..7b703e77cda 100644 --- a/vendor/golang.org/x/sys/unix/zsysnum_linux_sparc64.go +++ b/vendor/golang.org/x/sys/unix/zsysnum_linux_sparc64.go @@ -399,4 +399,5 @@ const ( SYS_LSM_GET_SELF_ATTR = 459 SYS_LSM_SET_SELF_ATTR = 460 SYS_LSM_LIST_MODULES = 461 + SYS_MSEAL = 462 ) diff --git a/vendor/golang.org/x/sys/unix/ztypes_darwin_amd64.go b/vendor/golang.org/x/sys/unix/ztypes_darwin_amd64.go index 091d107f3a5..17c53bd9b33 100644 --- a/vendor/golang.org/x/sys/unix/ztypes_darwin_amd64.go +++ b/vendor/golang.org/x/sys/unix/ztypes_darwin_amd64.go @@ -306,6 +306,19 @@ type XVSockPgen struct { type _Socklen uint32 +type SaeAssocID uint32 + +type SaeConnID uint32 + +type SaEndpoints struct { + Srcif uint32 + Srcaddr *RawSockaddr + Srcaddrlen uint32 + Dstaddr *RawSockaddr + Dstaddrlen uint32 + _ [4]byte +} + type Xucred struct { Version uint32 Uid uint32 @@ -449,11 +462,14 @@ type FdSet struct { const ( SizeofIfMsghdr = 0x70 + SizeofIfMsghdr2 = 0xa0 SizeofIfData = 0x60 + SizeofIfData64 = 0x80 SizeofIfaMsghdr = 0x14 SizeofIfmaMsghdr = 0x10 SizeofIfmaMsghdr2 = 0x14 SizeofRtMsghdr = 0x5c + SizeofRtMsghdr2 = 0x5c SizeofRtMetrics = 0x38 ) @@ -467,6 +483,20 @@ type IfMsghdr struct { Data IfData } +type IfMsghdr2 struct { + Msglen uint16 + Version uint8 + Type uint8 + Addrs int32 + Flags int32 + Index uint16 + Snd_len int32 + Snd_maxlen int32 + Snd_drops int32 + Timer int32 + Data IfData64 +} + type IfData struct { Type uint8 Typelen uint8 @@ -499,6 +529,34 @@ type IfData struct { Reserved2 uint32 } +type IfData64 struct { + Type uint8 + Typelen uint8 + Physical uint8 + Addrlen uint8 + Hdrlen uint8 + Recvquota uint8 + Xmitquota uint8 + Unused1 uint8 + Mtu uint32 + Metric uint32 + Baudrate uint64 + Ipackets uint64 + Ierrors uint64 + Opackets uint64 + Oerrors uint64 + Collisions uint64 + Ibytes uint64 + Obytes uint64 + Imcasts uint64 + Omcasts uint64 + Iqdrops uint64 + Noproto uint64 + Recvtiming uint32 + Xmittiming uint32 + Lastchange Timeval32 +} + type IfaMsghdr struct { Msglen uint16 Version uint8 @@ -544,6 +602,21 @@ type RtMsghdr struct { Rmx RtMetrics } +type RtMsghdr2 struct { + Msglen uint16 + Version uint8 + Type uint8 + Index uint16 + Flags int32 + Addrs int32 + Refcnt int32 + Parentflags int32 + Reserved int32 + Use int32 + Inits uint32 + Rmx RtMetrics +} + type RtMetrics struct { Locks uint32 Mtu uint32 diff --git a/vendor/golang.org/x/sys/unix/ztypes_darwin_arm64.go b/vendor/golang.org/x/sys/unix/ztypes_darwin_arm64.go index 28ff4ef74d0..2392226a743 100644 --- a/vendor/golang.org/x/sys/unix/ztypes_darwin_arm64.go +++ b/vendor/golang.org/x/sys/unix/ztypes_darwin_arm64.go @@ -306,6 +306,19 @@ type XVSockPgen struct { type _Socklen uint32 +type SaeAssocID uint32 + +type SaeConnID uint32 + +type SaEndpoints struct { + Srcif uint32 + Srcaddr *RawSockaddr + Srcaddrlen uint32 + Dstaddr *RawSockaddr + Dstaddrlen uint32 + _ [4]byte +} + type Xucred struct { Version uint32 Uid uint32 @@ -449,11 +462,14 @@ type FdSet struct { const ( SizeofIfMsghdr = 0x70 + SizeofIfMsghdr2 = 0xa0 SizeofIfData = 0x60 + SizeofIfData64 = 0x80 SizeofIfaMsghdr = 0x14 SizeofIfmaMsghdr = 0x10 SizeofIfmaMsghdr2 = 0x14 SizeofRtMsghdr = 0x5c + SizeofRtMsghdr2 = 0x5c SizeofRtMetrics = 0x38 ) @@ -467,6 +483,20 @@ type IfMsghdr struct { Data IfData } +type IfMsghdr2 struct { + Msglen uint16 + Version uint8 + Type uint8 + Addrs int32 + Flags int32 + Index uint16 + Snd_len int32 + Snd_maxlen int32 + Snd_drops int32 + Timer int32 + Data IfData64 +} + type IfData struct { Type uint8 Typelen uint8 @@ -499,6 +529,34 @@ type IfData struct { Reserved2 uint32 } +type IfData64 struct { + Type uint8 + Typelen uint8 + Physical uint8 + Addrlen uint8 + Hdrlen uint8 + Recvquota uint8 + Xmitquota uint8 + Unused1 uint8 + Mtu uint32 + Metric uint32 + Baudrate uint64 + Ipackets uint64 + Ierrors uint64 + Opackets uint64 + Oerrors uint64 + Collisions uint64 + Ibytes uint64 + Obytes uint64 + Imcasts uint64 + Omcasts uint64 + Iqdrops uint64 + Noproto uint64 + Recvtiming uint32 + Xmittiming uint32 + Lastchange Timeval32 +} + type IfaMsghdr struct { Msglen uint16 Version uint8 @@ -544,6 +602,21 @@ type RtMsghdr struct { Rmx RtMetrics } +type RtMsghdr2 struct { + Msglen uint16 + Version uint8 + Type uint8 + Index uint16 + Flags int32 + Addrs int32 + Refcnt int32 + Parentflags int32 + Reserved int32 + Use int32 + Inits uint32 + Rmx RtMetrics +} + type RtMetrics struct { Locks uint32 Mtu uint32 diff --git a/vendor/golang.org/x/sys/unix/ztypes_freebsd_386.go b/vendor/golang.org/x/sys/unix/ztypes_freebsd_386.go index 6cbd094a3aa..51e13eb055f 100644 --- a/vendor/golang.org/x/sys/unix/ztypes_freebsd_386.go +++ b/vendor/golang.org/x/sys/unix/ztypes_freebsd_386.go @@ -625,6 +625,7 @@ const ( POLLRDNORM = 0x40 POLLWRBAND = 0x100 POLLWRNORM = 0x4 + POLLRDHUP = 0x4000 ) type CapRights struct { diff --git a/vendor/golang.org/x/sys/unix/ztypes_freebsd_amd64.go b/vendor/golang.org/x/sys/unix/ztypes_freebsd_amd64.go index 7c03b6ee77f..d002d8ef3cc 100644 --- a/vendor/golang.org/x/sys/unix/ztypes_freebsd_amd64.go +++ b/vendor/golang.org/x/sys/unix/ztypes_freebsd_amd64.go @@ -630,6 +630,7 @@ const ( POLLRDNORM = 0x40 POLLWRBAND = 0x100 POLLWRNORM = 0x4 + POLLRDHUP = 0x4000 ) type CapRights struct { diff --git a/vendor/golang.org/x/sys/unix/ztypes_freebsd_arm.go b/vendor/golang.org/x/sys/unix/ztypes_freebsd_arm.go index 422107ee8b1..3f863d898dd 100644 --- a/vendor/golang.org/x/sys/unix/ztypes_freebsd_arm.go +++ b/vendor/golang.org/x/sys/unix/ztypes_freebsd_arm.go @@ -616,6 +616,7 @@ const ( POLLRDNORM = 0x40 POLLWRBAND = 0x100 POLLWRNORM = 0x4 + POLLRDHUP = 0x4000 ) type CapRights struct { diff --git a/vendor/golang.org/x/sys/unix/ztypes_freebsd_arm64.go b/vendor/golang.org/x/sys/unix/ztypes_freebsd_arm64.go index 505a12acfd9..61c72931066 100644 --- a/vendor/golang.org/x/sys/unix/ztypes_freebsd_arm64.go +++ b/vendor/golang.org/x/sys/unix/ztypes_freebsd_arm64.go @@ -610,6 +610,7 @@ const ( POLLRDNORM = 0x40 POLLWRBAND = 0x100 POLLWRNORM = 0x4 + POLLRDHUP = 0x4000 ) type CapRights struct { diff --git a/vendor/golang.org/x/sys/unix/ztypes_freebsd_riscv64.go b/vendor/golang.org/x/sys/unix/ztypes_freebsd_riscv64.go index cc986c79006..b5d17414f03 100644 --- a/vendor/golang.org/x/sys/unix/ztypes_freebsd_riscv64.go +++ b/vendor/golang.org/x/sys/unix/ztypes_freebsd_riscv64.go @@ -612,6 +612,7 @@ const ( POLLRDNORM = 0x40 POLLWRBAND = 0x100 POLLWRNORM = 0x4 + POLLRDHUP = 0x4000 ) type CapRights struct { diff --git a/vendor/golang.org/x/sys/unix/ztypes_linux.go b/vendor/golang.org/x/sys/unix/ztypes_linux.go index 4740b834854..5537148dcbb 100644 --- a/vendor/golang.org/x/sys/unix/ztypes_linux.go +++ b/vendor/golang.org/x/sys/unix/ztypes_linux.go @@ -87,30 +87,35 @@ type StatxTimestamp struct { } type Statx_t struct { - Mask uint32 - Blksize uint32 - Attributes uint64 - Nlink uint32 - Uid uint32 - Gid uint32 - Mode uint16 - _ [1]uint16 - Ino uint64 - Size uint64 - Blocks uint64 - Attributes_mask uint64 - Atime StatxTimestamp - Btime StatxTimestamp - Ctime StatxTimestamp - Mtime StatxTimestamp - Rdev_major uint32 - Rdev_minor uint32 - Dev_major uint32 - Dev_minor uint32 - Mnt_id uint64 - Dio_mem_align uint32 - Dio_offset_align uint32 - _ [12]uint64 + Mask uint32 + Blksize uint32 + Attributes uint64 + Nlink uint32 + Uid uint32 + Gid uint32 + Mode uint16 + _ [1]uint16 + Ino uint64 + Size uint64 + Blocks uint64 + Attributes_mask uint64 + Atime StatxTimestamp + Btime StatxTimestamp + Ctime StatxTimestamp + Mtime StatxTimestamp + Rdev_major uint32 + Rdev_minor uint32 + Dev_major uint32 + Dev_minor uint32 + Mnt_id uint64 + Dio_mem_align uint32 + Dio_offset_align uint32 + Subvol uint64 + Atomic_write_unit_min uint32 + Atomic_write_unit_max uint32 + Atomic_write_segments_max uint32 + _ [1]uint32 + _ [9]uint64 } type Fsid struct { @@ -515,6 +520,29 @@ type TCPInfo struct { Total_rto_time uint32 } +type TCPVegasInfo struct { + Enabled uint32 + Rttcnt uint32 + Rtt uint32 + Minrtt uint32 +} + +type TCPDCTCPInfo struct { + Enabled uint16 + Ce_state uint16 + Alpha uint32 + Ab_ecn uint32 + Ab_tot uint32 +} + +type TCPBBRInfo struct { + Bw_lo uint32 + Bw_hi uint32 + Min_rtt uint32 + Pacing_gain uint32 + Cwnd_gain uint32 +} + type CanFilter struct { Id uint32 Mask uint32 @@ -556,6 +584,7 @@ const ( SizeofICMPv6Filter = 0x20 SizeofUcred = 0xc SizeofTCPInfo = 0xf8 + SizeofTCPCCInfo = 0x14 SizeofCanFilter = 0x8 SizeofTCPRepairOpt = 0x8 ) @@ -1723,12 +1752,6 @@ const ( IFLA_IPVLAN_UNSPEC = 0x0 IFLA_IPVLAN_MODE = 0x1 IFLA_IPVLAN_FLAGS = 0x2 - NETKIT_NEXT = -0x1 - NETKIT_PASS = 0x0 - NETKIT_DROP = 0x2 - NETKIT_REDIRECT = 0x7 - NETKIT_L2 = 0x0 - NETKIT_L3 = 0x1 IFLA_NETKIT_UNSPEC = 0x0 IFLA_NETKIT_PEER_INFO = 0x1 IFLA_NETKIT_PRIMARY = 0x2 @@ -1767,6 +1790,7 @@ const ( IFLA_VXLAN_DF = 0x1d IFLA_VXLAN_VNIFILTER = 0x1e IFLA_VXLAN_LOCALBYPASS = 0x1f + IFLA_VXLAN_LABEL_POLICY = 0x20 IFLA_GENEVE_UNSPEC = 0x0 IFLA_GENEVE_ID = 0x1 IFLA_GENEVE_REMOTE = 0x2 @@ -1796,6 +1820,8 @@ const ( IFLA_GTP_ROLE = 0x4 IFLA_GTP_CREATE_SOCKETS = 0x5 IFLA_GTP_RESTART_COUNT = 0x6 + IFLA_GTP_LOCAL = 0x7 + IFLA_GTP_LOCAL6 = 0x8 IFLA_BOND_UNSPEC = 0x0 IFLA_BOND_MODE = 0x1 IFLA_BOND_ACTIVE_SLAVE = 0x2 @@ -1828,6 +1854,7 @@ const ( IFLA_BOND_AD_LACP_ACTIVE = 0x1d IFLA_BOND_MISSED_MAX = 0x1e IFLA_BOND_NS_IP6_TARGET = 0x1f + IFLA_BOND_COUPLED_CONTROL = 0x20 IFLA_BOND_AD_INFO_UNSPEC = 0x0 IFLA_BOND_AD_INFO_AGGREGATOR = 0x1 IFLA_BOND_AD_INFO_NUM_PORTS = 0x2 @@ -1896,6 +1923,7 @@ const ( IFLA_HSR_SEQ_NR = 0x5 IFLA_HSR_VERSION = 0x6 IFLA_HSR_PROTOCOL = 0x7 + IFLA_HSR_INTERLINK = 0x8 IFLA_STATS_UNSPEC = 0x0 IFLA_STATS_LINK_64 = 0x1 IFLA_STATS_LINK_XSTATS = 0x2 @@ -1948,6 +1976,15 @@ const ( IFLA_DSA_MASTER = 0x1 ) +const ( + NETKIT_NEXT = -0x1 + NETKIT_PASS = 0x0 + NETKIT_DROP = 0x2 + NETKIT_REDIRECT = 0x7 + NETKIT_L2 = 0x0 + NETKIT_L3 = 0x1 +) + const ( NF_INET_PRE_ROUTING = 0x0 NF_INET_LOCAL_IN = 0x1 @@ -2485,7 +2522,7 @@ type XDPMmapOffsets struct { type XDPUmemReg struct { Addr uint64 Len uint64 - Chunk_size uint32 + Size uint32 Headroom uint32 Flags uint32 Tx_metadata_len uint32 @@ -2557,8 +2594,8 @@ const ( SOF_TIMESTAMPING_BIND_PHC = 0x8000 SOF_TIMESTAMPING_OPT_ID_TCP = 0x10000 - SOF_TIMESTAMPING_LAST = 0x10000 - SOF_TIMESTAMPING_MASK = 0x1ffff + SOF_TIMESTAMPING_LAST = 0x20000 + SOF_TIMESTAMPING_MASK = 0x3ffff SCM_TSTAMP_SND = 0x0 SCM_TSTAMP_SCHED = 0x1 @@ -3473,7 +3510,7 @@ const ( DEVLINK_PORT_FN_ATTR_STATE = 0x2 DEVLINK_PORT_FN_ATTR_OPSTATE = 0x3 DEVLINK_PORT_FN_ATTR_CAPS = 0x4 - DEVLINK_PORT_FUNCTION_ATTR_MAX = 0x5 + DEVLINK_PORT_FUNCTION_ATTR_MAX = 0x6 ) type FsverityDigest struct { @@ -3504,7 +3541,7 @@ type Nhmsg struct { type NexthopGrp struct { Id uint32 Weight uint8 - Resvd1 uint8 + High uint8 Resvd2 uint16 } @@ -3765,7 +3802,7 @@ const ( ETHTOOL_MSG_PSE_GET = 0x24 ETHTOOL_MSG_PSE_SET = 0x25 ETHTOOL_MSG_RSS_GET = 0x26 - ETHTOOL_MSG_USER_MAX = 0x2b + ETHTOOL_MSG_USER_MAX = 0x2d ETHTOOL_MSG_KERNEL_NONE = 0x0 ETHTOOL_MSG_STRSET_GET_REPLY = 0x1 ETHTOOL_MSG_LINKINFO_GET_REPLY = 0x2 @@ -3805,12 +3842,15 @@ const ( ETHTOOL_MSG_MODULE_NTF = 0x24 ETHTOOL_MSG_PSE_GET_REPLY = 0x25 ETHTOOL_MSG_RSS_GET_REPLY = 0x26 - ETHTOOL_MSG_KERNEL_MAX = 0x2b + ETHTOOL_MSG_KERNEL_MAX = 0x2e + ETHTOOL_FLAG_COMPACT_BITSETS = 0x1 + ETHTOOL_FLAG_OMIT_REPLY = 0x2 + ETHTOOL_FLAG_STATS = 0x4 ETHTOOL_A_HEADER_UNSPEC = 0x0 ETHTOOL_A_HEADER_DEV_INDEX = 0x1 ETHTOOL_A_HEADER_DEV_NAME = 0x2 ETHTOOL_A_HEADER_FLAGS = 0x3 - ETHTOOL_A_HEADER_MAX = 0x3 + ETHTOOL_A_HEADER_MAX = 0x4 ETHTOOL_A_BITSET_BIT_UNSPEC = 0x0 ETHTOOL_A_BITSET_BIT_INDEX = 0x1 ETHTOOL_A_BITSET_BIT_NAME = 0x2 @@ -3947,7 +3987,7 @@ const ( ETHTOOL_A_COALESCE_RATE_SAMPLE_INTERVAL = 0x17 ETHTOOL_A_COALESCE_USE_CQE_MODE_TX = 0x18 ETHTOOL_A_COALESCE_USE_CQE_MODE_RX = 0x19 - ETHTOOL_A_COALESCE_MAX = 0x1c + ETHTOOL_A_COALESCE_MAX = 0x1e ETHTOOL_A_PAUSE_UNSPEC = 0x0 ETHTOOL_A_PAUSE_HEADER = 0x1 ETHTOOL_A_PAUSE_AUTONEG = 0x2 @@ -3975,7 +4015,7 @@ const ( ETHTOOL_A_TSINFO_TX_TYPES = 0x3 ETHTOOL_A_TSINFO_RX_FILTERS = 0x4 ETHTOOL_A_TSINFO_PHC_INDEX = 0x5 - ETHTOOL_A_TSINFO_MAX = 0x5 + ETHTOOL_A_TSINFO_MAX = 0x6 ETHTOOL_A_CABLE_TEST_UNSPEC = 0x0 ETHTOOL_A_CABLE_TEST_HEADER = 0x1 ETHTOOL_A_CABLE_TEST_MAX = 0x1 @@ -3991,11 +4031,11 @@ const ( ETHTOOL_A_CABLE_RESULT_UNSPEC = 0x0 ETHTOOL_A_CABLE_RESULT_PAIR = 0x1 ETHTOOL_A_CABLE_RESULT_CODE = 0x2 - ETHTOOL_A_CABLE_RESULT_MAX = 0x2 + ETHTOOL_A_CABLE_RESULT_MAX = 0x3 ETHTOOL_A_CABLE_FAULT_LENGTH_UNSPEC = 0x0 ETHTOOL_A_CABLE_FAULT_LENGTH_PAIR = 0x1 ETHTOOL_A_CABLE_FAULT_LENGTH_CM = 0x2 - ETHTOOL_A_CABLE_FAULT_LENGTH_MAX = 0x2 + ETHTOOL_A_CABLE_FAULT_LENGTH_MAX = 0x3 ETHTOOL_A_CABLE_TEST_NTF_STATUS_UNSPEC = 0x0 ETHTOOL_A_CABLE_TEST_NTF_STATUS_STARTED = 0x1 ETHTOOL_A_CABLE_TEST_NTF_STATUS_COMPLETED = 0x2 @@ -4078,6 +4118,107 @@ type EthtoolDrvinfo struct { Regdump_len uint32 } +type EthtoolTsInfo struct { + Cmd uint32 + So_timestamping uint32 + Phc_index int32 + Tx_types uint32 + Tx_reserved [3]uint32 + Rx_filters uint32 + Rx_reserved [3]uint32 +} + +type HwTstampConfig struct { + Flags int32 + Tx_type int32 + Rx_filter int32 +} + +const ( + HWTSTAMP_FILTER_NONE = 0x0 + HWTSTAMP_FILTER_ALL = 0x1 + HWTSTAMP_FILTER_SOME = 0x2 + HWTSTAMP_FILTER_PTP_V1_L4_EVENT = 0x3 + HWTSTAMP_FILTER_PTP_V2_L4_EVENT = 0x6 + HWTSTAMP_FILTER_PTP_V2_L2_EVENT = 0x9 + HWTSTAMP_FILTER_PTP_V2_EVENT = 0xc +) + +const ( + HWTSTAMP_TX_OFF = 0x0 + HWTSTAMP_TX_ON = 0x1 + HWTSTAMP_TX_ONESTEP_SYNC = 0x2 +) + +type ( + PtpClockCaps struct { + Max_adj int32 + N_alarm int32 + N_ext_ts int32 + N_per_out int32 + Pps int32 + N_pins int32 + Cross_timestamping int32 + Adjust_phase int32 + Max_phase_adj int32 + Rsv [11]int32 + } + PtpClockTime struct { + Sec int64 + Nsec uint32 + Reserved uint32 + } + PtpExttsEvent struct { + T PtpClockTime + Index uint32 + Flags uint32 + Rsv [2]uint32 + } + PtpExttsRequest struct { + Index uint32 + Flags uint32 + Rsv [2]uint32 + } + PtpPeroutRequest struct { + StartOrPhase PtpClockTime + Period PtpClockTime + Index uint32 + Flags uint32 + On PtpClockTime + } + PtpPinDesc struct { + Name [64]byte + Index uint32 + Func uint32 + Chan uint32 + Rsv [5]uint32 + } + PtpSysOffset struct { + Samples uint32 + Rsv [3]uint32 + Ts [51]PtpClockTime + } + PtpSysOffsetExtended struct { + Samples uint32 + Clockid int32 + Rsv [2]uint32 + Ts [25][3]PtpClockTime + } + PtpSysOffsetPrecise struct { + Device PtpClockTime + Realtime PtpClockTime + Monoraw PtpClockTime + Rsv [4]uint32 + } +) + +const ( + PTP_PF_NONE = 0x0 + PTP_PF_EXTTS = 0x1 + PTP_PF_PEROUT = 0x2 + PTP_PF_PHYSYNC = 0x3 +) + type ( HIDRawReportDescriptor struct { Size uint32 @@ -4259,6 +4400,7 @@ const ( type LandlockRulesetAttr struct { Access_fs uint64 Access_net uint64 + Scoped uint64 } type LandlockPathBeneathAttr struct { @@ -4605,7 +4747,7 @@ const ( NL80211_ATTR_MAC_HINT = 0xc8 NL80211_ATTR_MAC_MASK = 0xd7 NL80211_ATTR_MAX_AP_ASSOC_STA = 0xca - NL80211_ATTR_MAX = 0x14a + NL80211_ATTR_MAX = 0x14c NL80211_ATTR_MAX_CRIT_PROT_DURATION = 0xb4 NL80211_ATTR_MAX_CSA_COUNTERS = 0xce NL80211_ATTR_MAX_MATCH_SETS = 0x85 @@ -5209,7 +5351,7 @@ const ( NL80211_FREQUENCY_ATTR_GO_CONCURRENT = 0xf NL80211_FREQUENCY_ATTR_INDOOR_ONLY = 0xe NL80211_FREQUENCY_ATTR_IR_CONCURRENT = 0xf - NL80211_FREQUENCY_ATTR_MAX = 0x20 + NL80211_FREQUENCY_ATTR_MAX = 0x21 NL80211_FREQUENCY_ATTR_MAX_TX_POWER = 0x6 NL80211_FREQUENCY_ATTR_NO_10MHZ = 0x11 NL80211_FREQUENCY_ATTR_NO_160MHZ = 0xc diff --git a/vendor/golang.org/x/sys/unix/ztypes_linux_riscv64.go b/vendor/golang.org/x/sys/unix/ztypes_linux_riscv64.go index 15adc04142f..ad05b51a603 100644 --- a/vendor/golang.org/x/sys/unix/ztypes_linux_riscv64.go +++ b/vendor/golang.org/x/sys/unix/ztypes_linux_riscv64.go @@ -727,6 +727,37 @@ const ( RISCV_HWPROBE_EXT_ZBA = 0x8 RISCV_HWPROBE_EXT_ZBB = 0x10 RISCV_HWPROBE_EXT_ZBS = 0x20 + RISCV_HWPROBE_EXT_ZICBOZ = 0x40 + RISCV_HWPROBE_EXT_ZBC = 0x80 + RISCV_HWPROBE_EXT_ZBKB = 0x100 + RISCV_HWPROBE_EXT_ZBKC = 0x200 + RISCV_HWPROBE_EXT_ZBKX = 0x400 + RISCV_HWPROBE_EXT_ZKND = 0x800 + RISCV_HWPROBE_EXT_ZKNE = 0x1000 + RISCV_HWPROBE_EXT_ZKNH = 0x2000 + RISCV_HWPROBE_EXT_ZKSED = 0x4000 + RISCV_HWPROBE_EXT_ZKSH = 0x8000 + RISCV_HWPROBE_EXT_ZKT = 0x10000 + RISCV_HWPROBE_EXT_ZVBB = 0x20000 + RISCV_HWPROBE_EXT_ZVBC = 0x40000 + RISCV_HWPROBE_EXT_ZVKB = 0x80000 + RISCV_HWPROBE_EXT_ZVKG = 0x100000 + RISCV_HWPROBE_EXT_ZVKNED = 0x200000 + RISCV_HWPROBE_EXT_ZVKNHA = 0x400000 + RISCV_HWPROBE_EXT_ZVKNHB = 0x800000 + RISCV_HWPROBE_EXT_ZVKSED = 0x1000000 + RISCV_HWPROBE_EXT_ZVKSH = 0x2000000 + RISCV_HWPROBE_EXT_ZVKT = 0x4000000 + RISCV_HWPROBE_EXT_ZFH = 0x8000000 + RISCV_HWPROBE_EXT_ZFHMIN = 0x10000000 + RISCV_HWPROBE_EXT_ZIHINTNTL = 0x20000000 + RISCV_HWPROBE_EXT_ZVFH = 0x40000000 + RISCV_HWPROBE_EXT_ZVFHMIN = 0x80000000 + RISCV_HWPROBE_EXT_ZFA = 0x100000000 + RISCV_HWPROBE_EXT_ZTSO = 0x200000000 + RISCV_HWPROBE_EXT_ZACAS = 0x400000000 + RISCV_HWPROBE_EXT_ZICOND = 0x800000000 + RISCV_HWPROBE_EXT_ZIHINTPAUSE = 0x1000000000 RISCV_HWPROBE_KEY_CPUPERF_0 = 0x5 RISCV_HWPROBE_MISALIGNED_UNKNOWN = 0x0 RISCV_HWPROBE_MISALIGNED_EMULATED = 0x1 @@ -734,4 +765,6 @@ const ( RISCV_HWPROBE_MISALIGNED_FAST = 0x3 RISCV_HWPROBE_MISALIGNED_UNSUPPORTED = 0x4 RISCV_HWPROBE_MISALIGNED_MASK = 0x7 + RISCV_HWPROBE_KEY_ZICBOZ_BLOCK_SIZE = 0x6 + RISCV_HWPROBE_WHICH_CPUS = 0x1 ) diff --git a/vendor/golang.org/x/sys/unix/ztypes_zos_s390x.go b/vendor/golang.org/x/sys/unix/ztypes_zos_s390x.go index d9a13af4684..2e5d5a44357 100644 --- a/vendor/golang.org/x/sys/unix/ztypes_zos_s390x.go +++ b/vendor/golang.org/x/sys/unix/ztypes_zos_s390x.go @@ -377,6 +377,12 @@ type Flock_t struct { Pid int32 } +type F_cnvrt struct { + Cvtcmd int32 + Pccsid int16 + Fccsid int16 +} + type Termios struct { Cflag uint32 Iflag uint32 diff --git a/vendor/golang.org/x/sys/windows/dll_windows.go b/vendor/golang.org/x/sys/windows/dll_windows.go index 115341fba66..4e613cf6335 100644 --- a/vendor/golang.org/x/sys/windows/dll_windows.go +++ b/vendor/golang.org/x/sys/windows/dll_windows.go @@ -65,7 +65,7 @@ func LoadDLL(name string) (dll *DLL, err error) { return d, nil } -// MustLoadDLL is like LoadDLL but panics if load operation failes. +// MustLoadDLL is like LoadDLL but panics if load operation fails. func MustLoadDLL(name string) *DLL { d, e := LoadDLL(name) if e != nil { diff --git a/vendor/golang.org/x/sys/windows/security_windows.go b/vendor/golang.org/x/sys/windows/security_windows.go index 6f7d2ac70a9..b6e1ab76f82 100644 --- a/vendor/golang.org/x/sys/windows/security_windows.go +++ b/vendor/golang.org/x/sys/windows/security_windows.go @@ -894,7 +894,7 @@ type ACL struct { aclRevision byte sbz1 byte aclSize uint16 - aceCount uint16 + AceCount uint16 sbz2 uint16 } @@ -1087,6 +1087,27 @@ type EXPLICIT_ACCESS struct { Trustee TRUSTEE } +// https://learn.microsoft.com/en-us/windows/win32/api/winnt/ns-winnt-ace_header +type ACE_HEADER struct { + AceType uint8 + AceFlags uint8 + AceSize uint16 +} + +// https://learn.microsoft.com/en-us/windows/win32/api/winnt/ns-winnt-access_allowed_ace +type ACCESS_ALLOWED_ACE struct { + Header ACE_HEADER + Mask ACCESS_MASK + SidStart uint32 +} + +const ( + // Constants for AceType + // https://learn.microsoft.com/en-us/windows/win32/api/winnt/ns-winnt-ace_header + ACCESS_ALLOWED_ACE_TYPE = 0 + ACCESS_DENIED_ACE_TYPE = 1 +) + // This type is the union inside of TRUSTEE and must be created using one of the TrusteeValueFrom* functions. type TrusteeValue uintptr @@ -1158,6 +1179,7 @@ type OBJECTS_AND_NAME struct { //sys makeSelfRelativeSD(absoluteSD *SECURITY_DESCRIPTOR, selfRelativeSD *SECURITY_DESCRIPTOR, selfRelativeSDSize *uint32) (err error) = advapi32.MakeSelfRelativeSD //sys setEntriesInAcl(countExplicitEntries uint32, explicitEntries *EXPLICIT_ACCESS, oldACL *ACL, newACL **ACL) (ret error) = advapi32.SetEntriesInAclW +//sys GetAce(acl *ACL, aceIndex uint32, pAce **ACCESS_ALLOWED_ACE) (err error) = advapi32.GetAce // Control returns the security descriptor control bits. func (sd *SECURITY_DESCRIPTOR) Control() (control SECURITY_DESCRIPTOR_CONTROL, revision uint32, err error) { diff --git a/vendor/golang.org/x/sys/windows/syscall_windows.go b/vendor/golang.org/x/sys/windows/syscall_windows.go index 6525c62f3c2..4a325438685 100644 --- a/vendor/golang.org/x/sys/windows/syscall_windows.go +++ b/vendor/golang.org/x/sys/windows/syscall_windows.go @@ -17,8 +17,10 @@ import ( "unsafe" ) -type Handle uintptr -type HWND uintptr +type ( + Handle uintptr + HWND uintptr +) const ( InvalidHandle = ^Handle(0) @@ -166,6 +168,8 @@ func NewCallbackCDecl(fn interface{}) uintptr { //sys CreateNamedPipe(name *uint16, flags uint32, pipeMode uint32, maxInstances uint32, outSize uint32, inSize uint32, defaultTimeout uint32, sa *SecurityAttributes) (handle Handle, err error) [failretval==InvalidHandle] = CreateNamedPipeW //sys ConnectNamedPipe(pipe Handle, overlapped *Overlapped) (err error) //sys DisconnectNamedPipe(pipe Handle) (err error) +//sys GetNamedPipeClientProcessId(pipe Handle, clientProcessID *uint32) (err error) +//sys GetNamedPipeServerProcessId(pipe Handle, serverProcessID *uint32) (err error) //sys GetNamedPipeInfo(pipe Handle, flags *uint32, outSize *uint32, inSize *uint32, maxInstances *uint32) (err error) //sys GetNamedPipeHandleState(pipe Handle, state *uint32, curInstances *uint32, maxCollectionCount *uint32, collectDataTimeout *uint32, userName *uint16, maxUserNameSize uint32) (err error) = GetNamedPipeHandleStateW //sys SetNamedPipeHandleState(pipe Handle, state *uint32, maxCollectionCount *uint32, collectDataTimeout *uint32) (err error) = SetNamedPipeHandleState @@ -211,6 +215,10 @@ func NewCallbackCDecl(fn interface{}) uintptr { //sys OpenProcess(desiredAccess uint32, inheritHandle bool, processId uint32) (handle Handle, err error) //sys ShellExecute(hwnd Handle, verb *uint16, file *uint16, args *uint16, cwd *uint16, showCmd int32) (err error) [failretval<=32] = shell32.ShellExecuteW //sys GetWindowThreadProcessId(hwnd HWND, pid *uint32) (tid uint32, err error) = user32.GetWindowThreadProcessId +//sys LoadKeyboardLayout(name *uint16, flags uint32) (hkl Handle, err error) [failretval==0] = user32.LoadKeyboardLayoutW +//sys UnloadKeyboardLayout(hkl Handle) (err error) = user32.UnloadKeyboardLayout +//sys GetKeyboardLayout(tid uint32) (hkl Handle) = user32.GetKeyboardLayout +//sys ToUnicodeEx(vkey uint32, scancode uint32, keystate *byte, pwszBuff *uint16, cchBuff int32, flags uint32, hkl Handle) (ret int32) = user32.ToUnicodeEx //sys GetShellWindow() (shellWindow HWND) = user32.GetShellWindow //sys MessageBox(hwnd HWND, text *uint16, caption *uint16, boxtype uint32) (ret int32, err error) [failretval==0] = user32.MessageBoxW //sys ExitWindowsEx(flags uint32, reason uint32) (err error) = user32.ExitWindowsEx @@ -307,6 +315,10 @@ func NewCallbackCDecl(fn interface{}) uintptr { //sys SetConsoleMode(console Handle, mode uint32) (err error) = kernel32.SetConsoleMode //sys GetConsoleScreenBufferInfo(console Handle, info *ConsoleScreenBufferInfo) (err error) = kernel32.GetConsoleScreenBufferInfo //sys setConsoleCursorPosition(console Handle, position uint32) (err error) = kernel32.SetConsoleCursorPosition +//sys GetConsoleCP() (cp uint32, err error) = kernel32.GetConsoleCP +//sys GetConsoleOutputCP() (cp uint32, err error) = kernel32.GetConsoleOutputCP +//sys SetConsoleCP(cp uint32) (err error) = kernel32.SetConsoleCP +//sys SetConsoleOutputCP(cp uint32) (err error) = kernel32.SetConsoleOutputCP //sys WriteConsole(console Handle, buf *uint16, towrite uint32, written *uint32, reserved *byte) (err error) = kernel32.WriteConsoleW //sys ReadConsole(console Handle, buf *uint16, toread uint32, read *uint32, inputControl *byte) (err error) = kernel32.ReadConsoleW //sys resizePseudoConsole(pconsole Handle, size uint32) (hr error) = kernel32.ResizePseudoConsole @@ -715,20 +727,12 @@ func DurationSinceBoot() time.Duration { } func Ftruncate(fd Handle, length int64) (err error) { - curoffset, e := Seek(fd, 0, 1) - if e != nil { - return e - } - defer Seek(fd, curoffset, 0) - _, e = Seek(fd, length, 0) - if e != nil { - return e + type _FILE_END_OF_FILE_INFO struct { + EndOfFile int64 } - e = SetEndOfFile(fd) - if e != nil { - return e - } - return nil + var info _FILE_END_OF_FILE_INFO + info.EndOfFile = length + return SetFileInformationByHandle(fd, FileEndOfFileInfo, (*byte)(unsafe.Pointer(&info)), uint32(unsafe.Sizeof(info))) } func Gettimeofday(tv *Timeval) (err error) { @@ -884,6 +888,11 @@ const socket_error = uintptr(^uint32(0)) //sys GetACP() (acp uint32) = kernel32.GetACP //sys MultiByteToWideChar(codePage uint32, dwFlags uint32, str *byte, nstr int32, wchar *uint16, nwchar int32) (nwrite int32, err error) = kernel32.MultiByteToWideChar //sys getBestInterfaceEx(sockaddr unsafe.Pointer, pdwBestIfIndex *uint32) (errcode error) = iphlpapi.GetBestInterfaceEx +//sys GetIfEntry2Ex(level uint32, row *MibIfRow2) (errcode error) = iphlpapi.GetIfEntry2Ex +//sys GetUnicastIpAddressEntry(row *MibUnicastIpAddressRow) (errcode error) = iphlpapi.GetUnicastIpAddressEntry +//sys NotifyIpInterfaceChange(family uint16, callback uintptr, callerContext unsafe.Pointer, initialNotification bool, notificationHandle *Handle) (errcode error) = iphlpapi.NotifyIpInterfaceChange +//sys NotifyUnicastIpAddressChange(family uint16, callback uintptr, callerContext unsafe.Pointer, initialNotification bool, notificationHandle *Handle) (errcode error) = iphlpapi.NotifyUnicastIpAddressChange +//sys CancelMibChangeNotify2(notificationHandle Handle) (errcode error) = iphlpapi.CancelMibChangeNotify2 // For testing: clients can set this flag to force // creation of IPv6 sockets to return EAFNOSUPPORT. @@ -1368,9 +1377,11 @@ func SetsockoptLinger(fd Handle, level, opt int, l *Linger) (err error) { func SetsockoptInet4Addr(fd Handle, level, opt int, value [4]byte) (err error) { return Setsockopt(fd, int32(level), int32(opt), (*byte)(unsafe.Pointer(&value[0])), 4) } + func SetsockoptIPMreq(fd Handle, level, opt int, mreq *IPMreq) (err error) { return Setsockopt(fd, int32(level), int32(opt), (*byte)(unsafe.Pointer(mreq)), int32(unsafe.Sizeof(*mreq))) } + func SetsockoptIPv6Mreq(fd Handle, level, opt int, mreq *IPv6Mreq) (err error) { return syscall.EWINDOWS } @@ -1673,13 +1684,16 @@ func (s NTStatus) Error() string { // do not use NTUnicodeString, and instead UTF16PtrFromString should be used for // the more common *uint16 string type. func NewNTUnicodeString(s string) (*NTUnicodeString, error) { - var u NTUnicodeString - s16, err := UTF16PtrFromString(s) + s16, err := UTF16FromString(s) if err != nil { return nil, err } - RtlInitUnicodeString(&u, s16) - return &u, nil + n := uint16(len(s16) * 2) + return &NTUnicodeString{ + Length: n - 2, // subtract 2 bytes for the NULL terminator + MaximumLength: n, + Buffer: &s16[0], + }, nil } // Slice returns a uint16 slice that aliases the data in the NTUnicodeString. diff --git a/vendor/golang.org/x/sys/windows/types_windows.go b/vendor/golang.org/x/sys/windows/types_windows.go index d8cb71db0a6..9d138de5fed 100644 --- a/vendor/golang.org/x/sys/windows/types_windows.go +++ b/vendor/golang.org/x/sys/windows/types_windows.go @@ -176,6 +176,7 @@ const ( WAIT_FAILED = 0xFFFFFFFF // Access rights for process. + PROCESS_ALL_ACCESS = 0xFFFF PROCESS_CREATE_PROCESS = 0x0080 PROCESS_CREATE_THREAD = 0x0002 PROCESS_DUP_HANDLE = 0x0040 @@ -1060,6 +1061,7 @@ const ( SIO_GET_EXTENSION_FUNCTION_POINTER = IOC_INOUT | IOC_WS2 | 6 SIO_KEEPALIVE_VALS = IOC_IN | IOC_VENDOR | 4 SIO_UDP_CONNRESET = IOC_IN | IOC_VENDOR | 12 + SIO_UDP_NETRESET = IOC_IN | IOC_VENDOR | 15 // cf. http://support.microsoft.com/default.aspx?scid=kb;en-us;257460 @@ -2003,7 +2005,21 @@ const ( MOVEFILE_FAIL_IF_NOT_TRACKABLE = 0x20 ) -const GAA_FLAG_INCLUDE_PREFIX = 0x00000010 +// Flags for GetAdaptersAddresses, see +// https://learn.microsoft.com/en-us/windows/win32/api/iphlpapi/nf-iphlpapi-getadaptersaddresses. +const ( + GAA_FLAG_SKIP_UNICAST = 0x1 + GAA_FLAG_SKIP_ANYCAST = 0x2 + GAA_FLAG_SKIP_MULTICAST = 0x4 + GAA_FLAG_SKIP_DNS_SERVER = 0x8 + GAA_FLAG_INCLUDE_PREFIX = 0x10 + GAA_FLAG_SKIP_FRIENDLY_NAME = 0x20 + GAA_FLAG_INCLUDE_WINS_INFO = 0x40 + GAA_FLAG_INCLUDE_GATEWAYS = 0x80 + GAA_FLAG_INCLUDE_ALL_INTERFACES = 0x100 + GAA_FLAG_INCLUDE_ALL_COMPARTMENTS = 0x200 + GAA_FLAG_INCLUDE_TUNNEL_BINDINGORDER = 0x400 +) const ( IF_TYPE_OTHER = 1 @@ -2017,6 +2033,50 @@ const ( IF_TYPE_IEEE1394 = 144 ) +// Enum NL_PREFIX_ORIGIN for [IpAdapterUnicastAddress], see +// https://learn.microsoft.com/en-us/windows/win32/api/nldef/ne-nldef-nl_prefix_origin +const ( + IpPrefixOriginOther = 0 + IpPrefixOriginManual = 1 + IpPrefixOriginWellKnown = 2 + IpPrefixOriginDhcp = 3 + IpPrefixOriginRouterAdvertisement = 4 + IpPrefixOriginUnchanged = 1 << 4 +) + +// Enum NL_SUFFIX_ORIGIN for [IpAdapterUnicastAddress], see +// https://learn.microsoft.com/en-us/windows/win32/api/nldef/ne-nldef-nl_suffix_origin +const ( + NlsoOther = 0 + NlsoManual = 1 + NlsoWellKnown = 2 + NlsoDhcp = 3 + NlsoLinkLayerAddress = 4 + NlsoRandom = 5 + IpSuffixOriginOther = 0 + IpSuffixOriginManual = 1 + IpSuffixOriginWellKnown = 2 + IpSuffixOriginDhcp = 3 + IpSuffixOriginLinkLayerAddress = 4 + IpSuffixOriginRandom = 5 + IpSuffixOriginUnchanged = 1 << 4 +) + +// Enum NL_DAD_STATE for [IpAdapterUnicastAddress], see +// https://learn.microsoft.com/en-us/windows/win32/api/nldef/ne-nldef-nl_dad_state +const ( + NldsInvalid = 0 + NldsTentative = 1 + NldsDuplicate = 2 + NldsDeprecated = 3 + NldsPreferred = 4 + IpDadStateInvalid = 0 + IpDadStateTentative = 1 + IpDadStateDuplicate = 2 + IpDadStateDeprecated = 3 + IpDadStatePreferred = 4 +) + type SocketAddress struct { Sockaddr *syscall.RawSockaddrAny SockaddrLength int32 @@ -2144,6 +2204,132 @@ const ( IfOperStatusLowerLayerDown = 7 ) +const ( + IF_MAX_PHYS_ADDRESS_LENGTH = 32 + IF_MAX_STRING_SIZE = 256 +) + +// MIB_IF_ENTRY_LEVEL enumeration from netioapi.h or +// https://learn.microsoft.com/en-us/windows/win32/api/netioapi/nf-netioapi-getifentry2ex. +const ( + MibIfEntryNormal = 0 + MibIfEntryNormalWithoutStatistics = 2 +) + +// MIB_NOTIFICATION_TYPE enumeration from netioapi.h or +// https://learn.microsoft.com/en-us/windows/win32/api/netioapi/ne-netioapi-mib_notification_type. +const ( + MibParameterNotification = 0 + MibAddInstance = 1 + MibDeleteInstance = 2 + MibInitialNotification = 3 +) + +// MibIfRow2 stores information about a particular interface. See +// https://learn.microsoft.com/en-us/windows/win32/api/netioapi/ns-netioapi-mib_if_row2. +type MibIfRow2 struct { + InterfaceLuid uint64 + InterfaceIndex uint32 + InterfaceGuid GUID + Alias [IF_MAX_STRING_SIZE + 1]uint16 + Description [IF_MAX_STRING_SIZE + 1]uint16 + PhysicalAddressLength uint32 + PhysicalAddress [IF_MAX_PHYS_ADDRESS_LENGTH]uint8 + PermanentPhysicalAddress [IF_MAX_PHYS_ADDRESS_LENGTH]uint8 + Mtu uint32 + Type uint32 + TunnelType uint32 + MediaType uint32 + PhysicalMediumType uint32 + AccessType uint32 + DirectionType uint32 + InterfaceAndOperStatusFlags uint8 + OperStatus uint32 + AdminStatus uint32 + MediaConnectState uint32 + NetworkGuid GUID + ConnectionType uint32 + TransmitLinkSpeed uint64 + ReceiveLinkSpeed uint64 + InOctets uint64 + InUcastPkts uint64 + InNUcastPkts uint64 + InDiscards uint64 + InErrors uint64 + InUnknownProtos uint64 + InUcastOctets uint64 + InMulticastOctets uint64 + InBroadcastOctets uint64 + OutOctets uint64 + OutUcastPkts uint64 + OutNUcastPkts uint64 + OutDiscards uint64 + OutErrors uint64 + OutUcastOctets uint64 + OutMulticastOctets uint64 + OutBroadcastOctets uint64 + OutQLen uint64 +} + +// MIB_UNICASTIPADDRESS_ROW stores information about a unicast IP address. See +// https://learn.microsoft.com/en-us/windows/win32/api/netioapi/ns-netioapi-mib_unicastipaddress_row. +type MibUnicastIpAddressRow struct { + Address RawSockaddrInet6 // SOCKADDR_INET union + InterfaceLuid uint64 + InterfaceIndex uint32 + PrefixOrigin uint32 + SuffixOrigin uint32 + ValidLifetime uint32 + PreferredLifetime uint32 + OnLinkPrefixLength uint8 + SkipAsSource uint8 + DadState uint32 + ScopeId uint32 + CreationTimeStamp Filetime +} + +const ScopeLevelCount = 16 + +// MIB_IPINTERFACE_ROW stores interface management information for a particular IP address family on a network interface. +// See https://learn.microsoft.com/en-us/windows/win32/api/netioapi/ns-netioapi-mib_ipinterface_row. +type MibIpInterfaceRow struct { + Family uint16 + InterfaceLuid uint64 + InterfaceIndex uint32 + MaxReassemblySize uint32 + InterfaceIdentifier uint64 + MinRouterAdvertisementInterval uint32 + MaxRouterAdvertisementInterval uint32 + AdvertisingEnabled uint8 + ForwardingEnabled uint8 + WeakHostSend uint8 + WeakHostReceive uint8 + UseAutomaticMetric uint8 + UseNeighborUnreachabilityDetection uint8 + ManagedAddressConfigurationSupported uint8 + OtherStatefulConfigurationSupported uint8 + AdvertiseDefaultRoute uint8 + RouterDiscoveryBehavior uint32 + DadTransmits uint32 + BaseReachableTime uint32 + RetransmitTime uint32 + PathMtuDiscoveryTimeout uint32 + LinkLocalAddressBehavior uint32 + LinkLocalAddressTimeout uint32 + ZoneIndices [ScopeLevelCount]uint32 + SitePrefixLength uint32 + Metric uint32 + NlMtu uint32 + Connected uint8 + SupportsWakeUpPatterns uint8 + SupportsNeighborDiscovery uint8 + SupportsRouterDiscovery uint8 + ReachableTime uint32 + TransmitOffload uint32 + ReceiveOffload uint32 + DisableDefaultRoutes uint8 +} + // Console related constants used for the mode parameter to SetConsoleMode. See // https://docs.microsoft.com/en-us/windows/console/setconsolemode for details. @@ -3404,3 +3590,14 @@ type DCB struct { EvtChar byte wReserved1 uint16 } + +// Keyboard Layout Flags. +// See https://learn.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-loadkeyboardlayoutw +const ( + KLF_ACTIVATE = 0x00000001 + KLF_SUBSTITUTE_OK = 0x00000002 + KLF_REORDER = 0x00000008 + KLF_REPLACELANG = 0x00000010 + KLF_NOTELLSHELL = 0x00000080 + KLF_SETFORPROCESS = 0x00000100 +) diff --git a/vendor/golang.org/x/sys/windows/zsyscall_windows.go b/vendor/golang.org/x/sys/windows/zsyscall_windows.go index 9f73df75b5f..01c0716c2c4 100644 --- a/vendor/golang.org/x/sys/windows/zsyscall_windows.go +++ b/vendor/golang.org/x/sys/windows/zsyscall_windows.go @@ -91,6 +91,7 @@ var ( procEnumServicesStatusExW = modadvapi32.NewProc("EnumServicesStatusExW") procEqualSid = modadvapi32.NewProc("EqualSid") procFreeSid = modadvapi32.NewProc("FreeSid") + procGetAce = modadvapi32.NewProc("GetAce") procGetLengthSid = modadvapi32.NewProc("GetLengthSid") procGetNamedSecurityInfoW = modadvapi32.NewProc("GetNamedSecurityInfoW") procGetSecurityDescriptorControl = modadvapi32.NewProc("GetSecurityDescriptorControl") @@ -180,10 +181,15 @@ var ( procDnsRecordListFree = moddnsapi.NewProc("DnsRecordListFree") procDwmGetWindowAttribute = moddwmapi.NewProc("DwmGetWindowAttribute") procDwmSetWindowAttribute = moddwmapi.NewProc("DwmSetWindowAttribute") + procCancelMibChangeNotify2 = modiphlpapi.NewProc("CancelMibChangeNotify2") procGetAdaptersAddresses = modiphlpapi.NewProc("GetAdaptersAddresses") procGetAdaptersInfo = modiphlpapi.NewProc("GetAdaptersInfo") procGetBestInterfaceEx = modiphlpapi.NewProc("GetBestInterfaceEx") procGetIfEntry = modiphlpapi.NewProc("GetIfEntry") + procGetIfEntry2Ex = modiphlpapi.NewProc("GetIfEntry2Ex") + procGetUnicastIpAddressEntry = modiphlpapi.NewProc("GetUnicastIpAddressEntry") + procNotifyIpInterfaceChange = modiphlpapi.NewProc("NotifyIpInterfaceChange") + procNotifyUnicastIpAddressChange = modiphlpapi.NewProc("NotifyUnicastIpAddressChange") procAddDllDirectory = modkernel32.NewProc("AddDllDirectory") procAssignProcessToJobObject = modkernel32.NewProc("AssignProcessToJobObject") procCancelIo = modkernel32.NewProc("CancelIo") @@ -246,7 +252,9 @@ var ( procGetCommandLineW = modkernel32.NewProc("GetCommandLineW") procGetComputerNameExW = modkernel32.NewProc("GetComputerNameExW") procGetComputerNameW = modkernel32.NewProc("GetComputerNameW") + procGetConsoleCP = modkernel32.NewProc("GetConsoleCP") procGetConsoleMode = modkernel32.NewProc("GetConsoleMode") + procGetConsoleOutputCP = modkernel32.NewProc("GetConsoleOutputCP") procGetConsoleScreenBufferInfo = modkernel32.NewProc("GetConsoleScreenBufferInfo") procGetCurrentDirectoryW = modkernel32.NewProc("GetCurrentDirectoryW") procGetCurrentProcessId = modkernel32.NewProc("GetCurrentProcessId") @@ -272,8 +280,10 @@ var ( procGetMaximumProcessorCount = modkernel32.NewProc("GetMaximumProcessorCount") procGetModuleFileNameW = modkernel32.NewProc("GetModuleFileNameW") procGetModuleHandleExW = modkernel32.NewProc("GetModuleHandleExW") + procGetNamedPipeClientProcessId = modkernel32.NewProc("GetNamedPipeClientProcessId") procGetNamedPipeHandleStateW = modkernel32.NewProc("GetNamedPipeHandleStateW") procGetNamedPipeInfo = modkernel32.NewProc("GetNamedPipeInfo") + procGetNamedPipeServerProcessId = modkernel32.NewProc("GetNamedPipeServerProcessId") procGetOverlappedResult = modkernel32.NewProc("GetOverlappedResult") procGetPriorityClass = modkernel32.NewProc("GetPriorityClass") procGetProcAddress = modkernel32.NewProc("GetProcAddress") @@ -346,8 +356,10 @@ var ( procSetCommMask = modkernel32.NewProc("SetCommMask") procSetCommState = modkernel32.NewProc("SetCommState") procSetCommTimeouts = modkernel32.NewProc("SetCommTimeouts") + procSetConsoleCP = modkernel32.NewProc("SetConsoleCP") procSetConsoleCursorPosition = modkernel32.NewProc("SetConsoleCursorPosition") procSetConsoleMode = modkernel32.NewProc("SetConsoleMode") + procSetConsoleOutputCP = modkernel32.NewProc("SetConsoleOutputCP") procSetCurrentDirectoryW = modkernel32.NewProc("SetCurrentDirectoryW") procSetDefaultDllDirectories = modkernel32.NewProc("SetDefaultDllDirectories") procSetDllDirectoryW = modkernel32.NewProc("SetDllDirectoryW") @@ -477,12 +489,16 @@ var ( procGetDesktopWindow = moduser32.NewProc("GetDesktopWindow") procGetForegroundWindow = moduser32.NewProc("GetForegroundWindow") procGetGUIThreadInfo = moduser32.NewProc("GetGUIThreadInfo") + procGetKeyboardLayout = moduser32.NewProc("GetKeyboardLayout") procGetShellWindow = moduser32.NewProc("GetShellWindow") procGetWindowThreadProcessId = moduser32.NewProc("GetWindowThreadProcessId") procIsWindow = moduser32.NewProc("IsWindow") procIsWindowUnicode = moduser32.NewProc("IsWindowUnicode") procIsWindowVisible = moduser32.NewProc("IsWindowVisible") + procLoadKeyboardLayoutW = moduser32.NewProc("LoadKeyboardLayoutW") procMessageBoxW = moduser32.NewProc("MessageBoxW") + procToUnicodeEx = moduser32.NewProc("ToUnicodeEx") + procUnloadKeyboardLayout = moduser32.NewProc("UnloadKeyboardLayout") procCreateEnvironmentBlock = moduserenv.NewProc("CreateEnvironmentBlock") procDestroyEnvironmentBlock = moduserenv.NewProc("DestroyEnvironmentBlock") procGetUserProfileDirectoryW = moduserenv.NewProc("GetUserProfileDirectoryW") @@ -788,6 +804,14 @@ func FreeSid(sid *SID) (err error) { return } +func GetAce(acl *ACL, aceIndex uint32, pAce **ACCESS_ALLOWED_ACE) (err error) { + r1, _, e1 := syscall.Syscall(procGetAce.Addr(), 3, uintptr(unsafe.Pointer(acl)), uintptr(aceIndex), uintptr(unsafe.Pointer(pAce))) + if r1 == 0 { + err = errnoErr(e1) + } + return +} + func GetLengthSid(sid *SID) (len uint32) { r0, _, _ := syscall.Syscall(procGetLengthSid.Addr(), 1, uintptr(unsafe.Pointer(sid)), 0, 0) len = uint32(r0) @@ -1589,6 +1613,14 @@ func DwmSetWindowAttribute(hwnd HWND, attribute uint32, value unsafe.Pointer, si return } +func CancelMibChangeNotify2(notificationHandle Handle) (errcode error) { + r0, _, _ := syscall.Syscall(procCancelMibChangeNotify2.Addr(), 1, uintptr(notificationHandle), 0, 0) + if r0 != 0 { + errcode = syscall.Errno(r0) + } + return +} + func GetAdaptersAddresses(family uint32, flags uint32, reserved uintptr, adapterAddresses *IpAdapterAddresses, sizePointer *uint32) (errcode error) { r0, _, _ := syscall.Syscall6(procGetAdaptersAddresses.Addr(), 5, uintptr(family), uintptr(flags), uintptr(reserved), uintptr(unsafe.Pointer(adapterAddresses)), uintptr(unsafe.Pointer(sizePointer)), 0) if r0 != 0 { @@ -1621,6 +1653,46 @@ func GetIfEntry(pIfRow *MibIfRow) (errcode error) { return } +func GetIfEntry2Ex(level uint32, row *MibIfRow2) (errcode error) { + r0, _, _ := syscall.Syscall(procGetIfEntry2Ex.Addr(), 2, uintptr(level), uintptr(unsafe.Pointer(row)), 0) + if r0 != 0 { + errcode = syscall.Errno(r0) + } + return +} + +func GetUnicastIpAddressEntry(row *MibUnicastIpAddressRow) (errcode error) { + r0, _, _ := syscall.Syscall(procGetUnicastIpAddressEntry.Addr(), 1, uintptr(unsafe.Pointer(row)), 0, 0) + if r0 != 0 { + errcode = syscall.Errno(r0) + } + return +} + +func NotifyIpInterfaceChange(family uint16, callback uintptr, callerContext unsafe.Pointer, initialNotification bool, notificationHandle *Handle) (errcode error) { + var _p0 uint32 + if initialNotification { + _p0 = 1 + } + r0, _, _ := syscall.Syscall6(procNotifyIpInterfaceChange.Addr(), 5, uintptr(family), uintptr(callback), uintptr(callerContext), uintptr(_p0), uintptr(unsafe.Pointer(notificationHandle)), 0) + if r0 != 0 { + errcode = syscall.Errno(r0) + } + return +} + +func NotifyUnicastIpAddressChange(family uint16, callback uintptr, callerContext unsafe.Pointer, initialNotification bool, notificationHandle *Handle) (errcode error) { + var _p0 uint32 + if initialNotification { + _p0 = 1 + } + r0, _, _ := syscall.Syscall6(procNotifyUnicastIpAddressChange.Addr(), 5, uintptr(family), uintptr(callback), uintptr(callerContext), uintptr(_p0), uintptr(unsafe.Pointer(notificationHandle)), 0) + if r0 != 0 { + errcode = syscall.Errno(r0) + } + return +} + func AddDllDirectory(path *uint16) (cookie uintptr, err error) { r0, _, e1 := syscall.Syscall(procAddDllDirectory.Addr(), 1, uintptr(unsafe.Pointer(path)), 0, 0) cookie = uintptr(r0) @@ -2149,6 +2221,15 @@ func GetComputerName(buf *uint16, n *uint32) (err error) { return } +func GetConsoleCP() (cp uint32, err error) { + r0, _, e1 := syscall.Syscall(procGetConsoleCP.Addr(), 0, 0, 0, 0) + cp = uint32(r0) + if cp == 0 { + err = errnoErr(e1) + } + return +} + func GetConsoleMode(console Handle, mode *uint32) (err error) { r1, _, e1 := syscall.Syscall(procGetConsoleMode.Addr(), 2, uintptr(console), uintptr(unsafe.Pointer(mode)), 0) if r1 == 0 { @@ -2157,6 +2238,15 @@ func GetConsoleMode(console Handle, mode *uint32) (err error) { return } +func GetConsoleOutputCP() (cp uint32, err error) { + r0, _, e1 := syscall.Syscall(procGetConsoleOutputCP.Addr(), 0, 0, 0, 0) + cp = uint32(r0) + if cp == 0 { + err = errnoErr(e1) + } + return +} + func GetConsoleScreenBufferInfo(console Handle, info *ConsoleScreenBufferInfo) (err error) { r1, _, e1 := syscall.Syscall(procGetConsoleScreenBufferInfo.Addr(), 2, uintptr(console), uintptr(unsafe.Pointer(info)), 0) if r1 == 0 { @@ -2358,6 +2448,14 @@ func GetModuleHandleEx(flags uint32, moduleName *uint16, module *Handle) (err er return } +func GetNamedPipeClientProcessId(pipe Handle, clientProcessID *uint32) (err error) { + r1, _, e1 := syscall.Syscall(procGetNamedPipeClientProcessId.Addr(), 2, uintptr(pipe), uintptr(unsafe.Pointer(clientProcessID)), 0) + if r1 == 0 { + err = errnoErr(e1) + } + return +} + func GetNamedPipeHandleState(pipe Handle, state *uint32, curInstances *uint32, maxCollectionCount *uint32, collectDataTimeout *uint32, userName *uint16, maxUserNameSize uint32) (err error) { r1, _, e1 := syscall.Syscall9(procGetNamedPipeHandleStateW.Addr(), 7, uintptr(pipe), uintptr(unsafe.Pointer(state)), uintptr(unsafe.Pointer(curInstances)), uintptr(unsafe.Pointer(maxCollectionCount)), uintptr(unsafe.Pointer(collectDataTimeout)), uintptr(unsafe.Pointer(userName)), uintptr(maxUserNameSize), 0, 0) if r1 == 0 { @@ -2374,6 +2472,14 @@ func GetNamedPipeInfo(pipe Handle, flags *uint32, outSize *uint32, inSize *uint3 return } +func GetNamedPipeServerProcessId(pipe Handle, serverProcessID *uint32) (err error) { + r1, _, e1 := syscall.Syscall(procGetNamedPipeServerProcessId.Addr(), 2, uintptr(pipe), uintptr(unsafe.Pointer(serverProcessID)), 0) + if r1 == 0 { + err = errnoErr(e1) + } + return +} + func GetOverlappedResult(handle Handle, overlapped *Overlapped, done *uint32, wait bool) (err error) { var _p0 uint32 if wait { @@ -3025,6 +3131,14 @@ func SetCommTimeouts(handle Handle, timeouts *CommTimeouts) (err error) { return } +func SetConsoleCP(cp uint32) (err error) { + r1, _, e1 := syscall.Syscall(procSetConsoleCP.Addr(), 1, uintptr(cp), 0, 0) + if r1 == 0 { + err = errnoErr(e1) + } + return +} + func setConsoleCursorPosition(console Handle, position uint32) (err error) { r1, _, e1 := syscall.Syscall(procSetConsoleCursorPosition.Addr(), 2, uintptr(console), uintptr(position), 0) if r1 == 0 { @@ -3041,6 +3155,14 @@ func SetConsoleMode(console Handle, mode uint32) (err error) { return } +func SetConsoleOutputCP(cp uint32) (err error) { + r1, _, e1 := syscall.Syscall(procSetConsoleOutputCP.Addr(), 1, uintptr(cp), 0, 0) + if r1 == 0 { + err = errnoErr(e1) + } + return +} + func SetCurrentDirectory(path *uint16) (err error) { r1, _, e1 := syscall.Syscall(procSetCurrentDirectoryW.Addr(), 1, uintptr(unsafe.Pointer(path)), 0, 0) if r1 == 0 { @@ -4073,6 +4195,12 @@ func GetGUIThreadInfo(thread uint32, info *GUIThreadInfo) (err error) { return } +func GetKeyboardLayout(tid uint32) (hkl Handle) { + r0, _, _ := syscall.Syscall(procGetKeyboardLayout.Addr(), 1, uintptr(tid), 0, 0) + hkl = Handle(r0) + return +} + func GetShellWindow() (shellWindow HWND) { r0, _, _ := syscall.Syscall(procGetShellWindow.Addr(), 0, 0, 0, 0) shellWindow = HWND(r0) @@ -4106,6 +4234,15 @@ func IsWindowVisible(hwnd HWND) (isVisible bool) { return } +func LoadKeyboardLayout(name *uint16, flags uint32) (hkl Handle, err error) { + r0, _, e1 := syscall.Syscall(procLoadKeyboardLayoutW.Addr(), 2, uintptr(unsafe.Pointer(name)), uintptr(flags), 0) + hkl = Handle(r0) + if hkl == 0 { + err = errnoErr(e1) + } + return +} + func MessageBox(hwnd HWND, text *uint16, caption *uint16, boxtype uint32) (ret int32, err error) { r0, _, e1 := syscall.Syscall6(procMessageBoxW.Addr(), 4, uintptr(hwnd), uintptr(unsafe.Pointer(text)), uintptr(unsafe.Pointer(caption)), uintptr(boxtype), 0, 0) ret = int32(r0) @@ -4115,6 +4252,20 @@ func MessageBox(hwnd HWND, text *uint16, caption *uint16, boxtype uint32) (ret i return } +func ToUnicodeEx(vkey uint32, scancode uint32, keystate *byte, pwszBuff *uint16, cchBuff int32, flags uint32, hkl Handle) (ret int32) { + r0, _, _ := syscall.Syscall9(procToUnicodeEx.Addr(), 7, uintptr(vkey), uintptr(scancode), uintptr(unsafe.Pointer(keystate)), uintptr(unsafe.Pointer(pwszBuff)), uintptr(cchBuff), uintptr(flags), uintptr(hkl), 0, 0) + ret = int32(r0) + return +} + +func UnloadKeyboardLayout(hkl Handle) (err error) { + r1, _, e1 := syscall.Syscall(procUnloadKeyboardLayout.Addr(), 1, uintptr(hkl), 0, 0) + if r1 == 0 { + err = errnoErr(e1) + } + return +} + func CreateEnvironmentBlock(block **uint16, token Token, inheritExisting bool) (err error) { var _p0 uint32 if inheritExisting { diff --git a/vendor/golang.org/x/term/LICENSE b/vendor/golang.org/x/term/LICENSE index 6a66aea5eaf..2a7cf70da6e 100644 --- a/vendor/golang.org/x/term/LICENSE +++ b/vendor/golang.org/x/term/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2009 The Go Authors. All rights reserved. +Copyright 2009 The Go Authors. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are @@ -10,7 +10,7 @@ notice, this list of conditions and the following disclaimer. copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. - * Neither the name of Google Inc. nor the names of its + * Neither the name of Google LLC nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. diff --git a/vendor/golang.org/x/term/README.md b/vendor/golang.org/x/term/README.md index d03d0aefef6..05ff623f94f 100644 --- a/vendor/golang.org/x/term/README.md +++ b/vendor/golang.org/x/term/README.md @@ -4,16 +4,13 @@ This repository provides Go terminal and console support packages. -## Download/Install - -The easiest way to install is to run `go get -u golang.org/x/term`. You can -also manually git clone the repository to `$GOPATH/src/golang.org/x/term`. - ## Report Issues / Send Patches This repository uses Gerrit for code changes. To learn how to submit changes to -this repository, see https://golang.org/doc/contribute.html. +this repository, see https://go.dev/doc/contribute. + +The git repository is https://go.googlesource.com/term. The main issue tracker for the term repository is located at -https://github.com/golang/go/issues. Prefix your issue with "x/term:" in the +https://go.dev/issues. Prefix your issue with "x/term:" in the subject line, so it is easy to find. diff --git a/vendor/golang.org/x/term/term_windows.go b/vendor/golang.org/x/term/term_windows.go index 465f560604e..df6bf948e14 100644 --- a/vendor/golang.org/x/term/term_windows.go +++ b/vendor/golang.org/x/term/term_windows.go @@ -26,6 +26,7 @@ func makeRaw(fd int) (*State, error) { return nil, err } raw := st &^ (windows.ENABLE_ECHO_INPUT | windows.ENABLE_PROCESSED_INPUT | windows.ENABLE_LINE_INPUT | windows.ENABLE_PROCESSED_OUTPUT) + raw |= windows.ENABLE_VIRTUAL_TERMINAL_INPUT if err := windows.SetConsoleMode(windows.Handle(fd), raw); err != nil { return nil, err } diff --git a/vendor/golang.org/x/text/LICENSE b/vendor/golang.org/x/text/LICENSE index 6a66aea5eaf..2a7cf70da6e 100644 --- a/vendor/golang.org/x/text/LICENSE +++ b/vendor/golang.org/x/text/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2009 The Go Authors. All rights reserved. +Copyright 2009 The Go Authors. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are @@ -10,7 +10,7 @@ notice, this list of conditions and the following disclaimer. copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. - * Neither the name of Google Inc. nor the names of its + * Neither the name of Google LLC nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. diff --git a/vendor/modules.txt b/vendor/modules.txt index 0c7af8228bc..7c6efd022d9 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -876,8 +876,8 @@ go.uber.org/zap/internal/exit go.uber.org/zap/internal/pool go.uber.org/zap/internal/stacktrace go.uber.org/zap/zapcore -# golang.org/x/crypto v0.24.0 -## explicit; go 1.18 +# golang.org/x/crypto v0.31.0 +## explicit; go 1.20 golang.org/x/crypto/argon2 golang.org/x/crypto/bcrypt golang.org/x/crypto/blake2b @@ -885,7 +885,6 @@ golang.org/x/crypto/blowfish golang.org/x/crypto/cast5 golang.org/x/crypto/chacha20 golang.org/x/crypto/curve25519 -golang.org/x/crypto/curve25519/internal/field golang.org/x/crypto/ed25519 golang.org/x/crypto/hkdf golang.org/x/crypto/internal/alias @@ -932,21 +931,21 @@ golang.org/x/net/websocket ## explicit; go 1.18 golang.org/x/oauth2 golang.org/x/oauth2/internal -# golang.org/x/sync v0.7.0 +# golang.org/x/sync v0.10.0 ## explicit; go 1.18 golang.org/x/sync/errgroup golang.org/x/sync/semaphore -# golang.org/x/sys v0.21.0 +# golang.org/x/sys v0.28.0 ## explicit; go 1.18 golang.org/x/sys/cpu golang.org/x/sys/execabs golang.org/x/sys/plan9 golang.org/x/sys/unix golang.org/x/sys/windows -# golang.org/x/term v0.21.0 +# golang.org/x/term v0.27.0 ## explicit; go 1.18 golang.org/x/term -# golang.org/x/text v0.16.0 +# golang.org/x/text v0.21.0 ## explicit; go 1.18 golang.org/x/text/encoding golang.org/x/text/encoding/internal From 40d65343b568a0e82df68056435f84fa37fa2fc2 Mon Sep 17 00:00:00 2001 From: Vojtech Szocs Date: Tue, 18 Feb 2025 16:18:55 +0000 Subject: [PATCH 090/102] Expose topology components and utils via plugin SDK internal package --- analyze.sh | 2 +- dynamic-demo-plugin/console-extensions.json | 2 +- dynamic-demo-plugin/package.json | 3 +- dynamic-demo-plugin/yarn.lock | 1 + .../console-dynamic-plugin-sdk/README.md | 93 ++++++++---- .../scripts/generate-pkg-assets.ts | 8 +- .../scripts/package-definitions.ts | 3 + .../src/api/common-types.ts | 8 +- .../src/api/internal-api.ts | 5 +- .../src/api/internal-topology-api.ts | 75 ++++++++++ .../src/app/components/utils/rbac.tsx | 2 +- .../k8s/api-discovery/api-discovery-types.ts | 2 +- .../src/extensions/console-types.ts | 82 +++++++++-- .../src/extensions/topology-types.ts | 132 +++++++++++++++++- .../src/lib-internal.ts | 2 +- .../src/shared-modules-init.ts | 2 +- .../src/shared-modules.ts | 4 +- .../tsconfig-base.json | 1 - .../console-shared/src/constants/pod.ts | 18 +-- .../packages/console-shared/src/types/pod.ts | 57 ++------ .../__tests__/helm-data-transformer.spec.ts | 2 +- .../__tests__/data-transformer.spec.ts | 8 +- .../topology/src/__tests__/Graph.spec.tsx | 2 +- .../src/actions/contextMenuActions.tsx | 11 +- .../src/actions/modify-application.ts | 9 +- .../components/edges/CreateConnector.tsx | 11 +- .../list-view/TopologyListViewNode.tsx | 18 +-- .../components/list-view/cells/CpuCell.tsx | 6 +- .../components/list-view/cells/MemoryCell.tsx | 8 +- .../list-view/cells/MetricsTooltip.tsx | 10 +- .../__tests__/data-transformer.spec.ts | 8 +- .../__tests__/updateModelFromFilters.spec.ts | 4 +- .../src/data-transforms/data-transformer.ts | 25 ++-- .../src/data-transforms/transform-utils.ts | 54 +++---- .../updateTopologyDataModel.ts | 1 - .../operator-data-transformer.spec.ts | 2 +- .../utils/__tests__/application-utils.spec.ts | 21 ++- .../topology/src/utils/metricStats.ts | 18 +-- .../topology/src/utils/topology-utils.ts | 9 +- .../topology/src/utils/useMetricStats.ts | 3 +- .../src/utils/withEditReviewAccess.tsx | 15 +- frontend/public/actions/ui.ts | 15 +- frontend/public/module/k8s/pods.ts | 10 +- frontend/public/module/k8s/types.ts | 8 +- frontend/webpack.circular-deps.ts | 2 +- 45 files changed, 484 insertions(+), 298 deletions(-) create mode 100644 frontend/packages/console-dynamic-plugin-sdk/src/api/internal-topology-api.ts diff --git a/analyze.sh b/analyze.sh index 3537bdf56bc..703ad5f265d 100755 --- a/analyze.sh +++ b/analyze.sh @@ -14,7 +14,7 @@ if [ -d "$ARTIFACT_DIR" ]; then cp public/dist/report.html "${ARTIFACT_DIR}" fi -MAX_BYTES=3879731 # ~3.7 MiB +MAX_BYTES=4823450 # ~4.6 MiB VENDORS_MAIN_BYTES=$(du -b `find public/dist -type f -name 'vendors~main-chunk*js'` | cut -f1) DISPLAY_VALUE=$(awk "BEGIN {printf \"%.2f\n\", $VENDORS_MAIN_BYTES/1024/1024}") MAX_DISPLAY_VALUE=$(awk "BEGIN {printf \"%.2f\n\", $MAX_BYTES/1024/1024}") diff --git a/dynamic-demo-plugin/console-extensions.json b/dynamic-demo-plugin/console-extensions.json index cb7e73be629..2a99573a663 100644 --- a/dynamic-demo-plugin/console-extensions.json +++ b/dynamic-demo-plugin/console-extensions.json @@ -388,7 +388,7 @@ "href": "/test-modal" } }, - { + { "type": "console.create-project-modal", "properties": { "component": { "$codeRef": "createProjectModal" } diff --git a/dynamic-demo-plugin/package.json b/dynamic-demo-plugin/package.json index 8546e97aa63..5d6f4fa3395 100644 --- a/dynamic-demo-plugin/package.json +++ b/dynamic-demo-plugin/package.json @@ -6,7 +6,8 @@ "clean": "rm -rf dist", "build": "yarn clean && NODE_ENV=production yarn ts-node node_modules/.bin/webpack", "build-dev": "yarn clean && yarn ts-node node_modules/.bin/webpack", - "build-plugin-sdk": "yarn --cwd ../frontend build-plugin-sdk && rm -rf node_modules/@openshift-console && yarn install --check-files", + "build-plugin-sdk": "yarn --cwd ../frontend build-plugin-sdk && yarn install-plugin-sdk", + "install-plugin-sdk": "rm -rf node_modules/@openshift-console && yarn install --check-files", "start-console": "./start-console.sh", "http-server": "./http-server.sh dist", "i18n": "i18next \"src/**/*.{js,jsx,ts,tsx}\" [-oc] -c i18next-parser.config.js", diff --git a/dynamic-demo-plugin/yarn.lock b/dynamic-demo-plugin/yarn.lock index f5d3f94e3f8..6d96d146740 100644 --- a/dynamic-demo-plugin/yarn.lock +++ b/dynamic-demo-plugin/yarn.lock @@ -959,6 +959,7 @@ commander@^2.20.0: commander@~7.2.0: version "7.2.0" resolved "https://registry.yarnpkg.com/commander/-/commander-7.2.0.tgz#a36cb57d0b501ce108e4d20559a150a391d97ab7" + integrity sha512-QrWXB+ZQSVPmIWIhtEO9H+gwHaMGYiF5ChvoJ+K9ZGHG/sVsa6yiesAD1GC/x46sET00Xlwo1u49RVVVzvcSkw== comment-json@4.x: version "4.2.3" diff --git a/frontend/packages/console-dynamic-plugin-sdk/README.md b/frontend/packages/console-dynamic-plugin-sdk/README.md index 44c07e4f6a5..27f8e506a64 100644 --- a/frontend/packages/console-dynamic-plugin-sdk/README.md +++ b/frontend/packages/console-dynamic-plugin-sdk/README.md @@ -64,32 +64,37 @@ as a reference point for writing an OLM operator that ships with its own Console ## Distributable SDK package overview -| Package Name | Description | -| ------------ | ----------- | -| `@openshift-console/dynamic-plugin-sdk` | Provides core APIs, types and utilities used by dynamic plugins at runtime. | -| `@openshift-console/dynamic-plugin-sdk-webpack` | Provides webpack `ConsoleRemotePlugin` used to build all dynamic plugin assets. | -| `@openshift-console/dynamic-plugin-sdk-internal` | Internal package exposing additional code. | -| `@openshift-console/plugin-shared` | Provides reusable components and utility functions to build OCP dynamic plugins. Compatible with multiple versions of OpenShift Console. | +| Package Name | Description | +| ------------------------------------------------------ | -------------------------------------------------------------------------------- | +| `@openshift-console/dynamic-plugin-sdk` ★ | Provides core APIs, types and utilities used by dynamic plugins at runtime. | +| `@openshift-console/dynamic-plugin-sdk-webpack` ★ | Provides webpack `ConsoleRemotePlugin` used to build all dynamic plugin assets. | +| `@openshift-console/dynamic-plugin-sdk-internal` | Internal package exposing additional Console code. | +| `@openshift-console/plugin-shared` | Provides reusable components and utility functions to build OCP dynamic plugins. | + +Packages marked with ★ provide essential plugin APIs with backwards compatibility. Other packages may be +used with multiple versions of OpenShift Console but don't provide any backwards compatibility guarantees. ## OpenShift Console Versions vs SDK Versions Not all NPM packages are fully compatible with all versions of the Console. This table will help align compatible versions of distributable SDK packages to versions of the OpenShift Console. -| Console Version | SDK Package | Last Package Version | -| ----------------- | ----------------------------------------------- | -------------------- | -| 4.17.x | `@openshift-console/dynamic-plugin-sdk` | Latest | -| | `@openshift-console/dynamic-plugin-sdk-webpack` | Latest | -| 4.16.x | `@openshift-console/dynamic-plugin-sdk` | 1.4.0 | -| | `@openshift-console/dynamic-plugin-sdk-webpack` | 1.1.1 | -| 4.15.x | `@openshift-console/dynamic-plugin-sdk` | 1.0.0 | -| | `@openshift-console/dynamic-plugin-sdk-webpack` | 1.0.2 | -| 4.14.x | `@openshift-console/dynamic-plugin-sdk` | 0.0.21 | -| | `@openshift-console/dynamic-plugin-sdk-webpack` | 0.0.11 | -| 4.13.x | `@openshift-console/dynamic-plugin-sdk` | 0.0.19 | -| | `@openshift-console/dynamic-plugin-sdk-webpack` | 0.0.9 | -| 4.12.x | `@openshift-console/dynamic-plugin-sdk` | 0.0.18 | -| | `@openshift-console/dynamic-plugin-sdk-webpack` | 0.0.9 | +| Console Version | SDK Package | Last Package Version | +| --------------- | ----------------------------------------------- | -------------------- | +| 4.18.x | `@openshift-console/dynamic-plugin-sdk` | 1.8.0 | +| | `@openshift-console/dynamic-plugin-sdk-webpack` | 1.3.0 | +| 4.17.x | `@openshift-console/dynamic-plugin-sdk` | 1.6.0 | +| | `@openshift-console/dynamic-plugin-sdk-webpack` | 1.2.0 | +| 4.16.x | `@openshift-console/dynamic-plugin-sdk` | 1.4.0 | +| | `@openshift-console/dynamic-plugin-sdk-webpack` | 1.1.1 | +| 4.15.x | `@openshift-console/dynamic-plugin-sdk` | 1.0.0 | +| | `@openshift-console/dynamic-plugin-sdk-webpack` | 1.0.2 | +| 4.14.x | `@openshift-console/dynamic-plugin-sdk` | 0.0.21 | +| | `@openshift-console/dynamic-plugin-sdk-webpack` | 0.0.11 | +| 4.13.x | `@openshift-console/dynamic-plugin-sdk` | 0.0.19 | +| | `@openshift-console/dynamic-plugin-sdk-webpack` | 0.0.9 | +| 4.12.x | `@openshift-console/dynamic-plugin-sdk` | 0.0.18 | +| | `@openshift-console/dynamic-plugin-sdk-webpack` | 0.0.9 | Note: this table includes Console versions which currently receive technical support, as per [Red Hat OpenShift Container Platform Life Cycle Policy](https://access.redhat.com/support/policy/updates/openshift). @@ -159,13 +164,12 @@ This section documents notable changes in the Console provided shared modules ac - All Console provided React Router v5 shared modules are deprecated and will be removed in the future. Plugins should upgrade to React Router v6 via `react-router-dom-v5-compat` module. -### PatternFly dynamic modules +### PatternFly 5+ dynamic modules -Newer versions of `@openshift-console/dynamic-plugin-sdk-webpack` package (1.0.0 and higher) include -support for automatic detection and sharing of individual PatternFly 5.x dynamic modules. +Newer versions of `@openshift-console/dynamic-plugin-sdk-webpack` package include support for automatic +detection and sharing of individual PatternFly 5+ dynamic modules. -Plugins using PatternFly 5.x dependencies should generally avoid non-index imports for any PatternFly -packages, for example: +Plugins using PatternFly 5.x and newer should avoid non-index imports, for example: ```ts // Do _not_ do this: @@ -182,20 +186,47 @@ Console application uses [Content Security Policy](https://developer.mozilla.org includes the document origin `'self'` and Console webpack dev server when running off-cluster. All dynamic plugin assets _should_ be loaded using `/api/plugins/` Bridge endpoint which -matches the `'self'` CSP source of Console application. +matches the `'self'` CSP source for all Console assets served via Bridge. -See `cspSources` and `cspDirectives` in -[`pkg/server/server.go`](https://github.com/openshift/console/blob/master/pkg/server/server.go) +Refer to `BuildCSPDirectives` function in +[`pkg/utils/utils.go`](https://github.com/openshift/console/blob/release-4.18/pkg/utils/utils.go) for details on the current Console CSP implementation. +Refer to [Dynamic Plugins feature page][console-doc-feature-page] section on Content Security Policy +for more details. + ### Changes in Console CSP -This section documents notable changes in the Console Content Security Policy. +This section documents notable changes in the Console Content Security Policy implementation. #### Console 4.18.x -Console CSP is deployed in report-only mode. CSP violations will be logged in the browser console -but the associated CSP directives will not be enforced. +Console CSP feature is disabled by default. To test your plugins with CSP, enable the +`ConsolePluginContentSecurityPolicy` feature gate on a test cluster. This feature gate +should **not** be enabled on production clusters. Enabling this feature gate allows you +to set `spec.contentSecurityPolicy` in your `ConsolePlugin` resource to extend existing +CSP directives, for example: + +```yaml +apiVersion: console.openshift.io/v1 +kind: ConsolePlugin +metadata: + name: cron-tab +spec: + displayName: 'Cron Tab' + contentSecurityPolicy: + - directive: 'ScriptSrc' + values: + - 'https://example1.com/' + - 'https://example2.com/' +``` + +When enabled, Console CSP operates in report-only mode; CSP violations will be logged in +the browser and CSP violation data will be reported through telemetry service in production +deployments. + +In a future release, Console will begin enforcing CSP. Consider testing and preparing your +plugins now to avoid CSP related issues in future. ## Plugin metadata diff --git a/frontend/packages/console-dynamic-plugin-sdk/scripts/generate-pkg-assets.ts b/frontend/packages/console-dynamic-plugin-sdk/scripts/generate-pkg-assets.ts index acdb547e280..589a8a0fff6 100644 --- a/frontend/packages/console-dynamic-plugin-sdk/scripts/generate-pkg-assets.ts +++ b/frontend/packages/console-dynamic-plugin-sdk/scripts/generate-pkg-assets.ts @@ -24,11 +24,9 @@ const rootPackage = readPkg.sync({ cwd: resolvePath('../..'), normalize: false } const missingDepNames = new Set(); const missingDepCallback = (name: string) => missingDepNames.add(name); -const outPackages = [ - getCorePackage(sdkPackage, rootPackage, missingDepCallback), - getInternalPackage(sdkPackage, rootPackage, missingDepCallback), - getWebpackPackage(sdkPackage, rootPackage, missingDepCallback), -]; +const outPackages = [getCorePackage, getInternalPackage, getWebpackPackage].map((getPkg) => + getPkg(sdkPackage, rootPackage, missingDepCallback), +); if (missingDepNames.size > 0) { console.error(`Failed to parse package dependencies: ${Array.from(missingDepNames).join(', ')}`); diff --git a/frontend/packages/console-dynamic-plugin-sdk/scripts/package-definitions.ts b/frontend/packages/console-dynamic-plugin-sdk/scripts/package-definitions.ts index dd9c675f8b5..fa9927961a7 100644 --- a/frontend/packages/console-dynamic-plugin-sdk/scripts/package-definitions.ts +++ b/frontend/packages/console-dynamic-plugin-sdk/scripts/package-definitions.ts @@ -104,6 +104,7 @@ export const getCorePackage: GetPackageDefinition = ( manifest: { name: '@openshift-console/dynamic-plugin-sdk', version: sdkPackage.version, + description: 'Provides core APIs, types and utilities used by dynamic plugins at runtime.', main: 'lib/lib-core.js', ...commonManifestFields, dependencies: { @@ -133,6 +134,7 @@ export const getInternalPackage: GetPackageDefinition = ( manifest: { name: '@openshift-console/dynamic-plugin-sdk-internal', version: sdkPackage.version, + description: 'Internal package exposing additional Console code.', main: 'lib/lib-internal.js', ...commonManifestFields, dependencies: { @@ -154,6 +156,7 @@ export const getWebpackPackage: GetPackageDefinition = ( manifest: { name: '@openshift-console/dynamic-plugin-sdk-webpack', version: sdkPackage.version, + description: 'Provides webpack ConsoleRemotePlugin used to build all dynamic plugin assets.', main: 'lib/lib-webpack.js', ...commonManifestFields, dependencies: { diff --git a/frontend/packages/console-dynamic-plugin-sdk/src/api/common-types.ts b/frontend/packages/console-dynamic-plugin-sdk/src/api/common-types.ts index bdc48c73555..d3b62d23ed0 100644 --- a/frontend/packages/console-dynamic-plugin-sdk/src/api/common-types.ts +++ b/frontend/packages/console-dynamic-plugin-sdk/src/api/common-types.ts @@ -93,7 +93,7 @@ export type Selector = { matchExpressions?: MatchExpression[]; }; -type K8sVerb = +export type K8sVerb = | 'create' | 'get' | 'list' @@ -165,6 +165,12 @@ export type Alert = PrometheusAlert & { silencedBy?: Silence[]; }; +export type Alerts = { + data: Alert[]; + loaded: boolean; + loadError?: string | Error; +}; + export type PrometheusRule = { alerts: PrometheusAlert[]; annotations: PrometheusLabels; diff --git a/frontend/packages/console-dynamic-plugin-sdk/src/api/internal-api.ts b/frontend/packages/console-dynamic-plugin-sdk/src/api/internal-api.ts index e9a3f04127c..520c31e31ba 100644 --- a/frontend/packages/console-dynamic-plugin-sdk/src/api/internal-api.ts +++ b/frontend/packages/console-dynamic-plugin-sdk/src/api/internal-api.ts @@ -1,4 +1,5 @@ /* eslint-disable */ +import * as React from 'react'; import { ActivityItemProps, ActivityBodyProps, @@ -20,7 +21,9 @@ import { UseURLPoll, UseLastNamespace, } from './internal-types'; -import { UseUserSettings } from '../extensions'; +import { UseUserSettings } from '../extensions/console-types'; + +export * from './internal-topology-api'; export const ActivityItem: React.FC = require('@console/shared/src/components/dashboard/activity-card/ActivityItem') .default; diff --git a/frontend/packages/console-dynamic-plugin-sdk/src/api/internal-topology-api.ts b/frontend/packages/console-dynamic-plugin-sdk/src/api/internal-topology-api.ts new file mode 100644 index 00000000000..4a70eded729 --- /dev/null +++ b/frontend/packages/console-dynamic-plugin-sdk/src/api/internal-topology-api.ts @@ -0,0 +1,75 @@ +/* eslint-disable */ +import * as React from 'react'; +import { + CpuCellComponentProps, + MemoryCellComponentProps, + TopologyListViewNodeProps, + UseOverviewMetrics, + WithEditReviewAccess, + GetPodMetricStats, + GetTopologyResourceObject, + GetResource, + GetTopologyEdgeItems, + GetTopologyGroupItems, + GetTopologyNodeItem, + MergeGroup, + GetModifyApplicationAction, + BaseDataModelGetter, + GetWorkloadResources, + ContextMenuActions, + CreateConnectorProps, +} from '../extensions/topology-types'; + +export const CpuCellComponent: React.FC = require('@console/topology/src/components/list-view/cells/CpuCell') + .CpuCellComponent; + +export const MemoryCellComponent: React.FC = require('@console/topology/src/components/list-view/cells/MemoryCell') + .MemoryCellComponent; + +export const TopologyListViewNode: React.FC = require('@console/topology/src/components/list-view/TopologyListViewNode') + .default; + +export const useOverviewMetrics: UseOverviewMetrics = require('@console/topology/src/utils/useOverviewMetrics') + .useOverviewMetrics; + +export const withEditReviewAccess: WithEditReviewAccess = require('@console/topology/src/utils/withEditReviewAccess') + .withEditReviewAccess; + +export const getPodMetricStats: GetPodMetricStats = require('@console/topology/src/utils/metricStats') + .getPodMetricStats; + +export const getTopologyResourceObject: GetTopologyResourceObject = require('@console/topology/src/utils/topology-utils') + .getTopologyResourceObject; + +export const getResource: GetResource = require('@console/topology/src/utils/topology-utils') + .getResource; + +export const getTopologyEdgeItems: GetTopologyEdgeItems = require('@console/topology/src/data-transforms/transform-utils') + .getTopologyEdgeItems; + +export const getTopologyGroupItems: GetTopologyGroupItems = require('@console/topology/src/data-transforms/transform-utils') + .getTopologyGroupItems; + +export const getTopologyNodeItem: GetTopologyNodeItem = require('@console/topology/src/data-transforms/transform-utils') + .getTopologyNodeItem; + +export const mergeGroup: MergeGroup = require('@console/topology/src/data-transforms/transform-utils') + .mergeGroup; + +export const getModifyApplicationAction: GetModifyApplicationAction = require('@console/topology/src/actions/modify-application') + .getModifyApplicationAction; + +export const baseDataModelGetter: BaseDataModelGetter = require('@console/topology/src/data-transforms/data-transformer') + .baseDataModelGetter; + +export const getWorkloadResources: GetWorkloadResources = require('@console/topology/src/data-transforms/transform-utils') + .getWorkloadResources; + +export const contextMenuActions: ContextMenuActions = require('@console/topology/src/actions/contextMenuActions') + .contextMenuActions; + +export const CreateConnector: CreateConnectorProps = require('@console/topology/src/components/graph-view') + .CreateConnector; + +export const createConnectorCallback = require('@console/topology/src/components/graph-view') + .createConnectorCallback; diff --git a/frontend/packages/console-dynamic-plugin-sdk/src/app/components/utils/rbac.tsx b/frontend/packages/console-dynamic-plugin-sdk/src/app/components/utils/rbac.tsx index 47529207b55..a805ad8e3a7 100644 --- a/frontend/packages/console-dynamic-plugin-sdk/src/app/components/utils/rbac.tsx +++ b/frontend/packages/console-dynamic-plugin-sdk/src/app/components/utils/rbac.tsx @@ -1,8 +1,8 @@ import * as React from 'react'; import * as _ from 'lodash'; +import { K8sVerb } from '../../../api/common-types'; import { AccessReviewResourceAttributes, - K8sVerb, SelfSubjectAccessReviewKind, } from '../../../extensions/console-types'; import { ProjectModel, SelfSubjectAccessReviewModel } from '../../../models'; diff --git a/frontend/packages/console-dynamic-plugin-sdk/src/app/k8s/api-discovery/api-discovery-types.ts b/frontend/packages/console-dynamic-plugin-sdk/src/app/k8s/api-discovery/api-discovery-types.ts index 76d3c25f9f6..b6c37eeecd6 100644 --- a/frontend/packages/console-dynamic-plugin-sdk/src/app/k8s/api-discovery/api-discovery-types.ts +++ b/frontend/packages/console-dynamic-plugin-sdk/src/app/k8s/api-discovery/api-discovery-types.ts @@ -1,6 +1,6 @@ import { Store, AnyAction } from 'redux'; import { ActionType as Action } from 'typesafe-actions'; -import { K8sVerb } from '../../../extensions/console-types'; +import { K8sVerb } from '../../../api/common-types'; export type InitApiDiscovery = (store: Store>) => void; diff --git a/frontend/packages/console-dynamic-plugin-sdk/src/extensions/console-types.ts b/frontend/packages/console-dynamic-plugin-sdk/src/extensions/console-types.ts index 4f9ec9ea946..641d0497ba5 100644 --- a/frontend/packages/console-dynamic-plugin-sdk/src/extensions/console-types.ts +++ b/frontend/packages/console-dynamic-plugin-sdk/src/extensions/console-types.ts @@ -7,6 +7,7 @@ import MonacoEditor from 'react-monaco-editor/lib/editor'; import { ExtensionK8sGroupKindModel, K8sModel, + K8sVerb, MatchLabels, PrometheusEndpoint, PrometheusLabels, @@ -70,17 +71,6 @@ export type K8sResourceKind = K8sResourceCommon & { data?: { [key: string]: any }; }; -export type K8sVerb = - | 'create' - | 'get' - | 'list' - | 'update' - | 'patch' - | 'delete' - | 'deletecollection' - | 'watch' - | 'impersonate'; - export type AccessReviewResourceAttributes = { group?: string; resource?: string; @@ -827,3 +817,73 @@ export type CertificateSigningRequestKind = { export type NodeCertificateSigningRequestKind = CertificateSigningRequestKind & { metadata: K8sResourceCommon['metadata'] & { originalName: string }; }; + +export type MetricValuesByName = { + [name: string]: number; +}; + +export type NamespaceMetrics = { + cpu: MetricValuesByName; + memory: MetricValuesByName; +}; + +export type OverviewItemAlerts = { + [key: string]: { + message: string; + severity: string; + }; +}; + +export type PodReadiness = string; +export type PodPhase = string; + +export enum AllPodStatus { + Running = 'Running', + NotReady = 'Not Ready', + Warning = 'Warning', + Empty = 'Empty', + Failed = 'Failed', + Pending = 'Pending', + Succeeded = 'Succeeded', + Terminating = 'Terminating', + Unknown = 'Unknown', + ScaledTo0 = 'Scaled to 0', + Idle = 'Idle', + AutoScaledTo0 = 'Autoscaled to 0', + ScalingUp = 'Scaling Up', + CrashLoopBackOff = 'CrashLoopBackOff', +} + +export type ExtPodPhase = + | AllPodStatus.Empty + | AllPodStatus.Warning + | AllPodStatus.Idle + | AllPodStatus.NotReady + | AllPodStatus.ScaledTo0 + | AllPodStatus.AutoScaledTo0 + | AllPodStatus.Terminating + | AllPodStatus.ScalingUp; + +export type ExtPodStatus = { + phase: ExtPodPhase | PodPhase; +}; + +export type ExtPodKind = { + status?: ExtPodStatus; +} & K8sResourceKind; + +export type PodControllerOverviewItem = { + alerts: OverviewItemAlerts; + revision: number; + obj: K8sResourceKind; + phase?: string; + pods: ExtPodKind[]; +}; + +export interface PodRCData { + current: PodControllerOverviewItem; + previous: PodControllerOverviewItem; + obj?: K8sResourceKind; + isRollingOut: boolean; + pods: ExtPodKind[]; +} diff --git a/frontend/packages/console-dynamic-plugin-sdk/src/extensions/topology-types.ts b/frontend/packages/console-dynamic-plugin-sdk/src/extensions/topology-types.ts index 9cfe13607e1..46ae8f7d28a 100644 --- a/frontend/packages/console-dynamic-plugin-sdk/src/extensions/topology-types.ts +++ b/frontend/packages/console-dynamic-plugin-sdk/src/extensions/topology-types.ts @@ -9,9 +9,19 @@ import { ModelKind, GraphElement, TopologyQuadrant, -} from '@patternfly/react-topology/dist/esm/types'; -import { PrometheusAlert } from '../api/common-types'; -import { K8sResourceCommon, K8sResourceKindReference, WatchK8sResults } from './console-types'; + NodeShape, +} from '@patternfly/react-topology'; +import PFPoint from '@patternfly/react-topology/dist/esm/geom/Point'; +import { Alerts, K8sKind, K8sVerb, PrometheusAlert } from '../api/common-types'; +import { Action } from './actions'; +import { + K8sResourceCommon, + K8sResourceKind, + K8sResourceKindReference, + NamespaceMetrics, + PodRCData, + WatchK8sResults, +} from './console-types'; export type Point = [number, number]; @@ -179,3 +189,119 @@ export type BuildConfigData = { export const SHOW_GROUPING_HINT_EVENT = 'show-regroup-hint'; export type ShowGroupingHintEventListener = EventListener<[Node, string]>; + +export type MetricsTooltipProps = { + metricLabel: string; + byPod: { + formattedValue: string; + name: string; + value: number; + }[]; +}; + +export type CpuCellComponentProps = { + cpuByPod: MetricsTooltipProps['byPod']; + totalCores: number; +}; + +export type MemoryCellComponentProps = { + memoryByPod: MetricsTooltipProps['byPod']; + totalBytes: number; +}; + +export type TopologyListViewNodeProps = { + item: Node; + selectedIds: string[]; + onSelect: (ids: string[]) => void; + badgeCell?: React.ReactNode; + labelCell?: React.ReactNode; + alertsCell?: React.ReactNode; + memoryCell?: React.ReactNode; + cpuCell?: React.ReactNode; + statusCell?: React.ReactNode; + groupResourcesCell?: React.ReactNode; + hideAlerts?: boolean; + noPods?: boolean; +}; + +export type UseOverviewMetrics = () => any; + +export type WithEditReviewAccessComponentProps = { element: Node }; + +export type WithEditReviewAccess = ( + verb: K8sVerb, +) => ( + WrappedComponent: React.ComponentType, +) => React.ComponentType; + +export type PodStats = { + name: string; + value: number; + formattedValue: string; +}; + +export type MetricStats = { + totalBytes?: number; + totalCores?: number; + memoryByPod?: PodStats[]; + cpuByPod?: PodStats[]; +}; + +export type GetPodMetricStats = (metrics: NamespaceMetrics, podData: PodRCData) => MetricStats; + +export type GetTopologyResourceObject = (topologyObject: TopologyDataObject) => K8sResourceKind; + +export type GetResource = (node: GraphElement) => T; + +export type GetTopologyEdgeItems = ( + resource: K8sResourceKind, + resources: K8sResourceKind[], +) => EdgeModel[]; + +export type GetTopologyGroupItems = (resource: K8sResourceKind) => NodeModel | null; + +export type GetTopologyNodeItem = ( + resource: K8sResourceKind, + type: string, + data: any, + nodeProps?: Omit, + children?: string[], + resourceKind?: K8sResourceKindReference, + shape?: NodeShape, +) => OdcNodeModel; + +export type MergeGroup = (newGroup: NodeModel, existingGroups: NodeModel[]) => void; + +export type GetModifyApplicationAction = ( + kind: K8sKind, + obj: K8sResourceKind, + insertBefore?: string | string[], +) => Action; + +export type BaseDataModelGetter = ( + model: Model, + resources: TopologyDataResources, + workloadResources: K8sResourceKind[], + dataModelDepicters?: TopologyDataModelDepicted[], + trafficData?: TrafficData, + monitoringAlerts?: Alerts, +) => Model; + +export interface KindsMap { + [key: string]: string; +} +export type GetWorkloadResources = ( + resources: TopologyDataResources, + kindsMap: KindsMap, + workloadTypes?: string[], +) => K8sResourceKind[]; + +export type ContextMenuActions = (element: GraphElement) => Record; + +export type CreateConnectorProps = { + startPoint: PFPoint; + endPoint: PFPoint; + hints: string[]; + dragging?: boolean; + hover?: boolean; +}; diff --git a/frontend/packages/console-dynamic-plugin-sdk/src/lib-internal.ts b/frontend/packages/console-dynamic-plugin-sdk/src/lib-internal.ts index fddab9442d2..be09490f255 100644 --- a/frontend/packages/console-dynamic-plugin-sdk/src/lib-internal.ts +++ b/frontend/packages/console-dynamic-plugin-sdk/src/lib-internal.ts @@ -1,7 +1,7 @@ /** * @file Entrypoint for the `@openshift-console/dynamic-plugin-sdk-internal` package published to npmjs. * - * Internal package exposing additional code. + * Internal package exposing additional Console code. */ export * from './api/internal-api'; diff --git a/frontend/packages/console-dynamic-plugin-sdk/src/shared-modules-init.ts b/frontend/packages/console-dynamic-plugin-sdk/src/shared-modules-init.ts index a59d20355b6..e276a4942dc 100644 --- a/frontend/packages/console-dynamic-plugin-sdk/src/shared-modules-init.ts +++ b/frontend/packages/console-dynamic-plugin-sdk/src/shared-modules-init.ts @@ -37,10 +37,10 @@ const initSharedScope = () => { ); addModule('react', async () => () => require('react')); addModule('react-i18next', async () => () => require('react-i18next')); + addModule('react-redux', async () => () => require('react-redux')); addModule('react-router', async () => () => require('react-router')); addModule('react-router-dom', async () => () => require('react-router-dom')); addModule('react-router-dom-v5-compat', async () => () => require('react-router-dom-v5-compat')); - addModule('react-redux', async () => () => require('react-redux')); addModule('redux', async () => () => require('redux')); addModule('redux-thunk', async () => () => require('redux-thunk')); diff --git a/frontend/packages/console-dynamic-plugin-sdk/src/shared-modules.ts b/frontend/packages/console-dynamic-plugin-sdk/src/shared-modules.ts index bd47cfbf485..740140c259b 100644 --- a/frontend/packages/console-dynamic-plugin-sdk/src/shared-modules.ts +++ b/frontend/packages/console-dynamic-plugin-sdk/src/shared-modules.ts @@ -29,10 +29,10 @@ export const sharedPluginModules = [ '@patternfly/quickstarts', 'react', 'react-i18next', + 'react-redux', 'react-router', 'react-router-dom', 'react-router-dom-v5-compat', - 'react-redux', 'redux', 'redux-thunk', ] as const; @@ -50,10 +50,10 @@ const sharedPluginModulesMetadata: Record; } -export interface PodRCData { - current: PodControllerOverviewItem; - previous: PodControllerOverviewItem; - obj?: K8sResourceKind; - isRollingOut: boolean; - pods: ExtPodKind[]; -} - export interface PodRingResources { pods: FirehoseResult; replicaSets: FirehoseResult; @@ -34,36 +38,3 @@ export interface PodRingData { isRollingOut: boolean; }; } - -export type ExtPodPhase = - | AllPodStatus.Empty - | AllPodStatus.Warning - | AllPodStatus.Idle - | AllPodStatus.NotReady - | AllPodStatus.ScaledTo0 - | AllPodStatus.AutoScaledTo0 - | AllPodStatus.Terminating - | AllPodStatus.ScalingUp; - -export type ExtPodStatus = { - phase: ExtPodPhase | PodPhase; -}; - -export type ExtPodKind = { - status?: ExtPodStatus; -} & K8sResourceKind; - -export type OverviewItemAlerts = { - [key: string]: { - message: string; - severity: string; - }; -}; - -export type PodControllerOverviewItem = { - alerts: OverviewItemAlerts; - revision: number; - obj: K8sResourceKind; - phase?: string; - pods: ExtPodKind[]; -}; diff --git a/frontend/packages/helm-plugin/src/topology/__tests__/helm-data-transformer.spec.ts b/frontend/packages/helm-plugin/src/topology/__tests__/helm-data-transformer.spec.ts index 4bc84e621cc..46a6a35401e 100644 --- a/frontend/packages/helm-plugin/src/topology/__tests__/helm-data-transformer.spec.ts +++ b/frontend/packages/helm-plugin/src/topology/__tests__/helm-data-transformer.spec.ts @@ -50,7 +50,7 @@ export function getTransformedTopologyData(mockData: TopologyDataResources) { const workloadResources = getWorkloadResources(data, TEST_KINDS_MAP, WORKLOAD_TYPES); const model = getHelmGraphModelFromMap(sampleHelmResourcesMap, data); - return baseDataModelGetter(model, 'test-project', data, workloadResources, []); + return baseDataModelGetter(model, data, workloadResources, []); } describe('HELM data transformer ', () => { diff --git a/frontend/packages/knative-plugin/src/topology/__tests__/data-transformer.spec.ts b/frontend/packages/knative-plugin/src/topology/__tests__/data-transformer.spec.ts index 08e2b84a16c..da5f15862cc 100644 --- a/frontend/packages/knative-plugin/src/topology/__tests__/data-transformer.spec.ts +++ b/frontend/packages/knative-plugin/src/topology/__tests__/data-transformer.spec.ts @@ -72,13 +72,7 @@ const getTransformedTopologyData = ( ...(kameletModel.edges as EdgeModel[]), ], }; - return baseDataModelGetter( - model, - 'test-project', - mockData, - workloadResources, - dataModelDepicters, - ); + return baseDataModelGetter(model, mockData, workloadResources, dataModelDepicters); }); }; diff --git a/frontend/packages/topology/src/__tests__/Graph.spec.tsx b/frontend/packages/topology/src/__tests__/Graph.spec.tsx index f14f0f3951a..e123d9240ed 100644 --- a/frontend/packages/topology/src/__tests__/Graph.spec.tsx +++ b/frontend/packages/topology/src/__tests__/Graph.spec.tsx @@ -13,7 +13,7 @@ describe('Graph', () => { beforeEach(() => { mockSelectFn = jest.fn(); const model = { nodes: [], edges: [] }; - topologyData = baseDataModelGetter(model, 'test-project', MockGraphResources, []); + topologyData = baseDataModelGetter(model, MockGraphResources, []); graphWrapper = mount( ({ 'topology-context-actions': { element, connectorSource }, }); -export const contextMenuActions = (element: GraphElement) => { +export const contextMenuActions: ContextMenuActions = (element) => { const resource = getResource(element); const { csvName } = element.getData()?.data ?? {}; return { diff --git a/frontend/packages/topology/src/actions/modify-application.ts b/frontend/packages/topology/src/actions/modify-application.ts index b5f2bcb14db..272c95c0182 100644 --- a/frontend/packages/topology/src/actions/modify-application.ts +++ b/frontend/packages/topology/src/actions/modify-application.ts @@ -1,13 +1,8 @@ import i18next from 'i18next'; -import { Action } from '@console/dynamic-plugin-sdk'; -import { K8sResourceKind, K8sKind } from '@console/internal/module/k8s'; +import { GetModifyApplicationAction } from '@console/dynamic-plugin-sdk/src/extensions/topology-types'; import { editApplicationModal } from '@console/topology/src/components/modals'; -export const getModifyApplicationAction = ( - kind: K8sKind, - obj: K8sResourceKind, - insertBefore?: string | string[], -): Action => { +export const getModifyApplicationAction: GetModifyApplicationAction = (kind, obj, insertBefore) => { return { id: 'modify-application', label: i18next.t('topology~Edit application grouping'), diff --git a/frontend/packages/topology/src/components/graph-view/components/edges/CreateConnector.tsx b/frontend/packages/topology/src/components/graph-view/components/edges/CreateConnector.tsx index 7d15c0baec9..1b26b1f3cee 100644 --- a/frontend/packages/topology/src/components/graph-view/components/edges/CreateConnector.tsx +++ b/frontend/packages/topology/src/components/graph-view/components/edges/CreateConnector.tsx @@ -1,14 +1,7 @@ import * as React from 'react'; -import { DefaultCreateConnector, Point } from '@patternfly/react-topology'; +import { DefaultCreateConnector } from '@patternfly/react-topology'; import { useTranslation } from 'react-i18next'; - -type CreateConnectorProps = { - startPoint: Point; - endPoint: Point; - hints: string[]; - dragging?: boolean; - hover?: boolean; -}; +import { CreateConnectorProps } from '@console/dynamic-plugin-sdk/src/extensions/topology-types'; const CreateConnector: React.FC = ({ startPoint, diff --git a/frontend/packages/topology/src/components/list-view/TopologyListViewNode.tsx b/frontend/packages/topology/src/components/list-view/TopologyListViewNode.tsx index 609946c9a8b..9c1c990f9b6 100644 --- a/frontend/packages/topology/src/components/list-view/TopologyListViewNode.tsx +++ b/frontend/packages/topology/src/components/list-view/TopologyListViewNode.tsx @@ -10,10 +10,11 @@ import { Tooltip, TooltipPosition, } from '@patternfly/react-core'; -import { Node, observer } from '@patternfly/react-topology'; +import { observer } from '@patternfly/react-topology'; import * as classNames from 'classnames'; import { useTranslation } from 'react-i18next'; import { connect } from 'react-redux'; +import { TopologyListViewNodeProps } from '@console/dynamic-plugin-sdk/src/extensions/topology-types'; import { selectOverviewDetailsTab } from '@console/internal/actions/ui'; import { modelFor } from '@console/internal/module/k8s'; import { @@ -37,21 +38,6 @@ type DispatchProps = { onSelectTab?: (name: string) => void; }; -type TopologyListViewNodeProps = { - item: Node; - selectedIds: string[]; - onSelect: (ids: string[]) => void; - badgeCell?: React.ReactNode; - labelCell?: React.ReactNode; - alertsCell?: React.ReactNode; - memoryCell?: React.ReactNode; - cpuCell?: React.ReactNode; - statusCell?: React.ReactNode; - groupResourcesCell?: React.ReactNode; - hideAlerts?: boolean; - noPods?: boolean; -}; - const TopologyListViewNode: React.FC = ({ item, selectedIds, diff --git a/frontend/packages/topology/src/components/list-view/cells/CpuCell.tsx b/frontend/packages/topology/src/components/list-view/cells/CpuCell.tsx index 66457db4fa2..0faa9a97f91 100644 --- a/frontend/packages/topology/src/components/list-view/cells/CpuCell.tsx +++ b/frontend/packages/topology/src/components/list-view/cells/CpuCell.tsx @@ -2,6 +2,7 @@ import * as React from 'react'; import { DataListCell } from '@patternfly/react-core'; import { Node } from '@patternfly/react-topology'; import { useTranslation } from 'react-i18next'; +import { CpuCellComponentProps } from '@console/dynamic-plugin-sdk/src/extensions/topology-types'; import { formatCores } from '@console/internal/components/utils'; import { getTopologyResourceObject } from '../../../utils/topology-utils'; import { useMetricStats } from '../../../utils/useMetricStats'; @@ -9,11 +10,6 @@ import MetricsTooltip from './MetricsTooltip'; import './MetricsCell.scss'; -type CpuCellComponentProps = { - cpuByPod: any; - totalCores: number; -}; - const CpuCellComponent: React.FC = React.memo(({ cpuByPod, totalCores }) => { const { t } = useTranslation(); return ( diff --git a/frontend/packages/topology/src/components/list-view/cells/MemoryCell.tsx b/frontend/packages/topology/src/components/list-view/cells/MemoryCell.tsx index 6e91a398acd..035b1983426 100644 --- a/frontend/packages/topology/src/components/list-view/cells/MemoryCell.tsx +++ b/frontend/packages/topology/src/components/list-view/cells/MemoryCell.tsx @@ -1,6 +1,7 @@ import * as React from 'react'; import { DataListCell } from '@patternfly/react-core'; import { Node } from '@patternfly/react-topology'; +import { MemoryCellComponentProps } from '@console/dynamic-plugin-sdk/src/extensions/topology-types'; import { formatBytesAsMiB } from '@console/internal/components/utils'; import { getTopologyResourceObject } from '../../../utils/topology-utils'; import { useMetricStats } from '../../../utils/useMetricStats'; @@ -12,13 +13,8 @@ type MemoryCellProps = { item: Node; }; -type MemoryCellComponentProps = { - totalBytes: number; - memoryByPod: any; -}; - const MemoryCellComponent: React.FC = React.memo( - ({ totalBytes, memoryByPod }) => ( + ({ memoryByPod, totalBytes }) => (
    diff --git a/frontend/packages/topology/src/components/list-view/cells/MetricsTooltip.tsx b/frontend/packages/topology/src/components/list-view/cells/MetricsTooltip.tsx index 7270219b5a6..6f46cb96562 100644 --- a/frontend/packages/topology/src/components/list-view/cells/MetricsTooltip.tsx +++ b/frontend/packages/topology/src/components/list-view/cells/MetricsTooltip.tsx @@ -2,18 +2,10 @@ import * as React from 'react'; import { Tooltip } from '@patternfly/react-core'; import * as _ from 'lodash'; import { useTranslation } from 'react-i18next'; +import { MetricsTooltipProps } from '@console/dynamic-plugin-sdk/src/extensions/topology-types'; import { truncateMiddle } from '@console/internal/components/utils'; import { useIsMobile } from '@console/shared'; -type MetricsTooltipProps = { - metricLabel: string; - byPod: { - formattedValue: string; - name: string; - value: number; - }[]; -}; - const MetricsTooltip: React.FC = ({ metricLabel, byPod, children }) => { const { t } = useTranslation(); const isMobile = useIsMobile(); diff --git a/frontend/packages/topology/src/data-transforms/__tests__/data-transformer.spec.ts b/frontend/packages/topology/src/data-transforms/__tests__/data-transformer.spec.ts index 42b3fd09f22..b732a63f421 100644 --- a/frontend/packages/topology/src/data-transforms/__tests__/data-transformer.spec.ts +++ b/frontend/packages/topology/src/data-transforms/__tests__/data-transformer.spec.ts @@ -16,8 +16,6 @@ import { getEditURL, WORKLOAD_TYPES } from '../../utils/topology-utils'; import { getTrafficConnectors, baseDataModelGetter } from '../data-transformer'; import { getWorkloadResources } from '../transform-utils'; -const namespace = 'test-project'; - function getTransformedTopologyData( mockData: TopologyDataResources, transformByProp: string[] = WORKLOAD_TYPES, @@ -32,7 +30,7 @@ function getTransformedTopologyData( const workloadResources = getWorkloadResources(mockData, TEST_KINDS_MAP, transformByProp); const model = { nodes: [], edges: [] }; - return baseDataModelGetter(model, namespace, mockData, workloadResources, [], trafficData); + return baseDataModelGetter(model, mockData, workloadResources, [], trafficData); } describe('data transformer ', () => { @@ -44,13 +42,13 @@ describe('data transformer ', () => { it('should be able to create an object', () => { const model = { nodes: [], edges: [] }; - const data = baseDataModelGetter(model, namespace, resources, [], []); + const data = baseDataModelGetter(model, resources, [], []); expect(data).toBeTruthy(); }); it('should return graph and topology data', () => { const model = { nodes: [], edges: [] }; - const data = baseDataModelGetter(model, namespace, resources, [], []); + const data = baseDataModelGetter(model, resources, [], []); expect(data).toEqual(topologyData); }); diff --git a/frontend/packages/topology/src/data-transforms/__tests__/updateModelFromFilters.spec.ts b/frontend/packages/topology/src/data-transforms/__tests__/updateModelFromFilters.spec.ts index f050d2d962a..6ee2c769769 100644 --- a/frontend/packages/topology/src/data-transforms/__tests__/updateModelFromFilters.spec.ts +++ b/frontend/packages/topology/src/data-transforms/__tests__/updateModelFromFilters.spec.ts @@ -12,15 +12,13 @@ import { baseDataModelGetter } from '../data-transformer'; import { getWorkloadResources } from '../transform-utils'; import { updateModelFromFilters } from '../updateModelFromFilters'; -const namespace = 'test-project'; - const filterers = []; function getTransformedTopologyData() { const model = { nodes: [], edges: [] }; const workloadResources = getWorkloadResources(MockResources, TEST_KINDS_MAP, WORKLOAD_TYPES); - return baseDataModelGetter(model, namespace, MockResources, workloadResources, []); + return baseDataModelGetter(model, MockResources, workloadResources, []); } describe('topology model ', () => { diff --git a/frontend/packages/topology/src/data-transforms/data-transformer.ts b/frontend/packages/topology/src/data-transforms/data-transformer.ts index d434f727136..99f6556de02 100644 --- a/frontend/packages/topology/src/data-transforms/data-transformer.ts +++ b/frontend/packages/topology/src/data-transforms/data-transformer.ts @@ -1,15 +1,11 @@ import { EdgeModel, Model } from '@patternfly/react-topology'; +import { BaseDataModelGetter } from '@console/dynamic-plugin-sdk/src/extensions/topology-types'; import { getImageForIconClass } from '@console/internal/components/catalog/catalog-item-icon'; import { Alerts } from '@console/internal/components/monitoring/types'; import { K8sResourceKind } from '@console/internal/module/k8s'; import { createOverviewItemForType } from '@console/shared'; import { TYPE_APPLICATION_GROUP, TYPE_TRAFFIC_CONNECTOR, TYPE_WORKLOAD } from '../const'; -import { - TopologyDataResources, - TrafficData, - KialiNode, - TopologyDataModelDepicted, -} from '../topology-types'; +import { TopologyDataResources, TrafficData, KialiNode } from '../topology-types'; import { WORKLOAD_TYPES } from '../utils/topology-utils'; import { addToTopologyDataModel, @@ -129,15 +125,14 @@ const createTrafficConnectors = ( } }; -export const baseDataModelGetter = ( - model: Model, - namespace: string, - resources: TopologyDataResources, - workloadResources: K8sResourceKind[], - dataModelDepicters?: TopologyDataModelDepicted[], - trafficData?: TrafficData, - monitoringAlerts?: Alerts, -): Model => { +export const baseDataModelGetter: BaseDataModelGetter = ( + model, + resources, + workloadResources, + dataModelDepicters, + trafficData, + monitoringAlerts, +) => { const res = { ...resources, monitoringAlerts }; const baseModel = getBaseTopologyDataModel(res); addToTopologyDataModel(baseModel, model, dataModelDepicters); diff --git a/frontend/packages/topology/src/data-transforms/transform-utils.ts b/frontend/packages/topology/src/data-transforms/transform-utils.ts index e8d8d3c8c2f..e79c2a8fe1b 100644 --- a/frontend/packages/topology/src/data-transforms/transform-utils.ts +++ b/frontend/packages/topology/src/data-transforms/transform-utils.ts @@ -1,7 +1,17 @@ -import { EdgeModel, Model, NodeModel, NodeShape } from '@patternfly/react-topology'; +import { Model, NodeModel } from '@patternfly/react-topology'; import i18next from 'i18next'; import * as _ from 'lodash'; -import { WatchK8sResources, WatchK8sResults } from '@console/dynamic-plugin-sdk'; +import { + WatchK8sResources, + WatchK8sResults, +} from '@console/dynamic-plugin-sdk/src/extensions/console-types'; +import { + GetTopologyEdgeItems, + GetTopologyGroupItems, + GetTopologyNodeItem, + GetWorkloadResources, + MergeGroup, +} from '@console/dynamic-plugin-sdk/src/extensions/topology-types'; import { getImageForIconClass } from '@console/internal/components/catalog/catalog-item-icon'; import { Alerts } from '@console/internal/components/monitoring/types'; import { BuildConfigModel, HorizontalPodAutoscalerModel } from '@console/internal/models'; @@ -9,7 +19,6 @@ import { apiVersionForReference, isGroupVersionKind, K8sResourceKind, - K8sResourceKindReference, kindForReference, referenceFor, } from '@console/internal/module/k8s'; @@ -31,7 +40,6 @@ import { } from '../const'; import { TopologyDataObject, - TopologyDataResources, TopologyDataModelDepicted, OdcNodeModel, TopologyResourcesObject, @@ -134,15 +142,15 @@ export const createTopologyNodeData = ( /** * create node data for graphs */ -export const getTopologyNodeItem = ( - resource: K8sResourceKind, - type: string, - data: any, - nodeProps?: Omit, - children?: string[], - resourceKind?: K8sResourceKindReference, - shape?: NodeShape, -): OdcNodeModel => { +export const getTopologyNodeItem: GetTopologyNodeItem = ( + resource, + type, + data, + nodeProps, + children, + resourceKind, + shape, +) => { const uid = resource?.metadata.uid; const name = resource?.metadata.name; const label = resource?.metadata.labels?.['app.openshift.io/instance']; @@ -173,10 +181,7 @@ export const WorkloadModelProps = { /** * create edge data for graph */ -export const getTopologyEdgeItems = ( - dc: K8sResourceKind, - resources: K8sResourceKind[], -): EdgeModel[] => { +export const getTopologyEdgeItems: GetTopologyEdgeItems = (dc, resources) => { const annotations = _.get(dc, 'metadata.annotations'); const edges = []; @@ -220,7 +225,7 @@ export const getTopologyEdgeItems = ( /** * create groups data for graph */ -export const getTopologyGroupItems = (dc: K8sResourceKind): NodeModel => { +export const getTopologyGroupItems: GetTopologyGroupItems = (dc) => { const groupName = _.get(dc, ['metadata', 'labels', 'app.kubernetes.io/part-of']); if (!groupName) { return null; @@ -260,7 +265,7 @@ const mergeGroupData = (newGroup: NodeModel, existingGroup: NodeModel): void => } }; -export const mergeGroup = (newGroup: NodeModel, existingGroups: NodeModel[]): void => { +export const mergeGroup: MergeGroup = (newGroup, existingGroups) => { if (!newGroup) { return; } @@ -327,14 +332,11 @@ export const addToTopologyDataModel = ( /** * Mapping of TopologyResourcesObject key to k8s resource kind */ -export interface KindsMap { - [key: string]: string; -} -export const getWorkloadResources = ( - resources: TopologyDataResources, - kindsMap: KindsMap, - workloadTypes: string[] = WORKLOAD_TYPES, +export const getWorkloadResources: GetWorkloadResources = ( + resources, + kindsMap, + workloadTypes = WORKLOAD_TYPES, ) => { return _.flatten( workloadTypes.map((resourceKind) => { diff --git a/frontend/packages/topology/src/data-transforms/updateTopologyDataModel.ts b/frontend/packages/topology/src/data-transforms/updateTopologyDataModel.ts index 921f55e1bec..f4db0a3e377 100644 --- a/frontend/packages/topology/src/data-transforms/updateTopologyDataModel.ts +++ b/frontend/packages/topology/src/data-transforms/updateTopologyDataModel.ts @@ -48,7 +48,6 @@ export const updateTopologyDataModel = ( return dataModelContext.getExtensionModels(resources).then((extensionsModel) => { const fullModel = baseDataModelGetter( extensionsModel, - dataModelContext.namespace, resources, workloadResources, depicters, diff --git a/frontend/packages/topology/src/operators/__tests__/operator-data-transformer.spec.ts b/frontend/packages/topology/src/operators/__tests__/operator-data-transformer.spec.ts index 7f9bc5c4da7..91ded8df7ab 100644 --- a/frontend/packages/topology/src/operators/__tests__/operator-data-transformer.spec.ts +++ b/frontend/packages/topology/src/operators/__tests__/operator-data-transformer.spec.ts @@ -39,7 +39,7 @@ const filterers = [applyOperatorDisplayOptions]; const getTransformedTopologyData = (mockData: TopologyDataResources) => { const workloadResources = getWorkloadResources(mockData, TEST_KINDS_MAP, WORKLOAD_TYPES); return getOperatorTopologyDataModel('test-project', mockData, workloadResources).then((model) => { - const fullModel = baseDataModelGetter(model, 'test-project', mockData, workloadResources, []); + const fullModel = baseDataModelGetter(model, mockData, workloadResources, []); operatorsDataModelReconciler(fullModel, mockData); return fullModel; }); diff --git a/frontend/packages/topology/src/utils/__tests__/application-utils.spec.ts b/frontend/packages/topology/src/utils/__tests__/application-utils.spec.ts index 7a84c506ab2..0436247aea4 100644 --- a/frontend/packages/topology/src/utils/__tests__/application-utils.spec.ts +++ b/frontend/packages/topology/src/utils/__tests__/application-utils.spec.ts @@ -48,7 +48,6 @@ const spyAndReturn = (spy: Spy) => (returnValue: any) => const getTopologyData = async ( mockData: TopologyDataResources, name: string, - namespace: string, workloadType?: string, isKnativeResource?: boolean, ): Promise => { @@ -69,14 +68,13 @@ const getTopologyData = async ( edges: [...servingModel.edges, ...eventingModel.edges, ...kameletModel.edges], }; } - const result = baseDataModelGetter(model, namespace, mockData, workloadResources, []); + const result = baseDataModelGetter(model, mockData, workloadResources, []); return result.nodes.find((n) => n.data.resources?.obj.metadata.name === name); }; const getTopologyDataKafkaSink = async ( mockData: TopologyDataResources, name: string, - namespace: string, workloadType?: string, isKnativeResource?: boolean, ): Promise => { @@ -88,7 +86,7 @@ const getTopologyDataKafkaSink = async ( if (isKnativeResource) { model = await getKafkaSinkKnativeTopologyData(name, mockData); } - const result = baseDataModelGetter(model, namespace, mockData, workloadResources, []); + const result = baseDataModelGetter(model, mockData, workloadResources, []); return result.nodes.find((n) => n.data.resources?.obj.metadata.name === name); }; @@ -122,7 +120,7 @@ describe('ApplicationUtils ', () => { }); it('Should delete all the specific models related to deployment config', async (done) => { - const nodeModel = await getTopologyData(MockResources, 'nodejs', 'test-project'); + const nodeModel = await getTopologyData(MockResources, 'nodejs'); mockBuilds = sampleBuilds.data; mockBuildConfigs = sampleBuildConfigs.data; mockSecrets = sampleSecrets; @@ -144,7 +142,7 @@ describe('ApplicationUtils ', () => { }); it('Should delete all the specific models related to deployment config if the build config is not present i.e. for resource created through deploy image form', async (done) => { - const nodeModel = await getTopologyData(MockResources, 'nodejs-ex', 'test-project'); + const nodeModel = await getTopologyData(MockResources, 'nodejs-ex'); cleanUpWorkload(nodeModel.resource) .then(() => { @@ -162,7 +160,7 @@ describe('ApplicationUtils ', () => { }); it('Should delete all the specific models related to deployment config if the build config is present', async (done) => { - const nodeModel = await getTopologyData(MockResources, 'nodejs-with-bc', 'testproject'); + const nodeModel = await getTopologyData(MockResources, 'nodejs-with-bc'); cleanUpWorkload(nodeModel.resource) .then(() => { @@ -180,7 +178,7 @@ describe('ApplicationUtils ', () => { }); it('Should delete all the specific models related to daemonsets', async (done) => { - const nodeModel = await getTopologyData(MockResources, 'daemonset-testing', 'test-project'); + const nodeModel = await getTopologyData(MockResources, 'daemonset-testing'); cleanUpWorkload(nodeModel.resource) .then(() => { const allArgs = spy.calls.allArgs(); @@ -194,7 +192,7 @@ describe('ApplicationUtils ', () => { }); it('Should delete all the specific models related to statefulsets', async (done) => { - const nodeModel = await getTopologyData(MockResources, 'alertmanager-main', 'test-project'); + const nodeModel = await getTopologyData(MockResources, 'alertmanager-main'); cleanUpWorkload(nodeModel.resource) .then(() => { const allArgs = spy.calls.allArgs(); @@ -211,7 +209,6 @@ describe('ApplicationUtils ', () => { const nodeModel = await getTopologyData( MockKnativeResources, 'overlayimage', - 'testproject3', 'ksservices', true, ); @@ -232,7 +229,6 @@ describe('ApplicationUtils ', () => { const nodeModel = await getTopologyData( MockKnativeResources, 'overlayimage-kb', - 'testproject3', CamelKameletBindingModel.plural, true, ); @@ -253,7 +249,6 @@ describe('ApplicationUtils ', () => { const nodeModel = await getTopologyDataKafkaSink( MockKnativeResources, 'kafkasink-dummy', - 'testproject3', CamelKameletBindingModel.plural, true, ); @@ -271,7 +266,7 @@ describe('ApplicationUtils ', () => { }); it('Should not delete any of the models, if delete access is not available', async (done) => { - const nodeModel = await getTopologyData(MockResources, 'nodejs', 'test-project'); + const nodeModel = await getTopologyData(MockResources, 'nodejs'); spyAndReturn(checkAccessSpy)(Promise.resolve({ status: { allowed: false } })); cleanUpWorkload(nodeModel.resource) .then(() => { diff --git a/frontend/packages/topology/src/utils/metricStats.ts b/frontend/packages/topology/src/utils/metricStats.ts index 64803bb9be8..6d963eee19b 100644 --- a/frontend/packages/topology/src/utils/metricStats.ts +++ b/frontend/packages/topology/src/utils/metricStats.ts @@ -1,22 +1,8 @@ -import { NamespaceMetrics } from '@console/internal/actions/ui'; +import { GetPodMetricStats } from '@console/dynamic-plugin-sdk/src/extensions/topology-types'; import { formatBytesAsMiB, formatCores } from '@console/internal/components/utils'; import { K8sResourceKind } from '@console/internal/module/k8s'; -import { PodRCData } from '@console/shared/src'; -export type PodStats = { - name: string; - value: number; - formattedValue: string; -}; - -export type MetricStats = { - totalBytes?: number; - totalCores?: number; - memoryByPod?: PodStats[]; - cpuByPod?: PodStats[]; -}; - -export const getPodMetricStats = (metrics: NamespaceMetrics, podData: PodRCData): MetricStats => { +export const getPodMetricStats: GetPodMetricStats = (metrics, podData) => { const currentPods = podData.current ? podData.current.pods : podData.pods; let totalBytes = 0; let totalCores = 0; diff --git a/frontend/packages/topology/src/utils/topology-utils.ts b/frontend/packages/topology/src/utils/topology-utils.ts index ee37d76b2a5..916c1c452d1 100644 --- a/frontend/packages/topology/src/utils/topology-utils.ts +++ b/frontend/packages/topology/src/utils/topology-utils.ts @@ -2,6 +2,10 @@ import { Node, Edge, GraphElement } from '@patternfly/react-topology'; import * as GitUrlParse from 'git-url-parse'; import i18next from 'i18next'; import * as _ from 'lodash'; +import { + GetTopologyResourceObject, + GetResource, +} from '@console/dynamic-plugin-sdk/src/extensions/topology-types'; import { getRouteWebURL } from '@console/internal/components/routes'; import { K8sResourceKind, @@ -14,7 +18,6 @@ import { RootState } from '@console/internal/redux'; import { ALLOW_SERVICE_BINDING_FLAG } from '@console/service-binding-plugin/src/const'; import OdcBaseNode from '../elements/OdcBaseNode'; import { TYPE_OPERATOR_BACKED_SERVICE } from '../operators/components/const'; -import { TopologyDataObject } from '../topology-types'; import { updateResourceApplication } from './application-utils'; import { createResourceConnection, removeResourceConnection } from './connector-utils'; @@ -115,14 +118,14 @@ export const getRoutesURL = (resource: K8sResourceKind, routes: RouteKind[]): st return null; }; -export const getTopologyResourceObject = (topologyObject: TopologyDataObject): K8sResourceKind => { +export const getTopologyResourceObject: GetTopologyResourceObject = (topologyObject) => { if (!topologyObject) { return null; } return topologyObject.resource || topologyObject.resources?.obj; }; -export const getResource = (node: GraphElement): T => { +export const getResource: GetResource = (node: GraphElement) => { const resource = (node as OdcBaseNode)?.getResource(); return (resource as T) || (getTopologyResourceObject(node?.getData()) as T); }; diff --git a/frontend/packages/topology/src/utils/useMetricStats.ts b/frontend/packages/topology/src/utils/useMetricStats.ts index 2c5af258b94..1125e4a9fe2 100644 --- a/frontend/packages/topology/src/utils/useMetricStats.ts +++ b/frontend/packages/topology/src/utils/useMetricStats.ts @@ -1,8 +1,9 @@ import * as React from 'react'; import * as _ from 'lodash'; +import { MetricStats } from '@console/dynamic-plugin-sdk/src/extensions/topology-types'; import { K8sResourceKind } from '@console/internal/module/k8s'; import { usePodsWatcher } from '@console/shared/src'; -import { MetricStats, getPodMetricStats } from './metricStats'; +import { getPodMetricStats } from './metricStats'; import { useOverviewMetrics } from './useOverviewMetrics'; export const useMetricStats = (resource: K8sResourceKind): MetricStats => { diff --git a/frontend/packages/topology/src/utils/withEditReviewAccess.tsx b/frontend/packages/topology/src/utils/withEditReviewAccess.tsx index bab330dd313..f2d5a789ed4 100644 --- a/frontend/packages/topology/src/utils/withEditReviewAccess.tsx +++ b/frontend/packages/topology/src/utils/withEditReviewAccess.tsx @@ -1,16 +1,15 @@ import * as React from 'react'; -import { Node } from '@patternfly/react-topology'; import { observer } from 'mobx-react'; +import { + WithEditReviewAccess, + WithEditReviewAccessComponentProps, +} from '@console/dynamic-plugin-sdk/src/extensions/topology-types'; import { useAccessReview } from '@console/internal/components/utils'; -import { modelFor, referenceFor, K8sVerb } from '@console/internal/module/k8s'; +import { modelFor, referenceFor } from '@console/internal/module/k8s'; import { getResource } from './topology-utils'; -type ComponentProps = { - element: Node; -}; - -export const withEditReviewAccess = (verb: K8sVerb) => (WrappedComponent: React.ComponentType) => { - const Component: React.FC = (props) => { +export const withEditReviewAccess: WithEditReviewAccess = (verb) => (WrappedComponent) => { + const Component: React.FC = (props) => { const resourceObj = getResource(props.element); const resourceModel = modelFor(referenceFor(resourceObj)); const editAccess = useAccessReview({ diff --git a/frontend/public/actions/ui.ts b/frontend/public/actions/ui.ts index f86d71ad0ff..34cf5fcfbaf 100644 --- a/frontend/public/actions/ui.ts +++ b/frontend/public/actions/ui.ts @@ -22,8 +22,14 @@ import { getUser, getImpersonate, } from '@console/dynamic-plugin-sdk'; +import { + MetricValuesByName, + NamespaceMetrics, +} from '@console/dynamic-plugin-sdk/src/extensions/console-types'; import { DeprecatedOperatorWarning } from '@console/operator-lifecycle-manager/src/types'; +export type { NamespaceMetrics } from '@console/dynamic-plugin-sdk/src/extensions/console-types'; + export enum ActionType { DismissOverviewDetails = 'dismissOverviewDetails', SelectOverviewDetailsTab = 'selectOverviewDetailsTab', @@ -55,15 +61,6 @@ export enum ActionType { SetDeprecatedVersion = 'setDeprecatedVersion', } -type MetricValuesByName = { - [name: string]: number; -}; - -export type NamespaceMetrics = { - cpu: MetricValuesByName; - memory: MetricValuesByName; -}; - type MetricValuesByNamespace = { [namespace: string]: MetricValuesByName; }; diff --git a/frontend/public/module/k8s/pods.ts b/frontend/public/module/k8s/pods.ts index bda4e819196..a117d86a8b6 100644 --- a/frontend/public/module/k8s/pods.ts +++ b/frontend/public/module/k8s/pods.ts @@ -1,8 +1,13 @@ import * as _ from 'lodash-es'; import i18next from 'i18next'; - +import { PodPhase } from '@console/dynamic-plugin-sdk/src/extensions/console-types'; import { ContainerSpec, ContainerStatus, PodKind, Volume, VolumeMount } from './types'; +export type { + PodPhase, + PodReadiness, +} from '@console/dynamic-plugin-sdk/src/extensions/console-types'; + const getRestartPolicy = (pod: PodKind) => _.find( { @@ -146,9 +151,6 @@ export const getVolumeLocation = (volume: Volume) => { export const getRestartPolicyLabel = (pod: PodKind) => _.get(getRestartPolicy(pod), 'label', ''); -export type PodReadiness = string; -export type PodPhase = string; - export const getVolumeMountPermissions = (v: VolumeMount) => { if (!v) { return null; diff --git a/frontend/public/module/k8s/types.ts b/frontend/public/module/k8s/types.ts index ca10c639cbf..de1e8bbe8e8 100644 --- a/frontend/public/module/k8s/types.ts +++ b/frontend/public/module/k8s/types.ts @@ -1,16 +1,20 @@ import { JSONSchema7 } from 'json-schema'; +import { + Selector, + MatchLabels, + K8sModel, + K8sVerb, +} from '@console/dynamic-plugin-sdk/src/api/common-types'; import { NodeAddress, ObjectReference, ObjectMetadata, K8sResourceCommon, - K8sVerb, K8sResourceCondition, NodeCondition, TaintEffect, } from '@console/dynamic-plugin-sdk/src/extensions/console-types'; import { EventInvolvedObject } from './event'; -import { Selector, MatchLabels, K8sModel } from '@console/dynamic-plugin-sdk/src/api/common-types'; export * from '@console/dynamic-plugin-sdk/src/extensions/console-types'; export * from '@console/dynamic-plugin-sdk/src/api/common-types'; diff --git a/frontend/webpack.circular-deps.ts b/frontend/webpack.circular-deps.ts index 667ce04e0d4..dc578b6219d 100644 --- a/frontend/webpack.circular-deps.ts +++ b/frontend/webpack.circular-deps.ts @@ -130,7 +130,7 @@ export class CircularDependencyPreset { }), { // Ad-hoc plugin to handle detected module cycle information - apply: (compiler) => { + apply: (compiler: webpack.Compiler) => { compiler.hooks.emit.tap(HandleCyclesPluginName, (compilation) => { if (cycles.length === 0) { return; From 6dc0d7dc6d012fc782fc9cba289b0e889967f2c9 Mon Sep 17 00:00:00 2001 From: rawagner Date: Thu, 15 May 2025 14:23:14 +0200 Subject: [PATCH 091/102] Recognize Detached BMH status --- .../locales/en/metal3-plugin.json | 5 +- .../baremetal-hosts/BareMetalHostDetails.tsx | 58 ++++++++++++------- .../BareMetalHostSecondaryStatus.tsx | 23 ++++---- .../baremetal-hosts/dashboard/StatusCard.tsx | 55 +++++++++++------- .../baremetal-hosts/host-menu-actions.tsx | 13 +++-- .../packages/metal3-plugin/src/plugin.tsx | 6 +- .../src/selectors/baremetal-hosts.ts | 3 + .../src/status/baremetal-node-status.ts | 4 +- 8 files changed, 104 insertions(+), 63 deletions(-) diff --git a/frontend/packages/metal3-plugin/locales/en/metal3-plugin.json b/frontend/packages/metal3-plugin/locales/en/metal3-plugin.json index 5534bdd5795..f21017770a2 100644 --- a/frontend/packages/metal3-plugin/locales/en/metal3-plugin.json +++ b/frontend/packages/metal3-plugin/locales/en/metal3-plugin.json @@ -27,6 +27,9 @@ "Edit Bare Metal Host": "Edit Bare Metal Host", "Add Bare Metal Host": "Add Bare Metal Host", "Expand the hardware inventory by registering a new Bare Metal Host.": "Expand the hardware inventory by registering a new Bare Metal Host.", + "Detached": "Detached", + "No power management": "No power management", + "Restart pending": "Restart pending", "Bare Metal Host Details": "Bare Metal Host Details", "Host Addresses": "Host Addresses", "Machine": "Machine", @@ -34,8 +37,6 @@ "Created at": "Created at", "Status": "Status", "Power Status": "Power Status", - "No power management": "No power management", - "Restart pending": "Restart pending", "Role": "Role", "Model": "Model", "Bios": "Bios", diff --git a/frontend/packages/metal3-plugin/src/components/baremetal-hosts/BareMetalHostDetails.tsx b/frontend/packages/metal3-plugin/src/components/baremetal-hosts/BareMetalHostDetails.tsx index b2bcd8b6f1e..6962020d09d 100644 --- a/frontend/packages/metal3-plugin/src/components/baremetal-hosts/BareMetalHostDetails.tsx +++ b/frontend/packages/metal3-plugin/src/components/baremetal-hosts/BareMetalHostDetails.tsx @@ -1,4 +1,9 @@ import * as React from 'react'; +import { + DescriptionListDescription, + DescriptionListGroup, + DescriptionListTerm, +} from '@patternfly/react-core'; import { RebootingIcon } from '@patternfly/react-icons/dist/esm/icons/rebooting-icon'; import * as _ from 'lodash'; import { useTranslation } from 'react-i18next'; @@ -45,6 +50,7 @@ import { getHostBootMACAddress, isHostScheduledForRestart, hasPowerManagement, + isDetached, } from '../../selectors'; import { getHostStatus } from '../../status/host-status'; import { BareMetalHostKind } from '../../types'; @@ -52,6 +58,30 @@ import BareMetalHostPowerStatusIcon from './BareMetalHostPowerStatusIcon'; import BareMetalHostStatus from './BareMetalHostStatus'; import MachineLink from './MachineLink'; +const PowerStatus = ({ host }: { host: BareMetalHostKind }) => { + const { t } = useTranslation(); + if (isDetached(host)) { + return ; + } + + if (!hasPowerManagement(host)) { + return ; + } + + const powerStatus = getHostPowerStatus(host); + return ( + <> + } + /> + {isHostScheduledForRestart(host) && ( + } /> + )} + + ); +}; + type BareMetalHostDetailsProps = { obj: BareMetalHostKind; machines: MachineKind[]; @@ -80,7 +110,6 @@ const BareMetalHostDetails: React.FC = ({ const hostStorage = getHostTotalStorageCapacity(host); const totalStorageCapacity = hostStorage ? humanizeDecimalBytes(hostStorage).string : DASH; const description = getHostDescription(host); - const powerStatus = getHostPowerStatus(host); const provisioningState = getHostProvisioningState(host); const { count: CPUCount, model: CPUModel } = getHostCPU(host); const { manufacturer, productName, serialNumber } = getHostVendorInfo(host); @@ -150,27 +179,12 @@ const BareMetalHostDetails: React.FC = ({ {/* power status is not available until host registration/inspection is finished */} {!HOST_REGISTERING_STATES.includes(provisioningState) && ( - <> -
    {t('metal3-plugin~Power Status')}
    -
    - {!hasPowerManagement(host) ? ( - - ) : ( - <> - } - /> - {isHostScheduledForRestart(host) && ( - } - /> - )} - - )} -
    - + + {t('metal3-plugin~Power Status')} + + + + )} {role && ( <> diff --git a/frontend/packages/metal3-plugin/src/components/baremetal-hosts/BareMetalHostSecondaryStatus.tsx b/frontend/packages/metal3-plugin/src/components/baremetal-hosts/BareMetalHostSecondaryStatus.tsx index 2e7e84a3033..a764fc9cfca 100644 --- a/frontend/packages/metal3-plugin/src/components/baremetal-hosts/BareMetalHostSecondaryStatus.tsx +++ b/frontend/packages/metal3-plugin/src/components/baremetal-hosts/BareMetalHostSecondaryStatus.tsx @@ -7,6 +7,7 @@ import { getHostProvisioningState, isHostScheduledForRestart, hasPowerManagement, + isDetached, } from '../../selectors'; import { BareMetalHostKind } from '../../types'; @@ -20,17 +21,19 @@ const BareMetalHostSecondaryStatus: React.FC const provisioningState = getHostProvisioningState(host); const status = []; - if (!hasPowerManagement(host)) { - status.push(t('metal3-plugin~No power management')); - // don't show power status when host registration/inspection hasn't finished - } else if (!HOST_REGISTERING_STATES.includes(provisioningState)) { - if (isHostScheduledForRestart(host)) { - status.push(t('metal3-plugin~Restart pending')); - } + if (!isDetached(host)) { + if (!hasPowerManagement(host)) { + status.push(t('metal3-plugin~No power management')); + // don't show power status when host registration/inspection hasn't finished + } else if (!HOST_REGISTERING_STATES.includes(provisioningState)) { + if (isHostScheduledForRestart(host)) { + status.push(t('metal3-plugin~Restart pending')); + } - // don't show power status when host is powered on - if (powerStatus !== HOST_POWER_STATUS_POWERED_ON) { - status.push(powerStatus); + // don't show power status when host is powered on + if (powerStatus !== HOST_POWER_STATUS_POWERED_ON) { + status.push(powerStatus); + } } } diff --git a/frontend/packages/metal3-plugin/src/components/baremetal-hosts/dashboard/StatusCard.tsx b/frontend/packages/metal3-plugin/src/components/baremetal-hosts/dashboard/StatusCard.tsx index f5ec330a89e..8030c9a9257 100644 --- a/frontend/packages/metal3-plugin/src/components/baremetal-hosts/dashboard/StatusCard.tsx +++ b/frontend/packages/metal3-plugin/src/components/baremetal-hosts/dashboard/StatusCard.tsx @@ -37,6 +37,7 @@ import { getHostPowerStatus, getHostProvisioningState, hasPowerManagement, + isDetached, isHostScheduledForRestart, } from '../../../selectors'; import { getBareMetalHostStatus, getHostStatus } from '../../../status/host-status'; @@ -64,6 +65,37 @@ const getHostHardwareHealthState = (obj): HostHealthState => { const filterAlerts = (alerts: Alert[]): Alert[] => alerts.filter((alert) => _.get(alert, 'labels.hwalert')); +const PowerStatus = ({ obj }: { obj: BareMetalHostKind }) => { + const hasPowerMgmt = hasPowerManagement(obj); + const powerStatus = getHostPowerStatus(obj); + const restartScheduled = isHostScheduledForRestart(obj); + const { t } = useTranslation(); + if (isDetached(obj)) { + return ; + } + if (!hasPowerMgmt) { + return ( + + ); + } + return ( + + ) : ( + + ) + } + className="bmh-health__status" + /> + ); +}; + const HealthCard: React.FC = ({ watchAlerts, stopWatchAlerts, @@ -86,8 +118,6 @@ const HealthCard: React.FC = ({ const hasPowerMgmt = hasPowerManagement(obj); const provisioningState = getHostProvisioningState(obj); - const powerStatus = getHostPowerStatus(obj); - const restartScheduled = isHostScheduledForRestart(obj); return ( @@ -114,30 +144,13 @@ const HealthCard: React.FC = ({ {!HOST_REGISTERING_STATES.includes(provisioningState) && ( - {!hasPowerMgmt ? ( - - ) : ( - - ) : ( - - ) - } - className="bmh-health__status" - /> - )} + )} - {!hasPowerMgmt && ( + {!hasPowerMgmt && !isDetached(obj) && ( { const patches: Patch[] = [{ op: 'replace', path: '/spec/online', value: true }]; @@ -137,7 +139,8 @@ export const Deprovision = ( !machine || !!getAnnotations(machine, {})[DELETE_MACHINE_ANNOTATION] || (getMachineMachineSetOwner(machine) && !machineSet) || - !bmoEnabled, + !bmoEnabled || + isDetached(host), label: t('metal3-plugin~Deprovision'), callback: () => confirmModal({ @@ -171,7 +174,8 @@ export const PowerOff = ( getHostPowerStatus(host), ) || !hasPowerManagement(host) || - !bmoEnabled, + !bmoEnabled || + isDetached(host), label: t('metal3-plugin~Power Off'), callback: () => powerOffHostModal({ host, nodeName, status }), accessReview: host && asAccessReview(BareMetalHostModel, host, 'update'), @@ -188,7 +192,8 @@ export const Restart = ( ) || isHostScheduledForRestart(host) || !hasPowerManagement(host) || - !bmoEnabled, + !bmoEnabled || + isDetached(host), label: t('metal3-plugin~Restart'), callback: () => restartHostModal({ host }), accessReview: host && asAccessReview(BareMetalHostModel, host, 'update'), diff --git a/frontend/packages/metal3-plugin/src/plugin.tsx b/frontend/packages/metal3-plugin/src/plugin.tsx index 0fdd20dae9d..0ae4c30185e 100644 --- a/frontend/packages/metal3-plugin/src/plugin.tsx +++ b/frontend/packages/metal3-plugin/src/plugin.tsx @@ -35,7 +35,7 @@ import { NodeMaintenanceKubevirtAlphaModel, NodeMaintenanceKubevirtBetaModel, } from './models'; -import { getHostPowerStatus, hasPowerManagement } from './selectors'; +import { getHostPowerStatus, hasPowerManagement, isDetached } from './selectors'; import { BareMetalHostKind } from './types'; type ConsumedExtensions = @@ -301,7 +301,9 @@ const plugin: Plugin = [ isActivity: (resource: BareMetalHostKind) => [HOST_POWER_STATUS_POWERING_OFF, HOST_POWER_STATUS_POWERING_ON].includes( getHostPowerStatus(resource), - ) && hasPowerManagement(resource), + ) && + hasPowerManagement(resource) && + !isDetached(resource), loader: () => import( './components/baremetal-hosts/dashboard/BareMetalStatusActivity' /* webpackChunkName: "metal3-powering" */ diff --git a/frontend/packages/metal3-plugin/src/selectors/baremetal-hosts.ts b/frontend/packages/metal3-plugin/src/selectors/baremetal-hosts.ts index e1bce14f5ac..fc30550796e 100644 --- a/frontend/packages/metal3-plugin/src/selectors/baremetal-hosts.ts +++ b/frontend/packages/metal3-plugin/src/selectors/baremetal-hosts.ts @@ -86,3 +86,6 @@ export const getHostMachine = ( export const hasPowerManagement = (host: BareMetalHostKind): boolean => getHostProvisioningState(host) !== HOST_STATUS_UNMANAGED; + +export const isDetached = (host: BareMetalHostKind): boolean => + host.status?.operationalStatus === 'detached'; diff --git a/frontend/packages/metal3-plugin/src/status/baremetal-node-status.ts b/frontend/packages/metal3-plugin/src/status/baremetal-node-status.ts index b9693fc9d5c..3ed5e154d88 100644 --- a/frontend/packages/metal3-plugin/src/status/baremetal-node-status.ts +++ b/frontend/packages/metal3-plugin/src/status/baremetal-node-status.ts @@ -2,7 +2,7 @@ import { nodeStatus } from '@console/app/src/status/node'; import { NodeKind, K8sResourceKind } from '@console/internal/module/k8s'; import { isNodeUnschedulable } from '@console/shared/src/selectors/node'; import { StatusProps } from '../components/types'; -import { isHostPoweredOn, hasPowerManagement } from '../selectors'; +import { isHostPoweredOn, hasPowerManagement, isDetached } from '../selectors'; import { BareMetalHostKind, CertificateSigningRequestKind } from '../types'; import { getNodeMaintenanceStatus } from './node-maintenance-status'; @@ -46,7 +46,7 @@ export const baremetalNodeSecondaryStatus = ({ states.push('Scheduling disabled'); } // show host power status only if there is actual host associated to node - if (host && hasPowerManagement(host) && !isHostPoweredOn(host)) { + if (host && hasPowerManagement(host) && !isHostPoweredOn(host) && !isDetached(host)) { states.push('Host is powered off'); } return states; From 9d9119e7f29630389c1fc13aa4f0da6f768c9844 Mon Sep 17 00:00:00 2001 From: Lokananda Prabhu Date: Thu, 10 Apr 2025 10:27:36 +0530 Subject: [PATCH 092/102] Exposed OdcBaseNode to dynamic sdk internal package --- .../src/api/internal-topology-api.ts | 4 ++++ .../src/extensions/topology-types.ts | 15 +++++++++++++++ .../packages/topology/src/elements/OdcBaseNode.ts | 12 +++++++----- 3 files changed, 26 insertions(+), 5 deletions(-) diff --git a/frontend/packages/console-dynamic-plugin-sdk/src/api/internal-topology-api.ts b/frontend/packages/console-dynamic-plugin-sdk/src/api/internal-topology-api.ts index 4a70eded729..d8bf06a407b 100644 --- a/frontend/packages/console-dynamic-plugin-sdk/src/api/internal-topology-api.ts +++ b/frontend/packages/console-dynamic-plugin-sdk/src/api/internal-topology-api.ts @@ -18,6 +18,7 @@ import { GetWorkloadResources, ContextMenuActions, CreateConnectorProps, + OdcBaseNodeConstructor, } from '../extensions/topology-types'; export const CpuCellComponent: React.FC = require('@console/topology/src/components/list-view/cells/CpuCell') @@ -73,3 +74,6 @@ export const CreateConnector: CreateConnectorProps = require('@console/topology/ export const createConnectorCallback = require('@console/topology/src/components/graph-view') .createConnectorCallback; + +export const OdcBaseNode: OdcBaseNodeConstructor = require('@console/topology/src/elements') + .OdcBaseNode; diff --git a/frontend/packages/console-dynamic-plugin-sdk/src/extensions/topology-types.ts b/frontend/packages/console-dynamic-plugin-sdk/src/extensions/topology-types.ts index 46ae8f7d28a..902099115ca 100644 --- a/frontend/packages/console-dynamic-plugin-sdk/src/extensions/topology-types.ts +++ b/frontend/packages/console-dynamic-plugin-sdk/src/extensions/topology-types.ts @@ -305,3 +305,18 @@ export type CreateConnectorProps = { dragging?: boolean; hover?: boolean; }; + +export interface OdcBaseNodeInterface extends Node { + resource?: K8sResourceKind; + resourceKind?: K8sResourceKindReference; + + getResource(): K8sResourceKind | undefined; + setResource(resource: K8sResourceKind | undefined): void; + + getResourceKind(): K8sResourceKindReference | undefined; + setResourceKind(kind: K8sResourceKindReference | undefined): void; + + setModel(model: OdcNodeModel): void; +} + +export type OdcBaseNodeConstructor = new () => OdcBaseNodeInterface; diff --git a/frontend/packages/topology/src/elements/OdcBaseNode.ts b/frontend/packages/topology/src/elements/OdcBaseNode.ts index 9e531fe27db..a5e2d89a2eb 100644 --- a/frontend/packages/topology/src/elements/OdcBaseNode.ts +++ b/frontend/packages/topology/src/elements/OdcBaseNode.ts @@ -1,16 +1,14 @@ +import { BaseNode, Node } from '@patternfly/react-topology'; import { observable, makeObservable } from 'mobx'; +import { OdcBaseNodeInterface } from '@console/dynamic-plugin-sdk/src/extensions/topology-types'; import { K8sResourceKind, K8sResourceKindReference, referenceFor, } from '@console/internal/module/k8s'; import { OdcNodeModel } from '../topology-types'; -// -// Import from @patternfly/react-topology when updated to a branch containing https://github.com/patternfly/patternfly-react/pull/7573 -// -import BaseNode from './BaseNode'; -class OdcBaseNode extends BaseNode { +class OdcBaseNode extends BaseNode implements OdcBaseNodeInterface { public resource?: K8sResourceKind | undefined = undefined; public resourceKind?: K8sResourceKindReference | undefined = undefined; @@ -24,6 +22,10 @@ class OdcBaseNode extends BaseNode { }); } + getPositionableChildren(): Node[] { + return []; + } + getResource(): K8sResourceKind | undefined { return this.resource; } From 0dc6e2879b818d135ebbc3c4a1bc1e607af32fe4 Mon Sep 17 00:00:00 2001 From: logonoff Date: Thu, 31 Jul 2025 11:45:36 -0400 Subject: [PATCH 093/102] OCPBUGS-60278: Fix i18n string for event stream --- frontend/public/components/events.jsx | 2 +- frontend/public/locales/en/public.json | 2 +- frontend/public/locales/es/public.json | 2 +- frontend/public/locales/fr/public.json | 2 +- frontend/public/locales/ja/public.json | 2 +- frontend/public/locales/ko/public.json | 2 +- frontend/public/locales/zh/public.json | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/frontend/public/components/events.jsx b/frontend/public/components/events.jsx index a0fd0a7c781..b6352db9514 100644 --- a/frontend/public/components/events.jsx +++ b/frontend/public/components/events.jsx @@ -475,7 +475,7 @@ const EventStream = ({ statusBtnTxt = ( {_.isString(error) - ? t('public~Error connecting to event stream: { error }', { + ? t('public~Error connecting to event stream: {{ error }}', { error, }) : t('public~Error connecting to event stream')} diff --git a/frontend/public/locales/en/public.json b/frontend/public/locales/en/public.json index 2eefb9114c4..16986fbab9a 100644 --- a/frontend/public/locales/en/public.json +++ b/frontend/public/locales/en/public.json @@ -544,7 +544,7 @@ "An error occurred during event retrieval. Attempting to reconnect...": "An error occurred during event retrieval. Attempting to reconnect...", "Events": "Events", "Connection did not close cleanly.": "Connection did not close cleanly.", - "Error connecting to event stream: { error }": "Error connecting to event stream: { error }", + "Error connecting to event stream: {{ error }}": "Error connecting to event stream: {{ error }}", "Error connecting to event stream": "Error connecting to event stream", "Loading events...": "Loading events...", "Streaming events...": "Streaming events...", diff --git a/frontend/public/locales/es/public.json b/frontend/public/locales/es/public.json index 0041a9df324..9ea73990744 100644 --- a/frontend/public/locales/es/public.json +++ b/frontend/public/locales/es/public.json @@ -544,7 +544,7 @@ "An error occurred during event retrieval. Attempting to reconnect...": "Se produjo un error durante la recuperación del evento. Intentando reconectar...", "Events": "Eventos", "Connection did not close cleanly.": "La conexión no se cerró correctamente.", - "Error connecting to event stream: { error }": "Error al conectarse al flujo de eventos: { error }", + "Error connecting to event stream: {{ error }}": "Error al conectarse al flujo de eventos: {{ error }}", "Error connecting to event stream": "Error al conectarse al flujo de eventos", "Loading events...": "Cargando eventos...", "Streaming events...": "Transmisión de eventos...", diff --git a/frontend/public/locales/fr/public.json b/frontend/public/locales/fr/public.json index 652d3555ebc..c91807eb798 100644 --- a/frontend/public/locales/fr/public.json +++ b/frontend/public/locales/fr/public.json @@ -544,7 +544,7 @@ "An error occurred during event retrieval. Attempting to reconnect...": "Une erreur s’est produite lors de la récupération de l’événement. Tentative de reconnexion...", "Events": "Événements", "Connection did not close cleanly.": "La connexion ne s’est pas fermée proprement.", - "Error connecting to event stream: { error }": "Erreur de connexion au flux d’événements : { error }", + "Error connecting to event stream: {{ error }}": "Erreur de connexion au flux d’événements : {{ error }}", "Error connecting to event stream": "Erreur de connexion au flux d’événements", "Loading events...": "Chargement des événements...", "Streaming events...": "Streaming des événements...", diff --git a/frontend/public/locales/ja/public.json b/frontend/public/locales/ja/public.json index 2910e2580e0..bfd0bec263a 100644 --- a/frontend/public/locales/ja/public.json +++ b/frontend/public/locales/ja/public.json @@ -544,7 +544,7 @@ "An error occurred during event retrieval. Attempting to reconnect...": "イベントの取得中にエラーが発生しました。再接続の試行中...", "Events": "イベント", "Connection did not close cleanly.": "接続が正常に閉じられませんでした。", - "Error connecting to event stream: { error }": "イベントストリームへの接続エラー: { error }", + "Error connecting to event stream: {{ error }}": "イベントストリームへの接続エラー: {{ error }}", "Error connecting to event stream": "イベントストリームへの接続エラー", "Loading events...": "イベントを読み込み中...", "Streaming events...": "イベントをストリーミング中...", diff --git a/frontend/public/locales/ko/public.json b/frontend/public/locales/ko/public.json index 380f5d9297c..f5f4e57b4e7 100644 --- a/frontend/public/locales/ko/public.json +++ b/frontend/public/locales/ko/public.json @@ -544,7 +544,7 @@ "An error occurred during event retrieval. Attempting to reconnect...": "이벤트 검색 중에 오류가 발생했습니다. 다시 연결하는 중 ...", "Events": "이벤트", "Connection did not close cleanly.": "연결이 제대로 닫히지 않았습니다.", - "Error connecting to event stream: { error }": "이벤트 스트림에 연결 오류: { error }", + "Error connecting to event stream: {{ error }}": "이벤트 스트림에 연결 오류: {{ error }}", "Error connecting to event stream": "이벤트 스트림에 연결하는 동안 오류가 발생했습니다.", "Loading events...": "이벤트 로드 중...", "Streaming events...": "이벤트 스트리밍 중...", diff --git a/frontend/public/locales/zh/public.json b/frontend/public/locales/zh/public.json index 8e9778bc67a..af0057fe664 100644 --- a/frontend/public/locales/zh/public.json +++ b/frontend/public/locales/zh/public.json @@ -544,7 +544,7 @@ "An error occurred during event retrieval. Attempting to reconnect...": "在检索事件的过程中发生错误。尝试重新连接......", "Events": "事件", "Connection did not close cleanly.": "连接没有“干净”地关闭。", - "Error connecting to event stream: { error }": "连接到事件流时出错: { error }", + "Error connecting to event stream: {{ error }}": "连接到事件流时出错: {{ error }}", "Error connecting to event stream": "连接到事件流时出错", "Loading events...": "加载事件......", "Streaming events...": "流事件......", From 37c86e9d2d28c7ed42bf03ee17b895ee16b62614 Mon Sep 17 00:00:00 2001 From: Phillip Rhodes Date: Wed, 6 Aug 2025 07:50:02 -0400 Subject: [PATCH 094/102] Backport 14907 to 4.18 --- .../src/api/internal-topology-api.ts | 20 +++ .../src/extensions/topology-types.ts | 123 ++++++++++++++++++ .../components/groups/KnativeService.tsx | 2 +- .../components/groups/KnativeServiceGroup.tsx | 3 +- .../topology/components/nodes/EventSink.tsx | 2 +- .../topology/components/nodes/EventSource.tsx | 2 +- .../components/nodes/EventingPubSubNode.tsx | 2 +- .../src/behavior/withCreateConnector.tsx | 14 +- .../graph-view/components/nodes/BaseNode.tsx | 42 +----- .../components/nodes/BindableNode.tsx | 2 +- .../graph-view/components/nodes/PodSet.tsx | 9 +- .../components/nodes/WorkloadNode.tsx | 21 +-- 12 files changed, 158 insertions(+), 84 deletions(-) diff --git a/frontend/packages/console-dynamic-plugin-sdk/src/api/internal-topology-api.ts b/frontend/packages/console-dynamic-plugin-sdk/src/api/internal-topology-api.ts index d8bf06a407b..53eb89b8394 100644 --- a/frontend/packages/console-dynamic-plugin-sdk/src/api/internal-topology-api.ts +++ b/frontend/packages/console-dynamic-plugin-sdk/src/api/internal-topology-api.ts @@ -19,6 +19,11 @@ import { ContextMenuActions, CreateConnectorProps, OdcBaseNodeConstructor, + WorkloadNodeProps, + PodSetProps, + BaseNodeProps, + WithContextMenu, + WithCreateConnector, } from '../extensions/topology-types'; export const CpuCellComponent: React.FC = require('@console/topology/src/components/list-view/cells/CpuCell') @@ -77,3 +82,18 @@ export const createConnectorCallback = require('@console/topology/src/components export const OdcBaseNode: OdcBaseNodeConstructor = require('@console/topology/src/elements') .OdcBaseNode; + +export const WorkloadNode: React.FC = require('@console/topology/src/components/graph-view') + .WorkloadNode; + +export const PodSet: React.FC = require('@console/topology/src/components/graph-view') + .PodSet; + +export const BaseNode: React.FC = require('@console/topology/src/components/graph-view') + .BaseNode; + +export const withContextMenu: WithContextMenu = require('@console/topology/src/components/graph-view') + .withContextMenu; + +export const withCreateConnector: WithCreateConnector = require('@console/topology/src/behavior') + .withCreateConnector; diff --git a/frontend/packages/console-dynamic-plugin-sdk/src/extensions/topology-types.ts b/frontend/packages/console-dynamic-plugin-sdk/src/extensions/topology-types.ts index 902099115ca..aab035a3f2c 100644 --- a/frontend/packages/console-dynamic-plugin-sdk/src/extensions/topology-types.ts +++ b/frontend/packages/console-dynamic-plugin-sdk/src/extensions/topology-types.ts @@ -10,9 +10,21 @@ import { GraphElement, TopologyQuadrant, NodeShape, + WithSelectionProps, + WithDragNodeProps, + WithDndDropProps, + WithContextMenuProps, + BadgeLocation, + NodeStatus, + withContextMenu, + DragEvent, + DragObjectWithType, + DragOperationWithType, + ConnectorChoice, } from '@patternfly/react-topology'; import PFPoint from '@patternfly/react-topology/dist/esm/geom/Point'; import { Alerts, K8sKind, K8sVerb, PrometheusAlert } from '../api/common-types'; +import { ActionContext } from '../api/internal-types'; import { Action } from './actions'; import { K8sResourceCommon, @@ -320,3 +332,114 @@ export interface OdcBaseNodeInterface extends Node { } export type OdcBaseNodeConstructor = new () => OdcBaseNodeInterface; + +export interface WithCreateConnectorProps { + onShowCreateConnector: () => void; + onHideCreateConnector: () => void; + createConnectorDrag: boolean; +} + +export type WorkloadNodeProps = { + element: Node; + dragging?: boolean; + highlight?: boolean; + canDrop?: boolean; + dropTarget?: boolean; + urlAnchorRef?: React.Ref; + dropTooltip?: React.ReactNode; +} & WithSelectionProps & + WithDragNodeProps & + WithDndDropProps & + WithContextMenuProps & + WithCreateConnectorProps; + +export interface PodSetProps { + size: number; + data: PodRCData; + showPodCount?: boolean; + x?: number; + y?: number; +} + +export type BaseNodeProps = { + className?: string; + innerRadius?: number; + icon?: string; + kind?: string; + labelIconClass?: string; // Icon to show in label + labelIcon?: React.ReactNode; + labelIconPadding?: number; + badge?: string; + badgeColor?: string; + badgeTextColor?: string; + badgeBorderColor?: string; + badgeClassName?: string; + badgeLocation?: BadgeLocation; + children?: React.ReactNode; + attachments?: React.ReactNode; + element: Node; + hoverRef?: (node: Element) => () => void; + dragging?: boolean; + dropTarget?: boolean; + canDrop?: boolean; + createConnectorAccessVerb?: K8sVerb; + nodeStatus?: NodeStatus; + showStatusBackground?: boolean; + alertVariant?: NodeStatus; +} & Partial & + Partial & + Partial & + Partial & + Partial; + +export type WithContextMenu = ( + actions: (element: E) => ActionContext, +) => ReturnType; + +export interface ElementProps { + element: Node; +} + +export interface CreateConnectorOptions { + handleAngle?: number; + handleAngleTop?: number; + handleLength?: number; + dragItem?: DragObjectWithType; + dragOperation?: DragOperationWithType; + hideConnectorMenu?: boolean; +} + +interface ConnectorComponentProps { + startPoint: PFPoint; + endPoint: PFPoint; + hints: string[]; + dragging: boolean; + hover?: boolean; +} + +type CreateConnectorRenderer = React.ComponentType; + +type OnCreateResult = ConnectorChoice[] | void | undefined | null | React.ReactElement[]; + +type CreateConnectorWidgetProps = { + element: Node; + onKeepAlive: (isAlive: boolean) => void; + onCreate: ( + element: Node, + target: Node | Graph, + event: DragEvent, + dropHints?: string[] | undefined, + choice?: ConnectorChoice, + ) => Promise | OnCreateResult; + ConnectorComponent: CreateConnectorRenderer; + contextMenuClass?: string; +} & CreateConnectorOptions; + +export type WithCreateConnector =

    ( + onCreate: CreateConnectorWidgetProps['onCreate'], + ConnectorComponent?: CreateConnectorRenderer, + contextMenuClass?: string, + options?: CreateConnectorOptions, +) => ( + WrappedComponent: React.ComponentType>, +) => React.FC>; diff --git a/frontend/packages/knative-plugin/src/topology/components/groups/KnativeService.tsx b/frontend/packages/knative-plugin/src/topology/components/groups/KnativeService.tsx index 1a404545d3a..fe34bbadc7c 100644 --- a/frontend/packages/knative-plugin/src/topology/components/groups/KnativeService.tsx +++ b/frontend/packages/knative-plugin/src/topology/components/groups/KnativeService.tsx @@ -8,9 +8,9 @@ import { useDragNode, } from '@patternfly/react-topology'; import classNames from 'classnames'; +import { WithCreateConnectorProps } from '@console/dynamic-plugin-sdk/src/extensions/topology-types'; import { useAccessReview } from '@console/internal/components/utils'; import { modelFor, referenceFor } from '@console/internal/module/k8s'; -import { WithCreateConnectorProps } from '@console/topology/src/behavior'; import { nodeDragSourceSpec, GroupNode } from '@console/topology/src/components/graph-view'; import { getKindStringAndAbbreviation } from '@console/topology/src/components/graph-view/components/nodes/nodeUtils'; import { getResource } from '@console/topology/src/utils'; diff --git a/frontend/packages/knative-plugin/src/topology/components/groups/KnativeServiceGroup.tsx b/frontend/packages/knative-plugin/src/topology/components/groups/KnativeServiceGroup.tsx index d54a41833ca..c04e3d01a7d 100644 --- a/frontend/packages/knative-plugin/src/topology/components/groups/KnativeServiceGroup.tsx +++ b/frontend/packages/knative-plugin/src/topology/components/groups/KnativeServiceGroup.tsx @@ -18,8 +18,9 @@ import { } from '@patternfly/react-topology'; import classNames from 'classnames'; import { useTranslation } from 'react-i18next'; +import { WithCreateConnectorProps } from '@console/dynamic-plugin-sdk/src/extensions/topology-types'; import { getImageForIconClass } from '@console/internal/components/catalog/catalog-item-icon'; -import { WithCreateConnectorProps, useHover } from '@console/topology/src/behavior'; +import { useHover } from '@console/topology/src/behavior'; import { NodeShadows, NODE_SHADOW_FILTER_ID, diff --git a/frontend/packages/knative-plugin/src/topology/components/nodes/EventSink.tsx b/frontend/packages/knative-plugin/src/topology/components/nodes/EventSink.tsx index ec5ee9ea99e..5ca2183f344 100644 --- a/frontend/packages/knative-plugin/src/topology/components/nodes/EventSink.tsx +++ b/frontend/packages/knative-plugin/src/topology/components/nodes/EventSink.tsx @@ -16,10 +16,10 @@ import { ScaleDetailsLevel, } from '@patternfly/react-topology'; import { useTranslation } from 'react-i18next'; +import { WithCreateConnectorProps } from '@console/dynamic-plugin-sdk/src/extensions/topology-types'; import { DeploymentModel } from '@console/internal/models'; import { referenceForModel, referenceFor } from '@console/internal/module/k8s'; import { usePodsWatcher } from '@console/shared'; -import { WithCreateConnectorProps } from '@console/topology/src/behavior'; import { PodSet } from '@console/topology/src/components/graph-view'; import { BaseNode } from '@console/topology/src/components/graph-view/components/nodes'; import { KafkaSinkModel } from '../../../models'; diff --git a/frontend/packages/knative-plugin/src/topology/components/nodes/EventSource.tsx b/frontend/packages/knative-plugin/src/topology/components/nodes/EventSource.tsx index 78035f1a985..c37a9f7e400 100644 --- a/frontend/packages/knative-plugin/src/topology/components/nodes/EventSource.tsx +++ b/frontend/packages/knative-plugin/src/topology/components/nodes/EventSource.tsx @@ -8,7 +8,7 @@ import { WithDragNodeProps, Edge, } from '@patternfly/react-topology'; -import { WithCreateConnectorProps } from '@console/topology/src/behavior'; +import { WithCreateConnectorProps } from '@console/dynamic-plugin-sdk/src/extensions/topology-types'; import { BaseNode } from '@console/topology/src/components/graph-view/components/nodes'; import { getEventSourceIcon } from '../../../utils/get-knative-icon'; import { EventSourceIcon } from '../../../utils/icons'; diff --git a/frontend/packages/knative-plugin/src/topology/components/nodes/EventingPubSubNode.tsx b/frontend/packages/knative-plugin/src/topology/components/nodes/EventingPubSubNode.tsx index 2c51e74be13..b1742beff39 100644 --- a/frontend/packages/knative-plugin/src/topology/components/nodes/EventingPubSubNode.tsx +++ b/frontend/packages/knative-plugin/src/topology/components/nodes/EventingPubSubNode.tsx @@ -12,7 +12,7 @@ import { RectAnchor, } from '@patternfly/react-topology'; import { useTranslation } from 'react-i18next'; -import { WithCreateConnectorProps } from '@console/topology/src/behavior'; +import { WithCreateConnectorProps } from '@console/dynamic-plugin-sdk/src/extensions/topology-types'; import { BaseNode } from '@console/topology/src/components/graph-view/components/nodes'; import { TYPE_AGGREGATE_EDGE } from '@console/topology/src/const'; import { getTopologyResourceObject } from '@console/topology/src/utils'; diff --git a/frontend/packages/topology/src/behavior/withCreateConnector.tsx b/frontend/packages/topology/src/behavior/withCreateConnector.tsx index 80ba9afc39a..9d506d0ef87 100644 --- a/frontend/packages/topology/src/behavior/withCreateConnector.tsx +++ b/frontend/packages/topology/src/behavior/withCreateConnector.tsx @@ -27,6 +27,10 @@ import { } from '@patternfly/react-topology'; import styles from '@patternfly/react-topology/dist/js/css/topology-components'; import { observer } from 'mobx-react'; +import { + ElementProps, + WithCreateConnectorProps, +} from '@console/dynamic-plugin-sdk/src/extensions/topology-types'; // // Local version of the @patternfly/react-topology withCreateConnector @@ -262,16 +266,6 @@ const CreateConnectorWidget: React.FunctionComponent }, ); -interface ElementProps { - element: Node; -} - -export interface WithCreateConnectorProps { - onShowCreateConnector: () => void; - onHideCreateConnector: () => void; - createConnectorDrag: boolean; -} - export const withCreateConnector =

    ( onCreate: React.ComponentProps['onCreate'], ConnectorComponent: CreateConnectorRenderer = DefaultCreateConnector, diff --git a/frontend/packages/topology/src/components/graph-view/components/nodes/BaseNode.tsx b/frontend/packages/topology/src/components/graph-view/components/nodes/BaseNode.tsx index 0d292377c45..5c3145e8baf 100644 --- a/frontend/packages/topology/src/components/graph-view/components/nodes/BaseNode.tsx +++ b/frontend/packages/topology/src/components/graph-view/components/nodes/BaseNode.tsx @@ -1,27 +1,20 @@ import * as React from 'react'; import { - BadgeLocation, DEFAULT_LAYER, DefaultNode, Layer, - Node, - NodeStatus, observer, ScaleDetailsLevel, TOP_LAYER, useCombineRefs, - WithContextMenuProps, - WithDndDropProps, - WithDragNodeProps, - WithSelectionProps, StatusModifier, } from '@patternfly/react-topology'; import classNames from 'classnames'; +import { BaseNodeProps } from '@console/dynamic-plugin-sdk/src/extensions/topology-types'; import { useAccessReview } from '@console/internal/components/utils'; -import { K8sVerb, modelFor, referenceFor } from '@console/internal/module/k8s'; +import { modelFor, referenceFor } from '@console/internal/module/k8s'; import { RESOURCE_NAME_TRUNCATE_LENGTH } from '@console/shared'; import useHover from '../../../../behavior/useHover'; -import { WithCreateConnectorProps } from '../../../../behavior/withCreateConnector'; import { useSearchFilter } from '../../../../filters'; import { useShowLabel } from '../../../../filters/useShowLabel'; import { getTopologyResourceObject } from '../../../../utils/topology-utils'; @@ -30,37 +23,6 @@ import { getKindStringAndAbbreviation } from './nodeUtils'; import '../../../svg/SvgResourceIcon.scss'; import './BaseNode.scss'; -type BaseNodeProps = { - className?: string; - innerRadius?: number; - icon?: string; - kind?: string; - labelIconClass?: string; // Icon to show in label - labelIcon?: React.ReactNode; - labelIconPadding?: number; - badge?: string; - badgeColor?: string; - badgeTextColor?: string; - badgeBorderColor?: string; - badgeClassName?: string; - badgeLocation?: BadgeLocation; - children?: React.ReactNode; - attachments?: React.ReactNode; - element: Node; - hoverRef?: (node: Element) => () => void; - dragging?: boolean; - dropTarget?: boolean; - canDrop?: boolean; - createConnectorAccessVerb?: K8sVerb; - nodeStatus?: NodeStatus; - showStatusBackground?: boolean; - alertVariant?: NodeStatus; -} & Partial & - Partial & - Partial & - Partial & - Partial; - const BaseNode: React.FC = ({ className, innerRadius, diff --git a/frontend/packages/topology/src/components/graph-view/components/nodes/BindableNode.tsx b/frontend/packages/topology/src/components/graph-view/components/nodes/BindableNode.tsx index ba2ef08d703..e590631d201 100644 --- a/frontend/packages/topology/src/components/graph-view/components/nodes/BindableNode.tsx +++ b/frontend/packages/topology/src/components/graph-view/components/nodes/BindableNode.tsx @@ -8,9 +8,9 @@ import { WithSelectionProps, GraphElement, } from '@patternfly/react-topology'; +import { WithCreateConnectorProps } from '@console/dynamic-plugin-sdk/src/extensions/topology-types'; import openshiftImg from '@console/internal/imgs/logos/openshift.svg'; import { modelFor, referenceFor, referenceForModel } from '@console/internal/module/k8s'; -import { WithCreateConnectorProps } from '@console/topology/src/behavior'; import { getTopologyResourceObject } from '../../../../utils'; import { getRelationshipProvider } from '../../../../utils/relationship-provider-utils'; import BaseNode from './BaseNode'; diff --git a/frontend/packages/topology/src/components/graph-view/components/nodes/PodSet.tsx b/frontend/packages/topology/src/components/graph-view/components/nodes/PodSet.tsx index a6306683922..31c191b11b6 100644 --- a/frontend/packages/topology/src/components/graph-view/components/nodes/PodSet.tsx +++ b/frontend/packages/topology/src/components/graph-view/components/nodes/PodSet.tsx @@ -1,5 +1,6 @@ import * as React from 'react'; import { useTranslation } from 'react-i18next'; +import { PodSetProps } from '@console/dynamic-plugin-sdk/src/extensions/topology-types'; import { RevisionModel } from '@console/knative-plugin/src/models'; import { PodRCData, @@ -11,14 +12,6 @@ import { useRelatedHPA, } from '@console/shared'; -interface PodSetProps { - size: number; - data: PodRCData; - showPodCount?: boolean; - x?: number; - y?: number; -} - interface InnerPodStatusRadius { innerPodStatusOuterRadius: number; innerPodStatusInnerRadius: number; diff --git a/frontend/packages/topology/src/components/graph-view/components/nodes/WorkloadNode.tsx b/frontend/packages/topology/src/components/graph-view/components/nodes/WorkloadNode.tsx index 1e00c72f0b0..26ef10ddb19 100644 --- a/frontend/packages/topology/src/components/graph-view/components/nodes/WorkloadNode.tsx +++ b/frontend/packages/topology/src/components/graph-view/components/nodes/WorkloadNode.tsx @@ -1,19 +1,15 @@ import * as React from 'react'; import { Tooltip } from '@patternfly/react-core'; import { - Node, NodeStatus, observer, ScaleDetailsLevel, useHover, useVisualizationController, - WithContextMenuProps, - WithDndDropProps, - WithDragNodeProps, - WithSelectionProps, } from '@patternfly/react-topology'; import { useTranslation } from 'react-i18next'; import { AlertSeverity } from '@console/dynamic-plugin-sdk'; +import { WorkloadNodeProps } from '@console/dynamic-plugin-sdk/src/extensions/topology-types'; import { getImageForIconClass } from '@console/internal/components/catalog/catalog-item-icon'; import { AllPodStatus, @@ -25,7 +21,6 @@ import { useBuildConfigsWatcher, usePodsWatcher, } from '@console/shared'; -import { WithCreateConnectorProps } from '../../../../behavior/withCreateConnector'; import { getFilterById, SHOW_POD_COUNT_FILTER_ID, useDisplayFilters } from '../../../../filters'; import { getResource, getTopologyResourceObject } from '../../../../utils/topology-utils'; import { useResourceQuotaAlert } from '../../../workload'; @@ -139,20 +134,6 @@ export const getAggregateStatus = ( return NodeStatus.default; }; -type WorkloadNodeProps = { - element: Node; - dragging?: boolean; - highlight?: boolean; - canDrop?: boolean; - dropTarget?: boolean; - urlAnchorRef?: React.Ref; - dropTooltip?: React.ReactNode; -} & WithSelectionProps & - WithDragNodeProps & - WithDndDropProps & - WithContextMenuProps & - WithCreateConnectorProps; - type WorkloadPodsNodeProps = WorkloadNodeProps & { donutStatus: PodRCData; }; From bd8ce6cd04bf201f94088ad087e87421133eb414 Mon Sep 17 00:00:00 2001 From: Lokananda Prabhu Date: Thu, 24 Apr 2025 16:35:28 +0530 Subject: [PATCH 095/102] Added patternfly/react-topology to shared module list of dynamic plugin sdk --- dynamic-demo-plugin/package.json | 3 +++ frontend/packages/console-dynamic-plugin-sdk/README.md | 8 +++++++- .../console-dynamic-plugin-sdk/src/shared-modules-init.ts | 1 + .../console-dynamic-plugin-sdk/src/shared-modules.ts | 2 ++ 4 files changed, 13 insertions(+), 1 deletion(-) diff --git a/dynamic-demo-plugin/package.json b/dynamic-demo-plugin/package.json index 5d6f4fa3395..ccd39a29661 100644 --- a/dynamic-demo-plugin/package.json +++ b/dynamic-demo-plugin/package.json @@ -44,6 +44,9 @@ "webpack": "^5.75.0", "webpack-cli": "5.0.x" }, + "resolutions": { + "@types/d3-dispatch": "3.0.6" + }, "consolePlugin": { "name": "console-demo-plugin", "version": "0.0.0", diff --git a/frontend/packages/console-dynamic-plugin-sdk/README.md b/frontend/packages/console-dynamic-plugin-sdk/README.md index 27f8e506a64..bccb2dff438 100644 --- a/frontend/packages/console-dynamic-plugin-sdk/README.md +++ b/frontend/packages/console-dynamic-plugin-sdk/README.md @@ -123,6 +123,7 @@ The following shared modules are provided by Console, without plugins providing - `@openshift-console/dynamic-plugin-sdk` - `@openshift-console/dynamic-plugin-sdk-internal` +- `@patternfly/react-topology` - `react` - `react-i18next` - `react-redux` @@ -132,7 +133,7 @@ The following shared modules are provided by Console, without plugins providing - `redux` - `redux-thunk` -For backwards compatibility, Console also provides the following PatternFly **4.x** shared modules: +For backwards compatibility, Console 4.18 and earlier also provide the following PatternFly **4.x** shared modules: - `@patternfly/react-core` - `@patternfly/react-table` @@ -164,6 +165,11 @@ This section documents notable changes in the Console provided shared modules ac - All Console provided React Router v5 shared modules are deprecated and will be removed in the future. Plugins should upgrade to React Router v6 via `react-router-dom-v5-compat` module. +#### Console 4.18.x + +- Added `@patternfly/react-topology` to Console provided shared modules. This allows dynamic plugins + to use PatternFly 5 topology components with consistent context and styling. + ### PatternFly 5+ dynamic modules Newer versions of `@openshift-console/dynamic-plugin-sdk-webpack` package include support for automatic diff --git a/frontend/packages/console-dynamic-plugin-sdk/src/shared-modules-init.ts b/frontend/packages/console-dynamic-plugin-sdk/src/shared-modules-init.ts index e276a4942dc..3cce71355e6 100644 --- a/frontend/packages/console-dynamic-plugin-sdk/src/shared-modules-init.ts +++ b/frontend/packages/console-dynamic-plugin-sdk/src/shared-modules-init.ts @@ -35,6 +35,7 @@ const initSharedScope = () => { addModule('@openshift-console/dynamic-plugin-sdk-internal', async () => () => require('@console/dynamic-plugin-sdk/src/lib-internal'), ); + addModule('@patternfly/react-topology', async () => () => require('@patternfly/react-topology')); addModule('react', async () => () => require('react')); addModule('react-i18next', async () => () => require('react-i18next')); addModule('react-redux', async () => () => require('react-redux')); diff --git a/frontend/packages/console-dynamic-plugin-sdk/src/shared-modules.ts b/frontend/packages/console-dynamic-plugin-sdk/src/shared-modules.ts index 740140c259b..f8256cdc068 100644 --- a/frontend/packages/console-dynamic-plugin-sdk/src/shared-modules.ts +++ b/frontend/packages/console-dynamic-plugin-sdk/src/shared-modules.ts @@ -27,6 +27,7 @@ export const sharedPluginModules = [ '@patternfly/react-core', '@patternfly/react-table', '@patternfly/quickstarts', + '@patternfly/react-topology', 'react', 'react-i18next', 'react-redux', @@ -48,6 +49,7 @@ const sharedPluginModulesMetadata: Record Date: Mon, 27 Jan 2025 20:36:14 +0530 Subject: [PATCH 096/102] Store Topology sidebar alert in the localStorage --- .../src/hooks/useGetUserSettingConfigMap.ts | 47 +++++++++++++++++++ .../side-bar/components/SideBarAlerts.tsx | 27 +++++++++-- 2 files changed, 69 insertions(+), 5 deletions(-) create mode 100644 frontend/packages/console-shared/src/hooks/useGetUserSettingConfigMap.ts diff --git a/frontend/packages/console-shared/src/hooks/useGetUserSettingConfigMap.ts b/frontend/packages/console-shared/src/hooks/useGetUserSettingConfigMap.ts new file mode 100644 index 00000000000..28466498115 --- /dev/null +++ b/frontend/packages/console-shared/src/hooks/useGetUserSettingConfigMap.ts @@ -0,0 +1,47 @@ +import * as React from 'react'; +import { createHash } from 'crypto-browserify'; +// eslint-disable-next-line @typescript-eslint/ban-ts-comment +// @ts-ignore: FIXME out-of-sync @types/react-redux version as new types cause many build errors +import { useSelector } from 'react-redux'; +import { getImpersonate, getUser, K8sResourceKind } from '@console/dynamic-plugin-sdk/src'; +import { useK8sWatchResource } from '@console/internal/components/utils/k8s-watch-hook'; +import { ConfigMapModel } from '@console/internal/models'; +import { RootState } from '@console/internal/redux'; +import { USER_SETTING_CONFIGMAP_NAMESPACE } from '../utils/user-settings'; + +export const useGetUserSettingConfigMap = () => { + const hashNameOrKubeadmin = (name: string): string | null => { + if (!name) { + return null; + } + + if (name === 'kube:admin') { + return 'kubeadmin'; + } + const hash = createHash('sha256'); + hash.update(name); + return hash.digest('hex'); + }; + // User and impersonate + const userUid = useSelector((state: RootState) => { + const impersonateName = getImpersonate(state)?.name; + const { uid, username } = getUser(state) ?? {}; + const hashName = hashNameOrKubeadmin(username); + return impersonateName || uid || hashName || ''; + }); + + const configMapResource = React.useMemo( + () => + !userUid + ? null + : { + kind: ConfigMapModel.kind, + namespace: USER_SETTING_CONFIGMAP_NAMESPACE, + isList: false, + name: `user-settings-${userUid}`, + }, + [userUid], + ); + const [cfData, cfLoaded, cfLoadError] = useK8sWatchResource(configMapResource); + return [cfData, cfLoaded, cfLoadError]; +}; diff --git a/frontend/packages/topology/src/components/side-bar/components/SideBarAlerts.tsx b/frontend/packages/topology/src/components/side-bar/components/SideBarAlerts.tsx index 401114354cb..581b1c04569 100644 --- a/frontend/packages/topology/src/components/side-bar/components/SideBarAlerts.tsx +++ b/frontend/packages/topology/src/components/side-bar/components/SideBarAlerts.tsx @@ -7,7 +7,10 @@ import { isDetailsResourceAlert, useResolvedExtensions, } from '@console/dynamic-plugin-sdk'; -import { USERSETTINGS_PREFIX, useUserSettings } from '@console/shared'; +import { USERSETTINGS_PREFIX } from '@console/shared'; +import { useGetUserSettingConfigMap } from '@console/shared/src/hooks/useGetUserSettingConfigMap'; +import { useUserSettingsLocalStorage } from '@console/shared/src/hooks/useUserSettingsLocalStorage'; +import { deseralizeData } from '@console/shared/src/utils/user-settings'; const SIDEBAR_ALERTS = 'sideBarAlerts'; @@ -16,14 +19,28 @@ const ResolveResourceAlerts: React.FC<{ useResourceAlertsContent?: (element: GraphElement) => DetailsResourceAlertContent; element: GraphElement; }> = observer(function ResolveResourceAlerts({ id, useResourceAlertsContent, element }) { - const [showAlert, setShowAlert, loaded] = useUserSettings( - `${USERSETTINGS_PREFIX}.${SIDEBAR_ALERTS}.${id}.${element.getId()}`, - true, + const [cfData, cfLoaded, cfLoadError] = useGetUserSettingConfigMap(); + const [showAlert, setShowAlert] = useUserSettingsLocalStorage( + `${USERSETTINGS_PREFIX}/${SIDEBAR_ALERTS}/${id}`, + `${element.getId()}`, + deseralizeData( + cfData?.data?.[`${USERSETTINGS_PREFIX}.${SIDEBAR_ALERTS}.${id}.${element.getId()}`], + ) || true, ); + + React.useEffect(() => { + if (cfData && cfLoaded && !cfLoadError) { + const alertSetting = deseralizeData( + cfData?.data?.[`${USERSETTINGS_PREFIX}.${SIDEBAR_ALERTS}.${id}.${element.getId()}`], + ); + setShowAlert(alertSetting); + } + }, [setShowAlert, cfData, cfLoaded, cfLoadError, id, element]); + const alertConfigs = useResourceAlertsContent(element); if (!alertConfigs) return null; const { variant, content, actionLinks, dismissible, title } = alertConfigs; - return loaded && showAlert ? ( + return showAlert ? ( Date: Mon, 25 Aug 2025 18:15:06 +0000 Subject: [PATCH 097/102] Merge pull request #15366 from TheRealJon/OCPBUGS-50571 [release-4.19] OCPBUGS-50571: Make sure CSP violations are only reported to telemetry once per day per browser --- .../hooks/useCSPViolationDetector.spec.tsx | 139 +++++------------- ...tector.tsx => useCSPViolationDetector.tsx} | 112 +++++--------- .../console-shared/src/constants/common.ts | 1 + .../__tests__/useLocalStorageCache.spec.tsx | 133 +++++++++++++++++ .../src/hooks/useLocalStorageCache.ts | 77 ++++++++++ frontend/public/components/app.jsx | 2 +- 6 files changed, 291 insertions(+), 173 deletions(-) rename frontend/packages/console-app/src/hooks/{useCSPVioliationDetector.tsx => useCSPViolationDetector.tsx} (57%) create mode 100644 frontend/packages/console-shared/src/hooks/__tests__/useLocalStorageCache.spec.tsx create mode 100644 frontend/packages/console-shared/src/hooks/useLocalStorageCache.ts diff --git a/frontend/packages/console-app/src/__tests__/hooks/useCSPViolationDetector.spec.tsx b/frontend/packages/console-app/src/__tests__/hooks/useCSPViolationDetector.spec.tsx index c0019174228..32d056465ca 100644 --- a/frontend/packages/console-app/src/__tests__/hooks/useCSPViolationDetector.spec.tsx +++ b/frontend/packages/console-app/src/__tests__/hooks/useCSPViolationDetector.spec.tsx @@ -2,44 +2,34 @@ import * as React from 'react'; import { act, fireEvent, render } from '@testing-library/react'; import { Provider } from 'react-redux'; import store from '@console/internal/redux'; -import { ONE_DAY } from '@console/shared/src/constants/time'; import { - newCSPViolationReport, + newPluginCSPViolationEvent, useCSPViolationDetector, -} from '../../hooks/useCSPVioliationDetector'; +} from '../../hooks/useCSPViolationDetector'; -// Mock Date.now so that it returns a predictable value -const now = Date.now(); -const mockNow = jest.spyOn(Date, 'now').mockReturnValue(now); - -// Mock localStorage so that we can spy on calls and override return values. -const mockGetItem = jest.fn(); -const mockSetItem = jest.fn(); -class LocalStorageMock { - store = {}; - - length = 0; - - clear = jest.fn(); - - getItem = mockGetItem; - - setItem = mockSetItem; - - removeItem = jest.fn(); +jest.mock('@console/shared/src/constants/common', () => ({ + ...require.requireActual('@console/shared/src/constants/common'), + IS_PRODUCTION: true, +})); - key = jest.fn(); -} -window.localStorage = new LocalStorageMock(); +const mockCacheEvent = jest.fn(); +jest.mock('@console/shared/src/hooks/useLocalStorageCache', () => ({ + useLocalStorageCache: () => [undefined, mockCacheEvent], +})); -// Mock fireTelemetry so that we can spy on calls const mockFireTelemetry = jest.fn(); jest.mock('@console/shared/src/hooks/useTelemetry', () => ({ useTelemetry: () => mockFireTelemetry, })); -// Mock class that extends SecurityPolicyViolationEvent to work around "SecurityPolicyViolationEvent -// is not defined" error +const mockPluginStore = { + findDynamicPluginInfo: jest.fn(), + setCustomDynamicPluginInfo: jest.fn(), +}; +jest.mock('@console/plugin-sdk/src/api/usePluginStore', () => ({ + usePluginStore: () => mockPluginStore, +})); + class MockSecurityPolicyViolationEvent extends Event { documentURI; @@ -65,142 +55,93 @@ class MockSecurityPolicyViolationEvent extends Event { sample; - constructor(blockedURI?: string, sourceFile?: string) { + constructor(blockedURI?: string, sourceFile?: string, documentURI?: string) { super('securitypolicyviolation'); this.blockedURI = blockedURI || 'http://blocked.com'; this.sourceFile = sourceFile || 'http://example.com/test.js'; + this.documentURI = documentURI || 'http://localhost:9000/test'; } } const testEvent = new MockSecurityPolicyViolationEvent(); -const testReport = newCSPViolationReport(null, testEvent); -const testRecord = { - ...testReport, - timestamp: now, -}; -const existingRecord = { - ...testReport, - timestamp: now - ONE_DAY, -}; -const expiredRecord = { - ...testReport, - timestamp: now - 2 * ONE_DAY, -}; +const testPluginEvent = newPluginCSPViolationEvent(null, testEvent); + const TestComponent = () => { useCSPViolationDetector(); return

    hello, world!
    ; }; describe('useCSPViolationDetector', () => { - const originalNodeEnv = process.env.NODE_ENV; - beforeAll(() => { - process.env.NODE_ENV = 'production'; - }); - afterAll(() => { - process.env.NODE_ENV = originalNodeEnv; - }); afterEach(() => { - mockGetItem.mockClear(); - mockSetItem.mockClear(); mockFireTelemetry.mockClear(); - mockNow.mockClear(); + mockPluginStore.findDynamicPluginInfo.mockClear(); + mockPluginStore.setCustomDynamicPluginInfo.mockClear(); + mockCacheEvent.mockClear(); }); it('records a new CSP violation', () => { + mockCacheEvent.mockReturnValue(true); render( , ); - mockGetItem.mockReturnValueOnce('[]'); act(() => { fireEvent(document, testEvent); }); - expect(mockSetItem).toHaveBeenCalledWith( - 'console/csp_violations', - JSON.stringify([testRecord]), - ); - expect(mockFireTelemetry).toHaveBeenCalledWith('CSPViolation', testRecord); + expect(mockCacheEvent).toHaveBeenCalledWith(testPluginEvent); + expect(mockFireTelemetry).toHaveBeenCalledWith('CSPViolation', testPluginEvent); }); - it('updates existing events with new timestamp', () => { + it('does not update store when matching event exists', () => { + mockCacheEvent.mockReturnValue(false); render( , ); - mockGetItem.mockReturnValueOnce(JSON.stringify([existingRecord])); - act(() => { fireEvent(document, testEvent); }); - expect(mockSetItem).toBeCalledWith('console/csp_violations', JSON.stringify([testRecord])); + expect(mockCacheEvent).toHaveBeenCalledWith(testPluginEvent); expect(mockFireTelemetry).not.toBeCalled(); }); - it('fires a telemetry event when a matching CSP expires', () => { - render( - - - , - ); - - mockGetItem.mockReturnValueOnce(JSON.stringify([expiredRecord])); - const origNodeEnv = process.env.NODE_ENV; - act(() => { - fireEvent(document, testEvent); - }); - process.env.NODE_ENV = origNodeEnv; - expect(mockSetItem).toHaveBeenCalledWith( - 'console/csp_violations', - JSON.stringify([testRecord]), - ); - expect(mockFireTelemetry).toHaveBeenCalledWith('CSPViolation', testRecord); - }); it('correctly parses plugin name from blockedURI', () => { + mockCacheEvent.mockReturnValue(true); const testEventWithPlugin = new MockSecurityPolicyViolationEvent( 'http://localhost/api/plugins/foo', ); - const report = newCSPViolationReport('foo', testEventWithPlugin); - const record = { - ...report, - timestamp: 999, - }; + const expected = newPluginCSPViolationEvent('foo', testEventWithPlugin); render( , ); - mockNow.mockReturnValueOnce(999); - mockGetItem.mockReturnValueOnce(''); act(() => { fireEvent(document, testEventWithPlugin); }); - expect(mockSetItem).toHaveBeenCalledWith('console/csp_violations', JSON.stringify([record])); - expect(mockFireTelemetry).toHaveBeenCalledWith('CSPViolation', record); + expect(mockCacheEvent).toHaveBeenCalledWith(expected); + expect(mockFireTelemetry).toHaveBeenCalledWith('CSPViolation', expected); }); + it('correctly parses plugin name from sourceFile', () => { + mockCacheEvent.mockReturnValue(true); const testEventWithPlugin = new MockSecurityPolicyViolationEvent( 'http://blocked.com', 'http://localhost/api/plugins/foo', ); - const report = newCSPViolationReport('foo', testEventWithPlugin); - const record = { - ...report, - timestamp: 999, - }; + const expected = newPluginCSPViolationEvent('foo', testEventWithPlugin); render( , ); - mockNow.mockReturnValue(999); - mockGetItem.mockReturnValue(''); act(() => { fireEvent(document, testEventWithPlugin); }); - expect(mockSetItem).toHaveBeenCalledWith('console/csp_violations', JSON.stringify([record])); - expect(mockFireTelemetry).toHaveBeenCalledWith('CSPViolation', record); + expect(mockCacheEvent).toHaveBeenCalledWith(expected); + expect(mockFireTelemetry).toHaveBeenCalledWith('CSPViolation', expected); }); }); diff --git a/frontend/packages/console-app/src/hooks/useCSPVioliationDetector.tsx b/frontend/packages/console-app/src/hooks/useCSPViolationDetector.tsx similarity index 57% rename from frontend/packages/console-app/src/hooks/useCSPVioliationDetector.tsx rename to frontend/packages/console-app/src/hooks/useCSPViolationDetector.tsx index 043f7a0c19e..5f56747667e 100644 --- a/frontend/packages/console-app/src/hooks/useCSPVioliationDetector.tsx +++ b/frontend/packages/console-app/src/hooks/useCSPViolationDetector.tsx @@ -4,11 +4,14 @@ import * as _ from 'lodash'; import { useTranslation } from 'react-i18next'; import { usePluginStore } from '@console/plugin-sdk/src/api/usePluginStore'; import { useToast } from '@console/shared/src/components/toast'; +import { IS_PRODUCTION } from '@console/shared/src/constants/common'; import { ONE_DAY } from '@console/shared/src/constants/time'; +import { useLocalStorageCache } from '@console/shared/src/hooks/useLocalStorageCache'; import { useTelemetry } from '@console/shared/src/hooks/useTelemetry'; const CSP_VIOLATION_EXPIRATION = ONE_DAY; const LOCAL_STORAGE_CSP_VIOLATIONS_KEY = 'console/csp_violations'; +const CSP_VIOLATION_TELEMETRY_EVENT_NAME = 'CSPViolation'; const pluginAssetBaseURL = `${document.baseURI}api/plugins/`; @@ -17,16 +20,34 @@ const getPluginNameFromResourceURL = (url: string): string => ? url.substring(pluginAssetBaseURL.length).split('/')[0] : null; -const isRecordExpired = ({ timestamp }: CSPViolationRecord): boolean => { - return timestamp && Date.now() - timestamp > CSP_VIOLATION_EXPIRATION; +const sameHostname = (a: string, b: string): boolean => { + const urlA = new URL(a); + const urlB = new URL(b); + return urlA.hostname === urlB.hostname; }; +// CSP violation records are considered equal if the following properties match: +// - pluginName +// - effectiveDirective +// - sourceFile +// - documentURI +// - blockedURI hostname +const pluginCSPViolationsAreEqual = ( + a: PluginCSPViolationEvent, + b: PluginCSPViolationEvent, +): boolean => + a.pluginName === b.pluginName && + a.effectiveDirective === b.effectiveDirective && + a.sourceFile === b.sourceFile && + a.documentURI === b.documentURI && + sameHostname(a.blockedURI, b.blockedURI); + // Export for testing -export const newCSPViolationReport = ( +export const newPluginCSPViolationEvent = ( pluginName: string, // https://developer.mozilla.org/en-US/docs/Web/API/SecurityPolicyViolationEvent event: SecurityPolicyViolationEvent, -): CSPViolationReport => ({ +): PluginCSPViolationEvent => ({ ..._.pick(event, [ 'blockedURI', 'columnNumber', @@ -46,56 +67,12 @@ export const newCSPViolationReport = ( export const useCSPViolationDetector = () => { const { t } = useTranslation(); const toastContext = useToast(); - const pluginStore = usePluginStore(); const fireTelemetryEvent = useTelemetry(); - const getRecords = React.useCallback((): CSPViolationRecord[] => { - const serializedRecords = window.localStorage.getItem(LOCAL_STORAGE_CSP_VIOLATIONS_KEY) || ''; - try { - const records = serializedRecords ? JSON.parse(serializedRecords) : []; - // Violations should expire when they haven't been reported for a while - return records.reduce((acc, v) => (isRecordExpired(v) ? acc : [...acc, v]), []); - } catch (e) { - // eslint-disable-next-line no-console - console.warn('Error parsing CSP violation reports from local storage. Value will be reset.'); - return []; - } - }, []); - - const updateRecords = React.useCallback( - ( - existingRecords: CSPViolationRecord[], - newRecord: CSPViolationRecord, - ): CSPViolationRecord[] => { - if (!existingRecords.length) { - return [newRecord]; - } - - // Update the existing records. If a matching report is already recorded in local storage, - // update the timestamp. Otherwise, append the new record. - const [updatedRecords] = existingRecords.reduce( - ([acc, hasBeenRecorded], existingRecord, i, all) => { - // Exclude originalPolicy and timestamp from equality comparison. - const { timestamp, originalPolicy, ...existingReport } = existingRecord; - const { timestamp: _t, originalPolicy: _o, ...newReport } = newRecord; - - // Replace matching report with a newly timestamped record - if (_.isEqual(newReport, existingReport)) { - return [[...acc, newRecord], true]; - } - - // If this is the last record and the new report has not been recorded yet, append it - if (i === all.length - 1 && !hasBeenRecorded) { - return [[...acc, existingRecord, newRecord], true]; - } - - // Append all existing records that don't match to the accumulator - return [[...acc, existingRecord], hasBeenRecorded]; - }, - [[], false], - ); - return updatedRecords; - }, - [], + const pluginStore = usePluginStore(); + const [, cacheEvent] = useLocalStorageCache( + LOCAL_STORAGE_CSP_VIOLATIONS_KEY, + CSP_VIOLATION_EXPIRATION, + pluginCSPViolationsAreEqual, ); const reportViolation = React.useCallback( @@ -108,19 +85,11 @@ export const useCSPViolationDetector = () => { getPluginNameFromResourceURL(event.blockedURI) || getPluginNameFromResourceURL(event.sourceFile); - const existingRecords = getRecords(); - const newRecord = { - ...newCSPViolationReport(pluginName, event), - timestamp: Date.now(), - }; - const updatedRecords = updateRecords(existingRecords, newRecord); - const isNewOccurrence = updatedRecords.length > existingRecords.length; - const isProduction = process.env.NODE_ENV === 'production'; + const pluginCSPViolationEvent = newPluginCSPViolationEvent(pluginName, event); + const isNew = cacheEvent(pluginCSPViolationEvent); - window.localStorage.setItem(LOCAL_STORAGE_CSP_VIOLATIONS_KEY, JSON.stringify(updatedRecords)); - - if (isNewOccurrence && isProduction) { - fireTelemetryEvent('CSPViolation', newRecord); + if (isNew && IS_PRODUCTION) { + fireTelemetryEvent(CSP_VIOLATION_TELEMETRY_EVENT_NAME, pluginCSPViolationEvent); } if (pluginName) { @@ -139,7 +108,7 @@ export const useCSPViolationDetector = () => { pluginStore.setCustomDynamicPluginInfo(pluginName, { hasCSPViolations: true }); } - if (pluginIsLoaded && !isProduction && !pluginInfo.hasCSPViolations) { + if (pluginIsLoaded && !IS_PRODUCTION && !pluginInfo.hasCSPViolations) { toastContext.addToast({ variant: AlertVariant.warning, title: t('public~Content Security Policy violation in Console plugin'), @@ -155,7 +124,7 @@ export const useCSPViolationDetector = () => { } } }, - [fireTelemetryEvent, getRecords, t, toastContext, updateRecords, pluginStore], + [cacheEvent, fireTelemetryEvent, pluginStore, toastContext, t], ); React.useEffect(() => { @@ -167,7 +136,7 @@ export const useCSPViolationDetector = () => { }; /** A subset of properties from a SecurityPolicyViolationEvent which identify a unique CSP violation */ -type CSPViolationReportProperties = +type PluginCSPViolationProperties = // The URI of the resource that was blocked because it violates a policy. | 'blockedURI' // The column number in the document or worker at which the violation occurred. @@ -192,10 +161,7 @@ type CSPViolationReportProperties = // HTTP status code of the document or worker in which the violation occurred. | 'statusCode'; -/** A CSPViolationReport represents a unique CSP violation per plugin */ -type CSPViolationReport = Pick & { +/** A PluginCSPViolationEvent represents a CSP violation event associated with a plugin */ +type PluginCSPViolationEvent = Pick & { pluginName: string; }; - -/** A CSPViolationRecord represents a unique CSP violation per plugin, per occurrance */ -type CSPViolationRecord = CSPViolationReport & { timestamp: number }; diff --git a/frontend/packages/console-shared/src/constants/common.ts b/frontend/packages/console-shared/src/constants/common.ts index 1910ec1513a..0bb9102b11a 100644 --- a/frontend/packages/console-shared/src/constants/common.ts +++ b/frontend/packages/console-shared/src/constants/common.ts @@ -128,3 +128,4 @@ export const GETTING_STARTED_USER_SETTINGS_KEY_ADD_PAGE = export const GETTING_STARTED_USER_SETTINGS_KEY_CLUSTER_DASHBOARD = 'console.clusterDashboard.gettingStarted.expanded'; export const PREFERRED_TELEMETRY_USER_SETTING_KEY = 'telemetry.analytics'; +export const IS_PRODUCTION = process.env.NODE_ENV === 'production'; diff --git a/frontend/packages/console-shared/src/hooks/__tests__/useLocalStorageCache.spec.tsx b/frontend/packages/console-shared/src/hooks/__tests__/useLocalStorageCache.spec.tsx new file mode 100644 index 00000000000..488a329888b --- /dev/null +++ b/frontend/packages/console-shared/src/hooks/__tests__/useLocalStorageCache.spec.tsx @@ -0,0 +1,133 @@ +import * as React from 'react'; +import { act, render } from '@testing-library/react'; +import { useLocalStorageCache } from '../useLocalStorageCache'; + +const mockGetItem = jest.fn(); +const mockSetItem = jest.fn(); + +Object.defineProperty(window, 'localStorage', { + value: { + getItem: mockGetItem, + setItem: mockSetItem, + }, + writable: true, +}); + +const now = Date.now(); +jest.spyOn(Date, 'now').mockReturnValue(now); + +const KEY = 'key'; +const EXPIRATION = 1000; +const record = { foo: 'bar' }; +const recordWithTimestamp = { ...record, timestamp: now }; +const expiredRecord = { ...record, timestamp: now - EXPIRATION - 1 }; + +describe('useLocalStorageCache', () => { + const hookRef: React.MutableRefObject<[() => any[], (r: any) => boolean]> = { + current: undefined, + }; + + const TestComponent = ({ + cacheKey, + expiration, + comparator, + }: { + cacheKey: string; + expiration?: number; + comparator?: (a: any, b: any) => boolean; + }) => { + hookRef.current = useLocalStorageCache(cacheKey, expiration, comparator); + return null; + }; + + afterEach(() => { + mockGetItem.mockReset(); + mockSetItem.mockReset(); + hookRef.current = undefined; + }); + + it('should return empty array when cache is empty', () => { + mockGetItem.mockReturnValue(null); + render(); + const [getRecords] = hookRef.current; + expect(getRecords()).toEqual([]); + }); + + it('should add a record to an empty cache', () => { + mockGetItem.mockReturnValue(null); + render(); + const [, addRecord] = hookRef.current; + let added; + act(() => { + added = addRecord(record); + }); + expect(mockSetItem).toHaveBeenCalledWith(KEY, JSON.stringify([recordWithTimestamp])); + expect(added).toBe(true); + }); + + it('should not add a duplicate record', () => { + mockGetItem.mockReturnValue(JSON.stringify([recordWithTimestamp])); + render(); + const [, addRecord] = hookRef.current; + let added; + act(() => { + added = addRecord(record); + }); + expect(mockSetItem).not.toHaveBeenCalled(); + expect(added).toBe(false); + }); + + it('should return false when adding an existing record while another record expires', () => { + const existingRecord = { foo: 'bar' }; + const expiredRecordInCache = { foo: 'baz', timestamp: now - EXPIRATION - 1 }; + const existingRecordInCache = { ...existingRecord, timestamp: now }; + + mockGetItem.mockReturnValue(JSON.stringify([existingRecordInCache, expiredRecordInCache])); + render(); + const [, addRecord] = hookRef.current; + let added; + act(() => { + added = addRecord(existingRecord); + }); + + expect(mockSetItem).toHaveBeenCalledWith(KEY, JSON.stringify([existingRecordInCache])); + expect(added).toBe(false); + }); + + it('should add a new record to an existing cache', () => { + const existingRecord = { foo: 'baz' }; + mockGetItem.mockReturnValue(JSON.stringify([existingRecord])); + render(); + const [, addRecord] = hookRef.current; + let added; + act(() => { + added = addRecord(record); + }); + expect(mockSetItem).toHaveBeenCalledWith( + KEY, + JSON.stringify([recordWithTimestamp, existingRecord]), + ); + expect(added).toBe(true); + }); + + it('should not return expired records', () => { + mockGetItem.mockReturnValue(JSON.stringify([expiredRecord, recordWithTimestamp])); + render(); + const [getRecords] = hookRef.current; + expect(getRecords()).toEqual([record]); + }); + + it('should use custom comparator', () => { + const comparator = jest.fn((a, b) => a.foo === b.foo); + mockGetItem.mockReturnValue(JSON.stringify([{ ...recordWithTimestamp, baz: 'qux' }])); + render(); + const [, addRecord] = hookRef.current; + let added; + act(() => { + added = addRecord({ ...record, baz: 'different' }); + }); + expect(comparator).toHaveBeenCalled(); + expect(mockSetItem).not.toHaveBeenCalled(); + expect(added).toBe(false); + }); +}); diff --git a/frontend/packages/console-shared/src/hooks/useLocalStorageCache.ts b/frontend/packages/console-shared/src/hooks/useLocalStorageCache.ts new file mode 100644 index 00000000000..7acd21f5325 --- /dev/null +++ b/frontend/packages/console-shared/src/hooks/useLocalStorageCache.ts @@ -0,0 +1,77 @@ +import * as React from 'react'; +import * as _ from 'lodash'; + +const isFresh = ({ timestamp }: Timestamped, expiration: number): boolean => + expiration === undefined || !timestamp || Date.now() - timestamp <= expiration; + +export const useLocalStorageCache = ( + key: string, + expiration?: number, + comparator?: (a: T, b: T) => boolean, +): [Getter, Setter] => { + const refreshCache = React.useCallback(() => { + try { + const serializedCache = window.localStorage.getItem(key); + const records = serializedCache ? JSON.parse(serializedCache) : []; + return records.filter((record: Timestamped) => isFresh(record, expiration)); + } catch (e) { + // eslint-disable-next-line no-console + console.warn(`Error parsing cached records from local storage at key ${key}. Resetting.`); + return []; + } + }, [expiration, key]); + + const recordExists = React.useCallback( + (newRecord: T, records: T[]): boolean => + records.some((existingRecord) => + (comparator ?? _.isEqual)( + { ...existingRecord, timestamp: 0 }, + { ...newRecord, timestamp: 0 }, + ), + ), + [comparator], + ); + + const getNewSerializedRecords = React.useCallback( + (newRecord: T): [string, boolean] => { + const currentRecords = refreshCache(); + if (recordExists(newRecord, currentRecords)) { + return [JSON.stringify(currentRecords), false]; + } + return [JSON.stringify([newRecord, ...currentRecords]), true]; + }, + [recordExists, refreshCache], + ); + + const addRecord = React.useCallback( + (newRecord: T) => { + const currentSerializedRecords = window.localStorage.getItem(key); + const [updatedSerializedRecords, recordAdded] = getNewSerializedRecords({ + ...newRecord, + timestamp: Date.now(), + }); + if (updatedSerializedRecords !== currentSerializedRecords) { + try { + window.localStorage.setItem(key, updatedSerializedRecords); + } catch (e) { + // eslint-disable-next-line no-console + console.warn(`Error writing to local storage at key ${key}.`); + return false; + } + } + return recordAdded; + }, + [getNewSerializedRecords, key], + ); + + const getRecords = React.useCallback( + (): T[] => refreshCache().map(({ timestamp, ...rest }) => rest), + [refreshCache], + ); + + return [getRecords, addRecord]; +}; + +type Getter = () => T[]; +type Setter = (record: T) => boolean; +type Timestamped = T & { timestamp: number }; diff --git a/frontend/public/components/app.jsx b/frontend/public/components/app.jsx index 2bde15a9803..2a3745d8b6e 100644 --- a/frontend/public/components/app.jsx +++ b/frontend/public/components/app.jsx @@ -75,7 +75,7 @@ import { withoutSensitiveInformations, getTelemetryTitle } from './utils/telemet import { graphQLReady } from '../graphql/client'; import { AdmissionWebhookWarningNotifications } from '@console/app/src/components/admission-webhook-warnings/AdmissionWebhookWarningNotifications'; import { usePackageManifestCheck } from '@console/shared/src/hooks/usePackageManifestCheck'; -import { useCSPViolationDetector } from '@console/app/src/hooks/useCSPVioliationDetector'; +import { useCSPViolationDetector } from '@console/app/src/hooks/useCSPViolationDetector'; initI18n(); From b982d3b4558c8b7d150b2f56f3a55d5059c0d4ed Mon Sep 17 00:00:00 2001 From: Vojtech Szocs Date: Wed, 3 Sep 2025 15:47:06 +0000 Subject: [PATCH 098/102] Prepare for latest 4.18 plugin SDK package publish --- .../CHANGELOG-core.md | 25 +++++++++++++++++-- .../CHANGELOG-webpack.md | 19 ++++++++++++-- 2 files changed, 40 insertions(+), 4 deletions(-) diff --git a/frontend/packages/console-dynamic-plugin-sdk/CHANGELOG-core.md b/frontend/packages/console-dynamic-plugin-sdk/CHANGELOG-core.md index e1e1024318f..a3a1bf0c28f 100644 --- a/frontend/packages/console-dynamic-plugin-sdk/CHANGELOG-core.md +++ b/frontend/packages/console-dynamic-plugin-sdk/CHANGELOG-core.md @@ -1,7 +1,22 @@ # Changelog for `@openshift-console/dynamic-plugin-sdk` -Refer to [Console dynamic plugins README](./README.md) for OpenShift Console version vs SDK package -version and PatternFly version compatibility. +Console plugin SDK packages follow a semver scheme where the major and minor version number indicates +the earliest supported OCP Console version, and the patch version number indicates the release of that +particular package. + +For released (GA) versions of Console, use `4.x.z` packages. +For current development version of Console, use `4.x.0-prerelease.n` packages. + +For 1.x plugin SDK packages, refer to "OpenShift Console Versions vs SDK Versions" compatibility table +in [Console dynamic plugins README](./README.md). + +## 4.18.0 - 2025-09-04 + +> Initial release for OCP Console 4.18. + +- Fix `href` handling bug for extension type `console.tab/horizontalNav` ([OCPBUGS-58258], [#15231]) +- Improve `useModal` hook to support multiple modals and prop pass-through ([OCPBUGS-49709], [#15139]) +- Allow custom popover description in extension type `console.resource/details-item` ([CONSOLE-4269], [#14487]) ## 1.8.0 - 2024-11-04 @@ -63,6 +78,7 @@ version and PatternFly version compatibility. [CONSOLE-4097]: https://issues.redhat.com/browse/CONSOLE-4097 [CONSOLE-4185]: https://issues.redhat.com/browse/CONSOLE-4185 [CONSOLE-4263]: https://issues.redhat.com/browse/CONSOLE-4263 +[CONSOLE-4269]: https://issues.redhat.com/browse/CONSOLE-4269 [OCPBUGS-19048]: https://issues.redhat.com/browse/OCPBUGS-19048 [OCPBUGS-30077]: https://issues.redhat.com/browse/OCPBUGS-30077 [OCPBUGS-31355]: https://issues.redhat.com/browse/OCPBUGS-31355 @@ -74,6 +90,8 @@ version and PatternFly version compatibility. [OCPBUGS-37426]: https://issues.redhat.com/browse/OCPBUGS-37426 [OCPBUGS-43538]: https://issues.redhat.com/browse/OCPBUGS-43538 [OCPBUGS-43998]: https://issues.redhat.com/browse/OCPBUGS-43998 +[OCPBUGS-49709]: https://issues.redhat.com/browse/OCPBUGS-49709 +[OCPBUGS-58258]: https://issues.redhat.com/browse/OCPBUGS-58258 [ODC-7425]: https://issues.redhat.com/browse/ODC-7425 [#12983]: https://github.com/openshift/console/pull/12983 [#13233]: https://github.com/openshift/console/pull/13233 @@ -96,3 +114,6 @@ version and PatternFly version compatibility. [#14156]: https://github.com/openshift/console/pull/14156 [#14421]: https://github.com/openshift/console/pull/14421 [#14447]: https://github.com/openshift/console/pull/14447 +[#14487]: https://github.com/openshift/console/pull/14487 +[#15139]: https://github.com/openshift/console/pull/15139 +[#15231]: https://github.com/openshift/console/pull/15231 diff --git a/frontend/packages/console-dynamic-plugin-sdk/CHANGELOG-webpack.md b/frontend/packages/console-dynamic-plugin-sdk/CHANGELOG-webpack.md index 660977cb3b7..3940d20cf42 100644 --- a/frontend/packages/console-dynamic-plugin-sdk/CHANGELOG-webpack.md +++ b/frontend/packages/console-dynamic-plugin-sdk/CHANGELOG-webpack.md @@ -1,7 +1,20 @@ # Changelog for `@openshift-console/dynamic-plugin-sdk-webpack` -Refer to [Console dynamic plugins README](./README.md) for OpenShift Console version vs SDK package -version and PatternFly version compatibility. +Console plugin SDK packages follow a semver scheme where the major and minor version number indicates +the earliest supported OCP Console version, and the patch version number indicates the release of that +particular package. + +For released (GA) versions of Console, use `4.x.z` packages. +For current development version of Console, use `4.x.0-prerelease.n` packages. + +For 1.x plugin SDK packages, refer to "OpenShift Console Versions vs SDK Versions" compatibility table +in [Console dynamic plugins README](./README.md). + +## 4.18.0 - 2025-09-04 + +> Initial release for OCP Console 4.18. + +- Add `@patternfly/react-topology` to Console provided shared modules ([OCPBUGS-55323], [#14993]) ## 1.3.0 - 2024-10-31 @@ -47,6 +60,7 @@ version and PatternFly version compatibility. [OCPBUGS-35928]: https://issues.redhat.com/browse/OCPBUGS-35928 [OCPBUGS-38734]: https://issues.redhat.com/browse/OCPBUGS-38734 [OCPBUGS-42985]: https://issues.redhat.com/browse/OCPBUGS-42985 +[OCPBUGS-55323]: https://issues.redhat.com/browse/OCPBUGS-55323 [#13188]: https://github.com/openshift/console/pull/13188 [#13388]: https://github.com/openshift/console/pull/13388 [#13521]: https://github.com/openshift/console/pull/13521 @@ -58,3 +72,4 @@ version and PatternFly version compatibility. [#13992]: https://github.com/openshift/console/pull/13992 [#14167]: https://github.com/openshift/console/pull/14167 [#14300]: https://github.com/openshift/console/pull/14300 +[#14993]: https://github.com/openshift/console/pull/14993 From d3988c5f8db3d30cb6f9646012378a15b580d217 Mon Sep 17 00:00:00 2001 From: Vojtech Szocs Date: Wed, 10 Sep 2025 17:14:30 +0000 Subject: [PATCH 099/102] Fix bug with Console provided PatternFly shared modules --- .../src/webpack/ConsoleRemotePlugin.ts | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/frontend/packages/console-dynamic-plugin-sdk/src/webpack/ConsoleRemotePlugin.ts b/frontend/packages/console-dynamic-plugin-sdk/src/webpack/ConsoleRemotePlugin.ts index fcf521be99b..e8ab03fa823 100644 --- a/frontend/packages/console-dynamic-plugin-sdk/src/webpack/ConsoleRemotePlugin.ts +++ b/frontend/packages/console-dynamic-plugin-sdk/src/webpack/ConsoleRemotePlugin.ts @@ -74,9 +74,10 @@ const getWebpackSharedModules = (pkg: ConsolePluginPackageJSON) => { const moduleConfig: WebpackSharedConfig = { singleton }; // Console provides PatternFly 4 shared modules to its plugins for backwards compatibility. - // Plugins using PatternFly 5 and higher share the PatternFly code bits via dynamic modules. - // TODO(vojtech): remove this code when Console drops support for PatternFly 4 - if (moduleName.startsWith('@patternfly/') && pfMajorVersion > 4) { + // Plugins using PatternFly 5 and higher share the PatternFly code bits via dynamic modules, + // *except* for modules where we explicitly disallow plugins to provide their own fallback + // version of that module (i.e. any singleton Console provided shared modules). + if (moduleName.startsWith('@patternfly/') && pfMajorVersion > 4 && allowFallback) { return acc; } From e6e3a5f997f286c6769fee4bad1ff2e62ebaaa4e Mon Sep 17 00:00:00 2001 From: James Force Date: Tue, 5 Aug 2025 11:45:45 +0100 Subject: [PATCH 100/102] Remove ancient deprecated header See: https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Headers/X-XSS-Protection --- pkg/server/middleware.go | 2 -- 1 file changed, 2 deletions(-) diff --git a/pkg/server/middleware.go b/pkg/server/middleware.go index 5fe39555501..123286f1be4 100644 --- a/pkg/server/middleware.go +++ b/pkg/server/middleware.go @@ -130,8 +130,6 @@ func securityHeadersMiddleware(hdlr http.Handler) http.HandlerFunc { return func(w http.ResponseWriter, r *http.Request) { // Prevent MIME sniffing (https://en.wikipedia.org/wiki/Content_sniffing) w.Header().Set("X-Content-Type-Options", "nosniff") - // Ancient weak protection against reflected XSS (equivalent to CSP no unsafe-inline) - w.Header().Set("X-XSS-Protection", "1; mode=block") // Prevent clickjacking attacks involving iframes w.Header().Set("X-Frame-Options", "DENY") // Less information leakage about what domains we link to From b3372f0272526f8f3caa4e4b530f44e8afadf2f9 Mon Sep 17 00:00:00 2001 From: Vojtech Szocs Date: Fri, 19 Sep 2025 17:04:28 +0000 Subject: [PATCH 101/102] Update CHANGELOG for 4.18 plugin SDK package publish --- .../console-dynamic-plugin-sdk/CHANGELOG-webpack.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/frontend/packages/console-dynamic-plugin-sdk/CHANGELOG-webpack.md b/frontend/packages/console-dynamic-plugin-sdk/CHANGELOG-webpack.md index 3940d20cf42..01077bb0538 100644 --- a/frontend/packages/console-dynamic-plugin-sdk/CHANGELOG-webpack.md +++ b/frontend/packages/console-dynamic-plugin-sdk/CHANGELOG-webpack.md @@ -10,6 +10,10 @@ For current development version of Console, use `4.x.0-prerelease.n` packages. For 1.x plugin SDK packages, refer to "OpenShift Console Versions vs SDK Versions" compatibility table in [Console dynamic plugins README](./README.md). +## 4.18.1 - 2025-09-22 + +- Fix bug when processing Console provided PatternFly shared modules ([OCPBUGS-61569], [#15479]) + ## 4.18.0 - 2025-09-04 > Initial release for OCP Console 4.18. @@ -61,6 +65,7 @@ in [Console dynamic plugins README](./README.md). [OCPBUGS-38734]: https://issues.redhat.com/browse/OCPBUGS-38734 [OCPBUGS-42985]: https://issues.redhat.com/browse/OCPBUGS-42985 [OCPBUGS-55323]: https://issues.redhat.com/browse/OCPBUGS-55323 +[OCPBUGS-61569]: https://issues.redhat.com/browse/OCPBUGS-61569 [#13188]: https://github.com/openshift/console/pull/13188 [#13388]: https://github.com/openshift/console/pull/13388 [#13521]: https://github.com/openshift/console/pull/13521 @@ -73,3 +78,4 @@ in [Console dynamic plugins README](./README.md). [#14167]: https://github.com/openshift/console/pull/14167 [#14300]: https://github.com/openshift/console/pull/14300 [#14993]: https://github.com/openshift/console/pull/14993 +[#15479]: https://github.com/openshift/console/pull/15479 From 21fc6766cf60971f873a7d6e0f569a798de04899 Mon Sep 17 00:00:00 2001 From: Leo6Leo <36619969+Leo6Leo@users.noreply.github.com> Date: Mon, 29 Sep 2025 11:46:33 -0400 Subject: [PATCH 102/102] Merge pull request #15523 from Leo6Leo/leo/ocpbugs/62083/4-19/auth-error-page [release-4.19] OCPBUGS-62083: `/auth/error?error=missing_state&error_type=auth` is showing blank page --- frontend/public/components/app.jsx | 2 +- frontend/public/components/error.tsx | 41 ++++++++++++++++++-------- frontend/public/locales/en/public.json | 9 +++--- 3 files changed, 34 insertions(+), 18 deletions(-) diff --git a/frontend/public/components/app.jsx b/frontend/public/components/app.jsx index 2a3745d8b6e..0bfdda10f32 100644 --- a/frontend/public/components/app.jsx +++ b/frontend/public/components/app.jsx @@ -310,7 +310,7 @@ const AppRouter = () => { - + } /> {standaloneRouteExtensions.map((e) => ( { case 'login_state_error': return t('public~There was an error generating login state.'); case 'cookie_error': - return t('public~There was an error setting login state cookie'); - case 'missing_code': - return t('public~Auth code is missing in query param.'); - case 'missing_state': - return t('public~There was an error parsing your state cookie'); - case 'invalid_code': - return t('public~There was an error logging you in. Please log out and try again.'); - case 'invalid_state': - return t('public~There was an error verifying your session. Please log out and try again.'); + return t('public~There was an error setting login state cookie.'); case 'logout_error': return t('public~There was an error logging you out. Please try again.'); + case 'auth': + // When the error type is set as auth + switch (error) { + case 'missing_state': + return t('public~There was an error parsing your state cookie.'); + case 'invalid_state': + return t( + 'public~There was an error verifying your session. Please log out and try again.', + ); + case 'missing_code': + return t('public~Auth code is missing in query param.'); + case 'invalid_code': + return t('public~There was an error logging you in. Please log out and try again.'); + default: + return t('public~There was an authentication error. Please log out and try again.'); + } default: return ( - + There was an authentication error with the system: {error} @@ -125,6 +135,7 @@ const LoginErrorMessage: React.FC = () => { export const AuthenticationErrorPage: React.FC = () => { const { t } = useTranslation(); const title = t('public~Authentication error'); + return ( <> @@ -143,9 +154,13 @@ export const AuthenticationErrorPage: React.FC = () => { - - {t('public~Try again')} - + + + + + ); diff --git a/frontend/public/locales/en/public.json b/frontend/public/locales/en/public.json index 16986fbab9a..a503907fa3e 100644 --- a/frontend/public/locales/en/public.json +++ b/frontend/public/locales/en/public.json @@ -514,12 +514,13 @@ "There was a problem processing the request. Please try again.": "There was a problem processing the request. Please try again.", "There was an error generating OAuth client from OIDC client.": "There was an error generating OAuth client from OIDC client.", "There was an error generating login state.": "There was an error generating login state.", - "There was an error setting login state cookie": "There was an error setting login state cookie", + "There was an error setting login state cookie.": "There was an error setting login state cookie.", + "There was an error logging you out. Please try again.": "There was an error logging you out. Please try again.", + "There was an error parsing your state cookie.": "There was an error parsing your state cookie.", + "There was an error verifying your session. Please log out and try again.": "There was an error verifying your session. Please log out and try again.", "Auth code is missing in query param.": "Auth code is missing in query param.", - "There was an error parsing your state cookie": "There was an error parsing your state cookie", "There was an error logging you in. Please log out and try again.": "There was an error logging you in. Please log out and try again.", - "There was an error verifying your session. Please log out and try again.": "There was an error verifying your session. Please log out and try again.", - "There was an error logging you out. Please try again.": "There was an error logging you out. Please try again.", + "There was an authentication error. Please log out and try again.": "There was an authentication error. Please log out and try again.", "There was an authentication error with the system:<1><0>{error}": "There was an authentication error with the system:<1><0>{error}", "Authentication error": "Authentication error", "Try again": "Try again",
    + {!developmentMode ? ( ) : ( name )} {version || DASH}{description || DASH} + + {version || DASH} + + {description || DASH} + + +