* [PATCH] drm/amdgpu: detect buffer overflow and avoid unnecessary dereference
@ 2018-05-29 10:17 Evan Quan
[not found] ` <1527589079-29021-1-git-send-email-evan.quan-5C7GfCeVMHo@public.gmane.org>
0 siblings, 1 reply; 5+ messages in thread
From: Evan Quan @ 2018-05-29 10:17 UTC (permalink / raw)
To: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW
Cc: alexander.deucher-5C7GfCeVMHo, ray.huang-5C7GfCeVMHo, Evan Quan
Change-Id: I6666d7dcf60acf524f290460d2ffe3f1f5f46354
Signed-off-by: Evan Quan <evan.quan@amd.com>
---
drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 15 +++++++++------
1 file changed, 9 insertions(+), 6 deletions(-)
diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c b/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c
index 7c5a850..5a86726 100644
--- a/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c
@@ -1838,13 +1838,15 @@ static void gfx_v9_1_parse_ind_reg_list(int *register_list_format,
int indirect_offset,
int list_size,
int *unique_indirect_regs,
- int *unique_indirect_reg_count,
+ int unique_indirect_reg_count,
int *indirect_start_offsets,
- int *indirect_start_offsets_count)
+ int *indirect_start_offsets_count,
+ int max_start_offsets_count)
{
int idx;
for (; indirect_offset < list_size; indirect_offset++) {
+ BUG_ON(*indirect_start_offsets_count >= max_start_offsets_count);
indirect_start_offsets[*indirect_start_offsets_count] = indirect_offset;
*indirect_start_offsets_count = *indirect_start_offsets_count + 1;
@@ -1852,14 +1854,14 @@ static void gfx_v9_1_parse_ind_reg_list(int *register_list_format,
indirect_offset += 2;
/* look for the matching indice */
- for (idx = 0; idx < *unique_indirect_reg_count; idx++) {
+ for (idx = 0; idx < unique_indirect_reg_count; idx++) {
if (unique_indirect_regs[idx] ==
register_list_format[indirect_offset] ||
!unique_indirect_regs[idx])
break;
}
- BUG_ON(idx >= *unique_indirect_reg_count);
+ BUG_ON(idx >= unique_indirect_reg_count);
if (!unique_indirect_regs[idx])
unique_indirect_regs[idx] = register_list_format[indirect_offset];
@@ -1894,9 +1896,10 @@ static int gfx_v9_1_init_rlc_save_restore_list(struct amdgpu_device *adev)
adev->gfx.rlc.reg_list_format_direct_reg_list_length,
adev->gfx.rlc.reg_list_format_size_bytes >> 2,
unique_indirect_regs,
- &unique_indirect_reg_count,
+ unique_indirect_reg_count,
indirect_start_offsets,
- &indirect_start_offsets_count);
+ &indirect_start_offsets_count,
+ ARRAY_SIZE(indirect_start_offsets));
/* enable auto inc in case it is disabled */
tmp = RREG32(SOC15_REG_OFFSET(GC, 0, mmRLC_SRM_CNTL));
--
2.7.4
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] drm/amdgpu: detect buffer overflow and avoid unnecessary dereference
[not found] ` <1527589079-29021-1-git-send-email-evan.quan-5C7GfCeVMHo@public.gmane.org>
@ 2018-05-29 15:49 ` Alex Deucher
[not found] ` <CADnq5_M_OENzFeG-ASrmWxxpiA8mTyXbYPJYf7xgAbSxGWQomQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2018-05-30 11:52 ` Huang Rui
1 sibling, 1 reply; 5+ messages in thread
From: Alex Deucher @ 2018-05-29 15:49 UTC (permalink / raw)
To: Evan Quan; +Cc: Deucher, Alexander, Huang Rui, amd-gfx list
On Tue, May 29, 2018 at 6:17 AM, Evan Quan <evan.quan@amd.com> wrote:
> Change-Id: I6666d7dcf60acf524f290460d2ffe3f1f5f46354
> Signed-off-by: Evan Quan <evan.quan@amd.com>
Please include a patch description as well. One comment below.
> ---
> drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 15 +++++++++------
> 1 file changed, 9 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c b/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c
> index 7c5a850..5a86726 100644
> --- a/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c
> +++ b/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c
> @@ -1838,13 +1838,15 @@ static void gfx_v9_1_parse_ind_reg_list(int *register_list_format,
> int indirect_offset,
> int list_size,
> int *unique_indirect_regs,
> - int *unique_indirect_reg_count,
> + int unique_indirect_reg_count,
> int *indirect_start_offsets,
> - int *indirect_start_offsets_count)
> + int *indirect_start_offsets_count,
> + int max_start_offsets_count)
> {
> int idx;
>
> for (; indirect_offset < list_size; indirect_offset++) {
> + BUG_ON(*indirect_start_offsets_count >= max_start_offsets_count);
Maybe this should be a WARN_ON and then we clamp the range?
Alex
> indirect_start_offsets[*indirect_start_offsets_count] = indirect_offset;
> *indirect_start_offsets_count = *indirect_start_offsets_count + 1;
>
> @@ -1852,14 +1854,14 @@ static void gfx_v9_1_parse_ind_reg_list(int *register_list_format,
> indirect_offset += 2;
>
> /* look for the matching indice */
> - for (idx = 0; idx < *unique_indirect_reg_count; idx++) {
> + for (idx = 0; idx < unique_indirect_reg_count; idx++) {
> if (unique_indirect_regs[idx] ==
> register_list_format[indirect_offset] ||
> !unique_indirect_regs[idx])
> break;
> }
>
> - BUG_ON(idx >= *unique_indirect_reg_count);
> + BUG_ON(idx >= unique_indirect_reg_count);
>
> if (!unique_indirect_regs[idx])
> unique_indirect_regs[idx] = register_list_format[indirect_offset];
> @@ -1894,9 +1896,10 @@ static int gfx_v9_1_init_rlc_save_restore_list(struct amdgpu_device *adev)
> adev->gfx.rlc.reg_list_format_direct_reg_list_length,
> adev->gfx.rlc.reg_list_format_size_bytes >> 2,
> unique_indirect_regs,
> - &unique_indirect_reg_count,
> + unique_indirect_reg_count,
> indirect_start_offsets,
> - &indirect_start_offsets_count);
> + &indirect_start_offsets_count,
> + ARRAY_SIZE(indirect_start_offsets));
>
> /* enable auto inc in case it is disabled */
> tmp = RREG32(SOC15_REG_OFFSET(GC, 0, mmRLC_SRM_CNTL));
> --
> 2.7.4
>
> _______________________________________________
> amd-gfx mailing list
> amd-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/amd-gfx
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
^ permalink raw reply [flat|nested] 5+ messages in thread
* RE: [PATCH] drm/amdgpu: detect buffer overflow and avoid unnecessary dereference
[not found] ` <CADnq5_M_OENzFeG-ASrmWxxpiA8mTyXbYPJYf7xgAbSxGWQomQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
@ 2018-05-30 4:20 ` Quan, Evan
[not found] ` <DM5PR1201MB2489D9A57F5D0EE86A66EC84E46C0-grEf7a3NxMAAZHT/xKzwlGrFom/aUZj6nBOFsp37pqbUKgpGm//BTAC/G2K4zDHf@public.gmane.org>
0 siblings, 1 reply; 5+ messages in thread
From: Quan, Evan @ 2018-05-30 4:20 UTC (permalink / raw)
To: Alex Deucher; +Cc: Deucher, Alexander, Huang, Ray, amd-gfx list
> Maybe this should be a WARN_ON and then we clamp the range?
>
According to the spec, it should store all indirect_start_offsets into the array.
And the current array should be enough.
So, if overflow occurred, it should be a bug case and BUG_ON seems more proper.
Regards,
Evan
> -----Original Message-----
> From: Alex Deucher [mailto:alexdeucher@gmail.com]
> Sent: Tuesday, May 29, 2018 11:50 PM
> To: Quan, Evan <Evan.Quan@amd.com>
> Cc: amd-gfx list <amd-gfx@lists.freedesktop.org>; Deucher, Alexander
> <Alexander.Deucher@amd.com>; Huang, Ray <Ray.Huang@amd.com>
> Subject: Re: [PATCH] drm/amdgpu: detect buffer overflow and avoid
> unnecessary dereference
>
> On Tue, May 29, 2018 at 6:17 AM, Evan Quan <evan.quan@amd.com> wrote:
> > Change-Id: I6666d7dcf60acf524f290460d2ffe3f1f5f46354
> > Signed-off-by: Evan Quan <evan.quan@amd.com>
>
> Please include a patch description as well. One comment below.
>
> > ---
> > drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 15 +++++++++------
> > 1 file changed, 9 insertions(+), 6 deletions(-)
> >
> > diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c
> b/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c
> > index 7c5a850..5a86726 100644
> > --- a/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c
> > +++ b/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c
> > @@ -1838,13 +1838,15 @@ static void gfx_v9_1_parse_ind_reg_list(int
> *register_list_format,
> > int indirect_offset,
> > int list_size,
> > int *unique_indirect_regs,
> > - int *unique_indirect_reg_count,
> > + int unique_indirect_reg_count,
> > int *indirect_start_offsets,
> > - int *indirect_start_offsets_count)
> > + int *indirect_start_offsets_count,
> > + int max_start_offsets_count)
> > {
> > int idx;
> >
> > for (; indirect_offset < list_size; indirect_offset++) {
> > + BUG_ON(*indirect_start_offsets_count >=
> max_start_offsets_count);
>
> Maybe this should be a WARN_ON and then we clamp the range?
>
> Alex
>
> > indirect_start_offsets[*indirect_start_offsets_count] =
> indirect_offset;
> > *indirect_start_offsets_count = *indirect_start_offsets_count + 1;
> >
> > @@ -1852,14 +1854,14 @@ static void gfx_v9_1_parse_ind_reg_list(int
> *register_list_format,
> > indirect_offset += 2;
> >
> > /* look for the matching indice */
> > - for (idx = 0; idx < *unique_indirect_reg_count; idx++) {
> > + for (idx = 0; idx < unique_indirect_reg_count; idx++) {
> > if (unique_indirect_regs[idx] ==
> > register_list_format[indirect_offset] ||
> > !unique_indirect_regs[idx])
> > break;
> > }
> >
> > - BUG_ON(idx >= *unique_indirect_reg_count);
> > + BUG_ON(idx >= unique_indirect_reg_count);
> >
> > if (!unique_indirect_regs[idx])
> > unique_indirect_regs[idx] =
> register_list_format[indirect_offset];
> > @@ -1894,9 +1896,10 @@ static int
> gfx_v9_1_init_rlc_save_restore_list(struct amdgpu_device *adev)
> > adev->gfx.rlc.reg_list_format_direct_reg_list_length,
> > adev->gfx.rlc.reg_list_format_size_bytes >> 2,
> > unique_indirect_regs,
> > - &unique_indirect_reg_count,
> > + unique_indirect_reg_count,
> > indirect_start_offsets,
> > - &indirect_start_offsets_count);
> > + &indirect_start_offsets_count,
> > + ARRAY_SIZE(indirect_start_offsets));
> >
> > /* enable auto inc in case it is disabled */
> > tmp = RREG32(SOC15_REG_OFFSET(GC, 0, mmRLC_SRM_CNTL));
> > --
> > 2.7.4
> >
> > _______________________________________________
> > amd-gfx mailing list
> > amd-gfx@lists.freedesktop.org
> > https://lists.freedesktop.org/mailman/listinfo/amd-gfx
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] drm/amdgpu: detect buffer overflow and avoid unnecessary dereference
[not found] ` <DM5PR1201MB2489D9A57F5D0EE86A66EC84E46C0-grEf7a3NxMAAZHT/xKzwlGrFom/aUZj6nBOFsp37pqbUKgpGm//BTAC/G2K4zDHf@public.gmane.org>
@ 2018-05-30 8:00 ` Christian König
0 siblings, 0 replies; 5+ messages in thread
From: Christian König @ 2018-05-30 8:00 UTC (permalink / raw)
To: Quan, Evan, Alex Deucher; +Cc: Deucher, Alexander, Huang, Ray, amd-gfx list
Am 30.05.2018 um 06:20 schrieb Quan, Evan:
>> Maybe this should be a WARN_ON and then we clamp the range?
>>
> According to the spec, it should store all indirect_start_offsets into the array.
> And the current array should be enough.
> So, if overflow occurred, it should be a bug case and BUG_ON seems more proper.
I have no idea what the code does, but BUG_ON is usually only justified
if you need to prevent data loss or system corruption (or run into a
NULL pointer exception later on anyway or other stuff like that).
If you can safely abort whatever the code does and return an error then
WARN_ON is more appropriate.
Regards,
Christian.
>
> Regards,
> Evan
>> -----Original Message-----
>> From: Alex Deucher [mailto:alexdeucher@gmail.com]
>> Sent: Tuesday, May 29, 2018 11:50 PM
>> To: Quan, Evan <Evan.Quan@amd.com>
>> Cc: amd-gfx list <amd-gfx@lists.freedesktop.org>; Deucher, Alexander
>> <Alexander.Deucher@amd.com>; Huang, Ray <Ray.Huang@amd.com>
>> Subject: Re: [PATCH] drm/amdgpu: detect buffer overflow and avoid
>> unnecessary dereference
>>
>> On Tue, May 29, 2018 at 6:17 AM, Evan Quan <evan.quan@amd.com> wrote:
>>> Change-Id: I6666d7dcf60acf524f290460d2ffe3f1f5f46354
>>> Signed-off-by: Evan Quan <evan.quan@amd.com>
>> Please include a patch description as well. One comment below.
>>
>>> ---
>>> drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 15 +++++++++------
>>> 1 file changed, 9 insertions(+), 6 deletions(-)
>>>
>>> diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c
>> b/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c
>>> index 7c5a850..5a86726 100644
>>> --- a/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c
>>> +++ b/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c
>>> @@ -1838,13 +1838,15 @@ static void gfx_v9_1_parse_ind_reg_list(int
>> *register_list_format,
>>> int indirect_offset,
>>> int list_size,
>>> int *unique_indirect_regs,
>>> - int *unique_indirect_reg_count,
>>> + int unique_indirect_reg_count,
>>> int *indirect_start_offsets,
>>> - int *indirect_start_offsets_count)
>>> + int *indirect_start_offsets_count,
>>> + int max_start_offsets_count)
>>> {
>>> int idx;
>>>
>>> for (; indirect_offset < list_size; indirect_offset++) {
>>> + BUG_ON(*indirect_start_offsets_count >=
>> max_start_offsets_count);
>>
>> Maybe this should be a WARN_ON and then we clamp the range?
>>
>> Alex
>>
>>> indirect_start_offsets[*indirect_start_offsets_count] =
>> indirect_offset;
>>> *indirect_start_offsets_count = *indirect_start_offsets_count + 1;
>>>
>>> @@ -1852,14 +1854,14 @@ static void gfx_v9_1_parse_ind_reg_list(int
>> *register_list_format,
>>> indirect_offset += 2;
>>>
>>> /* look for the matching indice */
>>> - for (idx = 0; idx < *unique_indirect_reg_count; idx++) {
>>> + for (idx = 0; idx < unique_indirect_reg_count; idx++) {
>>> if (unique_indirect_regs[idx] ==
>>> register_list_format[indirect_offset] ||
>>> !unique_indirect_regs[idx])
>>> break;
>>> }
>>>
>>> - BUG_ON(idx >= *unique_indirect_reg_count);
>>> + BUG_ON(idx >= unique_indirect_reg_count);
>>>
>>> if (!unique_indirect_regs[idx])
>>> unique_indirect_regs[idx] =
>> register_list_format[indirect_offset];
>>> @@ -1894,9 +1896,10 @@ static int
>> gfx_v9_1_init_rlc_save_restore_list(struct amdgpu_device *adev)
>>> adev->gfx.rlc.reg_list_format_direct_reg_list_length,
>>> adev->gfx.rlc.reg_list_format_size_bytes >> 2,
>>> unique_indirect_regs,
>>> - &unique_indirect_reg_count,
>>> + unique_indirect_reg_count,
>>> indirect_start_offsets,
>>> - &indirect_start_offsets_count);
>>> + &indirect_start_offsets_count,
>>> + ARRAY_SIZE(indirect_start_offsets));
>>>
>>> /* enable auto inc in case it is disabled */
>>> tmp = RREG32(SOC15_REG_OFFSET(GC, 0, mmRLC_SRM_CNTL));
>>> --
>>> 2.7.4
>>>
>>> _______________________________________________
>>> amd-gfx mailing list
>>> amd-gfx@lists.freedesktop.org
>>> https://lists.freedesktop.org/mailman/listinfo/amd-gfx
> _______________________________________________
> amd-gfx mailing list
> amd-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/amd-gfx
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] drm/amdgpu: detect buffer overflow and avoid unnecessary dereference
[not found] ` <1527589079-29021-1-git-send-email-evan.quan-5C7GfCeVMHo@public.gmane.org>
2018-05-29 15:49 ` Alex Deucher
@ 2018-05-30 11:52 ` Huang Rui
1 sibling, 0 replies; 5+ messages in thread
From: Huang Rui @ 2018-05-30 11:52 UTC (permalink / raw)
To: Evan Quan
Cc: alexander.deucher-5C7GfCeVMHo, amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW
On Tue, May 29, 2018 at 06:17:59PM +0800, Evan Quan wrote:
> Change-Id: I6666d7dcf60acf524f290460d2ffe3f1f5f46354
Need a commit log even it is very short.
> Signed-off-by: Evan Quan <evan.quan@amd.com>
> ---
> drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 15 +++++++++------
> 1 file changed, 9 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c b/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c
> index 7c5a850..5a86726 100644
> --- a/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c
> +++ b/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c
> @@ -1838,13 +1838,15 @@ static void gfx_v9_1_parse_ind_reg_list(int *register_list_format,
> int indirect_offset,
> int list_size,
> int *unique_indirect_regs,
> - int *unique_indirect_reg_count,
> + int unique_indirect_reg_count,
> int *indirect_start_offsets,
> - int *indirect_start_offsets_count)
> + int *indirect_start_offsets_count,
> + int max_start_offsets_count)
> {
> int idx;
>
> for (; indirect_offset < list_size; indirect_offset++) {
> + BUG_ON(*indirect_start_offsets_count >= max_start_offsets_count);
The same comments with Christian and Alex, here we would better use
WARN_ON.
With that fixed, feel free to add
Reviewed-by: Huang Rui <ray.huang@amd.com>
> indirect_start_offsets[*indirect_start_offsets_count] = indirect_offset;
> *indirect_start_offsets_count = *indirect_start_offsets_count + 1;
>
> @@ -1852,14 +1854,14 @@ static void gfx_v9_1_parse_ind_reg_list(int *register_list_format,
> indirect_offset += 2;
>
> /* look for the matching indice */
> - for (idx = 0; idx < *unique_indirect_reg_count; idx++) {
> + for (idx = 0; idx < unique_indirect_reg_count; idx++) {
> if (unique_indirect_regs[idx] ==
> register_list_format[indirect_offset] ||
> !unique_indirect_regs[idx])
> break;
> }
>
> - BUG_ON(idx >= *unique_indirect_reg_count);
> + BUG_ON(idx >= unique_indirect_reg_count);
>
> if (!unique_indirect_regs[idx])
> unique_indirect_regs[idx] = register_list_format[indirect_offset];
> @@ -1894,9 +1896,10 @@ static int gfx_v9_1_init_rlc_save_restore_list(struct amdgpu_device *adev)
> adev->gfx.rlc.reg_list_format_direct_reg_list_length,
> adev->gfx.rlc.reg_list_format_size_bytes >> 2,
> unique_indirect_regs,
> - &unique_indirect_reg_count,
> + unique_indirect_reg_count,
> indirect_start_offsets,
> - &indirect_start_offsets_count);
> + &indirect_start_offsets_count,
> + ARRAY_SIZE(indirect_start_offsets));
>
> /* enable auto inc in case it is disabled */
> tmp = RREG32(SOC15_REG_OFFSET(GC, 0, mmRLC_SRM_CNTL));
> --
> 2.7.4
>
> _______________________________________________
> amd-gfx mailing list
> amd-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/amd-gfx
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2018-05-30 11:52 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-05-29 10:17 [PATCH] drm/amdgpu: detect buffer overflow and avoid unnecessary dereference Evan Quan
[not found] ` <1527589079-29021-1-git-send-email-evan.quan-5C7GfCeVMHo@public.gmane.org>
2018-05-29 15:49 ` Alex Deucher
[not found] ` <CADnq5_M_OENzFeG-ASrmWxxpiA8mTyXbYPJYf7xgAbSxGWQomQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2018-05-30 4:20 ` Quan, Evan
[not found] ` <DM5PR1201MB2489D9A57F5D0EE86A66EC84E46C0-grEf7a3NxMAAZHT/xKzwlGrFom/aUZj6nBOFsp37pqbUKgpGm//BTAC/G2K4zDHf@public.gmane.org>
2018-05-30 8:00 ` Christian König
2018-05-30 11:52 ` Huang Rui
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.